This is the mail archive of the
mailing list for the GCC project.
Re: RFA: highpart life analysis
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: joern dot rennecke at superh dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Jan 2004 14:05:34 -0500 (EST)
- Subject: Re: RFA: highpart life analysis
- References: <200401291745.i0THjBb20447@linsvr4.uk.superh.com>
> * basic-block.h (struct basic_block_def): New members
> global_high_live_at_start and global_high_live_at_end.
> (PROP_HIGH_LIFE, PROP_KILL_DEAD_EXTENDS): New defines.
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;
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.)