- Oct 25, 2012
-
-
Nadav Rotem authored
llvm-svn: 166642
-
Micah Villmow authored
llvm-svn: 166634
-
- Oct 24, 2012
-
-
Hal Finkel authored
GVN will now generate ptrtoint instructions for vectors of pointers. Fixes PR14166. llvm-svn: 166624
-
Nadav Rotem authored
llvm-svn: 166622
-
Nadav Rotem authored
llvm-svn: 166620
-
Micah Villmow authored
llvm-svn: 166607
-
Micah Villmow authored
Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this! llvm-svn: 166596
-
Micah Villmow authored
llvm-svn: 166591
-
Micah Villmow authored
This checkin also adds in some tests that utilize these paths and updates some of the clients. llvm-svn: 166578
-
- Oct 23, 2012
-
-
Nadav Rotem authored
Use the AliasAnalysis isIdentifiedObj because it also understands mallocs and c++ news. PR14158. llvm-svn: 166491
-
Duncan Sands authored
llvm-svn: 166475
-
Duncan Sands authored
%V = mul i64 %N, 4 %t = getelementptr i8* bitcast (i32* %arr to i8*), i32 %V into %t1 = getelementptr i32* %arr, i32 %N %t = bitcast i32* %t1 to i8* incorporating the multiplication into the getelementptr. This happens all the time in dragonegg, for example for int foo(int *A, int N) { return A[N]; } because gcc turns this into byte pointer arithmetic before it hits the plugin: D.1590_2 = (long unsigned int) N_1(D); D.1591_3 = D.1590_2 * 4; D.1592_5 = A_4(D) + D.1591_3; D.1589_6 = *D.1592_5; return D.1589_6; The D.1592_5 line is a POINTER_PLUS_EXPR, which is turned into a getelementptr on a bitcast of A_4 to i8*, so this becomes exactly the kind of IR that the transform fires on. An analogous transform (with no testcases!) already existed for bitcasts of arrays, so I rewrote it to share code with this one. llvm-svn: 166474
-
Richard Smith authored
every TU where it's implicitly instantiated, even if there's an implicit instantiation for the same types available in another TU. llvm-svn: 166470
-
Julien Lerouge authored
llvm-svn: 166456
-
Julien Lerouge authored
llvm-svn: 166454
-
- Oct 22, 2012
-
-
Julien Lerouge authored
deterministic, replace it with a DenseMap<std::pair<unsigned, unsigned>, PHINode*> (we already have a map from BasicBlock to unsigned). <rdar://problem/12541389> llvm-svn: 166435
-
Nadav Rotem authored
Fix by Shivarama Rao <Shivarama.Rao@amd.com> llvm-svn: 166427
-
Argyrios Kyrtzidis authored
llvm-svn: 166424
-
Hal Finkel authored
Unreachable blocks can have invalid instructions. For example, jump threading can produce self-referential instructions in unreachable blocks. Also, we should not be spending time optimizing unreachable code. Fixes PR14133. llvm-svn: 166423
-
Nadav Rotem authored
llvm-svn: 166410
-
Nadav Rotem authored
Vectorizer: optimize the generation of selects. If the condition is uniform, generate a scalar-cond select (i1 as selector). llvm-svn: 166409
-
Nadav Rotem authored
llvm-svn: 166408
-
Nick Lewycky authored
very small but very important bugfix: bool shouldExplore(Use *U) { Value *V = U->get(); if (isa<CallInst>(V) || isa<InvokeInst>(V)) [...] should have read: bool shouldExplore(Use *U) { Value *V = U->getUser(); if (isa<CallInst>(V) || isa<InvokeInst>(V)) Fixes PR14143! llvm-svn: 166407
-
NAKAMURA Takumi authored
It broke selfhosting stage2 in several builders. llvm-svn: 166406
-
Nick Lewycky authored
calls can be marked tail. llvm-svn: 166405
-
- Oct 21, 2012
-
-
Benjamin Kramer authored
It passes all tests, produces better results than the old code but uses the wrong pass, LoopDependenceAnalysis, which is old and unmaintained. "Why is it still in tree?", you might ask. The answer is obviously: "To confuse developers." Just swapping in the new dependency pass sends the pass manager into an infinte loop, I'll try to figure out why tomorrow. llvm-svn: 166399
-
Anders Carlsson authored
llvm-svn: 166395
-
Jakub Staszak authored
llvm-svn: 166393
-
Jakub Staszak authored
llvm-svn: 166392
-
Benjamin Kramer authored
Requires a lot less code and complexity on loop-idiom's side and the more precise analysis can catch more cases, like the one I included as a test case. This also fixes the edge-case miscompilation from PR9481. I'm not entirely sure that all cases are handled that the old checks handled but LDA will certainly become smarter in the future. llvm-svn: 166390
-
Nadav Rotem authored
We used a SCEV to detect that A[X] is consecutive. We assumed that X was the induction variable. But X can be any expression that uses the induction for example: X = i + 2; llvm-svn: 166388
-
Nadav Rotem authored
This is important for nested-loop reductions such as : In the innermost loop, the induction variable does not start with zero: for (i = 0 .. n) for (j = 0 .. m) sum += ... llvm-svn: 166387
-
Nadav Rotem authored
llvm-svn: 166386
-
Nadav Rotem authored
llvm-svn: 166384
-
- Oct 20, 2012
-
-
Nadav Rotem authored
PR14134. llvm-svn: 166379
-
Benjamin Kramer authored
llvm-svn: 166375
-
Benjamin Kramer authored
InstCombine: Fix an edge case where constant icmps could sneak into ConstantFoldInstOperands and crash. Have to refactor the ConstantFolder interface one day to define bugs like this away. Fixes PR14131. llvm-svn: 166374
-
Nadav Rotem authored
If the pointer is consecutive then it is safe to read and write. If the pointer is non-loop-consecutive then it is unsafe to vectorize it because we may hit an ordering issue. llvm-svn: 166371
-
Nadav Rotem authored
llvm-svn: 166367
-
Nadav Rotem authored
llvm-svn: 166366
-