[IRBuilder] Don't include Module.h (NFC) (#97159)

This used to be necessary to fetch the DataLayout, but isn't anymore.

GitOrigin-RevId: 74deadf19650f6f3b6392ba09caa20dd38ae41e0
diff --git a/lib/CodeGen/BlockGenerators.cpp b/lib/CodeGen/BlockGenerators.cpp
index da0e503..f7c777b 100644
--- a/lib/CodeGen/BlockGenerators.cpp
+++ b/lib/CodeGen/BlockGenerators.cpp
@@ -81,7 +81,7 @@
   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 @@
   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/lib/CodeGen/CodeGeneration.cpp b/lib/CodeGen/CodeGeneration.cpp
index c4ca3f2..8813cfd 100644
--- a/lib/CodeGen/CodeGeneration.cpp
+++ b/lib/CodeGen/CodeGeneration.cpp
@@ -198,7 +198,7 @@
   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 @@
     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/lib/CodeGen/PerfMonitor.cpp b/lib/CodeGen/PerfMonitor.cpp
index 056d5b3..3cad853 100644
--- a/lib/CodeGen/PerfMonitor.cpp
+++ b/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;