public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14840] New: [tree-ssa] fold tree_code_type[CST] and tree_code_length[CST] in GCC itself
@ 2004-04-03 23:34 kazu at cs dot umass dot edu
  2004-04-03 23:49 ` [Bug optimization/14840] " kazu at cs dot umass dot edu
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-04-03 23:34 UTC (permalink / raw)
  To: gcc-bugs

In fold-const.i.t54.vars, I see

164 occurrences of tree_code_type[CST]
142 occurrences of tree_code_length[CST]

with checking enabled.

One possible solution is to

1. define tree_code_type as we do now,
2. define static_tree_code_type like tree_code_type but with static,
3. define TREE_CODE_CLASS like

#define TREE_CODE_CLASS(CODE)			\
  (__builtin_constant_p (CODE)			\
   ? static_tree_code_type[(int) (CODE)]	\
   : tree_code_type[(int) (CODE)])

4. fold static_const_array[CST] in CCP or wherever appropriate.
5. and then make sure that static_const_array is never emitted to asm
   (as its only use is to be folded.)

-- 
           Summary: [tree-ssa] fold tree_code_type[CST] and
                    tree_code_length[CST] in GCC itself
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: pessimizes-code
          Severity: enhancement
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kazu at cs dot umass dot edu
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14840


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

end of thread, other threads:[~2005-05-08 21:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-03 23:34 [Bug optimization/14840] New: [tree-ssa] fold tree_code_type[CST] and tree_code_length[CST] in GCC itself kazu at cs dot umass dot edu
2004-04-03 23:49 ` [Bug optimization/14840] " kazu at cs dot umass dot edu
2004-04-04  2:59 ` pinskia at gcc dot gnu dot org
2004-04-04  6:51 ` pinskia at gcc dot gnu dot org
2004-04-04  8:52 ` kazu at cs dot umass dot edu
2004-04-04 16:11 ` pinskia at gcc dot gnu dot org
2004-05-24 19:43 ` [Bug other/14840] " pinskia at gcc dot gnu dot org
2004-07-22  6:33 ` pinskia at gcc dot gnu dot org
2005-05-07  5:14 ` [Bug middle-end/14840] " kazu at cs dot umass dot edu
2005-05-08 17:00 ` pinskia at gcc dot gnu dot org
2005-05-08 21:30 ` kazu at cs dot umass dot edu

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