[llvm-commits] More aggressive speculation in SimplifyCFG

Krzysztof Parzyszek kparzysz at codeaurora.org
Fri Jan 25 08:18:05 PST 2013


On 1/25/2013 5:06 AM, Duncan Sands wrote:
>
> I'm worried that TTI use is going to spread all over the IR optimizers
> because using it is tempting and easy, and not because people tried hard to do
> without it but failed.  By failed I mean when real-world programs show a
> significant improvement thanks to using target information, and it wasn't possible
> to get an equivalent improvement using a clever pure IR solution + codegen.

Clever, pure-IR solutions are nice, but given the variety of 
architectures (either present, or those that are not yet included in 
LLVM), they are often impossible to attain.  The ultimate goal of a 
compiler is to generate optimized code for a particular target.  From 
the user's perspective, it doesn't matter that much how it's done.
Of course, I'm not saying that it should be free-for-all, but we should 
not be overly restrictive in how specific targets want the IR to be 
processed.  Given a generic problem, a generic solution would always be 
preferred to a specific one, but in many practical situations the 
picture is not as clear.  Developers familiar with architecture X may 
not understand the impact of the changes on architecture Y, and their 
idea of what's good may turn out to be detrimental to others.

-Krzysztof


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the llvm-commits mailing list