[llvm-commits] [llvm] r171016 - /llvm/trunk/lib/Analysis/CostModel.cpp

Nadav Rotem nrotem at apple.com
Sun Dec 23 21:51:13 PST 2012


Author: nadav
Date: Sun Dec 23 23:51:12 2012
New Revision: 171016

URL: http://llvm.org/viewvc/llvm-project?rev=171016&view=rev
Log:
Update the docs of the cost model.

Modified:
    llvm/trunk/lib/Analysis/CostModel.cpp

Modified: llvm/trunk/lib/Analysis/CostModel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CostModel.cpp?rev=171016&r1=171015&r2=171016&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/CostModel.cpp (original)
+++ llvm/trunk/lib/Analysis/CostModel.cpp Sun Dec 23 23:51:12 2012
@@ -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.
 //
 //===----------------------------------------------------------------------===//
 





More information about the llvm-commits mailing list