aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetPassConfig.cpp
diff options
context:
space:
mode:
authorEgor Pasko <pasko@chromium.org>2024-05-31 21:48:45 +0200
committerGitHub <noreply@github.com>2024-05-31 12:48:45 -0700
commitcab81dd03813ac6333ad7fc031d72b84341fe2b9 (patch)
tree9ca05a8a1377bdfacbc89c0988ef72bd98cb7b9c /llvm/lib/CodeGen/TargetPassConfig.cpp
parent6119340e0bc538fbb884cea405fd6add9ed5798c (diff)
downloadllvm-cab81dd03813ac6333ad7fc031d72b84341fe2b9.zip
llvm-cab81dd03813ac6333ad7fc031d72b84341fe2b9.tar.gz
llvm-cab81dd03813ac6333ad7fc031d72b84341fe2b9.tar.bz2
[EntryExitInstrumenter] Move passes out of clang into LLVM default pipelines (#92171)
Move EntryExitInstrumenter(PostInlining=true) to as late as possible and EntryExitInstrumenter(PostInlining=false) to an early pre-inlining stage (but skip for ThinLTO post-link). This should fix the issues reported in https://github.com/rust-lang/rust/issues/92109 and https://github.com/llvm/llvm-project/issues/52853. These are caused by https://reviews.llvm.org/D97608.
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetPassConfig.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index 8832b51..3658e83 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -871,6 +871,9 @@ void TargetPassConfig::addIRPasses() {
// passes since it emits those kinds of intrinsics.
addPass(createExpandVectorPredicationPass());
+ // Instrument function entry after all inlining.
+ addPass(createPostInlineEntryExitInstrumenterPass());
+
// Add scalarization of target's unsupported masked memory intrinsics pass.
// the unsupported intrinsic will be replaced with a chain of basic blocks,
// that stores/loads element one-by-one if the appropriate mask bit is set.