This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: highpart life analysis

Hi Joern,

> 	* basic-block.h (struct basic_block_def): New members
> 	global_high_live_at_start and global_high_live_at_end.
> :

What does your pass do?  I am guessing that unnecessary zero/sign
extensions and such are deleted.  For example, consider:

unsigned short s0, s1, s2;

foo (void)
  unsigned long c = s0;
  s1 = c;
  s2 = c;

In this piece of code, the zero extension from s0 to c is unnecessary,
but ASAIK, no pass removes that.  Is this more or less correct?  Or am
I completely lost?

If that's the case, I like the idea, but I am afraid that having the
port explicitly specify attributes is a pain.  In a lot of cases, like
zero/sign exntesions or AND with certain constants, we can tell what
the attribute should be by looking at patterns.  (The down side is
that without the attribute, we would be adding more code doing rtl
pattern matching, which is often tough to read.)

Doing this in tree-ssa is probably another idea, but I don't know how
challenging that would be.

> +   including highpart lifeness calculations.  */
                         liveness (throughout the patch.)

Kazu Hirata

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]