Fix bug to merge away entry block and update DT correctly.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 19404 Build 19404: arc lint + arc unit
Event Timeline
I admit I haven't looked at this code in a while, but I can't understand your fix. Can you please elaborate with an example?
lib/Transforms/Utils/Local.cpp | ||
---|---|---|
718 | I'm a little confused by this comment. Isn't always the case that the entry block has no idom by definition of dominator tree? | |
unittests/Transforms/Utils/Local.cpp | ||
221 | The predecessors list here looks wrong? |
lib/Transforms/Utils/Local.cpp | ||
---|---|---|
718 | I should add "Entry block does not have IDom, do not attempt to getIDom() on it. | |
unittests/Transforms/Utils/Local.cpp | ||
221 | Yes, I will fix that. |
Worth seeing D48202, which plans to remove this function in preference of MergeBlockIntoPredecessor (which does the merge the other way, so doesn't run into the same problem removing the entry block).
@dmgreen Thanks for the pointer. I think https://reviews.llvm.org/D48202 will define away the problem. I will abandon this patch.
I'm a little confused by this comment. Isn't always the case that the entry block has no idom by definition of dominator tree?