diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2020-01-04 11:51:50 -0500 |
|---|---|---|
| committer | Matt Arsenault <arsenm2@gmail.com> | 2020-01-13 12:51:05 -0500 |
| commit | 3d8f1b2d22be79aab3d246fa5bc9c24b911b0bd2 (patch) | |
| tree | cb90d41ff60c49ce9488d2adf55def8e31c91d92 /llvm/lib/Target/AMDGPU | |
| parent | 2f090cc8f1a3144c81b024bdc52ec1ae49dc0def (diff) | |
| download | bcm5719-llvm-3d8f1b2d22be79aab3d246fa5bc9c24b911b0bd2.tar.gz bcm5719-llvm-3d8f1b2d22be79aab3d246fa5bc9c24b911b0bd2.zip | |
AMDGPU/GlobalISel: Set insert point after waterfall loop
The current users of the waterfall loop utility functions do not make
use of the restored original insert point. The insertion is either
done, or they set the insert point somewhere else. A future change
will want to insert instructions after the waterfall loop, but
figuring out the point after the loop is more difficult than ensuring
the insert point is there after the loop.
Diffstat (limited to 'llvm/lib/Target/AMDGPU')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp index da940990465..1bb01dc8fa1 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp @@ -1021,8 +1021,9 @@ bool AMDGPURegisterBankInfo::executeInWaterfallLoop( .addDef(ExecReg) .addReg(SaveExecReg); - // Restore the insert point before the original instruction. - B.setInsertPt(MBB, MBB.end()); + // Set the insert point after the original instruction, so any new + // instructions will be in the remainder. + B.setInsertPt(*RemainderBB, RemainderBB->begin()); return true; } |

