- Dec 09, 2011
-
-
Jakub Staszak authored
llvm-svn: 146277
-
Andrew Trick authored
Patch by Brendon Cahoon! This extends the existing LoopUnroll and LoopUnrollPass. Brendon measured no regressions in the llvm test suite with -unroll-runtime enabled. This implementation works by using the existing loop unrolling code to unroll the loop by a power-of-two (default 8). It generates an if-then-else sequence of code prior to the loop to execute the extra iterations before entering the unrolled loop. llvm-svn: 146245
-
- Dec 06, 2011
-
-
Benjamin Kramer authored
- Walking over pred_begin/pred_end is an expensive operation. - PHINodes contain a value for each predecessor anyway. - While it may look like we used to save a few iterations with the set, be aware that getIncomingValueForBlock does a linear search on the values of the phi node. - Another -5% on ARMDisassembler.cpp (Release build). This was the last entry in the profile that was obviously wasting time. llvm-svn: 145937
-
- Dec 05, 2011
-
-
Benjamin Kramer authored
- Calling getUser in a loop is much more expensive than iterating over a few instructions. - Use it instead of the open-coded loop in AddrModeMatcher. - 5% speedup on ARMDisassembler.cpp Release builds. llvm-svn: 145810
-
- Dec 02, 2011
-
-
Benjamin Kramer authored
Fix quadratic behavior in InlineFunction by fetching the personality function of the callee once and not for every invoke in the caller. The callee is usually smaller than the caller, too. This reduces the compile time of ARMDisassembler.cpp by 32% (Release build). It still takes ages to compile though. llvm-svn: 145690
-
- Dec 01, 2011
-
-
Chad Rosier authored
InstructionSimplify.cpp. Other fixups as needed. Part of rdar://10500969 llvm-svn: 145559
-
- Nov 29, 2011
-
-
Daniel Dunbar authored
llvm-svn: 145420
-
Duncan Sands authored
weak variable are compiled by different compilers, such as GCC and LLVM, while LLVM may increase the alignment to the preferred alignment there is no reason to think that GCC will use anything more than the ABI alignment. Since it is the GCC version that might end up in the final program (as the linkage is weak), it is wrong to increase the alignment of loads from the global up to the preferred alignment as the alignment might only be the ABI alignment. Increasing alignment up to the ABI alignment might be OK, but I'm not totally convinced that it is. It seems better to just leave the alignment of weak globals alone. llvm-svn: 145413
-
- Nov 20, 2011
-
-
Nick Lewycky authored
Suggested in code review by Eli. That code in InstCombine looks kinda suspicious. llvm-svn: 145013
-
- Nov 18, 2011
-
-
Andrew Trick authored
The right way to check for a binary operation is cast<BinaryOperator>. The original check: cast<Instruction> && numOperands() == 2 would match phi "instructions", leading to an infinite loop in extreme corner case: a useless phi with operands [self, constant] that prior optimization passes failed to remove, being used in the loop by another useless phi, in turn being used by an lshr or udiv. Fixes PR11350: runaway iteration assertion. llvm-svn: 144935
-
- Nov 17, 2011
-
-
Eli Friedman authored
Add support for custom names for library functions in TargetLibraryInfo. Add a custom name for fwrite and fputs on x86-32 OSX. Make SimplifyLibCalls honor the custom names for fwrite and fputs. Fixes <rdar://problem/9815881>. llvm-svn: 144876
-
- Nov 16, 2011
-
-
Kostya Serebryany authored
llvm-svn: 144748
-
- Nov 15, 2011
-
-
Benjamin Kramer authored
llvm-svn: 144675
-
- Nov 14, 2011
-
-
Benjamin Kramer authored
llvm-svn: 144536
-
- Nov 11, 2011
-
-
Daniel Dunbar authored
llvm-svn: 144416
-
- Nov 07, 2011
-
-
Bill Wendling authored
<rdar://problem/10405911> llvm-svn: 144000
-
- Nov 03, 2011
-
-
Daniel Dunbar authored
llvm-svn: 143634
-
- Nov 01, 2011
-
-
Devang Patel authored
Patch by Kostya Serebryany. llvm-svn: 143405
-
- Oct 24, 2011
-
-
Nick Lewycky authored
instructions. This doesn't introduce any optimizations we weren't doing before (except potentially due to pass ordering issues), now passes will eliminate them sooner as part of their own cleanups. llvm-svn: 142787
-
- Oct 21, 2011
-
-
Eli Friedman authored
llvm-svn: 142684
-
- Oct 20, 2011
-
-
Eli Friedman authored
Refactor code from inlining and globalopt that checks whether a function definition is unused, and enhance it so it can tell that functions which are only used by a blockaddress are in fact dead. This probably doesn't happen much on most code, but the Linux kernel's _THIS_IP_ can trigger this issue with blockaddress. (GlobalDCE can also handle the given tescase, but we only run that at -O3.) Found while looking at PR11180. llvm-svn: 142572
-
- Oct 17, 2011
-
-
Chandler Carruth authored
llvm-svn: 142162
-
- Oct 11, 2011
-
-
Lang Hames authored
promoting allocas to preferred alignments that exceed the natural alignment. This avoids some potentially expensive dynamic stack realignments. The natural stack alignment is set in target data strings via the "S<size>" option. Size is in bits and must be a multiple of 8. The natural stack alignment defaults to "unspecified" (represented by a zero value), and the "unspecified" value does not prevent any alignment promotions. Target maintainers that care about avoiding promotions should explicitly add the "S<size>" option to their target data strings. llvm-svn: 141599
-
- 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
-
Andrew Trick authored
llvm-svn: 141058
-
- Oct 02, 2011
-
-
Nick Lewycky authored
but not load instructions. Noticed by inspection. llvm-svn: 140966
-
- Sep 29, 2011
-
-
Eli Friedman authored
Clean up uses of switch instructions so they are not dependent on the operand ordering. Patch by Stepan Dyatkovskiy. llvm-svn: 140803
-
- 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
-
- Sep 21, 2011
-
-
Bill Wendling authored
Some passes require breaking critical edges before they're called. Don't segfault because of that. llvm-svn: 140196
-
- Sep 20, 2011
-
-
Bill Wendling authored
llvm-svn: 140172
-
Bill Wendling authored
llvm-svn: 140168
-
Bill Wendling authored
llvm-svn: 140164
-
Bill Wendling authored
llvm-svn: 140094
-
Bill Wendling authored
extract the landing pad block. Otherwise, there will be a situation where the invoke's unwind edge lands on a non-landing pad. We also forbid the user from extracting the landing pad block by itself. Again, this is not a valid transformation. llvm-svn: 140083
-
- Sep 19, 2011
-
-
Andrew Trick authored
llvm-svn: 140026
-
- Sep 05, 2011
-
-
Duncan Sands authored
exception. llvm-svn: 139117
-
- Aug 26, 2011
-
-
Benjamin Kramer authored
- Reword comments. - Allow undefined behavior interfering with undefined behavior. - Add address space checks. llvm-svn: 138619
-
Benjamin Kramer authored
SimplifyCFG: If we have a PHI node that can evaluate to NULL and do a load or store to the address returned by the PHI node then we can consider this incoming value as dead and remove the edge pointing there, unless there are instructions that can affect control flow executed in between. In theory this could be extended to other instructions, eg. division by zero, but it's likely that it will "miscompile" some code because people depend on div by zero not trapping. NULL pointer dereference usually leads to a crash so we should be on the safe side. This shrinks the size of a Release clang by 16k on x86_64. llvm-svn: 138618
-
- Aug 25, 2011
-
-
Bill Wendling authored
getFirstNonPHI so that it will skip over the landingpad instructions as well. llvm-svn: 138537
-
- Aug 24, 2011
-
-
Rafael Espindola authored
dominator information even though dominators were previously computed. Patch by Nick Sumner. llvm-svn: 138449
-