-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[SROA] Fix NumPromoted statistic for SROA pass. #115586
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
Conversation
@llvm/pr-subscribers-llvm-transforms Author: Afanasyev Ivan (ivafanas) Changes
Full diff: https://github.com/llvm/llvm-project/pull/115586.diff 1 Files Affected:
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index 3b01089962e29c..4a23e2bee5ba25 100644
--- a/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/llvm/lib/Transforms/Scalar/SROA.cpp
@@ -5590,12 +5590,11 @@ bool SROA::promoteAllocas(Function &F) {
if (PromotableAllocas.empty())
return false;
- NumPromoted += PromotableAllocas.size();
-
if (SROASkipMem2Reg) {
LLVM_DEBUG(dbgs() << "Not promoting allocas with mem2reg!\n");
} else {
LLVM_DEBUG(dbgs() << "Promoting allocas with mem2reg...\n");
+ NumPromoted += PromotableAllocas.size();
PromoteMemToReg(PromotableAllocas.getArrayRef(), DTU->getDomTree(), AC);
}
|
Chandler, could you please review the PR? If it is ok, could you please merge it? |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/5995 Here is the relevant piece of the build log for the reference
|
`NumPromoted` stat should not be increased if `SROASkipMem2Reg` is set and nothing is changed.
NumPromoted
stat should not be increased ifSROASkipMem2Reg
is set and nothing is changed.