diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2013-05-14 01:42:44 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2013-05-14 01:42:44 +0000 |
commit | dd29df06fa72de9e370cdd9d8e32ac5437a578c7 (patch) | |
tree | 00d3771ce714a1d5aaa8d2655684dc33442ab526 /lib | |
parent | 17a692e7f196c15118e69d7012d110aa00a362ba (diff) | |
download | external_llvm-dd29df06fa72de9e370cdd9d8e32ac5437a578c7.zip external_llvm-dd29df06fa72de9e370cdd9d8e32ac5437a578c7.tar.gz external_llvm-dd29df06fa72de9e370cdd9d8e32ac5437a578c7.tar.bz2 |
StackColoring: don't clear an instruction's mem operand if the underlying
object is a PseudoSourceValue and PseudoSourceValue::isConstant returns true (i.e.,
points to memory that has a constant value).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/StackColoring.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/StackColoring.cpp b/lib/CodeGen/StackColoring.cpp index a789a25..90b93aa 100644 --- a/lib/CodeGen/StackColoring.cpp +++ b/lib/CodeGen/StackColoring.cpp @@ -42,6 +42,7 @@ #include "llvm/CodeGen/MachineMemOperand.h" #include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/CodeGen/PseudoSourceValue.h" #include "llvm/CodeGen/SlotIndexes.h" #include "llvm/DebugInfo.h" #include "llvm/IR/Function.h" @@ -528,6 +529,10 @@ void StackColoring::remapInstructions(DenseMap<int, int> &SlotRemap) { if (!V) continue; + const PseudoSourceValue *PSV = dyn_cast<const PseudoSourceValue>(V); + if (PSV && PSV->isConstant(MFI)) + continue; + // Climb up and find the original alloca. V = GetUnderlyingObject(V); // If we did not find one, or if the one that we found is not in our |