[llvm-branch-commits] [llvm-branch] r195415 - Merging r195399:
Bill Wendling
isanbard at gmail.com
Thu Nov 21 21:18:38 PST 2013
Author: void
Date: Thu Nov 21 23:18:37 2013
New Revision: 195415
URL: http://llvm.org/viewvc/llvm-project?rev=195415&view=rev
Log:
Merging r195399:
------------------------------------------------------------------------
r195399 | tstellar | 2013-11-21 16:41:08 -0800 (Thu, 21 Nov 2013) | 10 lines
R600: Implement TargetInstrInfo::isLegalToSplitMBBAt()
Splitting a basic block will create a new ALU clause, so we need to make
sure we aren't moving uses of registers that are local to their
current clause into a new one.
I had a test case for this, but unfortunately unrelated schedule changes
invalidated it, and I wasn't been able to come up with another one.
NOTE: This is a candidate for the 3.4 branch.
------------------------------------------------------------------------
Modified:
llvm/branches/release_34/ (props changed)
llvm/branches/release_34/lib/Target/R600/R600InstrInfo.cpp
llvm/branches/release_34/lib/Target/R600/R600InstrInfo.h
Propchange: llvm/branches/release_34/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 21 23:18:37 2013
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,195092-195094,195100,195102-195103,195118,195129,195138,195152,195156-195157,195161-195162,195193,195272,195317-195318,195333,195339,195355,195397-195398
+/llvm/trunk:155241,195092-195094,195100,195102-195103,195118,195129,195138,195152,195156-195157,195161-195162,195193,195272,195317-195318,195333,195339,195355,195397-195399
Modified: llvm/branches/release_34/lib/Target/R600/R600InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/lib/Target/R600/R600InstrInfo.cpp?rev=195415&r1=195414&r2=195415&view=diff
==============================================================================
--- llvm/branches/release_34/lib/Target/R600/R600InstrInfo.cpp (original)
+++ llvm/branches/release_34/lib/Target/R600/R600InstrInfo.cpp Thu Nov 21 23:18:37 2013
@@ -77,6 +77,18 @@ R600InstrInfo::copyPhysReg(MachineBasicB
}
}
+/// \returns true if \p MBBI can be moved into a new basic.
+bool R600InstrInfo::isLegalToSplitMBBAt(MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator MBBI) const {
+ for (MachineInstr::const_mop_iterator I = MBBI->operands_begin(),
+ E = MBBI->operands_end(); I != E; ++I) {
+ if (I->isReg() && !TargetRegisterInfo::isVirtualRegister(I->getReg()) &&
+ I->isUse() && RI.isPhysRegLiveAcrossClauses(I->getReg()))
+ return false;
+ }
+ return true;
+}
+
unsigned R600InstrInfo::getIEQOpcode() const {
return AMDGPU::SETE_INT;
}
Modified: llvm/branches/release_34/lib/Target/R600/R600InstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/lib/Target/R600/R600InstrInfo.h?rev=195415&r1=195414&r2=195415&view=diff
==============================================================================
--- llvm/branches/release_34/lib/Target/R600/R600InstrInfo.h (original)
+++ llvm/branches/release_34/lib/Target/R600/R600InstrInfo.h Thu Nov 21 23:18:37 2013
@@ -55,6 +55,8 @@ namespace llvm {
MachineBasicBlock::iterator MI, DebugLoc DL,
unsigned DestReg, unsigned SrcReg,
bool KillSrc) const;
+ bool isLegalToSplitMBBAt(MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator MBBI) const;
bool isTrig(const MachineInstr &MI) const;
bool isPlaceHolderOpcode(unsigned opcode) const;
More information about the llvm-branch-commits
mailing list