Re: extra instructions lost from -O0 to -O1

2008-09-12 Thread Paolo Bonzini
Thomas A.M. Bernard wrote: > Well I found another way to solve the problem by updating the dce for > not taking out my instructions. > > I inserted "setallocate" as a native operator in the back-end which > comes from a GIMPLE node and map to the RTL pattern. Earlier in the > discussion, it's been

Re: extra instructions lost from -O0 to -O1

2008-09-12 Thread Thomas A.M. Bernard
Well I found another way to solve the problem by updating the dce for not taking out my instructions. I inserted "setallocate" as a native operator in the back-end which comes from a GIMPLE node and map to the RTL pattern. Earlier in the discussion, it's been discussed that the dce was taking

Re: extra instructions lost from -O0 to -O1

2008-09-11 Thread Ian Lance Taylor
"Thomas A.M. Bernard" <[EMAIL PROTECTED]> writes: > Ian Lance Taylor wrote: >> "Thomas A.M. Bernard" <[EMAIL PROTECTED]> writes: >> >> >>> I guess I am missing something here. I've tried the following as Paolo >>> suggested, >>> >>> (define_insn "setallocate" >>> [(unspec_volatile:DI [(match_op

Re: extra instructions lost from -O0 to -O1

2008-09-11 Thread Thomas A.M. Bernard
Ian Lance Taylor wrote: "Thomas A.M. Bernard" <[EMAIL PROTECTED]> writes: I guess I am missing something here. I've tried the following as Paolo suggested, (define_insn "setallocate" [(unspec_volatile:DI [(match_operand:DI 0 "general_operand" "r")] UNSPEC_AL

Re: extra instructions lost from -O0 to -O1

2008-09-11 Thread Ian Lance Taylor
"Thomas A.M. Bernard" <[EMAIL PROTECTED]> writes: > I guess I am missing something here. I've tried the following as Paolo > suggested, > > (define_insn "setallocate" > [(unspec_volatile:DI [(match_operand:DI 0 "general_operand" "r")] > UNSPEC_ALLOCATE)] > "" > "a

Re: extra instructions lost from -O0 to -O1

2008-09-11 Thread Thomas A.M. Bernard
I guess I am missing something here. I've tried the following as Paolo suggested, (define_insn "setallocate" [(unspec_volatile:DI [(match_operand:DI 0 "general_operand" "r")] UNSPEC_ALLOCATE)] "" "allocate %0\t\t#TCB_INSTRUCTIONS" [(set_attr "type" "multi")]

Re: extra instructions lost from -O0 to -O1

2008-09-11 Thread Paolo Bonzini
Thomas A.M. Bernard wrote: > I have tried unspec_volatile without success though. As > follow, > > (define_insn "setallocate" >[(setallocate >(unspec_volatile:DI [ (match_operand:DI 0 "general_operand" > "r")] >UNSPEC_ALLOCATE) >)] > ""

Re: extra instructions lost from -O0 to -O1

2008-09-11 Thread Thomas A.M. Bernard
Steven, In the MD file, I have this pattern: (define_insn "setallocate" [(setallocate (match_operand:DI 0 "general_operand" "r") )] "" "allocate %0\t\t#TCB_INSTRUCTIONS" [(set_attr "type" "multi")]) As you said dce takes out the instruction when flag -01 is engaged. I would like to r

Re: extra instructions lost from -O0 to -O1

2008-09-11 Thread Steven Bosscher
On Thu, Sep 11, 2008 at 10:38 AM, Thomas A.M. Bernard <[EMAIL PROTECTED]> wrote: > Hi, > > I inserted some extra instructions in the Alpha back-end (MD files). They > are properly emitted when the flag -O0 is enabled. Since they have no side > effects and no dependencies on other instructions, they