[PATCH] D35918: [GVNHoist] Factor out reachability to search for anticipable instructions quickly
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 3 14:26:38 PDT 2017
kuhar added a comment.
In https://reviews.llvm.org/D35918#831066, @hiraditya wrote:
> I tried a simple df walk like this, it crashes the compiler for the test cases llvm/test/Transforms/GVNHoist/infinite-loop-indirect.ll, and llvm/test/Transforms/GVNHoist/infinite-loop-direct.ll:
>
> auto PrevBB = PDT->getNode(nullptr);
> for (auto it = df_begin(PrevBB); it != df_end(PrevBB);
> ++it) {
> }
>
>
> These test cases are added in this patch.
>
> Thanks,
I tried running loop like yours in a couple of my unittests (`DominatorTreeTest.cpp`) and it seems to work:
auto PrevBB = PDT->getNode(nullptr);
for (auto it = df_begin(PrevBB); it != df_end(PrevBB);
++it) {
auto BB = it->getBlock();
outs() << (BB ?B B->getName() : "virtual root") << "\n";
}
Could you prepare a reduced repro for the crash you saw?
Thanks,
Kuba
https://reviews.llvm.org/D35918
More information about the llvm-commits
mailing list