mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
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:
parent
1ac8f9073c
commit
dae2a20a56
@ -201,7 +201,7 @@ private:
|
||||
!SubstituteKCacheBank(I, KCacheBanks))
|
||||
break;
|
||||
AluInstCount += OccupiedDwords(I);
|
||||
if (AluInstCount > 124)
|
||||
if (AluInstCount > TII->getMaxAlusPerClause())
|
||||
break;
|
||||
}
|
||||
unsigned Opcode = PushBeforeModifier ?
|
||||
|
@ -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,
|
||||
|
@ -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.
|
||||
|
@ -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>();
|
||||
|
Loading…
Reference in New Issue
Block a user