14#ifndef POLLY_CODEGEN_IRBUILDER_H
15#define POLLY_CODEGEN_IRBUILDER_H
17#include "llvm/ADT/MapVector.h"
18#include "llvm/IR/IRBuilder.h"
53 void pushLoop(llvm::Loop *L,
bool IsParallel);
77 llvm::DenseMap<llvm::AssertingVH<llvm::Value>,
78 llvm::AssertingVH<llvm::Value>> &NewMap) {
94 llvm::ScalarEvolution *
SE;
106 llvm::MapVector<llvm::AssertingVH<llvm::Value>, llvm::MDNode *>
AliasScopeMap;
109 llvm::DenseMap<llvm::AssertingVH<llvm::Value>, llvm::MDNode *>
112 llvm::DenseMap<llvm::AssertingVH<llvm::Value>, llvm::AssertingVH<llvm::Value>>
120class IRInserter final :
public llvm::IRBuilderDefaultInserter {
126 llvm::BasicBlock::iterator InsertPt)
const override {
127 llvm::IRBuilderDefaultInserter::InsertHelper(I, Name, InsertPt);
static bool IsLoopVectorizerDisabled(isl::ast_node_for Node)
Restore the initial ordering of dimensions of the band node.
Add Polly specifics when running IRBuilder.
ScopAnnotator * Annotator
void InsertHelper(llvm::Instruction *I, const llvm::Twine &Name, llvm::BasicBlock::iterator InsertPt) const override
IRInserter(ScopAnnotator &A)
Helper class to annotate newly generated SCoPs with metadata.
llvm::SmallVector< BandAttr *, 8 > LoopAttrEnv
Stack for surrounding BandAttr annotations.
llvm::SmallVector< llvm::MDNode *, 8 > ParallelLoops
Access groups for the parallel loops currently under construction.
void resetAlternativeAliasBases()
Delete the set of alternative alias bases.
llvm::DenseMap< llvm::AssertingVH< llvm::Value >, llvm::MDNode * > OtherAliasScopeListMap
A map from base pointers to an alias scope list of other pointers.
BandAttr *& getStagingAttrEnv()
void buildAliasScopes(Scop &S)
Build all alias scopes for the given SCoP.
void annotate(llvm::Instruction *I)
Annotate the new instruction I for all parallel loops.
llvm::MapVector< llvm::AssertingVH< llvm::Value >, llvm::MDNode * > AliasScopeMap
A map from base pointers to its alias scope.
llvm::ScalarEvolution * SE
The ScalarEvolution analysis we use to find base pointers.
void annotateLoopLatch(llvm::BranchInst *B, llvm::Loop *L, bool IsParallel, bool IsLoopVectorizerDisabled) const
Annotate the loop latch B wrt. L.
llvm::DenseMap< llvm::AssertingVH< llvm::Value >, llvm::AssertingVH< llvm::Value > > AlternativeAliasBases
void pushLoop(llvm::Loop *L, bool IsParallel)
Add a new loop L which is parallel if IsParallel is true.
void addAlternativeAliasBases(llvm::DenseMap< llvm::AssertingVH< llvm::Value >, llvm::AssertingVH< llvm::Value > > &NewMap)
Add alternative alias based pointers.
llvm::SmallVector< llvm::Loop *, 8 > ActiveLoops
All loops currently under construction.
void popLoop(bool isParallel)
Remove the last added loop.
BandAttr * getActiveAttrEnv() const
llvm::MDNode * AliasScopeDomain
The alias scope domain for the current SCoP.
This file contains the declaration of the PolyhedralInfo class, which will provide an interface to ex...
llvm::IRBuilder< llvm::ConstantFolder, IRInserter > PollyIRBuilder
Represent the attributes of a loop.