public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@redhat.com>
To: Andrew MacLeod <amacleod@redhat.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [COMMITTED 4/4] - Gimple range PHI analyzer and testcases
Date: Thu, 25 May 2023 10:00:30 +0200	[thread overview]
Message-ID: <401f35cd-a0e2-33ee-520e-b721500cb021@redhat.com> (raw)
In-Reply-To: <6a24c0bf-aa0d-5e13-6852-705605db15ec@redhat.com>

Some minor nits.

> +// There can be only one running at a time.
> +static phi_analyzer *phi_analysis_object = NULL;

Shouldn't this be phi_analyzer_object to be more consistent?  Similarly 
throughout.

> +// Create a new phi_group with members BM, initialvalue INIT_VAL, modifier
> +// statement MOD, and resolve values using query Q.
> +// Calculate the range for the gropup if possible, otherwise set it to
> +// VARYING.
> +
> +phi_group::phi_group (bitmap bm, tree init_val, edge e, gimple *mod,
> +		      range_query *q)

Could you document what this edge refers to?

> +  // we dont expect a modifer and no inital value, so trap to have a look.
> +  // perhaps they are dead cycles and we can just used UNDEFINED.

"We don't"...

"Perhaps..."

s/used/use

> +// Return 0 if S is not a modifier statment for group members BM.
> +// If it could be a modifier, return which operand position (1 or 2)
> +// the phi member occurs in.
> +unsigned
> +phi_group::is_modifier_p (gimple *s, const bitmap bm)

"not" a modifier?  Or *is* a modifier?

s/statment/statement

> +  // Look at the modifier for any relation

Missing final period.

> +  for (unsigned x = 0; x< 10; x++)

Space before "<"

> +  // Never converged, so bail for now. we could examine the pattern
> +  // from m_initial to m_vr as an extension  Especially if we had a way
> +  // to project the actual number of iterations (SCEV?)

s/we/We/

s/extension Especially/extension, especially/

> +// IF the modifier statement has a relation K between the modifier and the

s/IF/If/

> +  // If the type wraps, then relations dont tell us much.

s/dont/don't/

> +//   m_tab.safe_grow_cleared (num_ssa_names + 100);

why is this commented out?

> +	  // Other non-ssa names that arent constants are not understood

s/arent/aren't/

> +	  // Try to create a group based on m_current. If a result comes back

Two spaces after period.

> +  // If this dpoesn;t form a group, all members are instead simple phis.

doesn't

> +// their arguemnts contain nothing but other PHI defintions, with at most

arguments
definitions

> +// These are the APIs to start and stop a phi analyzerin a SCEV like manner.

analyzer

Thanks for working on this.
Aldy


      parent reply	other threads:[~2023-05-25  8:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 21:19 Andrew MacLeod
2023-05-25  7:03 ` Richard Biener
2023-05-25 14:01   ` Andrew MacLeod
2023-05-25  8:00 ` Aldy Hernandez [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=401f35cd-a0e2-33ee-520e-b721500cb021@redhat.com \
    --to=aldyh@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).