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
break-crit-edges incorrectly updates idoms for unreachable code #1482
Labels
bugzilla
Issues migrated from bugzilla
compile-fail
Use [accepts-invalid] and [rejects-valid] instead
Comments
assigned to @lattner |
Actually, "-idom -break-crit-edges -domtree" is sufficient. |
segfault confirmed with TOT. Upgraded bytecode attached. |
It sounds like b-c-e isn't updating idom correctly. I'll take a look. |
Fixed, testcase here: Analysis/Dominators/2007-01-14-BreakCritEdges.ll Patch here: -Chris |
Yup, all better. Thanks Chris! |
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bugzilla
Issues migrated from bugzilla
compile-fail
Use [accepts-invalid] and [rejects-valid] instead
Extended Description
Steps to reproduce:
$ llvm/Debug/bin/opt -etforest -break-crit-edges -domtree x.bc -disable-output
Segmentation fault
The backtrace shows an infinite loop
#123147 0x085b20b7 in llvm::DominatorTree::getNodeForBlock (this=0x87191f8,
BB=0x0) at Dominators.cpp:380
but before that, it seems that llvm::DominatorTree::calculate's "ImmDom", which
is gets from ImmediateDominator is out of date:
#174577 0x085b225f in llvm::DominatorTree::calculate (this=0x87191f8,
ID=@0x871a1a8) at Dominators.cpp:399
399 Node *IDomNode = getNodeForBlock(ImmDom);
(gdb) p ImmDom
$2 = (class llvm::BasicBlock *) 0x8719838
(gdb) p ImmDom->getName()
Cannot access memory at address 0xff75effc
(gdb) down
#174576 0x085b20b7 in llvm::DominatorTree::getNodeForBlock (this=0x87191f8,
BB=0x8719838) at Dominators.cpp:380
380 Node *IDomNode = getNodeForBlock(IDom);
(gdb) p IDom
$3 = (class llvm::BasicBlock *) 0x0
and that's the start of the infinite loop.
The text was updated successfully, but these errors were encountered: