OSDN Git Service

[DebugInfo][X86] Teach Optimize LEAs pass to handle debug values
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Tue, 21 Mar 2017 11:36:21 +0000 (11:36 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Tue, 21 Mar 2017 11:36:21 +0000 (11:36 +0000)
commit26b9b438fdda2dbfe8e37005cb33f5dc6b9c5e19
tree9f62c39baf71c109f754d9dd1e6620b517c0ba3f
parent1ec8346b667232713d90f199de6e15f434acf486
[DebugInfo][X86] Teach Optimize LEAs pass to handle debug values

This patch fixes an issue in the Optimize LEAs pass where redundant LEAs were
not removed because they were being used by debug values. The debug values are
now ignored when determining whether LEAs are redundant.

For now the debug values for the redundant LEAs are marked as undefined,
effectively lost. The intention is for a follow up patch which will attempt to
preserve the debug values where possible.

Patch by Andrew Ng.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298360 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86OptimizeLEAs.cpp
test/CodeGen/X86/lea-opt-with-debug.mir [new file with mode: 0644]