mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
f91f5af802
directly query the function information which this set was representing. This simplifies the interface of the inline cost analysis, and makes the always-inline pass significantly more efficient. Previously, always-inline would first make a single set of every function in the module *except* those marked with the always-inline attribute. It would then query this set at every call site to see if the function was a member of the set, and if so, refuse to inline it. This is quite wasteful. Instead, simply check the function attribute directly when looking at the callsite. The normal inliner also had similar redundancy. It added every function in the module with the noinline attribute to its set to ignore, even though inside the cost analysis function we *already tested* the noinline attribute and produced the same result. The only tricky part of removing this is that we have to be able to correctly remove only the functions inlined by the always-inline pass when finalizing, which requires a bit of a hack. Still, much less of a hack than the set of all non-always-inline functions was. While I was touching this function, I switched a heavy-weight set to a vector with sort+unique. The algorithm already had a two-phase insert and removal pattern, we were just needlessly paying the uniquing cost on every insert. This probably speeds up some compiles by a small amount (-O0 compiles with lots of always-inline, so potentially heavy libc++ users), but I've not tried to measure it. I believe there is no functional change here, but yell if you spot one. None are intended. Finally, the direction this is going in is to greatly simplify the inline cost query interface so that we can replace its implementation with a much more clever one. Along the way, all the APIs get simplified, so it seems incrementally good. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152903 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
AliasAnalysis.h | ||
AliasSetTracker.h | ||
BlockFrequencyImpl.h | ||
BlockFrequencyInfo.h | ||
BranchProbabilityInfo.h | ||
CallGraph.h | ||
CaptureTracking.h | ||
CFGPrinter.h | ||
CodeMetrics.h | ||
ConstantFolding.h | ||
ConstantsScanner.h | ||
DebugInfo.h | ||
DIBuilder.h | ||
DominanceFrontier.h | ||
DominatorInternals.h | ||
Dominators.h | ||
DomPrinter.h | ||
DOTGraphTraitsPass.h | ||
FindUsedTypes.h | ||
InlineCost.h | ||
InstructionSimplify.h | ||
Interval.h | ||
IntervalIterator.h | ||
IntervalPartition.h | ||
IVUsers.h | ||
LazyValueInfo.h | ||
LibCallAliasAnalysis.h | ||
LibCallSemantics.h | ||
Lint.h | ||
Loads.h | ||
LoopDependenceAnalysis.h | ||
LoopInfo.h | ||
LoopIterator.h | ||
LoopPass.h | ||
MemoryBuiltins.h | ||
MemoryDependenceAnalysis.h | ||
Passes.h | ||
PathNumbering.h | ||
PathProfileInfo.h | ||
PHITransAddr.h | ||
PostDominators.h | ||
ProfileInfo.h | ||
ProfileInfoLoader.h | ||
ProfileInfoTypes.h | ||
RegionInfo.h | ||
RegionIterator.h | ||
RegionPass.h | ||
RegionPrinter.h | ||
ScalarEvolution.h | ||
ScalarEvolutionExpander.h | ||
ScalarEvolutionExpressions.h | ||
ScalarEvolutionNormalization.h | ||
SparsePropagation.h | ||
Trace.h | ||
ValueTracking.h | ||
Verifier.h |