On 10/25/10 02:46, Frederic Riss wrote:
Hi,
The constant propagation pass propagates constants into the
instructions that accept immediates. I'm trying to find if there's
some CSE pass in GCC that would be able to undo this effect when the
constant is used more than once in the function. I looked at the CSE
code (4.5 branch) and I don't think this is currently possible. If the
code uses a bunch of big constants, the effect on code size might be
quite sensible.
There is currently no pass which does "un-cse"; however, using insn
splitting and operand costing and suitable insn constraints/predicates
you can usually arrange to avoid expensive constants in places where it
makes sense.
Perhaps if you gave us more information about the target and the
situations you're trying to avoid we could give more specific advice.
Jeff