- Oct 12, 2011
-
-
Nick Lewycky authored
llvm-svn: 141750
-
- Oct 11, 2011
-
-
Cameron Zwarich authored
would have never worked, since the element type of a vector type is never a vector type. Also fix the conditional to be more direct in checking whether EltTy is a vector type. llvm-svn: 141713
-
Cameron Zwarich authored
lowering of NEON code. It provides little-to-no benefit now and only introduces additional complexity. llvm-svn: 141646
-
Andrew Trick authored
I'm not sure we will need it in the long run, but the option is currently useful for checking if the output of LSR is "clean". llvm-svn: 141634
-
Andrew Trick authored
IVs. Indvars previously chose randomly between congruent IVs. Now it will bias the decision toward IVs that SCEVExpander likes to create. This was not done to fix any problem, it's just a welcome side effect of factoring code. llvm-svn: 141633
-
- Oct 08, 2011
-
-
Andrew Trick authored
Fixes rdar://problem/5064068 llvm-svn: 141442
-
- Oct 07, 2011
-
-
Duncan Sands authored
switch (n) { case 27: do_something(x); ... } the call do_something(x) will be replaced with do_something(27). In gcc-as-one-big-file this results in the removal of about 500 lines of bitcode (about 0.02%), so has about 1/10 of the effect of propagating branch conditions. llvm-svn: 141360
-
Eli Friedman authored
llvm-svn: 141333
-
- Oct 06, 2011
-
-
Eli Friedman authored
While I'm here, fix the related issue with strncmp, add some actual tests for strcmp and strncmp, and start using StringRef::compare for constant folding instead of using strcmp/strncmp so that the optimized IR isn't dependent on the host's implementation of strcmp. llvm-svn: 141227
-
- Oct 05, 2011
-
-
Duncan Sands authored
branch "br i1 %x, label %if_true, label %if_false" then it replaces "%x" with "true" in places only reachable via the %if_true arm, and with "false" in places only reachable via the %if_false arm. Except that actually it doesn't: if value numbering shows that %y is equal to %x then, yes, %y will be turned into true/false in this way, but any occurrences of %x itself are not transformed. Fix this. What's more, it's often the case that %x is an equality comparison such as "%x = icmp eq %A, 0", in which case every occurrence of %A that is only reachable via the %if_true arm can be replaced with 0. Implement this and a few other variations on this theme. This reduces the number of lines of LLVM IR in "GCC as one big file" by 0.2%. It has a bigger impact on Ada code, typically reducing the number of lines of bitcode by around 0.4% by removing repeated compiler generated checks. Passes the LLVM nightly testsuite and the Ada ACATS testsuite. llvm-svn: 141177
-
Duncan Sands authored
it's OK for the false/true destination to have multiple predecessors as long as the extra ones are dominated by the branch destination. llvm-svn: 141176
-
- Oct 04, 2011
-
-
Andrew Trick authored
This handles the case in which LSR rewrites an IV user that is a phi and splits critical edges originating from a switch. Fixes <rdar://problem/6453893> LSR is not splitting edges "nicely" llvm-svn: 141059
-
- Oct 01, 2011
-
-
Andrew Trick authored
We want heuristics to be based on accurate data, but more importantly we don't want llvm to behave randomly. A benign trunc inserted by an upstream pass should not cause a wild swings in optimization level. See PR11034. It's a general problem with threshold-based heuristics, but we can make it less bad. llvm-svn: 140919
-
- Sep 30, 2011
-
-
Nick Lewycky authored
llvm-svn: 140821
-
Dan Gohman authored
handle the case where the retain is in a different basic block. rdar://10210274. llvm-svn: 140815
-
Dan Gohman authored
objc_retainBlock call is potentially responsible for copying the block to the heap to extend its lifetime. rdar://10209613. llvm-svn: 140814
-
- Sep 29, 2011
-
-
Andrew Trick authored
llvm-svn: 140769
-
Andrew Trick authored
Rewriting the entire loop nest now requires -enable-lsr-nested. See PR11035 for some performance data. A few unit tests specifically test nested LSR, and are now under a flag. llvm-svn: 140762
-
- Sep 28, 2011
-
-
Andrew Trick authored
llvm-svn: 140670
-
- Sep 27, 2011
-
-
Benjamin Kramer authored
Stop emitting instructions with the name "tmp" they eat up memory and have to be uniqued, without any benefit. If someone prefers %tmp42 to %42, run instnamer. llvm-svn: 140634
-
Bill Wendling authored
split landingpad instructions into a PHI node. PR11016 llvm-svn: 140592
-
Andrew Trick authored
Disabling aggressive LSR saves compilation time, and with the new indvars behavior usually improves performance. llvm-svn: 140590
-
Andrew Trick authored
llvm-svn: 140583
-
Andrew Trick authored
The minor bug heuristic was noticed by inspection. I added the isLoser/isValid helpers because they will become more important with subsequent checkins. llvm-svn: 140580
-
- Sep 24, 2011
-
-
Andrew Trick authored
No test case. Noticed by inspection and I doubt it ever affects the outcome of the overall heuristic, let alone final codegen. llvm-svn: 140431
-
- Sep 22, 2011
-
-
Eli Friedman authored
llvm-svn: 140327
-
- Sep 21, 2011
-
-
Eli Friedman authored
Make sure IPSCCP never marks a tracked call as overdefined in SCCPSolver::ResolvedUndefsIn. If we do, we can end up in a situation where a function is resolved to return a constant, but the caller is marked overdefined, which confuses the code later. <rdar://problem/9956541> (again). llvm-svn: 140210
-
- Sep 15, 2011
-
-
Andrew Trick authored
llvm-svn: 139842
-
- Sep 14, 2011
-
-
Dan Gohman authored
which could theoretically throw. llvm-svn: 139710
-
Dan Gohman authored
in memory relevant to the optimizer. rdar://10050579. llvm-svn: 139708
-
- Sep 13, 2011
-
-
Andrew Trick authored
llvm-svn: 139583
-
Andrew Trick authored
llvm-svn: 139579
-
Andrew Trick authored
llvm-svn: 139574
-
Eli Friedman authored
llvm-svn: 139571
-
Eli Friedman authored
llvm-svn: 139565
-
- Sep 12, 2011
-
-
Eli Friedman authored
No tests; these changes aren't really interesting in the sense that the logic is the same for volatile and atomic. I believe this completes all of the changes necessary for the optimizer to handle loads and stores correctly. I'm going to try and come up with some additional testing, though. llvm-svn: 139533
-
Andrew Trick authored
llvm-svn: 139517
-
- Sep 10, 2011
-
-
Andrew Trick authored
better. Don't immediately give up when an add operation can't be trivially sign/zero-extended within a loop. If it has NSW/NUW flags, generate a new expression with sign extended (non-recurrent) operand. As before, if SCEV says that all sign extends are loop invariant, then we can widen the operation. llvm-svn: 139453
-
- Sep 09, 2011
-
-
Andrew Trick authored
llvm-svn: 139375
-
- Sep 06, 2011
-
-
Andrew Trick authored
llvm-svn: 139169
-