Introduce a generic interface for querying an operation's expected
authorChandler Carruth <chandlerc@gmail.com>
Mon, 21 Jan 2013 01:27:39 +0000 (01:27 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 21 Jan 2013 01:27:39 +0000 (01:27 +0000)
commit511aa76048982fd13105ebe745b84592bd720272
tree7b52dbc5a1b5a88a5e3b97518fe330c8f73b92d6
parent3c7982dfd953fd030b479b379eb0730e08e47490
Introduce a generic interface for querying an operation's expected
lowered cost.

Currently, this is a direct port of the logic implementing
isInstructionFree in CodeMetrics. The hope is that the interface can be
improved (f.ex. supporting un-formed instruction queries) and the
implementation abstracted so that as we have test cases and target
knowledge we can expose increasingly accurate heuristics to clients.

I'll start switching existing consumers over and kill off the routine in
CodeMetrics in subsequent commits.

llvm-svn: 172998
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/lib/Analysis/TargetTransformInfo.cpp