summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-07-09 01:13:51 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-07-09 01:13:51 +0000
commit95c7897555f4f99f5ce71f84ab11b63c256293f2 (patch)
treebb80cccf33203803ecfd6bc79659914ae4d80e44
parent152e7c8b1222d2af61df72c08caaa740e553cb6c (diff)
downloadbcm5719-llvm-95c7897555f4f99f5ce71f84ab11b63c256293f2.tar.gz
bcm5719-llvm-95c7897555f4f99f5ce71f84ab11b63c256293f2.zip
AMDGPU: Simplify isSchedulingBoundary
llvm-svn: 274953
-rw-r--r--llvm/lib/Target/AMDGPU/SIInstrInfo.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index 4f1eb52c88a..213cdc310c8 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -1455,14 +1455,13 @@ MachineInstr *SIInstrInfo::convertToThreeAddress(MachineFunction::iterator &MBB,
bool SIInstrInfo::isSchedulingBoundary(const MachineInstr &MI,
const MachineBasicBlock *MBB,
const MachineFunction &MF) const {
+ // XXX - Do we want the SP check in the base implementation?
+
// Target-independent instructions do not have an implicit-use of EXEC, even
// when they operate on VGPRs. Treating EXEC modifications as scheduling
// boundaries prevents incorrect movements of such instructions.
- const SIRegisterInfo *TRI = MF.getSubtarget<SISubtarget>().getRegisterInfo();
- if (MI.modifiesRegister(AMDGPU::EXEC, TRI))
- return true;
-
- return AMDGPUInstrInfo::isSchedulingBoundary(MI, MBB, MF);
+ return TargetInstrInfo::isSchedulingBoundary(MI, MBB, MF) ||
+ MI.modifiesRegister(AMDGPU::EXEC, &RI);
}
bool SIInstrInfo::isInlineConstant(const APInt &Imm) const {
OpenPOWER on IntegriCloud