This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa]: The dangers of keeping constants in phi nodes


In message <814E9985-3F37-11D8-9460-000A95DA505C@dberlin.org>, Daniel Berlin wr
ites:
 >
 >On Jan 4, 2004, at 10:10 PM, Daniel Berlin wrote:
 >
 >> If you rewrite a var which had a constant propagated into a phi node, 
 >> it loses the phi node value (IE it never unpropagates it temporarily, 
 >> or remembers it was there), and thus, you lose the initialization.
 >>
 >> There is no warning that this occurred, and unless you noticed it 
 >> otherwise, it's not easy to catch.
 >>
 >> This is clearly a bug.
 >
 >Grrr.
 >I never noticed that we can only rename *new* variables according to 
 >the API, so it's technically not a bug.
Use rewrite_vars_out_of_ssa to take the variable out of ssa form, then
use rewrite_into_ssa to put it back in SSA form.

[ The two interfaces into the rewriter need to be cleaned up so that there's
  a single interface to avoid this kind of confusion.  It's on my todo list. ]

Jeff




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]