[PATCH] D37902: [CodeExtractor] Fix multiple bugs under certain shape of extracted region
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 15 10:06:38 PDT 2017
kuhar requested changes to this revision.
kuhar added a comment.
This revision now requires changes to proceed.
I have to agree with Danny, I'm not sure this version is correct. It should be fairly easy to use the batch updater here.
If we discover that doing incremental update makes the code too slow, that it's also great, as I still haven't come up a good benchmark to tell me what needs more optimization.
================
Comment at: lib/Transforms/Utils/CodeExtractor.cpp:237
+ auto* OldPredNode = DT->getNode(OldPred);
+ const auto OrigChildren = OldPredNode->getChildren();
+ auto* NewBBNode = DT->addNewBlock(NewBB, OldPred);
----------------
Does this handle the self-loop case?
================
Comment at: lib/Transforms/Utils/CodeExtractor.cpp:244
+ }
+ DT->updateDFSNumbers();
+ }
----------------
In general, we prefer to update DFS numbers lazily and it's better to just invalidate them.
https://reviews.llvm.org/D37902
More information about the llvm-commits
mailing list