diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-07-14 18:45:35 +0000 | 
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-07-14 18:45:35 +0000 | 
| commit | 8f324a2cc827d4f5ea2ac94609e3b6054aba7617 (patch) | |
| tree | 9d6d2a040d600ac135e98522a816460d1368651b /llvm/lib/CodeGen | |
| parent | b50e716bac45a9713144869b01c2850ef8048100 (diff) | |
| download | bcm5719-llvm-8f324a2cc827d4f5ea2ac94609e3b6054aba7617.tar.gz bcm5719-llvm-8f324a2cc827d4f5ea2ac94609e3b6054aba7617.zip | |
Account for early-clobber reload instructions.
No test case, there are no in-tree targets that require this.
llvm-svn: 160219
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/InlineSpiller.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/llvm/lib/CodeGen/InlineSpiller.cpp b/llvm/lib/CodeGen/InlineSpiller.cpp index 4c7f5d8c88c..07e37af57f3 100644 --- a/llvm/lib/CodeGen/InlineSpiller.cpp +++ b/llvm/lib/CodeGen/InlineSpiller.cpp @@ -1081,6 +1081,10 @@ void InlineSpiller::insertReload(LiveInterval &NewLI,                             MRI.getRegClass(NewLI.reg), &TRI);    --MI; // Point to load instruction.    SlotIndex LoadIdx = LIS.InsertMachineInstrInMaps(MI).getRegSlot(); +  // Some (out-of-tree) targets have EC reload instructions. +  if (MachineOperand *MO = MI->findRegisterDefOperand(NewLI.reg)) +    if (MO->isEarlyClobber()) +      LoadIdx = LoadIdx.getRegSlot(true);    DEBUG(dbgs() << "\treload:  " << LoadIdx << '\t' << *MI);    VNInfo *LoadVNI = NewLI.getNextValue(LoadIdx, LIS.getVNInfoAllocator());    NewLI.addRange(LiveRange(LoadIdx, Idx, LoadVNI)); | 

