Switch CodeMetrics itself over to use TTI to determine if an instruction
authorChandler Carruth <chandlerc@gmail.com>
Mon, 21 Jan 2013 13:04:33 +0000 (13:04 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 21 Jan 2013 13:04:33 +0000 (13:04 +0000)
commita5157e68d183e1bdf010e94a15dc0c44b65f889b
tree757e688c898997b0c45773e98ab1eee7de93f015
parent6097e774fc9896583ae916daabedbd87b26b4466
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
include/llvm/Analysis/CodeMetrics.h
lib/Analysis/CodeMetrics.cpp
lib/Analysis/TargetTransformInfo.cpp
lib/Transforms/Scalar/LoopRotation.cpp
lib/Transforms/Scalar/LoopUnrollPass.cpp
lib/Transforms/Scalar/LoopUnswitch.cpp