diff options
| author | 2019-06-23 21:36:31 +0000 | |
|---|---|---|
| committer | 2019-06-23 21:36:31 +0000 | |
| commit | 23f101f37937a1bd4a29726cab2f76e0fb038b35 (patch) | |
| tree | f7da7d6b32c2e07114da399150bfa88d72187012 /gnu/llvm/lib/CodeGen/LiveInterval.cpp | |
| parent | sort previous; ok deraadt (diff) | |
| download | wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.tar.xz wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.zip | |
Import LLVM 8.0.0 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/CodeGen/LiveInterval.cpp')
| -rw-r--r-- | gnu/llvm/lib/CodeGen/LiveInterval.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gnu/llvm/lib/CodeGen/LiveInterval.cpp b/gnu/llvm/lib/CodeGen/LiveInterval.cpp index 83dd982587c..2340b6abd87 100644 --- a/gnu/llvm/lib/CodeGen/LiveInterval.cpp +++ b/gnu/llvm/lib/CodeGen/LiveInterval.cpp @@ -1310,17 +1310,17 @@ void ConnectedVNInfoEqClasses::Distribute(LiveInterval &LI, LiveInterval *LIV[], MachineOperand &MO = *RI; MachineInstr *MI = RI->getParent(); ++RI; - // DBG_VALUE instructions don't have slot indexes, so get the index of the - // instruction before them. - // Normally, DBG_VALUE instructions are removed before this function is - // called, but it is not a requirement. - SlotIndex Idx; - if (MI->isDebugValue()) - Idx = LIS.getSlotIndexes()->getIndexBefore(*MI); - else - Idx = LIS.getInstructionIndex(*MI); - LiveQueryResult LRQ = LI.Query(Idx); - const VNInfo *VNI = MO.readsReg() ? LRQ.valueIn() : LRQ.valueDefined(); + const VNInfo *VNI; + if (MI->isDebugValue()) { + // DBG_VALUE instructions don't have slot indexes, so get the index of + // the instruction before them. The value is defined there too. + SlotIndex Idx = LIS.getSlotIndexes()->getIndexBefore(*MI); + VNI = LI.Query(Idx).valueOut(); + } else { + SlotIndex Idx = LIS.getInstructionIndex(*MI); + LiveQueryResult LRQ = LI.Query(Idx); + VNI = MO.readsReg() ? LRQ.valueIn() : LRQ.valueDefined(); + } // In the case of an <undef> use that isn't tied to any def, VNI will be // NULL. If the use is tied to a def, VNI will be the defined value. if (!VNI) |
