| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
with calls, is
not unrolling loops that contain calls that would be better off getting inlined. This mostly
comes up when an interleaved devirtualization pass has devirtualized a call which the inliner
will inline on a future pass. Thus, rather than blocking all loops containing calls, add
a metric for "inline candidate calls" and block loops containing those instead.
llvm-svn: 113535
|
| |
|
|
|
|
|
|
| |
cannot be unrolled. After some discussion,
there seems to be a better way to achieve the same effect.
llvm-svn: 113528
|
| |
|
|
|
|
| |
Revert it.
llvm-svn: 113527
|
| |
|
|
| |
llvm-svn: 113526
|
| |
|
|
|
|
|
|
| |
when we unroll a loop.
Next step is to recalculate the threshold values given this new heuristic.
llvm-svn: 113525
|
| |
|
|
|
|
|
|
|
| |
contains a call, lower the
unrolling threshold to the optimize-for-size threshold. Basically, for loops containing calls, unrolling
can still be profitable as long as the loop is REALLY small.
llvm-svn: 113439
|
| |
|
|
|
|
| |
single test. Patch by Dirk Steinke!
llvm-svn: 113423
|
| |
|
|
|
|
|
|
|
|
| |
optimized for size.
The threshold value of 50 is arbitrary, and I chose it simply by analogy to the inlining thresholds, where
the baseline unrolling threshold is slightly smaller than the baseline inlining threshold. This could
undoubtedly use some tuning.
llvm-svn: 113306
|
| |
|
|
|
|
|
|
| |
turning (fptrunc (sqrt (fpext x))) -> (sqrtf x) is great, but we have
to delete the original sqrt as well. Not doing so causes us to do
two sqrt's when building with -fmath-errno (the default on linux).
llvm-svn: 113260
|
| |
|
|
|
|
|
|
|
| |
Switch from isWeakForLinker to mayBeOverridden which is more accurate.
Add more statistics and debugging info. Add comments. Move static function
outside anonymous namespace.
llvm-svn: 113190
|
| |
|
|
| |
llvm-svn: 113146
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the duplicated block instead of duplicating them.
Duplicating them into the end of the loop and the preheader
means that we got a phi node in the header of the loop,
which prevented LICM from hoisting them. GVN would
usually come around later and merge the duplicated
instructions so we'd get reasonable output... except that
anything dependent on the shoulda-been-hoisted value can't
be hoisted. In PR5319 (which this fixes), a memory value
didn't get promoted.
llvm-svn: 113134
|
| |
|
|
|
|
|
|
|
|
| |
Loop::hasLoopInvariantOperands method. Remove
a useless and confusing Loop::isLoopInvariant(Instruction)
method, which didn't do what you thought it did.
No functionality change.
llvm-svn: 113133
|
| |
|
|
| |
llvm-svn: 113115
|
| |
|
|
| |
llvm-svn: 113114
|
| |
|
|
| |
llvm-svn: 113113
|
| |
|
|
| |
llvm-svn: 113106
|
| |
|
|
|
|
| |
This reduces malloc traffic (yay!) and removes MergeFunctionsEqualityInfo.
llvm-svn: 113105
|
| |
|
|
|
|
|
| |
strong functions first to make sure they're the canonical definitions and then
do a second pass looking only for weak functions.
llvm-svn: 113104
|
| |
|
|
| |
llvm-svn: 113073
|
| |
|
|
|
|
|
| |
into an inner loop, as the new loop iteration may differ substantially.
This fixes PR8078.
llvm-svn: 113057
|
| |
|
|
|
|
|
|
| |
location is being re-stored to the memory location. We would get
a dangling pointer from the SSAUpdate data structure and miss a
use. This fixes PR8068
llvm-svn: 113042
|
| |
|
|
| |
llvm-svn: 113025
|
| |
|
|
|
|
|
|
| |
global when it
is provable that they're equivalent. This fixes PR4855.
llvm-svn: 112994
|
| |
|
|
| |
llvm-svn: 112878
|
| |
|
|
|
|
|
|
|
| |
I'm sure it is harmless. Original commit message:
If PrototypeValue is erased in the middle of using the SSAUpdator
then the SSAUpdator may access freed memory. Instead, simply pass
in the type and name explicitly, which is all that was used anyway.
llvm-svn: 112810
|
| |
|
|
| |
llvm-svn: 112763
|
| |
|
|
|
|
| |
infinite loops or exits will eventually exit. This fixes PR5373.
llvm-svn: 112745
|
| |
|
|
|
|
| |
if we schedule another LVI-using pass afterwards.
llvm-svn: 112722
|
| |
|
|
|
|
| |
self host errors on clang-x86-64.
llvm-svn: 112719
|
| |
|
|
|
|
|
| |
then the SSAUpdator may access freed memory. Instead, simply pass
in the type and name explicitly, which is all that was used anyway.
llvm-svn: 112699
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
on llvmdev: SRoA is introducing MMX datatypes like <1 x i64>,
which then cause random problems because the X86 backend is
producing mmx stuff without inserting proper emms calls.
In the short term, force off MMX datatypes. In the long term,
the X86 backend should not select generic vector types to MMX
registers. This is being worked on, but won't be done in time
for 2.8. rdar://8380055
llvm-svn: 112696
|
| |
|
|
|
|
| |
by 112440 are resolved.
llvm-svn: 112692
|
| |
|
|
|
|
|
| |
instead of hoisting them, just fold them away. This occurs in the
testcase for PR8041, for example.
llvm-svn: 112669
|
| |
|
|
| |
llvm-svn: 112643
|
| |
|
|
|
|
| |
duplicated code into a helper function.
llvm-svn: 112634
|
| |
|
|
| |
llvm-svn: 112628
|
| |
|
|
| |
llvm-svn: 112625
|
| |
|
|
|
|
| |
first failure.
llvm-svn: 112620
|
| |
|
|
|
|
|
|
|
| |
two are weak, we make them thunks to a new strong function) so don't iterate
through the function list as we're modifying it.
Also add back the outermost loop which got removed during the cleanups.
llvm-svn: 112595
|
| |
|
|
|
|
| |
safely simplify instructions after each block has been processed without worrying about iterator invalidation.
llvm-svn: 112594
|
| |
|
|
| |
llvm-svn: 112591
|
| |
|
|
| |
llvm-svn: 112590
|
| |
|
|
|
|
|
|
|
| |
constant-fold undef, and be more careful with its return value.
This actually exposed an infinite recursion bug in ComputeValueKnownInPredecessors which theoretically already existed (in JumpThreading's
handling of and/or of i1's), but never manifested before. This patch adds a tracking set to prevent this case.
llvm-svn: 112589
|
| |
|
|
|
|
|
| |
where we hash, compare and fold, instead of one iteration where we build up
the hash buckets and a second one to fold.
llvm-svn: 112582
|
| |
|
|
|
|
|
|
| |
discovered a miscompilation in it, and it's not easily
fixable at the optimizer level. I'll investigate reimplementing it in DAGCombine.
llvm-svn: 112575
|
| |
|
|
| |
llvm-svn: 112560
|
| |
|
|
| |
llvm-svn: 112553
|
| |
|
|
|
|
|
|
| |
constant folding methods. Additionally,
use the ConstantExpr::get*() methods to simplify some constant folding.
llvm-svn: 112550
|
| |
|
|
| |
llvm-svn: 112545
|