11#ifndef POLLY_ISL_EXPR_BUILDER_H
12#define POLLY_ISL_EXPR_BUILDER_H
20template <>
struct PointerLikeTypeTraits<
isl_id *> {
27 static constexpr int NumLowBitsAvailable = 0;
84 typedef llvm::MapVector<isl_id *, llvm::AssertingVH<llvm::Value>>
IDToValueTy;
124 llvm::ScalarEvolution &
SE, llvm::DominatorTree &DT,
125 llvm::LoopInfo &LI, llvm::BasicBlock *
StartBlock);
129 llvm::LoopInfo *
GenLI, llvm::ScalarEvolution *
GenSE);
180 std::pair<llvm::Value *, llvm::Type *>
210 const llvm::DataLayout &
DL;
211 llvm::ScalarEvolution &
SE;
242 llvm::Value *
createBinOp(llvm::BinaryOperator::BinaryOps Opc,
243 llvm::Value *LHS, llvm::Value *RHS,
244 const llvm::Twine &Name);
253 llvm::Value *
createAdd(llvm::Value *LHS, llvm::Value *RHS,
254 const llvm::Twine &Name =
"");
263 llvm::Value *
createSub(llvm::Value *LHS, llvm::Value *RHS,
264 const llvm::Twine &Name =
"");
273 llvm::Value *
createMul(llvm::Value *LHS, llvm::Value *RHS,
274 const llvm::Twine &Name =
"");
LLVM-IR generator for isl_ast_expr[essions].
llvm::BasicBlock * StartBlock
bool hasLargeInts(isl::ast_expr Expr)
Check if an Expr contains integer constants larger than 64 bit.
void setIDToSAI(IDToScopArrayInfoTy *NewIDToSAI)
Set the isl_id to ScopArrayInfo map.
llvm::Value * createAdd(llvm::Value *LHS, llvm::Value *RHS, const llvm::Twine &Name="")
Create an addition and track overflows if requested.
llvm::Value * createOpBoolean(__isl_take isl_ast_expr *Expr)
llvm::Value * createOpICmp(__isl_take isl_ast_expr *Expr)
llvm::Value * createBinOp(llvm::BinaryOperator::BinaryOps Opc, llvm::Value *LHS, llvm::Value *RHS, const llvm::Twine &Name)
Create a binary operation Opc and track overflows if requested.
llvm::ScalarEvolution * GenSE
IDToScopArrayInfoTy * IDToSAI
A map from isl_ids to ScopArrayInfo objects.
llvm::Value * createOpAccess(__isl_take isl_ast_expr *Expr)
void setTrackOverflow(bool Enable)
Change if runtime overflows are tracked or not.
llvm::Value * getOverflowState() const
Return the current overflow status or nullptr if it is not tracked.
const llvm::DataLayout & DL
llvm::DominatorTree * GenDT
Relates to the region where the code is emitted into.
llvm::MapVector< isl_id *, llvm::AssertingVH< llvm::Value > > IDToValueTy
A map from isl_ids to llvm::Values.
llvm::Value * create(__isl_take isl_ast_expr *Expr)
Create LLVM-IR for an isl_ast_expr[ession].
llvm::Type * getWidestType(llvm::Type *T1, llvm::Type *T2)
Return the largest of two types.
std::pair< llvm::Value *, llvm::Type * > createAccessAddress(__isl_take isl_ast_expr *Expr)
Create LLVM-IR that computes the memory location of an access expression.
llvm::Value * createOpAddressOf(__isl_take isl_ast_expr *Expr)
llvm::Value * createMul(llvm::Value *LHS, llvm::Value *RHS, const llvm::Twine &Name="")
Create a multiplication and track overflows if requested.
llvm::Value * OverflowState
Flag that will be set if an overflow occurred at runtime.
llvm::Value * createOpNAry(__isl_take isl_ast_expr *Expr)
llvm::MapVector< isl_id *, const ScopArrayInfo * > IDToScopArrayInfoTy
llvm::IntegerType * getType(__isl_keep isl_ast_expr *Expr)
Return the type with which this expression should be computed.
llvm::Value * createOpBooleanConditional(__isl_take isl_ast_expr *Expr)
llvm::ScalarEvolution & SE
llvm::Value * createOpSelect(__isl_take isl_ast_expr *Expr)
void switchGeneratedFunc(llvm::Function *GenFn, llvm::DominatorTree *GenDT, llvm::LoopInfo *GenLI, llvm::ScalarEvolution *GenSE)
Change the function that code is emitted into.
llvm::Value * createOp(__isl_take isl_ast_expr *Expr)
llvm::Value * createOpUnary(__isl_take isl_ast_expr *Expr)
llvm::Value * createInt(__isl_take isl_ast_expr *Expr)
llvm::Value * createId(__isl_take isl_ast_expr *Expr)
llvm::Value * createSub(llvm::Value *LHS, llvm::Value *RHS, const llvm::Twine &Name="")
Create a subtraction and track overflows if requested.
llvm::Value * createOpBin(__isl_take isl_ast_expr *Expr)
This file contains the declaration of the PolyhedralInfo class, which will provide an interface to ex...
llvm::IRBuilder< llvm::ConstantFolder, IRInserter > PollyIRBuilder
llvm::DenseMap< llvm::AssertingVH< llvm::Value >, llvm::AssertingVH< llvm::Value > > ValueMapT
Type to remap values.
static const void * getAsVoidPointer(isl_id *P)
static const Region * getFromVoidPointer(void *P)