summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEkaterina Romanova <katya_romanova@playstation.sony.com>2014-03-13 18:47:12 +0000
committerEkaterina Romanova <katya_romanova@playstation.sony.com>2014-03-13 18:47:12 +0000
commited2ca70ccff2e2654a41d6d9fc74683d6ec0a2ff (patch)
tree829e06a09c999477f07347a446c8984787fa7865 /include
parent4ad41871eba4ec8bfe5a967f596b85814fa5fe4b (diff)
downloadllvm-ed2ca70ccff2e2654a41d6d9fc74683d6ec0a2ff.tar.gz
llvm-ed2ca70ccff2e2654a41d6d9fc74683d6ec0a2ff.tar.bz2
llvm-ed2ca70ccff2e2654a41d6d9fc74683d6ec0a2ff.tar.xz
Fix for http://llvm.org/bugs/show_bug.cgi?id=18590
This patch fixes the bug in peephole optimization that folds a load which defines one vreg into the one and only use of that vreg. With debug info, a DBG_VALUE that referenced the vreg considered to be a use, preventing the optimization. The fix is to ignore DBG_VALUE's during the optimization, and undef a DBG_VALUE that references a vreg that gets removed. Patch by Trevor Smigiel! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineRegisterInfo.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h
index ecaaf0a068..01fa00fe24 100644
--- a/include/llvm/CodeGen/MachineRegisterInfo.h
+++ b/include/llvm/CodeGen/MachineRegisterInfo.h
@@ -510,6 +510,10 @@ public:
return Hint.first ? 0 : Hint.second;
}
+ /// markUsesInDebugValueAsUndef - Mark every DBG_VALUE referencing the
+ /// specified register as undefined which causes the DBG_VALUE to be
+ /// deleted during LiveDebugVariables analysis.
+ void markUsesInDebugValueAsUndef(unsigned Reg) const;
//===--------------------------------------------------------------------===//
// Physical Register Use Info