Re: [PATCH 1/2] Implement basic block path solver.

2021-07-27 Thread Jeff Law via Gcc-patches
On 7/27/2021 3:58 AM, Aldy Hernandez wrote: On Mon, Jul 26, 2021 at 9:10 PM Jeff Law wrote: On 7/2/2021 2:13 AM, Aldy Hernandez wrote: On 7/2/21 12:20 AM, Jeff Law wrote: On 6/28/2021 10:21 AM, Aldy Hernandez wrote: +// Internal construct to help facilitate debugging of solver. +#defi

Re: [PATCH 1/2] Implement basic block path solver.

2021-07-27 Thread Aldy Hernandez via Gcc-patches
On Mon, Jul 26, 2021 at 9:10 PM Jeff Law wrote: > > > > On 7/2/2021 2:13 AM, Aldy Hernandez wrote: > > > > > > On 7/2/21 12:20 AM, Jeff Law wrote: > >> > >> > >> On 6/28/2021 10:21 AM, Aldy Hernandez wrote: > > > >>> +// Internal construct to help facilitate debugging of solver. > >>> +#define DEB

Re: [PATCH 1/2] Implement basic block path solver.

2021-07-26 Thread Jeff Law via Gcc-patches
On 7/2/2021 2:13 AM, Aldy Hernandez wrote: On 7/2/21 12:20 AM, Jeff Law wrote: On 6/28/2021 10:21 AM, Aldy Hernandez wrote: +// Internal construct to help facilitate debugging of solver. +#define DEBUG_SOLVER getenv("DEBUG") Shouldn't this really be a property of what pass is using the

Re: [PATCH 1/2] Implement basic block path solver.

2021-07-15 Thread Aldy Hernandez via Gcc-patches
Jeff has mentioned that it'll take a while longer to review the threader rewrite, so I've decided to make some minor cleanups while he gets to it. There are few minor changes here: 1. I've renamed the solver to gimple-range-path.* which expresses better that it's part of the ranger tools. The pre

Re: [PATCH 1/2] Implement basic block path solver.

2021-07-02 Thread Andrew MacLeod via Gcc-patches
On 7/2/21 4:13 AM, Aldy Hernandez wrote: + +// Return the range of STMT as it would be seen at the end of the path +// being analyzed.  Anything but the final conditional in a BB will +// return VARYING. + +void +path_solver::range_in_path (irange &r, gimple *stmt) +{ +  if (gimple_code (stmt) ==

Re: [PATCH 1/2] Implement basic block path solver.

2021-07-02 Thread Aldy Hernandez via Gcc-patches
a few things to address noted above, but it's close. Attached is an updated patch. Tested on x86-64 Linux with bootstrap, regtests, as well as our callgrind benchmark suite. I also verified that the number of threading opportunities was the same. Aldy >From e70ab3b9849db45176f4ab

Re: [PATCH 1/2] Implement basic block path solver.

2021-07-01 Thread Jeff Law via Gcc-patches
On 6/28/2021 10:21 AM, Aldy Hernandez wrote: This is is the main basic block path solver for use in the ranger-based backwards threader. Given a path of BBs, the class can solve the final conditional or any SSA name used in calculating the final conditional. The main API is: // This class i

[PATCH 1/2] Implement basic block path solver.

2021-06-28 Thread Aldy Hernandez via Gcc-patches
This is is the main basic block path solver for use in the ranger-based backwards threader. Given a path of BBs, the class can solve the final conditional or any SSA name used in calculating the final conditional. The main API is: // This class is a basic block path solver. Given a set of BBs /