diff options
author | Dan Gohman <gohman@apple.com> | 2007-06-14 20:50:44 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2007-06-14 20:50:44 +0000 |
commit | c101e95cb6aae1fd6a0727ba4b518a7894ae3089 (patch) | |
tree | 31516302b800a8107db6735791587a0cdb6ed26b /lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 86ff296e63cd9d4c28a7b73d3d6ec05e4011a0e5 (diff) | |
download | external_llvm-c101e95cb6aae1fd6a0727ba4b518a7894ae3089.zip external_llvm-c101e95cb6aae1fd6a0727ba4b518a7894ae3089.tar.gz external_llvm-c101e95cb6aae1fd6a0727ba4b518a7894ae3089.tar.bz2 |
Add a target hook to allow loads from constant pools to be rematerialized, and an
implementation for x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37576 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index eadd47b..aae27bb 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -336,12 +336,14 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock *mbb, // time we see a vreg. if (interval.empty()) { // Remember if the definition can be rematerialized. All load's from fixed - // stack slots are re-materializable. + // stack slots are re-materializable. The target may permit other loads to + // be re-materialized as well. int FrameIdx = 0; if (vi.DefInst && (tii_->isReMaterializable(vi.DefInst->getOpcode()) || (tii_->isLoadFromStackSlot(vi.DefInst, FrameIdx) && - mf_->getFrameInfo()->isFixedObjectIndex(FrameIdx)))) + mf_->getFrameInfo()->isFixedObjectIndex(FrameIdx)) || + tii_->isOtherReMaterializableLoad(vi.DefInst))) interval.remat = vi.DefInst; // Get the Idx of the defining instructions. |