diff options
author | Nikita Popov <llvm@npopov.com> | 2024-06-29 15:05:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-29 15:05:04 +0200 |
commit | 74deadf19650f6f3b6392ba09caa20dd38ae41e0 (patch) | |
tree | 1ed9b668dc890fa0818728c4042d78830864c932 /polly | |
parent | 02b60893c3858d5d76cdca1bd9b684bdd7093fb7 (diff) | |
download | llvm-74deadf19650f6f3b6392ba09caa20dd38ae41e0.zip llvm-74deadf19650f6f3b6392ba09caa20dd38ae41e0.tar.gz llvm-74deadf19650f6f3b6392ba09caa20dd38ae41e0.tar.bz2 |
[IRBuilder] Don't include Module.h (NFC) (#97159)
This used to be necessary to fetch the DataLayout, but isn't anymore.
Diffstat (limited to 'polly')
-rw-r--r-- | polly/lib/CodeGen/BlockGenerators.cpp | 4 | ||||
-rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 4 | ||||
-rw-r--r-- | polly/lib/CodeGen/PerfMonitor.cpp | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp index da0e503..f7c777b 100644 --- a/polly/lib/CodeGen/BlockGenerators.cpp +++ b/polly/lib/CodeGen/BlockGenerators.cpp @@ -81,7 +81,7 @@ Value *BlockGenerator::trySynthesizeNewValue(ScopStmt &Stmt, Value *Old, VTV.insert(GlobalMap.begin(), GlobalMap.end()); Scop &S = *Stmt.getParent(); - const DataLayout &DL = S.getFunction().getParent()->getDataLayout(); + const DataLayout &DL = S.getFunction().getDataLayout(); auto IP = Builder.GetInsertPoint(); assert(IP != Builder.GetInsertBlock()->end() && @@ -492,7 +492,7 @@ Value *BlockGenerator::getOrCreateAlloca(const ScopArrayInfo *Array) { else NameExt = ".s2a"; - const DataLayout &DL = Builder.GetInsertBlock()->getModule()->getDataLayout(); + const DataLayout &DL = Builder.GetInsertBlock()->getDataLayout(); Addr = new AllocaInst(Ty, DL.getAllocaAddrSpace(), nullptr, diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index c4ca3f2..8813cfd 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -198,7 +198,7 @@ static bool generateCode(Scop &S, IslAstInfo &AI, LoopInfo &LI, auto ScopStats = S.getStatistics(); ScopsProcessed++; - auto &DL = S.getFunction().getParent()->getDataLayout(); + auto &DL = S.getFunction().getDataLayout(); Region *R = &S.getRegion(); assert(!R->isTopLevelRegion() && "Top level regions are not supported"); @@ -328,7 +328,7 @@ public: LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree(); SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE(); - DL = &S.getFunction().getParent()->getDataLayout(); + DL = &S.getFunction().getDataLayout(); RI = &getAnalysis<RegionInfoPass>().getRegionInfo(); return generateCode(S, *AI, *LI, *DT, *SE, *RI); } diff --git a/polly/lib/CodeGen/PerfMonitor.cpp b/polly/lib/CodeGen/PerfMonitor.cpp index 056d5b3..3cad853 100644 --- a/polly/lib/CodeGen/PerfMonitor.cpp +++ b/polly/lib/CodeGen/PerfMonitor.cpp @@ -13,6 +13,7 @@ #include "polly/ScopInfo.h" #include "llvm/ADT/Twine.h" #include "llvm/IR/IntrinsicsX86.h" +#include "llvm/IR/Module.h" #include "llvm/TargetParser/Triple.h" using namespace llvm; |