[PATCH] D132408: [SimplifyCFG] accumulate bonus insts cost
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 29 11:48:19 PDT 2022
nikic added reviewers: spatel, fhahn, nikic.
nikic added a comment.
Do you have any numbers for the impact of this change? I suspect (but haven't checked) that it may be quite significant, because the current tiny bonus inst threshold (1) is tuned for the current implementation, and this patch will result in much less common dest folding than would be desirable.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:211
+ NumBonusInsts.insert({BB, 0});
+ Loc = NumBonusInsts.find(BB);
+ }
----------------
insert returns the iterator, no need to call find again.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:219
+ return 0;
+ return Loc->second;
+}
----------------
You can use lookup() here, which will return 0 if not found.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132408/new/
https://reviews.llvm.org/D132408
More information about the llvm-commits
mailing list