[llvm] 79c00d3 - [NPM] Make AddDiscriminators pass required
Yuanfang Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 7 17:02:51 PDT 2021
Author: Yuanfang Chen
Date: 2021-09-07T17:02:24-07:00
New Revision: 79c00d3f544078f6510b26971699a8c776021a72
URL: https://github.com/llvm/llvm-project/commit/79c00d3f544078f6510b26971699a8c776021a72
DIFF: https://github.com/llvm/llvm-project/commit/79c00d3f544078f6510b26971699a8c776021a72.diff
LOG: [NPM] Make AddDiscriminators pass required
This is to make sure the pass is not skipped at O0 where optnone is
applied to functions by default.
Added:
Modified:
llvm/include/llvm/Transforms/Utils/AddDiscriminators.h
llvm/test/Transforms/AddDiscriminators/basic.ll
Removed:
################################################################################
diff --git a/llvm/include/llvm/Transforms/Utils/AddDiscriminators.h b/llvm/include/llvm/Transforms/Utils/AddDiscriminators.h
index f512c6c063319..0aee2fe95cad3 100644
--- a/llvm/include/llvm/Transforms/Utils/AddDiscriminators.h
+++ b/llvm/include/llvm/Transforms/Utils/AddDiscriminators.h
@@ -24,6 +24,7 @@ class Function;
class AddDiscriminatorsPass : public PassInfoMixin<AddDiscriminatorsPass> {
public:
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
+ static bool isRequired() { return true; }
};
} // end namespace llvm
diff --git a/llvm/test/Transforms/AddDiscriminators/basic.ll b/llvm/test/Transforms/AddDiscriminators/basic.ll
index 3b443b3c556c5..6a26e34acd1d4 100644
--- a/llvm/test/Transforms/AddDiscriminators/basic.ll
+++ b/llvm/test/Transforms/AddDiscriminators/basic.ll
@@ -36,7 +36,7 @@ if.end: ; preds = %if.then, %entry
; CHECK: ret void, !dbg ![[END:[0-9]+]]
}
-attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #0 = { nounwind uwtable noinline optnone "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!7, !8}
More information about the llvm-commits
mailing list