[RFC/PATCH] updating global ranges and their effect on __builtin_unreachable code

Jeff Law jeffreyalaw@gmail.com
Sun Jun 13 21:24:54 GMT 2021



On 6/13/2021 10:02 AM, Aldy Hernandez via Gcc-patches wrote:
> On Mon, Jun 7, 2021 at 4:32 PM Andrew MacLeod <amacleod@redhat.com> wrote:
>
>> Aldy, I think this means we can use global information in the get_global
>> query for ranger if "cfun->after_inlining" is true, otherwise do what we
>> currently do.
> Tested on x86-64 Linux.
>
> OK for trunk?
>
> Aldy
>
> 0001-Pick-up-global-ranges-in-ranger-after-inlining.patch
>
>  From 914810565183ad2cdac82ed5babd1f182346a728 Mon Sep 17 00:00:00 2001
> From: Aldy Hernandez <aldyh@redhat.com>
> Date: Sun, 13 Jun 2021 16:20:33 +0200
> Subject: [PATCH] Pick up global ranges in ranger after inlining.
>
> Ranger was not picking up global ranges because doing so could remove
> __builtin_unreachable calls too early to the detriment of LTO.  However,
> we can safely remove these calls after inlining.  This patch removes the
> restriction and allows ranger to pick up global ranges under these
> circumstances.
>
> Tested on x86-64 Linux.
>
> gcc/ChangeLog:
>
> 	* value-query.cc (gimple_range_global): Call get_range_global
> 	if called after inlining.
OK
jeff



More information about the Gcc-patches mailing list