[llvm-commits] [llvm] r115364 - in /llvm/trunk: include/llvm/Target/TargetInstrInfo.h lib/CodeGen/IfConversion.cpp lib/Target/ARM/ARMBaseInstrInfo.cpp lib/Target/ARM/ARMBaseInstrInfo.h lib/Target/ARM/Thumb2InstrInfo.cpp lib/Target/ARM/Thumb2InstrInfo.h

Owen Anderson resistor at mac.com
Fri Oct 1 15:57:55 PDT 2010


On Oct 1, 2010, at 3:54 PM, Evan Cheng wrote:

> 
> On Oct 1, 2010, at 3:45 PM, Owen Anderson wrote:
> 
>> Author: resistor
>> Date: Fri Oct  1 17:45:50 2010
>> New Revision: 115364
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=115364&view=rev
>> Log:
>> Thread the determination of branch prediction hit rates back through the if-conversion heuristic APIs.  For now,
>> stick with a constant estimate of 90% (branch predictors are good!), but we might find that we want to provide
>> more nuanced estimates in the future.
> 
> Should it be target specific?


It could be, but I doubt it would differ enough (unless a microarchitecture varies radically from standard practice) to make a difference.

The way it set up now, the if-converter is the one in the position to make prediction estimates (since it has visibility of the CFG, while the target hooks don't).  It passes those estimate into the target hook, which can use them (or not) as it pleases in determining is if conversion is worthwhile.

--Owen



More information about the llvm-commits mailing list