summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/InlineCost.h
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-05-04 00:58:03 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-05-04 00:58:03 +0000
commitd5003cafd6fc86acaf8e09ef0ca1dc899da8850e (patch)
tree16436eec4ec4c6a95b3d9d05d07c64aacebb18f1 /include/llvm/Analysis/InlineCost.h
parenta83a6d3725a9a488e2d10c1f2af46d9c6d82958d (diff)
downloadllvm-d5003cafd6fc86acaf8e09ef0ca1dc899da8850e.tar.gz
llvm-d5003cafd6fc86acaf8e09ef0ca1dc899da8850e.tar.bz2
llvm-d5003cafd6fc86acaf8e09ef0ca1dc899da8850e.tar.xz
A pile of long over-due refactorings here. There are some very, *very*
minor behavior changes with this, but nothing I have seen evidence of in the wild or expect to be meaningful. The real goal is unifying our logic and simplifying the interfaces. A summary of the changes follows: - Make 'callIsSmall' actually accept a callsite so it can handle intrinsics, and simplify callers appropriately. - Nuke a completely bogus declaration of 'callIsSmall' that was still lurking in InlineCost.h... No idea how this got missed. - Teach the 'isInstructionFree' about the various more intelligent 'free' heuristics that got added to the inline cost analysis during review and testing. This mostly surrounds int->ptr and ptr->int casts. - Switch most of the interesting parts of the inline cost analysis that were essentially computing 'is this instruction free?' to use the code metrics routine instead. This way we won't keep duplicating logic. All of this is motivated by the desire to allow other passes to compute a roughly equivalent 'cost' metric for a particular basic block as the inline cost analysis. Sadly, re-using the same analysis for both is really messy because only the actual inline cost analysis is ever going to go to the contortions required for simplification, SROA analysis, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156140 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/InlineCost.h')
-rw-r--r--include/llvm/Analysis/InlineCost.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/include/llvm/Analysis/InlineCost.h b/include/llvm/Analysis/InlineCost.h
index 691c2d19be..0cba135222 100644
--- a/include/llvm/Analysis/InlineCost.h
+++ b/include/llvm/Analysis/InlineCost.h
@@ -127,10 +127,6 @@ namespace llvm {
// adding a replacement API.
InlineCost getInlineCost(CallSite CS, Function *Callee, int Threshold);
};
-
- /// callIsSmall - If a call is likely to lower to a single target instruction,
- /// or is otherwise deemed small return true.
- bool callIsSmall(const Function *Callee);
}
#endif