summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorMikael Holmen <mikael.holmen@ericsson.com>2017-11-16 07:01:23 +0000
committerMikael Holmen <mikael.holmen@ericsson.com>2017-11-16 07:01:23 +0000
commit56e4abc2cfc5f3868b28d2cfacb6ff27f0622d23 (patch)
treef4d0d63e6afa09d96fd750e3b28916fad59a162b /llvm/lib
parentb1b8aff2e7b2aa487657a6a13e2cf0bd9d7735d3 (diff)
downloadbcm5719-llvm-56e4abc2cfc5f3868b28d2cfacb6ff27f0622d23.tar.gz
bcm5719-llvm-56e4abc2cfc5f3868b28d2cfacb6ff27f0622d23.zip
[MachineRegisterInfo] Avoid having dbg.values affect code generation
Summary: Use use_nodbg_empty() rather than use_empty() in MachineRegisterInfo::EmitLiveInCopies() when determining if a livein register has any uses or not. Otherwise a single dbg.value can make us generate different code, meaning -g would affect code generation. Found when compiling code for my out-of-tree target. Unfortunately I haven't been able to reproduce the problem on X86 or any of the other in-tree targets that I tried, so no test case. Reviewers: MatzeB Reviewed By: MatzeB Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39044 llvm-svn: 318382
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/MachineRegisterInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineRegisterInfo.cpp b/llvm/lib/CodeGen/MachineRegisterInfo.cpp
index 1674aba0c82..8e031cb4e5b 100644
--- a/llvm/lib/CodeGen/MachineRegisterInfo.cpp
+++ b/llvm/lib/CodeGen/MachineRegisterInfo.cpp
@@ -428,8 +428,8 @@ MachineRegisterInfo::EmitLiveInCopies(MachineBasicBlock *EntryMBB,
// Emit the copies into the top of the block.
for (unsigned i = 0, e = LiveIns.size(); i != e; ++i)
if (LiveIns[i].second) {
- if (use_empty(LiveIns[i].second)) {
- // The livein has no uses. Drop it.
+ if (use_nodbg_empty(LiveIns[i].second)) {
+ // The livein has no non-dbg uses. Drop it.
//
// It would be preferable to have isel avoid creating live-in
// records for unused arguments in the first place, but it's
OpenPOWER on IntegriCloud