| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
|
| |
|
|
| |
llvm-svn: 95453
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
commit.
llvm-svn: 93473
|
| |
|
|
| |
llvm-svn: 93462
|
| |
|
|
|
|
| |
optimized away in codegen.
llvm-svn: 93453
|
| |
|
|
|
|
| |
and frequently optimized functions.
llvm-svn: 93448
|
| |
|
|
|
|
| |
columns.
llvm-svn: 85732
|
| |
|
|
| |
llvm-svn: 85724
|
| |
|
|
|
|
| |
an indirectbr.
llvm-svn: 85702
|
| |
|
|
| |
llvm-svn: 85351
|
| |
|
|
|
|
| |
more.
llvm-svn: 85316
|
| |
|
|
|
|
|
| |
Remove LowerAllocations pass.
Update some more passes to treate free calls just like they were treating FreeInst.
llvm-svn: 85176
|
| |
|
|
|
|
| |
subclass of AllocationInst, so it no longer is necessary.
llvm-svn: 84969
|
| |
|
|
| |
llvm-svn: 84299
|
| |
|
|
| |
llvm-svn: 84015
|
| |
|
|
|
|
|
| |
named CodeMetrics. Move it to be a non-nested class. Rename RegionInfo
back to FunctionInfo.
llvm-svn: 84013
|
|
|
llvm-svn: 83998
|