| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
operators.
The test difference is just due to the multiplication operands
being commuted (and thus requiring a more elaborate match). In
optimized code, that expression would be folded.
llvm-svn: 96816
|
|
|
|
| |
llvm-svn: 96808
|
|
|
|
| |
llvm-svn: 96780
|
|
|
|
| |
llvm-svn: 96777
|
|
|
|
| |
llvm-svn: 96688
|
|
|
|
|
|
|
|
| |
true or false as its exit condition. These are usually eliminated by
SimplifyCFG, but the may be left around during a pass which wishes
to preserve the CFG.
llvm-svn: 96683
|
|
|
|
|
|
| |
to be spurious
llvm-svn: 96662
|
|
|
|
| |
llvm-svn: 96653
|
|
|
|
|
|
|
|
| |
a loop exit value, so that if a loop gets deleted, ScalarEvolution
isn't stick holding on to dangling SCEVAddRecExprs for that loop. This
fixes PR6339.
llvm-svn: 96626
|
|
|
|
|
|
|
|
| |
case where there are loop-invariant instructions somehow left
inside the loop, and in a position where they won't dominate
the IV increment position.
llvm-svn: 96448
|
|
|
|
| |
llvm-svn: 96432
|
|
|
|
| |
llvm-svn: 96395
|
|
|
|
| |
llvm-svn: 96378
|
|
|
|
|
|
|
| |
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
|
|
|
|
|
|
| |
strict about the requirements.
llvm-svn: 96301
|
|
|
|
|
|
| |
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!
llvm-svn: 96223
|
|
|
|
|
|
|
|
| |
name, test whether the SCEV itself is that temporary symbolic name,
in addition to checking whether the symbolic name appears as a
possibly-indirect operand.
llvm-svn: 96216
|
|
|
|
|
|
|
| |
insert location has become an "inserted" instruction since the time
it was saved. If so, advance to the first non-"inserted" instruction.
llvm-svn: 96203
|
|
|
|
|
|
|
|
|
| |
current insertion point, advance the current insertion point.
This avoids a use-before-def situation in a testcase extracted
from clang which is difficult to reduce to a reasonable-sized
regression test.
llvm-svn: 96151
|
|
|
|
|
|
| |
to override anything from the parent class.
llvm-svn: 96150
|
|
|
|
|
|
|
| |
SCEVAddRecExpr doesn't necessarily dominate blocks merely dominated
by all of its operands. This fixes an abort compiling 403.gcc.
llvm-svn: 96056
|
|
|
|
| |
llvm-svn: 96007
|
|
|
|
|
|
|
|
|
|
| |
bug fixes, and with improved heuristics for analyzing foreign-loop
addrecs.
This change also flattens IVUsers, eliminating the stride-oriented
groupings, which makes it easier to work with.
llvm-svn: 95975
|
|
|
|
|
|
| |
The "uses=" comments are just clutter in this context.
llvm-svn: 95799
|
|
|
|
| |
llvm-svn: 95781
|
|
|
|
| |
llvm-svn: 95582
|
|
|
|
| |
llvm-svn: 95461
|
|
|
|
| |
llvm-svn: 95453
|
|
|
|
|
|
|
| |
than int. This will make it more convenient for LSR, which does
a lot of things with int64_t offsets.
llvm-svn: 95281
|
|
|
|
| |
llvm-svn: 95240
|
|
|
|
| |
llvm-svn: 95044
|
|
|
|
| |
llvm-svn: 95022
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cases, and implement target-independent folding rules for alignof and
offsetof. Also, reassociate reassociative operators when it leads to
more folding.
Generalize ScalarEvolution's isOffsetOf to recognize offsetof on
arrays. Rename getAllocSizeExpr to getSizeOfExpr, and getFieldOffsetExpr
to getOffsetOfExpr, for consistency with analagous ConstantExpr routines.
Make the target-dependent folder promote GEP array indices to
pointer-sized integers, to make implicit casting explicit and exposed
to subsequent folding.
And add a bunch of testcases for this new functionality, and a bunch
of related existing functionality.
llvm-svn: 94987
|
|
|
|
|
|
|
|
| |
check whether the basic block has a terminator or not.
This API is used by clang and the test case is test/CodeGen/debug-info-crash.c in clang module.
llvm-svn: 94820
|
|
|
|
|
|
| |
(fix for PR6165) are needed here too.
llvm-svn: 94801
|
|
|
|
|
|
| |
rather than after.
llvm-svn: 94742
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use plain SCEVUnknowns with ConstantExpr::getSizeOf and
ConstantExpr::getOffsetOf constants. This eliminates a bunch of
special-case code.
Also add code for pattern-matching these expressions, for clients that
want to recognize them.
Move ScalarEvolution's logic for expanding array and vector sizeof
expressions into an element count times the element size, to expose
the multiplication to subsequent folding, into the regular constant
folder.
llvm-svn: 94737
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After running a batch of measurements, it is clear that the inliner metrics
need some adjustments:
Own argument bonus: 20 -> 5
Outgoing argument penalty: 0 -> 5
Alloca bonus: 10 -> 5
Constant instr bonus: 7 -> 5
Dead successor bonus: 40 -> 5*(avg instrs/block)
The new cost metrics are generaly 25 points higher than before, so we may need
to move thresholds.
With this change, InlineConstants::CallPenalty becomes a political correction:
if (!isa<IntrinsicInst>(II) && !callIsSmall(CS.getCalledFunction()))
NumInsts += InlineConstants::CallPenalty + CS.arg_size();
The code size is accurately modelled by CS.arg_size(). CallPenalty is added
because calls tend to take a long time, so it may not be worth it to inline a
function with lots of calls.
All of the political corrections are in the InlineConstants namespace:
IndirectCallBonus, CallPenalty, LastCallToStaticBonus, ColdccPenalty,
NoreturnPenalty.
llvm-svn: 94615
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bonus.
A GEP with all constant indices is already considered free by
analyzeBasicBlock(), so don't give it an extra bonus in
CountCodeReductionForAlloca().
This patch should remove a small positive bias toward inlining functions with
variable-index GEPs, and remove a smaller negative bias from functions with
all-constant index GEPs.
llvm-svn: 94591
|
|
|
|
|
|
|
|
|
|
| |
Functions containing indirectbr are marked NeverInline by analyzeBasicBlock(),
so there is no point in giving indirectbr special treatment in
CountCodeReductionForConstant. It is never called.
No functional change intended.
llvm-svn: 94590
|
|
|
|
|
|
|
|
| |
Save a few bytes by allocating the correct size vector.
No functional change intended.
llvm-svn: 94589
|
|
|
|
|
|
| |
c++ class that holds current class's vtable.
llvm-svn: 94586
|
|
|
|
|
|
| |
and clean up some loose ends.
llvm-svn: 94572
|
|
|
|
| |
llvm-svn: 94562
|
|
|
|
|
|
| |
than an iteration count.
llvm-svn: 94549
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
have trouble with an intermediate add overflowing. Also, be more conservative
about the case where the induction variable in an SLT loop exit can step past
the RHS of the SLT and overflow in a single step.
Make getSignedRange more aggressive, to recover for some common cases which
the above fixes pessimized.
This addresses rdar://7561161.
llvm-svn: 94512
|
|
|
|
| |
llvm-svn: 94491
|
|
|
|
| |
llvm-svn: 94378
|
|
|
|
| |
llvm-svn: 94262
|
|
|
|
| |
llvm-svn: 94256
|