[LLVMdev] Linearscan allocator bug?

Chris Lattner sabre at nondot.org
Wed Jun 23 02:28:01 PDT 2004


> > BTW, is it possible to set some instruction flag, instead of overriding a
> > function? Something like:
> >
> > let isMove = 1 in
> >       def MOVE :.....
>
> That would make sense, but no not currently.  :)  If you wanted to teach
> it how to do that (similar to the isTerminator functionality), it would be
> a great patch.  :)

Actually, I just realized why this isn't possible: isMoveInstr is a
predicate that returns three things: the boolean and the two registers
being moved.

The idea is that a move does not necessarily have to be a simple: 'X = Y'
type of operation.  On RISC machines, it might be an 'or' with the zero
register.  In particular, the method takes an instance of a MachineInstr
because some instances of a particular opcode might be moves and some
might not be.

Sorry for leading you astray!

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/




More information about the llvm-dev mailing list