mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
[RegisterCoalescer] Add new subtarget hook allowing targets to opt-out of coalescing.
The coalescer is very aggressive at propagating constraints on the register classes, and the register allocator doesn’t know how to split sub-registers later to recover. This patch provides an escape valve for targets that encounter this problem to limit coalescing. This patch also implements such for ARM to lower register pressure when using lots of large register classes. This works around PR18825. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213078 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -115,6 +115,16 @@ public:
|
||||
|
||||
/// \brief Reset the features for the subtarget.
|
||||
virtual void resetSubtargetFeatures(const MachineFunction *MF) { }
|
||||
|
||||
/// \brief SrcRC and DstRC will be morphed into NewRC if this returns true.
|
||||
virtual bool shouldCoalesce(MachineInstr *MI,
|
||||
const TargetRegisterClass *SrcRC,
|
||||
unsigned SubReg,
|
||||
const TargetRegisterClass *DstRC,
|
||||
unsigned DstSubReg,
|
||||
const TargetRegisterClass *NewRC) const
|
||||
{ return true; }
|
||||
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
Reference in New Issue
Block a user