OSDN Git Service

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)
commit1e05bd9e714934a71ff933ad15f0b884808b405f
treeac88d8e6500233bc36043f2e2e19629d12d1cafa
parentf3c437b167a98cbe47cace318989f1807b523cd5
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172998 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/TargetTransformInfo.h
lib/Analysis/TargetTransformInfo.cpp