Don't create a terminator in the middle of the block.
We should probably get rid of this intrinsic.
Details
- Reviewers
• tstellarAMD nhaehnle mareko
Diff Detail
Event Timeline
Use custom inserter to make sure kill is a terminator instruction so the post-RA pass doesn't need to worry about splitting the block
I haven't looked at the changes in detail yet, but I'm fine with the general approach.
The reference to SI_KILL in SIWholeQuadMode should probably be removed with this change.
Some small remarks, apart from that LGTM.
lib/Target/AMDGPU/SILowerControlFlow.cpp | ||
---|---|---|
212 | The function now logically operates on a block level, so I'd change it to take MBB as a parameter instead of MI. | |
217 | I think the first argument to shouldSkip should be the successor MBB. That said, shouldSkip itself is a bit broken as a heuristic since it doesn't seem to follow successors itself, so perhaps it makes sense to fix this separately. | |
235 | The SkipBB shouldn't have any successors, should it? |
The function now logically operates on a block level, so I'd change it to take MBB as a parameter instead of MI.