llvm-6502/include/llvm/Analysis
Chandler Carruth f91f5af802 Start removing the use of an ad-hoc 'never inline' set and instead
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
2012-03-16 06:10:13 +00:00
..
AliasAnalysis.h Move isKnownNonNull from private implementation detail of BasicAA to a public 2012-02-25 10:56:28 +00:00
AliasSetTracker.h Make aliasesPointer and aliasesUnknownInst public members of AliasSet. 2012-02-10 15:52:37 +00:00
BlockFrequencyImpl.h Add some constantness to BranchProbabilityInfo and BlockFrequnencyInfo. 2011-12-20 20:03:10 +00:00
BlockFrequencyInfo.h Add some constantness to BranchProbabilityInfo and BlockFrequnencyInfo. 2011-12-20 20:03:10 +00:00
BranchProbabilityInfo.h Remove return heuristics from the static branch probabilities, and 2011-10-24 12:01:08 +00:00
CallGraph.h Teach the CallGraph to ignore calls to intrinsics. 2011-06-09 19:46:27 +00:00
CaptureTracking.h Move includes to the .cpp file. 2012-01-17 22:16:31 +00:00
CFGPrinter.h Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012: 2012-03-08 07:06:20 +00:00
CodeMetrics.h Pull the implementation of the code metrics out of the inline cost 2012-03-16 05:51:52 +00:00
ConstantFolding.h Split the interesting bits of ConstantFoldLoadThroughGEPConstantExpr 2012-01-24 05:43:50 +00:00
ConstantsScanner.h
DebugInfo.h Remove tabs. 2012-02-08 00:17:07 +00:00
DIBuilder.h Add support for runtime languages on our forward declarations. 2012-02-20 18:04:14 +00:00
DominanceFrontier.h Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:50:00 +00:00
DominatorInternals.h Change the Dominators recalculate() function to only rely on GraphTraits 2011-12-05 19:17:04 +00:00
Dominators.h Change the implementation of dominates(inst, inst) to one based on what the 2012-02-26 02:19:19 +00:00
DomPrinter.h add function passes for printing various dominator datastructures 2009-10-18 04:10:40 +00:00
DOTGraphTraitsPass.h Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
FindUsedTypes.h land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
InlineCost.h Start removing the use of an ad-hoc 'never inline' set and instead 2012-03-16 06:10:13 +00:00
InstructionSimplify.h Generalize the "trunc(ptrtoint(x)) - trunc(ptrtoint(y)) -> 2012-03-13 14:07:05 +00:00
Interval.h
IntervalIterator.h Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
IntervalPartition.h Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
IVUsers.h LSR fix: Add isSimplifiedLoopNest to IVUsers analysis. 2012-03-16 03:16:56 +00:00
LazyValueInfo.h Fix a few more places where TargetData/TargetLibraryInfo is not being passed. 2011-12-02 01:26:24 +00:00
LibCallAliasAnalysis.h Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
LibCallSemantics.h Remove the experimental AliasAnalysis::getDependency interface, which 2010-09-14 21:25:10 +00:00
Lint.h Remove unused STL header includes. 2011-04-23 19:53:52 +00:00
Loads.h enhance jump threading to preserve TBAA information when PRE'ing loads, 2012-03-13 18:07:41 +00:00
LoopDependenceAnalysis.h Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
LoopInfo.h Simplify more DenseMap.find users. 2012-01-04 21:41:24 +00:00
LoopIterator.h Cleanup. Remove an extraneous GraphTraits specialization. 2011-08-10 22:55:39 +00:00
LoopPass.h Reapply r138695. Fix PassManager stack depths. 2011-08-29 17:07:00 +00:00
MemoryBuiltins.h land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
MemoryDependenceAnalysis.h Refactor capture tracking (which already had a couple flags for whether returns 2011-11-14 22:49:42 +00:00
Passes.h The ARC language-specific optimizer. Credit to Dan Gohman. 2011-06-15 23:37:01 +00:00
PathNumbering.h Implementation of path profiling. 2011-01-29 01:09:53 +00:00
PathProfileInfo.h Remove unused STL header includes. 2011-04-23 19:53:52 +00:00
PHITransAddr.h Propagate TargetLibraryInfo throughout ConstantFolding.cpp and 2011-12-01 03:08:23 +00:00
PostDominators.h remove postdom frontiers, because it is dead. Forward dom frontiers are 2011-04-05 21:57:17 +00:00
ProfileInfo.h Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
ProfileInfoLoader.h Reapplied r81355 with the problems fixed. 2009-09-16 11:35:50 +00:00
ProfileInfoTypes.h This is #included by .c files. Remove C++-style comments. 2011-01-29 21:54:26 +00:00
RegionInfo.h Missed some users of Value::getNameStr. 2011-11-15 18:30:06 +00:00
RegionIterator.h Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
RegionPass.h Reapply r138695. Fix PassManager stack depths. 2011-08-29 17:07:00 +00:00
RegionPrinter.h Add new RegionInfo pass. 2010-07-22 07:46:31 +00:00
ScalarEvolution.h Clarified the SCEV getSmallConstantTripCount interface with in-your-face comments. 2012-01-11 06:52:55 +00:00
ScalarEvolutionExpander.h SCEVExpander fixes. Affects LSR and indvars. 2012-01-20 07:41:13 +00:00
ScalarEvolutionExpressions.h Remove dead code. Improve llvm_unreachable text. Simplify some control flow. 2012-02-19 11:37:01 +00:00
ScalarEvolutionNormalization.h Generalize IVUsers to track arbitrary expressions rather than expressions 2010-04-07 22:27:08 +00:00
SparsePropagation.h Eliminate unnecessary LLVMContexts. 2009-12-18 23:42:08 +00:00
Trace.h
ValueTracking.h reapply the patches reverted in r149470 that reenable ConstantDataArray, 2012-02-05 02:29:43 +00:00
Verifier.h Fix a comment. 2010-04-08 17:41:04 +00:00