| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 11793
|
| |
|
|
|
|
|
|
|
|
| |
This turns code like this:
if (X == 4 | X == 7)
and
if (X != 4 & X != 7)
into switch instructions.
llvm-svn: 11792
|
| |
|
|
| |
llvm-svn: 11565
|
| |
|
|
|
|
| |
see the testcase for the reasoning.
llvm-svn: 11496
|
| |
|
|
| |
llvm-svn: 11474
|
| |
|
|
|
|
|
| |
allowed in invoke instructions. Thus, if we are inlining a call to an intrinsic
function into an invoke site, we don't need to turn the call into an invoke!
llvm-svn: 11384
|
| |
|
|
|
|
|
| |
Having a proper 'select' instruction would allow the elimination of a lot
of the special case cruft in this patch, but we don't have one yet.
llvm-svn: 11307
|
| |
|
|
| |
llvm-svn: 11301
|
| |
|
|
|
|
| |
'unwind' dest
llvm-svn: 11202
|
| |
|
|
| |
llvm-svn: 11123
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
1. Don't scan to the end of alloca instructions in the caller function to
insert inlined allocas, just insert at the top. This saves a lot of
time inlining into functions with a lot of allocas.
2. Use splice to move the alloca instructions over, instead of remove/insert.
This allows us to transfer a block at a time, and eliminates a bunch of
silly symbol table manipulations.
This speeds up the inliner on the testcase in PR209 from 1.73s -> 1.04s (67%)
llvm-svn: 11118
|
| |
|
|
|
|
|
|
|
|
|
| |
basic block,
and that basic block ends with a return instruction. In this case, we can just splice
the cloned "body" of the function directly into the source basic block, avoiding a lot
of rearrangement and splitBasicBlock's linear scan over the split block. This speeds up
the inliner on the testcase in PR209 from 2.3s to 1.7s, a 35% reduction.
llvm-svn: 11116
|
| |
|
|
|
|
|
| |
before we delete the original call site, allowing slight simplifications of
code, but nothing exciting.
llvm-svn: 11109
|
| |
|
|
|
|
|
|
|
|
| |
process. The only optimization we did so far is to avoid creating a
PHI node, then immediately destroying it in the common case where the
callee has one return statement. Instead, we just don't create the return
value. This has no noticable performance impact, but paves the way for
future improvements.
llvm-svn: 11108
|
| |
|
|
|
|
|
|
| |
to add the cloned block to. This allows the block to be added to the function
immediately, and all of the instructions to be immediately added to the function
symbol table, which speeds up the inliner from 3.7 -> 3.38s on the PR209.
llvm-svn: 11107
|
| |
|
|
|
|
|
| |
process them all as a group. This speeds up SRoA/mem2reg from 28.46s to
0.62s on the testcase from PR209.
llvm-svn: 11100
|
| |
|
|
|
|
| |
SRoA/mem2reg from 41.2s to 27.5s on the testcase in PR209.
llvm-svn: 11099
|
| |
|
|
| |
llvm-svn: 10799
|
| |
|
|
| |
llvm-svn: 10792
|
| |
|
|
| |
llvm-svn: 10789
|
| |
|
|
|
|
| |
ConstantFoldTerminator
llvm-svn: 10785
|
| |
|
|
|
|
| |
case that the C/C++ front-end generates.
llvm-svn: 10761
|
| |
|
|
| |
llvm-svn: 10727
|
| |
|
|
| |
llvm-svn: 10529
|
| |
|
|
| |
llvm-svn: 10127
|
| |
|
|
| |
llvm-svn: 10111
|
| |
|
|
| |
llvm-svn: 10110
|
| |
|
|
| |
llvm-svn: 9903
|
| |
|
|
| |
llvm-svn: 9857
|
| |
|
|
| |
llvm-svn: 9853
|
| |
|
|
| |
llvm-svn: 9753
|
| |
|
|
| |
llvm-svn: 9739
|
| |
|
|
| |
llvm-svn: 9738
|
| |
|
|
|
|
|
|
|
|
| |
Added assert() to ensure symbol table is well formed.
Added code to remember the value that was found; resolving types can change
the symbol table and invalidate the value of the iterator.
Added comments to the ResolveTypes() function (mainly for my own benefit).
Please feel free to correct the comments if they are not accurate.
llvm-svn: 9693
|
| |
|
|
|
|
| |
Fix PR58
llvm-svn: 9530
|
| |
|
|
|
|
|
|
| |
PHI node entries for unwind instructions just like for call instructions which
became invokes! This fixes PR57, tested by
Inline/2003-10-26-InlineInvokeExceptionDestPhi.ll
llvm-svn: 9526
|
| |
|
|
| |
llvm-svn: 9357
|
| |
|
|
| |
llvm-svn: 9354
|
| |
|
|
| |
llvm-svn: 9321
|
| |
|
|
| |
llvm-svn: 9312
|
| |
|
|
|
|
| |
Header files will be on the way.
llvm-svn: 9298
|
| |
|
|
| |
llvm-svn: 9227
|
| |
|
|
| |
llvm-svn: 9171
|
| |
|
|
| |
llvm-svn: 9133
|
| |
|
|
|
|
|
|
| |
break dominance relationships, and is otherwise bad. This fixes bug:
Inline/2003-10-13-AllocaDominanceProblem.ll. This also fixes miscompilation
of 3 176.gcc source files (reload1.c, global.c, flow.c)
llvm-svn: 9109
|
| |
|
|
| |
llvm-svn: 9061
|
| |
|
|
| |
llvm-svn: 9027
|
| |
|
|
|
|
|
|
|
|
| |
Running the inliner on 252.eon used to take 48.4763s, now it takes 14.4148s.
In release mode, it went from taking 25.8741s to taking 11.5712s.
This also fixes a FIXME.
llvm-svn: 8890
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"minimal" SSA form (in other words, it doesn't insert dead PHIs). This
speeds up the mem2reg pass very significantly because it doesn't have to
do a lot of frivolous work in many common cases.
In the 252.eon function I have been playing with, this doesn't even insert
the 120 PHI nodes that it used to which were trivially dead (in the process
of promoting 356 alloca instructions overall). This speeds up the mem2reg
pass from 1.2459s to 0.1284s. More significantly, the DCE pass used to take
2.4138s to remove the 120 dead PHI nodes that mem2reg constructed, now it
takes 0.0134s (which is the time to scan the function and decide that there
is nothing dead). So overall, on this one function, we speed things up a
total of 3.5179s, which is a 24.8x speedup! :)
This change is tested by the Mem2Reg/2003-10-05-DeadPHIInsertion.ll test,
which now passes.
llvm-svn: 8884
|
| |
|
|
| |
llvm-svn: 8883
|