public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Marking variable as addressable from within SSA pass
@ 2004-03-19 17:02 Bonzini
  2004-03-19 21:57 ` Richard Henderson
  0 siblings, 1 reply; 8+ messages in thread
From: Bonzini @ 2004-03-19 17:02 UTC (permalink / raw)
  To: gcc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 1347 bytes --]

Hi,

I am trying to implement vector operation lowering as an SSA pass.  The 
pass is similar to tree-complex; I work on tree-ssa, slightly modified to
use bsi's also at -O0 similar to what is done in the tree-profiling branch,
but this is ok (it bootstraps).

So far I made it work as a non-SSA pass which I run just before
expanding, but I would like to run it as well just after loop
optimization, so that dom can clean up the code it generates.

The pass takes, for example,

  V4QI T_1;
  V4QI T_2;
  V4QI T_3;
  T_3 = T_1 & T_2;

and converts it into

  V4QI T_1;
  V4QI T_2;
  V4QI T_3;
  unsigned int *T_4;
  unsigned int *T_5;
  unsigned int *T_6;
  unsigned int T_7;
  unsigned int T_8;
  T_4 = (unsigned int *) &T_1;  
  T_5 = (unsigned int *) &T_2;  
  T_6 = (unsigned int *) &T_3;  
  T_7 = *T_4;
  T_8 = *T_5;
  T_9 = T_4 & T_5;
  *T_6 = T_9;

I do tweak the alias sets of the unsigned int *Ã that I generate.  All
this mess should hopefully be cleaned up by dom -- indeed even CSE and
ADDRESSOF manage to clean most of it.

I am setting the TREE_ADDRESSABLE bit of T_1, T_2 and T_3 but it is not
enough.  During variable renaming, stmt_ann returns an error_mark and
then everything goes haywire until I get an ICE near note_addressable.
Is there anything more I should do to mark these variables as
addressable?

Thank you,

Paolo

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Marking variable as addressable from within SSA pass
@ 2004-03-19 22:06 Richard Kenner
  2004-03-19 22:09 ` Richard Henderson
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Kenner @ 2004-03-19 22:06 UTC (permalink / raw)
  To: rth; +Cc: gcc

    You do not want to do this.  Addressing variables SEVERELY pessimizes
    the code.  Use a VIEW_CONVERT_EXPR to change the type instead.

Amusing that this tree code, originally viewed as Ada-specific, will
find another use!

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-03-21 19:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-19 17:02 Marking variable as addressable from within SSA pass Bonzini
2004-03-19 21:57 ` Richard Henderson
2004-03-20 18:09   ` Paolo Bonzini
2004-03-20 22:08     ` Richard Henderson
2004-03-21 18:17       ` Paolo Bonzini
2004-03-21 23:07         ` Richard Henderson
2004-03-19 22:06 Richard Kenner
2004-03-19 22:09 ` Richard Henderson

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).