[PATCH] D139334: [IRSim] Reduce IROutliner Compile time by reducing the number of time the CodeExtractorCache is rebuilt.
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 6 10:28:48 PST 2022
paquette added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:357
+ CEAC->TestAndAddSideEffectingBlock(PrevBB, StartBB);
+
----------------
comment?
================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:366
+
+ if (EndBB == StartBB)
+ CEAC->TestAndAddSideEffectingBlock(PrevBB, FollowBB);
----------------
we probably want comments for all calls to this explaining why we're doing this
================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:2838
for (OutlinableRegion *OS : CurrentGroup.Regions) {
+ Function *OrigF = OS->Candidate->getStartBB()->getParent();
+ DenseMap<Function *, CodeExtractorAnalysisCache *>::iterator CEACIt =
----------------
For a follow-up patch: maybe `Candidate`s should have a `getFunction` function?
================
Comment at: llvm/lib/Transforms/Utils/CodeExtractor.cpp:322
+ BasicBlock *OldBlock, BasicBlock *NewBlock) {
+ if (BaseMemAddrs.find(OldBlock) != BaseMemAddrs.end()) {
+ findSideEffectInfoForBlock(*NewBlock);
----------------
comments in this function?
================
Comment at: llvm/lib/Transforms/Utils/CodeExtractor.cpp:335
+ BasicBlock *RemovedBlock) {
+ if (BaseMemAddrs.find(RemovedBlock) != BaseMemAddrs.end())
+ BaseMemAddrs.erase(RemovedBlock);
----------------
comments here too?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139334/new/
https://reviews.llvm.org/D139334
More information about the llvm-commits
mailing list