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

Hal Finkel hfinkel at anl.gov
Mon Oct 29 04:47:06 PDT 2012


----- Original Message -----
> From: "Nadav Rotem" <nrotem at apple.com>
> To: "Duncan Sands" <baldrick at free.fr>
> Cc: llvm-commits at cs.uiuc.edu
> Sent: Sunday, October 28, 2012 11:48:43 PM
> Subject: Re: [llvm-commits] [llvm] r166865 - /llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
> 
> 
> Hi Duncan,
> 
> 
> 
> 
> 
> On Oct 28, 2012, at 7:39 AM, Duncan Sands < baldrick at free.fr > wrote:
> 
> 
> does this mean you are querying target lowering info to get these
> cost
> estimates? That doesn't make any sense to me.
> 
> 
> Yes. We ask TLI if the operation is legal (or custom or promote) or
> if it is 'expand'. This works in many cases.
> The idea is to provide a basic cost information for all targets. The
> cost information that we get is inaccurate, but it gives us a
> ballpark figure.
> The next step is to define backend-specific cost model that will give
> more accurate information.
> 
> 
> 
> Can't the whole cost
> estimate thing be its own independent world?

It could be, but then we'd need to maintain two separate sets of target-dependent information, a lot of which will be redundant. The existing targets already give us 80% of what we need (what types are legal, what operations are legal, how these things are legalized, etc.), and we get this for all targets without doing any additional work. To get beyond legalization costs, target-specific tables and code will be needed, and keeping all of the target-dependent code together seems like it makes the most sense.

Thanks again,
Hal

> 
> 
> I don't understand this.
> 
> 
> In fact it would be nice
> to have cost information for all targets regardless of whether
> codegen
> support for that target is even built (but maybe that's going too
> far).
> 
> I agree. This is what I want to get with the default implementation.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

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



More information about the llvm-commits mailing list