[PATCH] Infer known bits from dominating conditions

Philip Reames listmail at philipreames.com
Tue Mar 10 11:11:51 PDT 2015


Updated to fix the early return bug.  Unfortunately, I'm now getting the performance impact I really expected to see all along.  Short version: We will need to be very selective about this.

Baseline (sqlite -03): 16.128-16.805

- Note the high variance.  Also, NEW BASELINE NUMBERS.  I have no idea why the baseline changed by 50%.  I've rebased on ToT, but nothing else should have changed.

Both Dom & Value based (unlimited): 18.416, 18.427 (ouch!)
Value only (unlimited): 17.349, 17.492
Dom only (unlimited): 17.462, 17.613
Value only (< 20 uses): 16.516 - 17.107
Dom + Value (< 20 each): 17.512 - 18.054
Value only (< 4 uses): 16.540-16.927
Dom only (< 4 blocks): 16.991 - 17.366

My take away here is that the dominance walk based implementation is more expensive than the value based one.

@Hal, can you give me a LGTM here?  I'd really prefer to work on this incrementally in tree with proper review at each change.  In particular, that likely would have caught my return typo issue and saved us all some time.

@sanjoy - will fix up whitespace and add a negative test or two


http://reviews.llvm.org/D7708

Files:
  lib/Analysis/ValueTracking.cpp
  test/Transforms/InstCombine/dom-conditions.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7708.21604.patch
Type: text/x-patch
Size: 13524 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150310/385d37d9/attachment.bin>


More information about the llvm-commits mailing list