summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/CostModel.cpp
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-12-24 05:51:12 +0000
committerNadav Rotem <nrotem@apple.com>2012-12-24 05:51:12 +0000
commit99868e4f9ddb153e52e9cae19cd5b28eae356396 (patch)
tree72252eeb1484a9ce1801dbcf0f71b61e2b8a8208 /llvm/lib/Analysis/CostModel.cpp
parentcc80b551bf3abe7038d1637cb623d7a845dd531f (diff)
downloadbcm5719-llvm-99868e4f9ddb153e52e9cae19cd5b28eae356396.tar.gz
bcm5719-llvm-99868e4f9ddb153e52e9cae19cd5b28eae356396.zip
Update the docs of the cost model.
llvm-svn: 171016
Diffstat (limited to 'llvm/lib/Analysis/CostModel.cpp')
-rw-r--r--llvm/lib/Analysis/CostModel.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/CostModel.cpp b/llvm/lib/Analysis/CostModel.cpp
index 0d0a8933b35..28d6a864707 100644
--- a/llvm/lib/Analysis/CostModel.cpp
+++ b/llvm/lib/Analysis/CostModel.cpp
@@ -8,9 +8,12 @@
//===----------------------------------------------------------------------===//
//
// This file defines the cost model analysis. It provides a very basic cost
-// estimation for LLVM-IR. The cost result can be thought of as cycles, but it
-// is really unit-less. The estimated cost is ment to be used for comparing
-// alternatives.
+// estimation for LLVM-IR. This analysis uses the services of the codegen
+// to approximate the cost of any IR instruction when lowered to machine
+// instructions. The cost results are unit-less and the cost number represents
+// the throughput of the machine assuming that all loads hit the cache, all
+// branches are predicted, etc. The cost numbers can be added in order to
+// compare two or more transformation alternatives.
//
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud