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 | 4350eb86a7cdc83fa6a5f4819a7f0534ace5cd58 (patch) | |
tree | 832a8134aebec5dbb85db231c42c9dc2727c4ec6 /lib/CodeGen | |
parent | b3a021cdb3d26ddb2985e326ba0cb96761b86f69 (diff) | |
download | external_llvm-4350eb86a7cdc83fa6a5f4819a7f0534ace5cd58.tar.gz external_llvm-4350eb86a7cdc83fa6a5f4819a7f0534ace5cd58.tar.bz2 external_llvm-4350eb86a7cdc83fa6a5f4819a7f0534ace5cd58.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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63936 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/PreAllocSplitting.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/PreAllocSplitting.cpp b/lib/CodeGen/PreAllocSplitting.cpp index dfff87a3d7..ef2cfdb982 100644 --- a/lib/CodeGen/PreAllocSplitting.cpp +++ b/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) { |