[PATCH] D108155: [PassBuilder] Use loop-mssa for licm
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 17 12:23:31 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf58a642da19c: [PassBuilder] Use loop-mssa for licm (authored by nikic).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108155/new/
https://reviews.llvm.org/D108155
Files:
llvm/lib/Passes/PassBuilder.cpp
Index: llvm/lib/Passes/PassBuilder.cpp
===================================================================
--- llvm/lib/Passes/PassBuilder.cpp
+++ llvm/lib/Passes/PassBuilder.cpp
@@ -2416,15 +2416,19 @@
}
template <typename CallbacksT>
-static bool isLoopPassName(StringRef Name, CallbacksT &Callbacks) {
- // Explicitly handle pass manager names.
- if (Name == "loop" || Name == "loop-mssa")
- return true;
+static bool isLoopPassName(StringRef Name, CallbacksT &Callbacks,
+ bool &UseMemorySSA) {
+ UseMemorySSA = false;
// Explicitly handle custom-parsed pass names.
if (parseRepeatPassName(Name))
return true;
+ if (Name == "licm") {
+ UseMemorySSA = true;
+ return true;
+ }
+
#define LOOP_PASS(NAME, CREATE_PASS) \
if (Name == NAME) \
return true;
@@ -3013,13 +3017,16 @@
StringRef FirstName = Pipeline->front().Name;
if (!isModulePassName(FirstName, ModulePipelineParsingCallbacks)) {
+ bool UseMemorySSA;
if (isCGSCCPassName(FirstName, CGSCCPipelineParsingCallbacks)) {
Pipeline = {{"cgscc", std::move(*Pipeline)}};
} else if (isFunctionPassName(FirstName,
FunctionPipelineParsingCallbacks)) {
Pipeline = {{"function", std::move(*Pipeline)}};
- } else if (isLoopPassName(FirstName, LoopPipelineParsingCallbacks)) {
- Pipeline = {{"function", {{"loop", std::move(*Pipeline)}}}};
+ } else if (isLoopPassName(FirstName, LoopPipelineParsingCallbacks,
+ UseMemorySSA)) {
+ Pipeline = {{"function", {{UseMemorySSA ? "loop-mssa" : "loop",
+ std::move(*Pipeline)}}}};
} else {
for (auto &C : TopLevelPipelineParsingCallbacks)
if (C(MPM, *Pipeline))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108155.366981.patch
Type: text/x-patch
Size: 1886 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210817/1563dca6/attachment.bin>
More information about the llvm-commits
mailing list