[PATCH] D10979: Update the branch weight metadata in JumpThreading pass.
Xinliang David Li
davidxl at google.com
Tue Jul 21 13:10:37 PDT 2015
On Tue, Jul 21, 2015 at 1:03 PM, Cong Hou <congh at google.com> wrote:
> congh added a comment.
> In http://reviews.llvm.org/D10979#208776, @davidxl wrote:
>> I suggest also adding another test case (documented in the PR -- the one that has problem with jump-threading + loop-rotation + jump-threading).
>> This reminds me of a way to do profile sanity check/validation when debug check is turned on:
>> 1. compute the BB freq before the pass
>> 2. cfg transformation + BB freq update
>> 3. branch probability weight update
>> 4. recompute BFI using updated weight in 3). The result of 4) should match that of 2).
> You mean comparing result from 4) and 1)? What if a CFG node is split? If CFG is modified, we may not be able to find one-to-one BB match.
I mean 4) vs 2) (the BB freq after incremental update). 2)+3) may
introduce bugs such that 4) won't compare equivalent with 2).
>To make a reasonable comparison, we may need to understand what the pass does...
yes. This will help that too. Suppose the pass does not do any of 2)
but does change the CFG, then comparison of 4) vs 1) will certainly
More information about the llvm-commits