]> granicus.if.org Git - llvm/commit
[DebugInfo] Use a MapVector to coalesce MachineOperand locations
authorReid Kleckner <rnk@google.com>
Wed, 20 Sep 2017 17:32:54 +0000 (17:32 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 20 Sep 2017 17:32:54 +0000 (17:32 +0000)
commitcf0cb494bee0e348f9277eafb01aaa9ead34120c
tree9f44f7dc5500cd4674ff5ad16a930cfbe9a49780
parent9a4ebf5dc97fadd0b1f302dab44fa43aada20ff3
[DebugInfo] Use a MapVector to coalesce MachineOperand locations

Summary:
The new code should be linear in the number of DBG_VALUEs, while the old
code was quadratic. NFC intended.

This is also hopefully a more direct expression of the problem, which is
to:

1. Rewrite all virtual register operands to stack slots or physical
   registers
2. Uniquely number those machine operands, assigning them location
   numbers
3. Rewrite all uses of the old location numbers in the interval map to
   use the new location numbers

In r313400, I attempted to track which locations were spilled in a
parallel bitvector indexed by location number. My code was broken
because these location numbers are not stable during rewriting.

Reviewers: aprantl, hans

Subscribers: hiraditya, llvm-commits

Differential Revision: https://reviews.llvm.org/D38068

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313775 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineOperand.h
lib/CodeGen/LiveDebugVariables.cpp