//===---- llvm/Analysis/ScalarEvolutionExpander.h - SCEV Exprs --*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file defines the classes used to generate code from scalar expressions. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_UTILS_SCALAREVOLUTIONEXPANDER_H #define LLVM_TRANSFORMS_UTILS_SCALAREVOLUTIONEXPANDER_H #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Analysis/InstSimplifyFolder.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/Analysis/ScalarEvolutionNormalization.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/ValueHandle.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/InstructionCost.h" namespace llvm { extern cl::opt<unsigned> SCEVCheapExpansionBudget; /// struct for holding enough information to help calculate the cost of the /// given SCEV when expanded into IR. struct SCEVOperand { … }; struct PoisonFlags { … }; /// This class uses information about analyze scalars to rewrite expressions /// in canonical form. /// /// Clients should create an instance of this class when rewriting is needed, /// and destroy it when finished to allow the release of the associated /// memory. class SCEVExpander : public SCEVVisitor<SCEVExpander, Value *> { … }; /// Helper to remove instructions inserted during SCEV expansion, unless they /// are marked as used. class SCEVExpanderCleaner { … }; } // namespace llvm #endif