[llvm] r341305 - Fix issue introduced by r341301 that broke buildbot.
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 3 03:23:34 PDT 2018
Author: s.desmalen
Date: Mon Sep 3 03:23:34 2018
New Revision: 341305
URL: http://llvm.org/viewvc/llvm-project?rev=341305&view=rev
Log:
Fix issue introduced by r341301 that broke buildbot.
A condition in isSpillInstruction() updates a small vector rather
than the 'FI' by-ref parameter, which was used in a subsequent
call to 'isSpillSlotObjectIndex()'. This patch fixes the condition
to check the FIs in the vector instead.
Modified:
llvm/trunk/lib/CodeGen/LiveDebugValues.cpp
Modified: llvm/trunk/lib/CodeGen/LiveDebugValues.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugValues.cpp?rev=341305&r1=341304&r2=341305&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveDebugValues.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveDebugValues.cpp Mon Sep 3 03:23:34 2018
@@ -477,9 +477,12 @@ bool LiveDebugValues::isSpillInstruction
return false;
// To identify a spill instruction, use the same criteria as in AsmPrinter.
- if (!((TII->isStoreToStackSlotPostFE(MI, FI) ||
- TII->hasStoreToStackSlot(MI, Accesses)) &&
- FrameInfo.isSpillSlotObjectIndex(FI)))
+ if (!((TII->isStoreToStackSlotPostFE(MI, FI) &&
+ FrameInfo.isSpillSlotObjectIndex(FI)) ||
+ (TII->hasStoreToStackSlot(MI, Accesses) &&
+ llvm::any_of(Accesses, [&FrameInfo](TargetInstrInfo::FrameAccess &FA) {
+ return FrameInfo.isSpillSlotObjectIndex(FA.FI);
+ }))))
return false;
auto isKilledReg = [&](const MachineOperand MO, unsigned &Reg) {
More information about the llvm-commits
mailing list