diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-06 17:17:30 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-06 17:17:30 +0000 |
commit | b5f0ec3eb7d97f231b12f30985b463d6740713ba (patch) | |
tree | 89d18dd6edc12ad2d5e29173e8a79771505683d4 /llvm/lib/CodeGen/PreAllocSplitting.cpp | |
parent | afdf90ae64416dc0a2adb23b224c272b3132b125 (diff) | |
download | bcm5719-llvm-b5f0ec3eb7d97f231b12f30985b463d6740713ba.tar.gz bcm5719-llvm-b5f0ec3eb7d97f231b12f30985b463d6740713ba.zip |
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.
llvm-svn: 63936
Diffstat (limited to 'llvm/lib/CodeGen/PreAllocSplitting.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PreAllocSplitting.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/PreAllocSplitting.cpp b/llvm/lib/CodeGen/PreAllocSplitting.cpp index dfff87a3d7b..ef2cfdb9828 100644 --- a/llvm/lib/CodeGen/PreAllocSplitting.cpp +++ b/llvm/lib/CodeGen/PreAllocSplitting.cpp @@ -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) { |