mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Add TargetInstrInfo::isSafeToMoveRegisterClassDefs. It returns true if it's safe to move an instruction which defines a value in the register class. Replace pre-splitting specific IgnoreRegisterClassBarriers with this new hook.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63936 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1128,7 +1128,10 @@ PreAllocSplitting::SplitRegLiveIntervals(const TargetRegisterClass **RCs,
|
||||
// by the current barrier.
|
||||
SmallVector<LiveInterval*, 8> Intervals;
|
||||
for (const TargetRegisterClass **RC = RCs; *RC; ++RC) {
|
||||
if (TII->IgnoreRegisterClassBarriers(*RC))
|
||||
// FIXME: If it's not safe to move any instruction that defines the barrier
|
||||
// register class, then it means there are some special dependencies which
|
||||
// codegen is not modelling. Ignore these barriers for now.
|
||||
if (!TII->isSafeToMoveRegClassDefs(*RC))
|
||||
continue;
|
||||
std::vector<unsigned> &VRs = MRI->getRegClassVirtRegs(*RC);
|
||||
for (unsigned i = 0, e = VRs.size(); i != e; ++i) {
|
||||
|
Reference in New Issue
Block a user