mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-01 12:24:24 +00:00
R600: Use StructurizeCFGPass for non SI targets
StructurizeCFG pass allows to make complex cfg reducible ; it allows a lot of shader from shadertoy (which exhibits complex control flow constructs) to works correctly with respect to CFG handling (and allow us to detect potential bug in other part of the backend). We provide a cmd line argument to disable the pass for debug purpose. Patch by: Vincent Lejeune Reviewed-by: Tom Stellard <thomas.stellard@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192363 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -340,7 +340,7 @@ bool R600Packetizer::runOnMachineFunction(MachineFunction &Fn) {
|
||||
MachineBasicBlock::iterator End = MBB->end();
|
||||
MachineBasicBlock::iterator MI = MBB->begin();
|
||||
while (MI != End) {
|
||||
if (MI->isKill() ||
|
||||
if (MI->isKill() || MI->getOpcode() == AMDGPU::IMPLICIT_DEF ||
|
||||
(MI->getOpcode() == AMDGPU::CF_ALU && !MI->getOperand(8).getImm())) {
|
||||
MachineBasicBlock::iterator DeleteMI = MI;
|
||||
++MI;
|
||||
|
Reference in New Issue
Block a user