[llvm-commits] [llvm] r166865 - /llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp

Hal Finkel hfinkel at anl.gov
Fri Oct 26 22:35:43 PDT 2012


----- Original Message -----
> From: "Nadav Rotem" <nrotem at apple.com>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: llvm-commits at cs.uiuc.edu
> Sent: Saturday, October 27, 2012 12:16:18 AM
> Subject: Re: [llvm-commits] [llvm] r166865 - /llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
> 
> 
> 
> 
> On Oct 26, 2012, at 10:08 PM, Hal Finkel < hfinkel at anl.gov > wrote:
> 
> 
> To be fair, I think we expected this. I see two general solutions:
> 1. Cover all such cases with target hooks
> 
> 
> 
> This is possible.
> 
> 
> 2. When the cost of some operation is requested, actually compile it
> (make a small selection DAG and run instruction selection), and then
> use the result (we could just count the number of machine
> instructions, for example). We'd need to cache the results for this
> to be practical.
> 
> 
> 
> I don't think that this is a good approach. The compile time for this
> kind of mechanism would be very high.
> 
> 
> We can build an off-line tool that would compile IR to assembly. We
> can use this (off-line) tool to generate cost-tables.
> 

Makes sense. I suggest that we put in target hooks for the time being. Once that works well, we'll know what the tool should have generated ;)

 -Hal

> 
> 
> 
> What do you think?
> 
> -Hal
> 
> 
> 
> 
> Thanks,
> Nadav

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list