summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2013-01-21 13:04:33 +0000
committerChandler Carruth <chandlerc@gmail.com>2013-01-21 13:04:33 +0000
commita5157e68d183e1bdf010e94a15dc0c44b65f889b (patch)
tree757e688c898997b0c45773e98ab1eee7de93f015 /include
parent6097e774fc9896583ae916daabedbd87b26b4466 (diff)
downloadllvm-a5157e68d183e1bdf010e94a15dc0c44b65f889b.tar.gz
llvm-a5157e68d183e1bdf010e94a15dc0c44b65f889b.tar.bz2
llvm-a5157e68d183e1bdf010e94a15dc0c44b65f889b.tar.xz
Switch CodeMetrics itself over to use TTI to determine if an instruction
is free. The whole CodeMetrics API should probably be reworked more, but this is enough to allow deleting the duplicate code there for computing whether an instruction is free. All of the passes using this have been updated to pull in TTI and hand it to the CodeMetrics stuff. Further, a dead CodeMetrics API (analyzeFunction) is nuked for lack of users. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173036 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/CodeMetrics.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/llvm/Analysis/CodeMetrics.h b/include/llvm/Analysis/CodeMetrics.h
index 2a03b93fd8..086934d0e6 100644
--- a/include/llvm/Analysis/CodeMetrics.h
+++ b/include/llvm/Analysis/CodeMetrics.h
@@ -23,11 +23,9 @@ class BasicBlock;
class Function;
class Instruction;
class DataLayout;
+class TargetTransformInfo;
class Value;
-/// \brief Check whether an instruction is likely to be "free" when lowered.
-bool isInstructionFree(const Instruction *I, const DataLayout *TD = 0);
-
/// \brief Check whether a call will lower to something small.
///
/// This tests checks whether this callsite will lower to something
@@ -87,10 +85,7 @@ struct CodeMetrics {
NumInlineCandidates(0), NumVectorInsts(0), NumRets(0) {}
/// \brief Add information about a block to the current state.
- void analyzeBasicBlock(const BasicBlock *BB, const DataLayout *TD = 0);
-
- /// \brief Add information about a function to the current state.
- void analyzeFunction(Function *F, const DataLayout *TD = 0);
+ void analyzeBasicBlock(const BasicBlock *BB, const TargetTransformInfo &TTI);
};
}