[PATCH] D29500: [DWARF][PATCH] Keep track of spilled variables in LiveDebugValues
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 3 13:54:21 PST 2017
aprantl added a comment.
Very interesting! Have you measured the performance impact of this? Is there any?
================
Comment at: lib/CodeGen/LiveDebugValues.cpp:324
+ "Spill instruction does not have exactly one memory operand?");
+ MachineInstr::mmo_iterator MMOI = MI.memoperands_begin();
+ const PseudoSourceValue *PVal = (*MMOI)->getPseudoValue();
----------------
auto ?
================
Comment at: lib/CodeGen/LiveDebugValues.cpp:405
+
+ // To identify a spill instruction, use the same criteria as in AsmPrinter.
+ if (!((TII->isStoreToStackSlotPostFE(MI, FI) ||
----------------
perhaps factor this out into a bool isSpillInstruction()?
================
Comment at: lib/CodeGen/LiveDebugValues.cpp:411
+
+ // We are looking for a register operand that has its kill flag set.
+ unsigned Reg = 0;
----------------
It would be good if the comment could explain why we are looking for one.
================
Comment at: lib/CodeGen/LiveDebugValues.cpp:454
+ OpenRanges.insert(SpillLocID, VL.Var);
+ break;
+ }
----------------
return?
================
Comment at: test/DebugInfo/MIR/X86/live-debug-values-spill.mir:195
+
+ attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
+ attributes #1 = { argmemonly nounwind }
----------------
most of the "string" attributes can probably be safely removed.
https://reviews.llvm.org/D29500
More information about the llvm-commits
mailing list