R600: Factorize maximum alu per clause in a single location

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178667 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vincent Lejeune 2013-04-03 16:49:34 +00:00
parent 1ac8f9073c
commit dae2a20a56
4 changed files with 6 additions and 2 deletions

View File

@ -201,7 +201,7 @@ private:
!SubstituteKCacheBank(I, KCacheBanks))
break;
AluInstCount += OccupiedDwords(I);
if (AluInstCount > 124)
if (AluInstCount > TII->getMaxAlusPerClause())
break;
}
unsigned Opcode = PushBeforeModifier ?

View File

@ -645,6 +645,9 @@ const TargetRegisterClass *R600InstrInfo::getSuperIndirectRegClass() const {
return &AMDGPU::IndirectRegRegClass;
}
unsigned R600InstrInfo::getMaxAlusPerClause() const {
return 115;
}
MachineInstrBuilder R600InstrInfo::buildDefaultInstruction(MachineBasicBlock &MBB,
MachineBasicBlock::iterator I,

View File

@ -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.

View File

@ -37,7 +37,7 @@ void R600SchedStrategy::initialize(ScheduleDAGMI *dag) {
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>();