On 6/13/2021 10:02 AM, Aldy Hernandez via Gcc-patches wrote:
On Mon, Jun 7, 2021 at 4:32 PM Andrew MacLeod <amacl...@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 <al...@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