diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2014-04-15 07:22:52 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2014-04-15 07:22:52 +0000 |
commit | d63390cba15f10600d550201f2e9109e75933a0f (patch) | |
tree | 4eea1fced6d7f4971d6a10c25aa0c498bc90f5a1 /lib/CodeGen/StackColoring.cpp | |
parent | 095734c578c74f6d1b1fcbdc4d4264a059cdb9ee (diff) | |
download | llvm-d63390cba15f10600d550201f2e9109e75933a0f.tar.gz llvm-d63390cba15f10600d550201f2e9109e75933a0f.tar.bz2 llvm-d63390cba15f10600d550201f2e9109e75933a0f.tar.xz |
Break PseudoSourceValue out of the Value hierarchy. It is now the root of its own tree containing FixedStackPseudoSourceValue (which you can use isa/dyn_cast on) and MipsCallEntry (which you can't). Anything that needs to use either a PseudoSourceValue* and Value* is strongly encouraged to use a MachinePointerInfo instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/StackColoring.cpp')
-rw-r--r-- | lib/CodeGen/StackColoring.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/CodeGen/StackColoring.cpp b/lib/CodeGen/StackColoring.cpp index ac1f320b8b..abe3db4b44 100644 --- a/lib/CodeGen/StackColoring.cpp +++ b/lib/CodeGen/StackColoring.cpp @@ -509,11 +509,6 @@ void StackColoring::remapInstructions(DenseMap<int, int> &SlotRemap) { // Update the MachineMemOperand to use the new alloca. for (MachineMemOperand *MMO : I.memoperands()) { - const Value *V = MMO->getValue(); - - if (!V) - continue; - // FIXME: In order to enable the use of TBAA when using AA in CodeGen, // we'll also need to update the TBAA nodes in MMOs with values // derived from the merged allocas. When doing this, we'll need to use @@ -523,10 +518,10 @@ void StackColoring::remapInstructions(DenseMap<int, int> &SlotRemap) { // We've replaced IR-level uses of the remapped allocas, so we only // need to replace direct uses here. - if (!isa<AllocaInst>(V)) + const AllocaInst *AI = dyn_cast_or_null<AllocaInst>(MMO->getValue()); + if (!AI) continue; - const AllocaInst *AI= cast<AllocaInst>(V); if (!Allocas.count(AI)) continue; |