[llvm-commits] [llvm] r167324 - in /llvm/trunk: include/llvm/Analysis/Passes.h include/llvm/InitializePasses.h include/llvm/LinkAllPasses.h lib/Analysis/Analysis.cpp lib/Analysis/CMakeLists.txt lib/Analysis/CostModel.cpp test/Analysis/CostModel/

Nadav Rotem nrotem at apple.com
Fri Nov 2 16:39:41 PDT 2012


Code metrics runs on a function or a basic block and collects statics such as the number of dynamic allocas, or the number of vector instructions.  The Cost Model class attempts to estimate the execution cost. The only overlap that I see is that CodeMetrics has API for checking if a given instruction is free.  

On Nov 2, 2012, at 4:35 PM, Eli Friedman <eli.friedman at gmail.com> wrote:

> On Fri, Nov 2, 2012 at 2:48 PM, Nadav Rotem <nrotem at apple.com> wrote:
>> Author: nadav
>> Date: Fri Nov  2 16:48:17 2012
>> New Revision: 167324
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=167324&view=rev
>> Log:
>> Add a cost model analysis that allows us to estimate the cost of IR-level instructions.
>> 
>> Added:
>>    llvm/trunk/lib/Analysis/CostModel.cpp
>>    llvm/trunk/test/Analysis/CostModel/
>>    llvm/trunk/test/Analysis/CostModel/X86/
>>    llvm/trunk/test/Analysis/CostModel/X86/lit.local.cfg
>>    llvm/trunk/test/Analysis/CostModel/X86/tiny.ll
>>    llvm/trunk/test/Analysis/CostModel/X86/vectorized-loop.ll
>>    llvm/trunk/test/Analysis/CostModel/lit.local.cfg
>>    llvm/trunk/test/Analysis/CostModel/no_info.ll
>> Modified:
>>    llvm/trunk/include/llvm/Analysis/Passes.h
>>    llvm/trunk/include/llvm/InitializePasses.h
>>    llvm/trunk/include/llvm/LinkAllPasses.h
>>    llvm/trunk/lib/Analysis/Analysis.cpp
>>    llvm/trunk/lib/Analysis/CMakeLists.txt
> 
> How is this new pass related to the utilities in llvm/Analysis/CodeMetrics.h ?
> 
> -Eli




More information about the llvm-commits mailing list