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 | 1f24e6a6a2c855a0d7d0aea3951f7e1faf8bed83 (patch) | |
tree | 60c66d60e7189d55581f4191ad33e6a9a87ad279 /llvm/lib/CodeGen/StackColoring.cpp | |
parent | 92dbc3183fe26688973e308f988482f3638b77d4 (diff) | |
download | bcm5719-llvm-1f24e6a6a2c855a0d7d0aea3951f7e1faf8bed83.tar.gz bcm5719-llvm-1f24e6a6a2c855a0d7d0aea3951f7e1faf8bed83.zip |
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).
llvm-svn: 181751
Diffstat (limited to 'llvm/lib/CodeGen/StackColoring.cpp')
-rw-r--r-- | llvm/lib/CodeGen/StackColoring.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/StackColoring.cpp b/llvm/lib/CodeGen/StackColoring.cpp index a789a2596db..90b93aaa724 100644 --- a/llvm/lib/CodeGen/StackColoring.cpp +++ b/llvm/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 |