Skip to content

Commit 0187960

Browse files
[Scalar] Use LLVMContext::MD_mem_parallel_loop_access (NFC)
1 parent 3c4ecc4 commit 0187960

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

llvm/lib/Transforms/Scalar/Scalarizer.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -447,11 +447,9 @@ bool ScalarizerLegacyPass::runOnFunction(Function &F) {
447447
if (skipFunction(F))
448448
return false;
449449

450-
Module &M = *F.getParent();
451-
unsigned ParallelLoopAccessMDKind =
452-
M.getContext().getMDKindID("llvm.mem.parallel_loop_access");
453450
DominatorTree *DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
454-
ScalarizerVisitor Impl(ParallelLoopAccessMDKind, DT, ScalarizerPassOptions());
451+
ScalarizerVisitor Impl(LLVMContext::MD_mem_parallel_loop_access, DT,
452+
ScalarizerPassOptions());
455453
return Impl.visit(F);
456454
}
457455

@@ -1254,11 +1252,8 @@ bool ScalarizerVisitor::finish() {
12541252
}
12551253

12561254
PreservedAnalyses ScalarizerPass::run(Function &F, FunctionAnalysisManager &AM) {
1257-
Module &M = *F.getParent();
1258-
unsigned ParallelLoopAccessMDKind =
1259-
M.getContext().getMDKindID("llvm.mem.parallel_loop_access");
12601255
DominatorTree *DT = &AM.getResult<DominatorTreeAnalysis>(F);
1261-
ScalarizerVisitor Impl(ParallelLoopAccessMDKind, DT, Options);
1256+
ScalarizerVisitor Impl(LLVMContext::MD_mem_parallel_loop_access, DT, Options);
12621257
bool Changed = Impl.visit(F);
12631258
PreservedAnalyses PA;
12641259
PA.preserve<DominatorTreeAnalysis>();

0 commit comments

Comments
 (0)