- Aug 20, 2009
-
-
Dan Gohman authored
TargetData to find the pointer size. llvm-svn: 79490
-
Dan Gohman authored
array member of a struct, it's possible to land in an arbitrary position inside that struct, such that attempting to find further getelementptr indices will fail. In such cases, folding cannot be done. llvm-svn: 79485
-
- Aug 19, 2009
-
-
Dan Gohman authored
static extents of the static array type, it causes GlobalOpt and other passes to be more conservative. This canonicalization also allows the constant folder to add "inbounds" to GEPs. llvm-svn: 79440
-
Nick Lewycky authored
delete a newed pointer, and improve readability a little bit. llvm-svn: 79411
-
Dan Gohman authored
before performing optimizations based on constant string values. llvm-svn: 79384
-
- Aug 18, 2009
-
-
Dan Gohman authored
TargetData is not present. It still uses TargetData when available. This generalization also fixed some limitations in the TargetData case; the attached testcase covers this. llvm-svn: 79344
-
Dan Gohman authored
unruly indices for arrays that are members of structs. llvm-svn: 79337
-
- Aug 17, 2009
-
-
Nick Lewycky authored
llvm-svn: 79257
-
Nick Lewycky authored
llvm-svn: 79252
-
Nick Lewycky authored
llvm-svn: 79230
-
Nick Lewycky authored
llvm-svn: 79226
-
- Aug 16, 2009
-
-
Eli Friedman authored
unfoldable references to a PHI node in the block being folded, and disable the transformation in that case. The correct transformation of such PHI nodes depends on whether BB dominates Succ, and dominance is expensive to compute here. (Alternatively, it's possible to check whether any uses are live, but that's also essentially a dominance calculation. Another alternative is to use reg2mem, but it probably isn't a good idea to use that in simplifycfg.) Also, remove some incorrect code from CanPropagatePredecessorsForPHIs which is made unnecessary with this patch: it didn't consider the case where a PHI node in BB has multiple uses. llvm-svn: 79174
-
- Aug 15, 2009
-
-
Nick Lewycky authored
blocks. llvm-svn: 79132
-
- Aug 13, 2009
-
-
Mon P Wang authored
the new load by the old load instead of by the extract element because a store could have occurred between the load and extract element. llvm-svn: 78891
-
- Aug 12, 2009
-
-
Dan Gohman authored
using formatted_raw_ostream's PadToColumn. Before: bb1: ; preds = %bb %2 = sext i32 %i.01 to i64 ; <i64> [#uses=1] %3 = getelementptr double* %p, i64 %2 ; <double*> [#uses=1] %4 = load double* %3, align 8 ; <double> [#uses=1] %5 = fmul double %4, 1.100000e+00 ; <double> [#uses=1] %6 = sext i32 %i.01 to i64 ; <i64> [#uses=1] %7 = getelementptr double* %p, i64 %6 ; <double*> [#uses=1] After: bb1: ; preds = %bb %2 = sext i32 %i.01 to i64 ; <i64> [#uses=1] %3 = getelementptr double* %p, i64 %2 ; <double*> [#uses=1] %4 = load double* %3, align 8 ; <double> [#uses=1] %5 = fmul double %4, 1.100000e+00 ; <double> [#uses=1] %6 = sext i32 %i.01 to i64 ; <i64> [#uses=1] %7 = getelementptr double* %p, i64 %6 ; <double*> [#uses=1] Several tests required whitespace adjustments. llvm-svn: 78816
-
Dan Gohman authored
llvm-svn: 78812
-
Dan Gohman authored
llvm-svn: 78811
-
- Aug 11, 2009
-
-
Dan Gohman authored
llvm-svn: 78714
-
Dan Gohman authored
alignment. Only the minimum alignment guaranteed by the ABI may be assumed. llvm-svn: 78668
-
- Aug 04, 2009
-
-
Dan Gohman authored
llvm-svn: 78009
-
Dan Gohman authored
few places in InstCombine to use it, to fix problems handling pointer types. This fixes the recent llvm-gcc bootstrap error. llvm-svn: 78005
-
- Jul 31, 2009
-
-
Eli Friedman authored
llvm-svn: 77716
-
- Jul 30, 2009
-
-
Daniel Dunbar authored
- Call RAUW to delete all instructions (this is a patch from Nick Lewycky). llvm-svn: 77512
-
- Jul 29, 2009
-
-
Nick Lewycky authored
llvm-svn: 77439
-
Chris Lattner authored
llvm-svn: 77436
-
Nick Lewycky authored
into a new BB that has no predecessors. llvm-svn: 77433
-
- Jul 28, 2009
-
-
Dan Gohman authored
to a few tests where it is required for the expected transformation. llvm-svn: 77290
-
- Jul 23, 2009
-
-
Chris Lattner authored
llvm-svn: 76864
-
Chris Lattner authored
also apply to vectors. This allows us to compile this: #include <emmintrin.h> __m128i a(__m128 a, __m128 b) { return a==a & b==b; } __m128i b(__m128 a, __m128 b) { return a!=a | b!=b; } to: _a: cmpordps %xmm1, %xmm0 ret _b: cmpunordps %xmm1, %xmm0 ret with clang instead of to a ton of horrible code. llvm-svn: 76863
-
Chris Lattner authored
with negative tests: this test wasn't checking what it thought it was because it was grepping .bc, not .ll. llvm-svn: 76861
-
Chris Lattner authored
llvm-svn: 76860
-
- Jul 21, 2009
-
-
Dan Gohman authored
llvm-svn: 76527
-
Dan Gohman authored
llvm-svn: 76492
-
- Jul 20, 2009
-
-
Dan Gohman authored
Getelementptrs that are defined to wrap are virtually useless to optimization, and getelementptrs that are undefined on any kind of overflow are too restrictive -- it's difficult to ensure that all intermediate addresses are within bounds. I'm going to take a different approach. Remove a few optimizations that depended on this flag. llvm-svn: 76437
-
- Jul 19, 2009
-
-
Eli Friedman authored
insertelement/extractelement. I'm not entirely sure this is precisely what we want to do: should we prefer bitcast(insertelement) or insertelement(bitcast)? Similarly. should we prefer extractelement(bitcast) or bitcast(extractelement)? llvm-svn: 76345
-
- Jul 18, 2009
-
-
Eli Friedman authored
way (bitcast -> insert/extractelement). llvm-svn: 76325
-
Eli Friedman authored
sign bit set. llvm-svn: 76304
-
Eli Friedman authored
bitcasts. It would also be possible to canonicalize the other way; does anyone have a preference? llvm-svn: 76300
-
Eli Friedman authored
where int is 32 bits. llvm-svn: 76293
-
- Jul 16, 2009
-
-
Dan Gohman authored
analysis. This allows indvars to emit a simpler loop trip count expression. llvm-svn: 76085
-