This is the mail archive of the gcc-patches@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] Temporary Expression Replacement in SSA->normal.


    >   int y = 3;
    >   return x*y;

    there's nothing stopping the transformation to

      T.1 = x << 1;
      T.2 = T.1 + x;
      return T.2;

    from happening at the tree level.  

Sure there is: it may not be faster on the target.  It's not hard to
envision a processor that has a single-cyle multiply instruction.
Code choice decisions like this belong in the code generation part of
the compiler.


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