This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [aarch64] disable shrink wrapping when tracking speculative execution
On 05/11/2018 10:05, Richard Biener wrote:
> On Fri, Nov 2, 2018 at 3:04 PM Richard Earnshaw (lists)
> <Richard.Earnshaw@arm.com> wrote:
>>
>> On 02/11/2018 13:53, Richard Biener wrote:
>>> On Fri, Nov 2, 2018 at 2:38 PM Richard Earnshaw (lists)
>>> <Richard.Earnshaw@arm.com> wrote:
>>>>
>>>> Although there's no fundamental reason why shrink wrapping and
>>>> speculation tracking are incompatible, a phase-ordering requirement (we
>>>> need to do speculation tracking before the final basic block clean-up)
>>>> means that the shrink wrapping pass can undo some of the changes the
>>>> speculation tracking pass makes. The result is that the tracking, while
>>>> still safe is less comprehensive than we really want.
>>>>
>>>> So to keep things simple, and because the tracking code is quite
>>>> expensive anyway, it seems best to just disable that pass when we are
>>>> tracking speculative execution.
>>>
>>> Shouldn't you be able to do this per function at least?
>>>
>>
>> do what per function? track speculation?
>
> disable shrink-wrapping only when any speculation was there
> (this is about __bultin_speculation_safe_value, no?)
>
Only indirectly. This is about the tracking code that tracks
conditional branches and propagates that information through call/return
sequences. Shrink wrapping messes with the prologue/epilogue sequences
after the speculation tracking pass has run and unknowingly deletes some
of the additional code that was previously inserted by the tracking pass.
R.
> Richard.
>
>> R.
>>
>>> Richard.
>>>
>>>> * config/aarch64/aarch64.c (aarch64_override_options): Disable
>>>> shrink-wrapping when -mtrack-speculation.
>>>>
>>>> Committed.
>>