[LLVMdev] Classifying Operands & Def/Use Chains

David Greene dag at cray.com
Fri Jan 11 14:58:11 PST 2008

On Friday 11 January 2008 16:36, Chris Lattner wrote:
> On Jan 11, 2008, at 2:00 PM, David Greene wrote:
> > Is there any way to discover whether a particular operand of a
> > MachineInst
> > participates in addressing?  That is, if the MachineInst references
> > memory,
> > can I tell, given an operand, whether that operand is part of the
> > address
> > calculation for the instruction?
> Nope, not that I know of.


> On mainline, you can use the MachineRegisterInfo class (not
> MRegisterInfo) to walk all uses and defs (or just one class of them)
> of any register.  Use def_iterator (defs) use_iterator (uses) or
> reg_iterator (both) to get all uses/defs of a particular register,
> physical or virtual.

Exactly what I need.  Thanks!  This must have gone in fairly recently.


More information about the llvm-dev mailing list