This teaches MachineSink to not sink instructions that might break the
implicit null check optimization that runs later. This should not
affect frontends that do not use implicit null checks.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I added a comment to the ImplicitNullChecks pass stating why it is difficult to work with loads sunk below control flow: http://reviews.llvm.org/rL253020
lib/CodeGen/MachineSink.cpp | ||
---|---|---|
684 ↗ | (On Diff #40107) | Reading this on phabricator makes me feel that the naming here is not great -- I'll rename this function to SinkingPreventsImplicitNullCheck tomorrow. |
lib/CodeGen/MachineSink.cpp | ||
---|---|---|
694 ↗ | (On Diff #40320) | Can't getBasicBlock fail? IIRC, MachineBasicBlocks aren't obligated to map back to a BasicBlock. |
lib/CodeGen/MachineSink.cpp | ||
---|---|---|
694 ↗ | (On Diff #40320) | I think the failure mode is to return nullptr, which should be caught by the check below. |
lib/CodeGen/MachineSink.cpp | ||
---|---|---|
694 ↗ | (On Diff #40320) | Ah, my eyes didn't see it. Sorry for the noise. |