[llvm] 0187960 - [Scalar] Use LLVMContext::MD_mem_parallel_loop_access (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 15 00:14:20 PDT 2023
Author: Kazu Hirata
Date: 2023-10-15T00:14:14-07:00
New Revision: 0187960cdd0cc640317b29a2f25a0c30df3f68ef
URL: https://github.com/llvm/llvm-project/commit/0187960cdd0cc640317b29a2f25a0c30df3f68ef
DIFF: https://github.com/llvm/llvm-project/commit/0187960cdd0cc640317b29a2f25a0c30df3f68ef.diff
LOG: [Scalar] Use LLVMContext::MD_mem_parallel_loop_access (NFC)
Added:
Modified:
llvm/lib/Transforms/Scalar/Scalarizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/Scalarizer.cpp b/llvm/lib/Transforms/Scalar/Scalarizer.cpp
index 14df394e2b41556..111c477337535f0 100644
--- a/llvm/lib/Transforms/Scalar/Scalarizer.cpp
+++ b/llvm/lib/Transforms/Scalar/Scalarizer.cpp
@@ -447,11 +447,9 @@ bool ScalarizerLegacyPass::runOnFunction(Function &F) {
if (skipFunction(F))
return false;
- Module &M = *F.getParent();
- unsigned ParallelLoopAccessMDKind =
- M.getContext().getMDKindID("llvm.mem.parallel_loop_access");
DominatorTree *DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
- ScalarizerVisitor Impl(ParallelLoopAccessMDKind, DT, ScalarizerPassOptions());
+ ScalarizerVisitor Impl(LLVMContext::MD_mem_parallel_loop_access, DT,
+ ScalarizerPassOptions());
return Impl.visit(F);
}
@@ -1254,11 +1252,8 @@ bool ScalarizerVisitor::finish() {
}
PreservedAnalyses ScalarizerPass::run(Function &F, FunctionAnalysisManager &AM) {
- Module &M = *F.getParent();
- unsigned ParallelLoopAccessMDKind =
- M.getContext().getMDKindID("llvm.mem.parallel_loop_access");
DominatorTree *DT = &AM.getResult<DominatorTreeAnalysis>(F);
- ScalarizerVisitor Impl(ParallelLoopAccessMDKind, DT, Options);
+ ScalarizerVisitor Impl(LLVMContext::MD_mem_parallel_loop_access, DT, Options);
bool Changed = Impl.visit(F);
PreservedAnalyses PA;
PA.preserve<DominatorTreeAnalysis>();
More information about the llvm-commits
mailing list