| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
indicates whether the intrinsic has a defined result for a first
argument equal to zero. This will eventually allow these intrinsics to
accurately model the semantics of GCC's __builtin_ctz and __builtin_clz
and the X86 instructions (prior to AVX) which implement them.
This patch merely sets the stage by extending the signature of these
intrinsics and establishing auto-upgrade logic so that the old spelling
still works both in IR and in bitcode. The upgrade logic preserves the
existing (inefficient) semantics. This patch should not change any
behavior. CodeGen isn't updated because it can use the existing
semantics regardless of the flag's value.
Note that this will be followed by API updates to Clang and DragonEgg.
Reviewed by Nick Lewycky!
llvm-svn: 146357
|
| |
|
|
|
|
|
|
| |
Since we're not rewriting IVs in other loops, there's not much reason
to consider their stride when generating formulae.
This should reduce the number of useless formulas considered by LSR.
llvm-svn: 146302
|
| |
|
|
|
|
| |
malloc chicken-and-egg situation on Android and probably on other flavours of Linux. Patch by eugenis@google.com.
llvm-svn: 146284
|
| |
|
|
| |
llvm-svn: 146277
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
trivially infinite.
llvm-svn: 146197
|
| |
|
|
| |
llvm-svn: 146037
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
| |
llvm-svn: 145934
|
| |
|
|
|
|
|
|
|
| |
It's always good to prune early, but formulae that are unsatisfactory
in their own right need to be removed before running any other pruning
heuristics. We easily avoid generating such formulae, but we need them
as an intermediate basis for forming other good formulae.
llvm-svn: 145906
|
| |
|
|
| |
llvm-svn: 145880
|
| |
|
|
| |
llvm-svn: 145866
|
| |
|
|
|
|
|
|
| |
where this would be bad as the backend shouldn't have a problem inlining small
memcpys.
rdar://10510150
llvm-svn: 145865
|
| |
|
|
|
|
|
|
|
|
| |
basic blocks.
- 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
|
| |
|
|
| |
llvm-svn: 145801
|
| |
|
|
|
|
|
|
|
|
| |
causing the optimisation to occur
Turns out long long + unsigned long long is unsigned. Doh!
Fixes http://llvm.org/bugs/show_bug.cgi?id=11455
llvm-svn: 145731
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Add FIXMEs to places that are non-trivial to fix.
llvm-svn: 145661
|
| |
|
|
|
|
|
| |
where it appeared beneficial to pass.
More of rdar://10500969
llvm-svn: 145630
|
| |
|
|
|
|
| |
style issues and confusing comment
llvm-svn: 145618
|
| |
|
|
|
|
| |
call; use report_fatal_error when blacklist file can not be found
llvm-svn: 145611
|
| |
|
|
|
|
|
|
| |
(val != 0) == (-val != 0) so "abs(val) != 0" becomes "val != 0"
Fixes <rdar://problem/10482509>
llvm-svn: 145563
|
| |
|
|
|
|
|
| |
InstructionSimplify.cpp. Other fixups as needed.
Part of rdar://10500969
llvm-svn: 145559
|
| |
|
|
| |
llvm-svn: 145530
|
| |
|
|
|
|
|
|
| |
explicitly specified alignment.
<rdar://problem/10497732>.
llvm-svn: 145523
|
| |
|
|
| |
llvm-svn: 145470
|
| |
|
|
|
|
|
|
| |
(fptrunc (sqrt (fpext x))) -> (sqrtf x) transformation if -fno-builtin is
specified.
rdar://10466410
llvm-svn: 145460
|
| |
|
|
|
|
| |
not be changed inside the uses enumeration loop.
llvm-svn: 145432
|
| |
|
|
| |
llvm-svn: 145420
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
This reverts r139450, fixes r139453, and adds much needed comments and a
unit test.
llvm-svn: 145367
|
| |
|
|
|
|
| |
but I don't really want to try to write a testcase involving an invoke returning a pointer to a varargs function...
llvm-svn: 145347
|
| |
|
|
| |
llvm-svn: 145316
|
| |
|
|
|
|
| |
SCEV should now be used for trip count analysis, not LoopInfo.
llvm-svn: 145262
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
gcc, though I thought it was older (my gcc 4.4 has it as a local patch. Whoops!)
This fixes PR10589.
Also add some debugging statements.
Remove GcnoFiles, the mapping from CompilationUnit to raw_ostream. Now that we
start by iterating over each CU and descending into them, there's no need to
maintain a mapping.
llvm-svn: 145208
|
| |
|
|
| |
llvm-svn: 145154
|
| |
|
|
| |
llvm-svn: 145092
|
| |
|
|
|
|
|
|
| |
Suggested in code review by Eli.
That code in InstCombine looks kinda suspicious.
llvm-svn: 145013
|
| |
|
|
|
|
| |
large chunks of inline assembler
llvm-svn: 144962
|
| |
|
|
|
|
| |
r144933. For some reason this compiles on linux
llvm-svn: 144936
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
asan; add a test check that asan does not touch linkonce_odr
llvm-svn: 144933
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
looking at the size of the pointee. Fixes PR11390!
llvm-svn: 144773
|
| |
|
|
| |
llvm-svn: 144758
|
| |
|
|
| |
llvm-svn: 144748
|
| |
|
|
| |
llvm-svn: 144721
|
| |
|
|
| |
llvm-svn: 144675
|
| |
|
|
| |
llvm-svn: 144648
|
| |
|
|
| |
llvm-svn: 144536
|