Skip to content
  1. Dec 12, 2012
  2. Dec 11, 2012
  3. Dec 10, 2012
    • Nadav Rotem's avatar
      36cdd826
    • Nadav Rotem's avatar
      Split the LoopVectorizer into H and CPP. · 07df5ac1
      Nadav Rotem authored
      llvm-svn: 169771
      07df5ac1
    • Bill Wendling's avatar
      Don't use a red zone for code coverage if the user specified `-mno-red-zone'. · 74f334e4
      Bill Wendling authored
      The `-mno-red-zone' flag wasn't being propagated to the functions that code
      coverage generates. This allowed some of them to use the red zone when that
      wasn't allowed.
      <rdar://problem/12843084>
      
      llvm-svn: 169754
      74f334e4
    • Nadav Rotem's avatar
      Add support for reverse induction variables. For example: · 7b5b55c1
      Nadav Rotem authored
      while (i--)
       sum+=A[i];
      
      llvm-svn: 169752
      7b5b55c1
    • Chandler Carruth's avatar
      Add a new visitor for walking the uses of a pointer value. · e41e7b79
      Chandler Carruth authored
      This visitor provides infrastructure for recursively traversing the
      use-graph of a pointer-producing instruction like an alloca or a malloc.
      It maintains a worklist of uses to visit, so it can handle very deep
      recursions. It automatically looks through instructions which simply
      translate one pointer to another (bitcasts and GEPs). It tracks the
      offset relative to the original pointer as long as that offset remains
      constant and exposes it during the visit as an APInt offset. Finally, it
      performs conservative escape analysis.
      
      However, currently it has some limitations that should be addressed
      going forward:
      1) It doesn't handle vectors of pointers.
      2) It doesn't provide a cheaper visitor when the constant offset
         tracking isn't needed.
      3) It doesn't support non-instruction pointer values.
      
      The current functionality is exactly what is required to implement the
      SROA pointer-use visitors in terms of this one, rather than in terms of
      their own ad-hoc base visitor, which was always very poorly specified.
      SROA has been converted to use this, and the code there deleted which
      this utility now provides.
      
      Technically speaking, using this new visitor allows SROA to handle a few
      more cases than it previously did. It is now more aggressive in ignoring
      chains of instructions which look like they would defeat SROA, but in
      fact do not because they never result in a read or write of memory.
      While this is "neat", it shouldn't be interesting for real programs as
      any such chains should have been removed by others passes long before we
      get to SROA. As a consequence, I've not added any tests for these
      features -- it shouldn't be part of SROA's contract to perform such
      heroics.
      
      The goal is to extend the functionality of this visitor going forward,
      and re-use it from passes like ASan that can benefit from doing
      a detailed walk of the uses of a pointer.
      
      Thanks to Ben Kramer for the code review rounds and lots of help
      reviewing and debugging this patch.
      
      llvm-svn: 169728
      e41e7b79
    • Chandler Carruth's avatar
      Fix PR14548: SROA was crashing on a mixture of i1 and i8 loads and stores. · e45f4658
      Chandler Carruth authored
      When SROA was evaluating a mixture of i1 and i8 loads and stores, in
      just a particular case, it would tickle a latent bug where we compared
      bits to bytes rather than bits to bits. As a consequence of the latent
      bug, we would allow integers through which were not byte-size multiples,
      a situation the later rewriting code was never intended to handle.
      
      In release builds this could trigger all manner of oddities, but the
      reported issue in PR14548 was forming invalid bitcast instructions.
      
      The only downside of this fix is that it makes it more clear that SROA
      in its current form is not capable of handling mixed i1 and i8 loads and
      stores. Sometimes with the previous code this would work by luck, but
      usually it would crash, so I'm not terribly worried. I'll watch the LNT
      numbers just to be sure.
      
      llvm-svn: 169719
      e45f4658
  4. Dec 09, 2012
  5. Dec 08, 2012
  6. Dec 07, 2012
    • Evgeniy Stepanov's avatar
      [msan] Remove readonly/readnone attributes from all called functions. · 383b61e7
      Evgeniy Stepanov authored
      MSan uses a TLS slot to pass shadow for function arguments and return values.
      This makes all instrumented functions not readonly, and at the same time
      requires that all callees of an instrumented function that may be
      MSan-instrumented do not have readonly attribute (otherwise some of the
      instrumentation may be optimized out).
      
      llvm-svn: 169591
      383b61e7
  7. Dec 06, 2012
  8. Dec 05, 2012
  9. Dec 04, 2012
    • Nadav Rotem's avatar
      Enable if-conversion during vectorization. · 87fc988c
      Nadav Rotem authored
      llvm-svn: 169331
      87fc988c
    • Nadav Rotem's avatar
      Fix a bug in vectorization of if-converted reduction variables. If the · 93fa5ef9
      Nadav Rotem authored
      reduction variable is not used outside the loop then we ran into an
      endless loop. This change checks if we found the original PHI.
      
      llvm-svn: 169324
      93fa5ef9
    • Shuxin Yang's avatar
      For rdar://12329730, last piece. · 73285933
      Shuxin Yang authored
        This change attempts to simplify (X^Y) -> X or Y in the user's context if we know that
      only bits from X or Y are demanded.
      
        A minimized case is provided bellow. This change will simplify "t>>16" into "var1 >>16".
      
        =============================================================
        unsigned foo (unsigned val1, unsigned val2) {
          unsigned t = val1 ^ 1234;
          return (t >> 16) | t; // NOTE: t is used more than once.
        }
        =============================================================
      
        Note that if the "t" were used only once, the expression would be finally optimized as well.
      However, with with this change, the optimization will take place earlier.
      
        Reviewed by Nadav, Thanks a lot!
      
      llvm-svn: 169317
      73285933
    • Nadav Rotem's avatar
      Add support for reduction variables when IF-conversion is enabled. · a10b311a
      Nadav Rotem authored
      llvm-svn: 169288
      a10b311a
Loading