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 | aad475b3241bdbbb38e0cf7dd637209b49d5d927 (patch) | |
| tree | b5f7bb7af521a505867d300ce1f67c471c0562d6 /llvm/lib/CodeGen/MachineLICM.cpp | |
| parent | 2406477179def10372e6275bb855be9f3848db22 (diff) | |
| download | bcm5719-llvm-aad475b3241bdbbb38e0cf7dd637209b49d5d927.tar.gz bcm5719-llvm-aad475b3241bdbbb38e0cf7dd637209b49d5d927.zip | |
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineLICM.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/MachineLICM.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp index 32379b6d824..8960d38e610 100644 --- a/llvm/lib/CodeGen/MachineLICM.cpp +++ b/llvm/lib/CodeGen/MachineLICM.cpp @@ -390,10 +390,10 @@ bool MachineLICM::runOnMachineFunction(MachineFunction &MF) { static bool InstructionStoresToFI(const MachineInstr *MI, int FI) { for (MachineInstr::mmo_iterator o = MI->memoperands_begin(), oe = MI->memoperands_end(); o != oe; ++o) { - if (!(*o)->isStore() || !(*o)->getValue()) + if (!(*o)->isStore() || !(*o)->getPseudoValue()) continue; if (const FixedStackPseudoSourceValue *Value = - dyn_cast<const FixedStackPseudoSourceValue>((*o)->getValue())) { + dyn_cast<FixedStackPseudoSourceValue>((*o)->getPseudoValue())) { if (Value->getFrameIndex() == FI) return true; } @@ -882,10 +882,9 @@ static bool isLoadFromGOTOrConstantPool(MachineInstr &MI) { assert (MI.mayLoad() && "Expected MI that loads!"); for (MachineInstr::mmo_iterator I = MI.memoperands_begin(), E = MI.memoperands_end(); I != E; ++I) { - if (const Value *V = (*I)->getValue()) { - if (const PseudoSourceValue *PSV = dyn_cast<PseudoSourceValue>(V)) - if (PSV == PSV->getGOT() || PSV == PSV->getConstantPool()) - return true; + if (const PseudoSourceValue *PSV = (*I)->getPseudoValue()) { + if (PSV == PSV->getGOT() || PSV == PSV->getConstantPool()) + return true; } } return false; |

