Speed up the predicate used to decide when to inline by caching the size
authorChris Lattner <sabre@nondot.org>
Mon, 6 Oct 2003 15:52:43 +0000 (15:52 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 6 Oct 2003 15:52:43 +0000 (15:52 +0000)
commit884d6c4e10501116a8ff45616231564a2738dadd
tree54bd9970078b53c3f11032527fd6ece56a377135
parent2c9b913fc0fe0c6b2e41e84fc80f905a743ca054
Speed up the predicate used to decide when to inline by caching the size
of callees between executions.

On eon, in release mode, this changes the inliner from taking 11.5712s
to taking 2.2066s.  In debug mode, it went from taking 14.4148s to
taking 7.0745s.  In release mode, this is a 24.7% speedup of gccas, in
debug mode, it's a total speedup of 11.7%.

This also makes it slightly more aggressive.  This could be because we
are not judging the size of the functions quite as accurately as before.
When we start looking at the performance of the generated code, this can
be investigated further.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8893 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/InlineSimple.cpp