On Monday 14 September 2009 13:07, Dan Gohman wrote:> MachineMemOperands for spill slots use FixedStack PseudoSourceValues > as their base. There's a unique FixedStack PseudoSourceValue for each > fixed frame object, so it's independent of whether frame pointer > elimination has been done, and it's independent of the actual frame > offsets.>From MachineMemOperand.h:/// getValue - Return the base address of the memory access. /// Special values are PseudoSourceValue::FPRel, PseudoSourceValue::SPRel, /// and the other PseudoSourceValue members which indicate references to /// frame/stack pointer relative references and other special references. const Value *getValue() const { return V; } I don't see PseudoSourceValue::FPRel, etc. defined anywhere. How do I know if a PseudoSourceValue is from the stack? -Dave
On Monday 14 September 2009 15:28, David Greene wrote:> I don't see PseudoSourceValue::FPRel, etc. defined anywhere. How do I know > if a PseudoSourceValue is from the stack?Ok, the comment is misleading. I see the class defined in PseudoSourceValue.cpp now. I'll move it to the header. I have another question. Looking at the list of MachineMemOperands for an instruction, is ther eany way to easily know whether the operand is loaded from or stored to? -Dave
On Sep 14, 2009, at 1:39 PM, David Greene wrote:> On Monday 14 September 2009 15:28, David Greene wrote: > > >> I don't see PseudoSourceValue::FPRel, etc. defined anywhere. How >> do I know >> >> if a PseudoSourceValue is from the stack? >> > > Ok, the comment is misleading. I see the class defined in > PseudoSourceValue.cpp now. I'll move it to the header.Yes; the comment was out of date. I just updated it.> > I have another question. Looking at the list of MachineMemOperands > for an > instruction, is ther eany way to easily know whether the operand is > loaded > from or stored to?Yes. MachineMemOperand has isLoad and isStore flags. Dan