On Fri, Jan 29, 2021 at 4:30 PM Andrew MacLeod via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Ranger spends a lot of time tracking pointer type ssa_names which are
> initialized to non-null, ie (a_2 = &foo). This turns out to be a waste
> of effort.
>
> Pointers can effectively  have one of 3 values we care about: VARYING,
> [0,0], or [1, +INF].   If an ssa_name is globally [0,0] or [1, +INF],
> the only "refinement" that can be made on an outgoing edge is to
> evaluate to UNDEFINED.    There is no need to track UNDEFINED on the
> un-taken edge as the branch will be folded and the edge removed.  The
> range will remain the same on the other edge.
>
> Initializing to [0,0] produces a singleton range, and constants like
> this tend to be propagated away anyway, so their usage patterns are less
> of an issue.   [1, +INF] however looks like a range which can be
> modified,  and we spend a lot of pointless time in this PR processing it.
>
> This patch extends current invariant tracking to also include pointers
> which evaluate to [1, +INF] at their definition, and thus will not be
> included in the on-entry cache, and resolves the compilation time issue.
>
> I also renamed the local member name as it now has a more specific
> definition.
>
> Bootstrapped on x86_64-pc-linux-gnu with no regressions.
> I'm not sure the current protocol for checking things in, so I will ask
> for blessing from the release managers:-)  OK for trunk?

OK.

Richard.

> Andrew
>

Reply via email to