[LLVMdev] Linearscan allocator bug?

Chris Lattner sabre at nondot.org
Wed Jun 23 01:04:03 PDT 2004


On Wed, 23 Jun 2004, Vladimir Prus wrote:
> Hmm.. this is what I have in td file already:
>
> let isTerminator = 1 in
>     def GOTO : Unknown<"goto">;
>     def IFEQ : Unknown<"if =0 goto">;
>     def IFNEQ : Unknown<"if <>0 goto">;
>     .....
>
> Should this work?

Nope, but try this:

let isTerminator = 1 in {
     def GOTO : Unknown<"goto">;
     def IFEQ : Unknown<"if =0 goto">;
     def IFNEQ : Unknown<"if <>0 goto">;
     .....
}

... aka add {}

Also, if you do 'tblgen target.td' it will spit out all of the records
to stdout so you can visually inspect them.

> > Also, if you haven't already, you might want to teach TargetInstrInfo
> > that '=' is a move instruction (implement isMoveInstr), so instructinos
> > like 'gr1 = gr1' will go away and you'll get coallescing.  :)
>
> 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.  :)

-Chris

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




More information about the llvm-dev mailing list