[PATCH] D96694: Use LoopRotate PrepareForLTO stage in NPM
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 16 08:50:53 PST 2021
fhahn added a comment.
This matches the behavior in the legacy pass manager. LGTM, thanks!
================
Comment at: llvm/lib/Passes/PassBuilder.cpp:519
+// Helper to check the current compilation phase
+static bool isLTOPreLink(ThinOrFullLTOPhase Phase) {
----------------
nit: The helper specifically checks for the 'pre-lto' stage, might be good to clarify in the comment, e.g. something like `Helper to check if the current compilation phase is preparing for LTO`
================
Comment at: llvm/lib/Passes/PassBuilder.cpp:521
+static bool isLTOPreLink(ThinOrFullLTOPhase Phase) {
+ switch (Phase) {
+ case ThinOrFullLTOPhase::ThinLTOPreLink:
----------------
nit: might be slightly simpler to just have `return Phase == ThinOrFullLTOPhase::ThinLTOPreLink || Phase == ThinOrFullLTOPhase::ThinLTOPreLink;`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96694/new/
https://reviews.llvm.org/D96694
More information about the llvm-commits
mailing list