[patch] fix regrename pass to ensure renamings produce valid insns

Ramana Radhakrishnan ramana.radhakrishnan@foss.arm.com
Wed Jun 24 07:59:00 GMT 2015



On 24/06/15 02:00, Sandra Loosemore wrote:
> On 06/18/2015 11:32 AM, Eric Botcazou wrote:
>>> The attached patch teaches regrename to validate insns affected by each
>>> register renaming before making the change.  I can see at least two
>>> other ways to handle this -- earlier, by rejecting renamings that result
>>> in invalid instructions when it's searching for the best renaming; or
>>> later, by validating the entire set of renamings as a group instead of
>>> incrementally for each one -- but doing it all in regname_do_replace
>>> seems least disruptive and risky in terms of the existing code.
>>
>> OK, but the patch looks incomplete, rename_chains should be adjusted
>> as well,
>> i.e. regrename_do_replace should now return a boolean.
>
> Like this?  I tested this on nios2 and x86_64-linux-gnu, as before, plus
> built for aarch64-linux-gnu and ran the gcc testsuite.

Hopefully that was built with --with-cpu=cortex-a57 to enable the 
renaming pass ?

Ramana

>
> The c6x back end also calls regrename_do_replace.  I am not set up to
> build or test on that target, and Bernd told me off-list that it would
> never fail on that target anyway so I have left that code alone.
>
> -Sandra



More information about the Gcc-patches mailing list