[LLVMdev] Linearscan allocator bug?
Vladimir Prus
ghost at cs.msu.su
Wed Jun 23 01:12:02 PDT 2004
Chris Lattner wrote:
> > 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 {}
Uhm ;-) This change seems to fix things.
> 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. :)
I'll probably look at the code.
- Volodya
More information about the llvm-dev
mailing list