[LLVMdev] reg_iterator Caveats
dag at cray.com
Tue Apr 1 11:27:18 PDT 2008
On Tuesday 01 April 2008 12:35, Chris Lattner wrote:
> On Tue, 1 Apr 2008, David Greene wrote:
> > On Tuesday 01 April 2008 10:47, David Greene wrote:
> >>> reg iterators will return everything that is in the function. If the
> >>> implicit operands haven't been added to the machieninstrs yet, then
> >>> they won't be returned.
> >> Hmm...this is definitely NOT true in my copy. During register
> >> allocation these implicit defs are not returned. By then the
> >> instructions are most definitely fully constructed. :)
> > Urk. It seems things are worse than that, even.
> You should try updating to mainline. I have no idea what snapshot you
Yep, it's on my TODO list.
> Barring a serious bug, the use/def chains cannot get out of date. When a
> machineinstr is inserted into a function or when an operand is added to
> the instr, it is automatically added to the register list. There is no
> way that these can get out of date, by design.
Ok, I see the code in MachineOperand to do this. Strange. I've hacked around
it for the time being. I'll double-check when we update.
More information about the llvm-dev