-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[LowerAllowCheckPass] fix pipeline printing #146000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LowerAllowCheckPass] fix pipeline printing #146000
Conversation
Created using spr 1.3.4
@llvm/pr-subscribers-llvm-transforms Author: Florian Mayer (fmayer) ChangesFull diff: https://github.com/llvm/llvm-project/pull/146000.diff 2 Files Affected:
diff --git a/llvm/lib/Transforms/Instrumentation/LowerAllowCheckPass.cpp b/llvm/lib/Transforms/Instrumentation/LowerAllowCheckPass.cpp
index f6a273262e535..196f58a8f1d1c 100644
--- a/llvm/lib/Transforms/Instrumentation/LowerAllowCheckPass.cpp
+++ b/llvm/lib/Transforms/Instrumentation/LowerAllowCheckPass.cpp
@@ -182,11 +182,13 @@ void LowerAllowCheckPass::printPipeline(
// correctness.
// TODO: print shorter output by combining adjacent runs, etc.
int i = 0;
+ bool printed = false;
for (unsigned int cutoff : Opts.cutoffs) {
if (cutoff > 0) {
- if (i > 0)
+ if (printed)
OS << ";";
OS << "cutoffs[" << i << "]=" << cutoff;
+ printed = true;
}
i++;
diff --git a/llvm/test/Transforms/lower-builtin-allow-check-pipeline.ll b/llvm/test/Transforms/lower-builtin-allow-check-pipeline.ll
new file mode 100644
index 0000000000000..7b00be97e050c
--- /dev/null
+++ b/llvm/test/Transforms/lower-builtin-allow-check-pipeline.ll
@@ -0,0 +1,3 @@
+; RUN: opt < %s -passes='require<profile-summary>,function(lower-allow-check<cutoffs[7]=0;cutoffs[8]=1>)' -S -o - -print-pipeline-passes | FileCheck %s
+
+; CHECK: lower-allow-check<cutoffs[8]=1>
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/22282 Here is the relevant piece of the build log for the reference
|
@@ -182,11 +182,13 @@ void LowerAllowCheckPass::printPipeline( | |||
// correctness. | |||
// TODO: print shorter output by combining adjacent runs, etc. | |||
int i = 0; | |||
bool printed = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OS << llvm:::join(llvm::map_range())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the same? This is a vector with some elements 0, and we want to skip those
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
join(map_range(make_filter_range))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an idea, not a request to change
No description provided.