search for: branch_miss_penalty

Displaying 4 results from an estimated 4 matches for "branch_miss_penalty".

2008 Mar 29
2
[LLVMdev] Introducing a branch optimization and prediction pass
...f compiler can predict branch, don't apply this optimization * dynamically: can branch be predicted based on execution history (i.e. can CPU predict it?) * how to determine if a branch's body is small? if execution_cost_of(body) + execution_cost_of(cmov)/branch_miss_probability < branch_miss_penalty, or simply: execution_cost_of(body) < branch_miss_penalty If it is bigger, then it is faster if we take the miss penalty (and don't execute the body) But miss-penalties, and execution_costs are target specific, so use TargetData here (and teach it about penalties), or use som...
2008 Mar 31
0
[LLVMdev] Introducing a branch optimization and prediction pass
...ed on execution history > (i.e. can CPU predict it?) Based on profiling data from previous runs? Or dynamic profiling in JIT situation? > > * how to determine if a branch's body is small? > if execution_cost_of(body) + > execution_cost_of(cmov)/branch_miss_probability < branch_miss_penalty, > or simply: execution_cost_of(body) < branch_miss_penalty > If it is bigger, then it is faster if we take the miss penalty (and > don't execute the body) > But miss-penalties, and execution_costs are target specific, so use > TargetData here (and teach it about pena...
2008 Mar 31
2
[LLVMdev] Introducing a branch optimization and prediction pass
...t; Good idea. However in absence of profiling info there should be some heuristics, I am not sure what that could be ATM. > >> * how to determine if a branch's body is small? >> if execution_cost_of(body) + >> execution_cost_of(cmov)/branch_miss_probability < branch_miss_penalty, >> or simply: execution_cost_of(body) < branch_miss_penalty >> If it is bigger, then it is faster if we take the miss penalty (and >> don't execute the body) >> But miss-penalties, and execution_costs are target specific, so use >> TargetData here (and...
2008 Mar 31
0
[LLVMdev] Introducing a branch optimization and prediction pass
...n be done later. I think the first step should be to get the transformation piece ready. > > >> >>> * how to determine if a branch's body is small? >>> if execution_cost_of(body) + >>> execution_cost_of(cmov)/branch_miss_probability < >>> branch_miss_penalty, >>> or simply: execution_cost_of(body) < branch_miss_penalty >>> If it is bigger, then it is faster if we take the miss penalty >>> (and >>> don't execute the body) >>> But miss-penalties, and execution_costs are target specific, so &gt...