diff mbox series

[COMMITTED] Switch vrp2 to ranger.

Message ID da79b375-5ebc-5805-d743-f4d8c769a809@redhat.com
State New
Headers show
Series [COMMITTED] Switch vrp2 to ranger. | expand

Commit Message

Andrew MacLeod Nov. 3, 2021, 2:40 p.m. UTC
This patch flips the switch and makes ranger the default for the VRP2 
pass. All of the testcases have been tweaked as necessary and the 
testsuite run should be clean.

I continue to work with ranger as the VRP1 pass determining what other 
things VRP is doing that ranger doesn't and unifying the testcases so 
that they pass with both VRP and ranger.

After the previous patch sets, there are only 2 failing testcases when 
ranger is used for the vrp1 pass:

    * gcc.dg/tree-ssa/pr79095.c  : This is an overflow of unsigned 
detection testcase, and I have not yet pushed relations up the GORI 
unwind stack. ie:

u1 = u2 + 1
if (u2 > u1)

on the true edge, since we know u2> u1, if you feed that relation back 
into the gori calculator, when it resolves u1 = u2 + 1, we would 
determine in op1_range  that u2 is [INT_MAX, INT_MAX] to satisfy that 
relation, and therefore u1 can be calculated as [0,0]

   *   gcc.dg/guality/pr54693-2.c  THis test is failing for just "-O2 
-flto -fuse-linker-plugin -fno-fat-lto-objects" for some reason I havent 
been able to fathom yet.

Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed.

Andrew
diff mbox series

Patch

From 502ffb1f389011b28ee51815242c7397790802d5 Mon Sep 17 00:00:00 2001
From: Andrew MacLeod <amacleod@redhat.com>
Date: Tue, 2 Nov 2021 21:26:44 -0400
Subject: [PATCH 6/6] Switch vrp2 to ranger.

This patch flips the default for the VRP2 pass to execute ranger vrp rather
than the assert_expr version of VRP.

	* params.opt (param_vrp2_mode): Make ranger the default for VRP2.
---
 gcc/params.opt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/params.opt b/gcc/params.opt
index 8c5948f7a84..6096854aa78 100644
--- a/gcc/params.opt
+++ b/gcc/params.opt
@@ -1156,7 +1156,7 @@  Common Joined Var(param_vrp1_mode) Enum(vrp_mode) Init(VRP_MODE_VRP) Param Optim
 --param=vrp1-mode=[vrp|ranger] Specifies the mode VRP1 should operate in.
 
 -param=vrp2-mode=
-Common Joined Var(param_vrp2_mode) Enum(vrp_mode) Init(VRP_MODE_VRP) Param Optimization
+Common Joined Var(param_vrp2_mode) Enum(vrp_mode) Init(VRP_MODE_RANGER) Param Optimization
 --param=vrp2-mode=[vrp|ranger] Specifies the mode VRP2 should operate in.
 
 Enum
-- 
2.17.2