[llvm] r178667 - R600: Factorize maximum alu per clause in a single location
Vincent Lejeune
vljn at ovi.com
Wed Apr 3 09:49:34 PDT 2013
Author: vljn
Date: Wed Apr 3 11:49:34 2013
New Revision: 178667
URL: http://llvm.org/viewvc/llvm-project?rev=178667&view=rev
Log:
R600: Factorize maximum alu per clause in a single location
Modified:
llvm/trunk/lib/Target/R600/R600EmitClauseMarkers.cpp
llvm/trunk/lib/Target/R600/R600InstrInfo.cpp
llvm/trunk/lib/Target/R600/R600InstrInfo.h
llvm/trunk/lib/Target/R600/R600MachineScheduler.cpp
Modified: llvm/trunk/lib/Target/R600/R600EmitClauseMarkers.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600EmitClauseMarkers.cpp?rev=178667&r1=178666&r2=178667&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/R600EmitClauseMarkers.cpp (original)
+++ llvm/trunk/lib/Target/R600/R600EmitClauseMarkers.cpp Wed Apr 3 11:49:34 2013
@@ -201,7 +201,7 @@ private:
!SubstituteKCacheBank(I, KCacheBanks))
break;
AluInstCount += OccupiedDwords(I);
- if (AluInstCount > 124)
+ if (AluInstCount > TII->getMaxAlusPerClause())
break;
}
unsigned Opcode = PushBeforeModifier ?
Modified: llvm/trunk/lib/Target/R600/R600InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600InstrInfo.cpp?rev=178667&r1=178666&r2=178667&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/R600InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/R600/R600InstrInfo.cpp Wed Apr 3 11:49:34 2013
@@ -645,6 +645,9 @@ const TargetRegisterClass *R600InstrInfo
return &AMDGPU::IndirectRegRegClass;
}
+unsigned R600InstrInfo::getMaxAlusPerClause() const {
+ return 115;
+}
MachineInstrBuilder R600InstrInfo::buildDefaultInstruction(MachineBasicBlock &MBB,
MachineBasicBlock::iterator I,
Modified: llvm/trunk/lib/Target/R600/R600InstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600InstrInfo.h?rev=178667&r1=178666&r2=178667&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/R600InstrInfo.h (original)
+++ llvm/trunk/lib/Target/R600/R600InstrInfo.h Wed Apr 3 11:49:34 2013
@@ -145,6 +145,7 @@ namespace llvm {
virtual const TargetRegisterClass *getSuperIndirectRegClass() const;
+ unsigned getMaxAlusPerClause() const;
///buildDefaultInstruction - This function returns a MachineInstr with
/// all the instruction modifiers initialized to their default values.
Modified: llvm/trunk/lib/Target/R600/R600MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600MachineScheduler.cpp?rev=178667&r1=178666&r2=178667&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/R600MachineScheduler.cpp (original)
+++ llvm/trunk/lib/Target/R600/R600MachineScheduler.cpp Wed Apr 3 11:49:34 2013
@@ -37,7 +37,7 @@ void R600SchedStrategy::initialize(Sched
CurInstKind = IDOther;
CurEmitted = 0;
OccupedSlotsMask = 15;
- InstKindLimit[IDAlu] = 120; // 120 minus 8 for security
+ InstKindLimit[IDAlu] = TII->getMaxAlusPerClause();
const AMDGPUSubtarget &ST = DAG->TM.getSubtarget<AMDGPUSubtarget>();
More information about the llvm-commits
mailing list