[PATCH] Teach IRCE to look at branch weights when recognizing range checks

Sanjoy Das sanjoy at playingwithpointers.com
Mon Jan 26 22:21:38 PST 2015


Hi reames, hfinkel,

Splitting a loop to make range checks redundant is profitable only if the range check "never" fails.  Make this fact a part of recognizing a range check -- a branch is a range check only if it is expected to pass (via branch_weights metadata).

http://reviews.llvm.org/D7192

Files:
  lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
  test/Transforms/IRCE/multiple-access-no-preloop.ll
  test/Transforms/IRCE/no-branch-weight.ll
  test/Transforms/IRCE/single-access-no-preloop.ll
  test/Transforms/IRCE/single-access-with-preloop.ll
  test/Transforms/IRCE/with-parent-loops.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7192.18796.patch
Type: text/x-patch
Size: 10082 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150127/309fcfd1/attachment.bin>


More information about the llvm-commits mailing list