Skip to content
  1. Sep 17, 2010
  2. Jul 16, 2010
  3. Jul 12, 2010
  4. Jul 07, 2010
  5. Jun 18, 2010
  6. Apr 17, 2010
  7. Apr 16, 2010
  8. Apr 15, 2010
  9. Apr 12, 2010
  10. Mar 19, 2010
  11. Mar 18, 2010
  12. Mar 12, 2010
  13. Mar 10, 2010
  14. Feb 23, 2010
    • Dan Gohman's avatar
      Remove the code which constant-folded ptrtoint(inttoptr(x)+c) to · 8a0eb36d
      Dan Gohman authored
      getelementptr. Despite only doing so in the case where x is a known
      array object and c can be converted to an index within range, this
      could still be invalid if c is actually the address of an object
      allocated outside of LLVM. Also, SCEVExpander, the original motivation
      for this code, has since been improved to avoid inttoptr+ptroint in
      more cases.
      
      llvm-svn: 96950
      8a0eb36d
  15. Feb 22, 2010
  16. Feb 17, 2010
  17. Feb 16, 2010
  18. Feb 15, 2010
  19. Feb 08, 2010
  20. Feb 01, 2010
    • Dan Gohman's avatar
      Generalize target-independent folding rules for sizeof to handle more · e5e1b7b0
      Dan Gohman authored
      cases, and implement target-independent folding rules for alignof and
      offsetof. Also, reassociate reassociative operators when it leads to
      more folding.
      
      Generalize ScalarEvolution's isOffsetOf to recognize offsetof on
      arrays. Rename getAllocSizeExpr to getSizeOfExpr, and getFieldOffsetExpr
      to getOffsetOfExpr, for consistency with analagous ConstantExpr routines.
      
      Make the target-dependent folder promote GEP array indices to
      pointer-sized integers, to make implicit casting explicit and exposed
      to subsequent folding.
      
      And add a bunch of testcases for this new functionality, and a bunch
      of related existing functionality.
      
      llvm-svn: 94987
      e5e1b7b0
  21. Jan 08, 2010
  22. Jan 02, 2010
  23. Dec 04, 2009
  24. Dec 03, 2009
  25. Nov 29, 2009
  26. Nov 23, 2009
  27. Nov 10, 2009
  28. Nov 06, 2009
  29. Oct 25, 2009
    • Chris Lattner's avatar
      Teach FoldBitCast to be able to handle bitcasts from (e.g.) i128 -> <4 x float>. · d8e8fb4d
      Chris Lattner authored
      This allows us to simplify this:
      union vec2d {
          double e[2];
          double v __attribute__((vector_size(16)));
      };
      typedef union vec2d vec2d;
      
      static vec2d a={{1,2}}, b={{3,4}};
          
      vec2d foo () {
          return (vec2d){ .v = a.v + b.v * (vec2d){{5,5}}.v };
      }
      
      down to:
      
      define %0 @foo() nounwind ssp {
      entry:
        %mrv5 = insertvalue %0 undef, double 1.600000e+01, 0 ; <%0> [#uses=1]
        %mrv6 = insertvalue %0 %mrv5, double 2.200000e+01, 1 ; <%0> [#uses=1]
        ret %0 %mrv6
      }
      
      instead of:
      
      define %0 @foo() nounwind ssp {
      entry:
        %mrv5 = insertvalue %0 undef, double extractelement (<2 x double> fadd (<2 x double> fmul (<2 x double> bitcast (<1 x i128> <i128 85174437667405312423031577302488055808> to <2 x double>), <2 x double> <double 3.000000e+00, double 4.000000e+00>), <2 x double> <double 1.000000e+00, double 2.000000e+00>), i32 0), 0 ; <%0> [#uses=1]
        %mrv6 = insertvalue %0 %mrv5, double extractelement (<2 x double> fadd (<2 x double> fmul (<2 x double> bitcast (<1 x i128> <i128 85174437667405312423031577302488055808> to <2 x double>), <2 x double> <double 3.000000e+00, double 4.000000e+00>), <2 x double> <double 1.000000e+00, double 2.000000e+00>), i32 1), 1 ; <%0> [#uses=1]
        ret %0 %mrv6
      }
      
      llvm-svn: 85040
      d8e8fb4d
    • Chris Lattner's avatar
      move FoldBitCast earlier in the file, and use it instead of · 9d051246
      Chris Lattner authored
      ConstantExpr::getBitCast in various places.
      
      llvm-svn: 85039
      9d051246
    • Chris Lattner's avatar
      refactor FoldBitCast to reduce nesting and to always return a constantexpr · c5fd5ad4
      Chris Lattner authored
      instead of returning null on failure.  No functionality change.
      
      llvm-svn: 85038
      c5fd5ad4
  30. Oct 24, 2009
Loading