CodeGenPrepare may invalidate the domtree. At the moment, there's no way to selectively preserve passes, so we need to be conservative and never preserve it.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Note: D16984 incorporates this into a slightly larger/more complete change. I'll abandon this when that goes in.
Comment Actions
LGTM.
As CGP is the last pass run before SDAG, how exactly did you find this bug out of interest?
James
Comment Actions
LGTM.
Thank you! :) Like said, D16984 seems to absorb this change, so I'll commit this if we decide to abandon that.
As CGP is the last pass run before SDAG, how exactly did you find this bug out of interest?
I wrote a script that more or less appends -basicaa -verify-memoryssa to all opt runlines in our test suite. This caused a CGP test that was originally just running -loop-unroll -codegenprepare to segfault, because the domtree was pointing to deleted basic blocks when it was handed to MemorySSA.