This is the mail archive of the gcc-bugs@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]

[Bug optimization/14287] [tree-ssa] does not remove unnecessary extensions


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-17 01:46 -------
Actually it is not that involved at all.
Basically here is how my pass works:
For each block:
  For each statement in the block:
    is the statement is a modify expression and the RHS is a cast then:
      is the cast's operand's definition a modifiy express and its RHS a cast also:
        Do the inner and outer types match and is the intermediate's type size is larger or 
equal to the outer's type then remove change the statement to point to the outer variable.

Let DCE do its work with respect to getting rid of the intermediate variable.

-- 


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


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