[PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

Kenneth Zadeck zadeck@naturalbridge.com
Fri Mar 18 18:19:00 GMT 2011


i see your point.    I had forgotten that crossjumping is not really a 
pass, it is more of an infectious agent.

On 03/18/2011 01:45 PM, Paolo Bonzini wrote:
> On Fri, Mar 18, 2011 at 17:31, Jakub Jelinek<jakub@redhat.com>  wrote:
>> On Fri, Mar 18, 2011 at 12:23:11PM -0400, Kenneth Zadeck wrote:
>>> I believe that this is not the right way to go.
>>>
>>> if someone specifies -fcrossjumping, then the pass should turn on
>>> live for the duration of the pass just as ifcvt does.    If they ask
>>> for crossjumping you should give them crossjumping and not some
>>> crippled version of it.
>> Such (untested) patch is in
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48156#c7
>> But Paolo just added comment there that he prefers this version.
>>
>> Is the live problem so much more useful for crossjumping than lr problem?
>> All it wants to prove is if it can safely move a couple of instructions
>> across some other instructions, and the live_union bitmap that is computed
>> using the live/lr problem is used to find out if registers set by the
>> moved instructions are actually live at the end of those instructions
>> or not.  What would be an example where live problem would allow optimizing
>> more than lr?
> LIVE == LR except when you have uninitialized uses.
>
> Unless it is needed for correctness, I see no reason to prefer LIVE to
> LR at -O1.
>
yes, but i think that the reason this is a pr is that it seems to be 
needed for correctness.
i certainly am not advocating using live at O1.    it is more 
expensive.    however, we do have the ability to turn on some problem 
only in one pass, and that was what i was suggesting.   you make 
crossjumping require LIVE, and you will get LIVE for that pass, not for 
the entire compilation.
> Paolo



More information about the Gcc-patches mailing list