[llvm] [IR] Add getDataLayout() helpers to BasicBlock and Instruction (PR #96902)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 06:49:27 PDT 2024


================
@@ -172,7 +172,7 @@ static void addBlockAndPredsToSet(BasicBlock *InputBB, BasicBlock *StopBlock,
 /// us how to partition the loops.
 static PHINode *findPHIToPartitionLoops(Loop *L, DominatorTree *DT,
                                         AssumptionCache *AC) {
-  const DataLayout &DL = L->getHeader()->getModule()->getDataLayout();
+  const DataLayout &DL = L->getHeader()->getDataLayout();
----------------
dtcxzyw wrote:

Do we need an `Loop::getDataLayout`?


https://github.com/llvm/llvm-project/pull/96902


More information about the llvm-commits mailing list