This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] add --param ssa-name-def-chain-limit
- From: Martin Sebor <msebor at gmail dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Jeff Law <law at redhat dot com>
- Date: Fri, 12 Jul 2019 11:05:52 -0600
- Subject: Re: [PATCH] add --param ssa-name-def-chain-limit
- References: <email@example.com> <CAFiYyc1X_79ewEJ3qqL=aAjKb64Ea=iXsZc4crQEHnUnOJMoNg@mail.gmail.com>
On 7/12/19 3:35 AM, Richard Biener wrote:
On Thu, Jul 11, 2019 at 7:43 PM Martin Sebor <firstname.lastname@example.org> wrote:
Attached is a patch that adds a new parameter to limit the number
of SSA_NAME assignments for GCC to follow in iterative or recursive
algorithms. Purely as a proof of concept the patch introduces
the parameter into -Warray-bounds where the warning follows
POINTER_PLUS (and ASSERT_EXPR) assignments to get at the DECL
the final pointer points to.
With this "infrastructure" in place the parameter can start to be
introduced wherever else it might be necessary. I don't know of
any pathological cases where it actually is necessary (i.e., one
the 512 default keeps from going off the rails) so the test I have
put together for it is artificial. A better test case involving
one of the known recursive algorithms would be helpful.
The docs talk about diagnostics so I wonder if the param
name should include that as well, otherwise OK.
I committed the patch as is for now. The parameter's effect is
on both, optimization and diagnostics, so a generic name seems
like a good fit. Plus, I couldn't off hand think of a better
name. We can always change it if you or someone else comes up