split a parallel expression and then combine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have some occurrences in my instruction stream that I want to
optimize by using new instructions that are available for the new
target architecture

I want to replace the following :

op1
...
op2 ( depends on op1 )
...
op3  ( depends on op1 )


with

...
op2'
...
op3'

I noticed in the combine dump that the compiler was appropriately looking for

Failed to match this instruction:
(parallel [
        (set (reg:SI 222)
            (op2:SI ( op1 (reg 219) (reg 109)))
        (set (reg:DI 202)
            (op1:DI (reg 219) (reg 109)))
    ])

To achieve above-mentioned task, I did the following ( in the same
order as below in the md file ) :

1. define_insn_and_split to split the above parallel expression into
two separate insns - op2 (op1) and op1
2. define_insn op2 (op1) = op2'
3. define_insn op3 (op1) = op3'

Because of the define_insn_and_split, the above parallel expression is
correctly split into two separate insns - op2 (op1) and op1 (and
subsequently op2' is picked up for op2(op1)). But the combine pass
does NOT then attempt to combine op3 and op1. So in the end, I get
op2', op1, op3 after the combine pass.

I tried the define_insn_and_split with and without specifying "
reload_completed" (Sorry but even after few weeks of playing with the
backends, I am not completely clear on the relevance of
"reload_completed" in this context)

Can some give some insight into how can this be achieved ? What am I
doing wrong ?

Thanks




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux