[tree-ssa] CCP fixes

law@redhat.com law@redhat.com
Wed Feb 19 00:50:00 GMT 2003


In message <20030218234245.GG27530@redhat.com>, Richard Henderson writes:
 >On Tue, Feb 18, 2003 at 01:05:56PM -0700, law@redhat.com wrote:
 >> They fail because gimple doesn't allow arbitrary complex expressions
 >> to appear as call arguments.  You can have simple constants and variables.
 >> Something like PLUS_EXPR ... is not allowed.
 >
 >A plus of two constants should also be considered a constant,
 >for the purposes of GIMPLE.
It's not that simple.  If you allow that, then GIMPLE has to allow
for much more complex trees as operands for unary and binary operators.

In fact, you have to allow for arbitrarily complex trees since this
stuff is usually peppered with a bunch of NOP_EXPRs and CONVERT_EXPRS.

[ And note the tree-ssa code is littered with assumptions about 
  what is and what is not a valid operand for unary and binary
  operators.  ]

 >In rtl we have (const (plus (symbol_ref) (const_int))) to 
 >record this, but nothing similar in trees.
Yup.  I'm just not sure this concept is the best thing to re-introduce
into the gimple code.


Jeff



More information about the Gcc-patches mailing list