From aad475b3241bdbbb38e0cf7dd637209b49d5d927 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Tue, 15 Apr 2014 07:22:52 +0000 Subject: 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. llvm-svn: 206255 --- llvm/lib/CodeGen/StackColoring.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'llvm/lib/CodeGen/StackColoring.cpp') diff --git a/llvm/lib/CodeGen/StackColoring.cpp b/llvm/lib/CodeGen/StackColoring.cpp index ac1f320b8b2..abe3db4b44e 100644 --- a/llvm/lib/CodeGen/StackColoring.cpp +++ b/llvm/lib/CodeGen/StackColoring.cpp @@ -509,11 +509,6 @@ void StackColoring::remapInstructions(DenseMap &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 &SlotRemap) { // We've replaced IR-level uses of the remapped allocas, so we only // need to replace direct uses here. - if (!isa(V)) + const AllocaInst *AI = dyn_cast_or_null(MMO->getValue()); + if (!AI) continue; - const AllocaInst *AI= cast(V); if (!Allocas.count(AI)) continue; -- cgit v1.2.3