[PATCH] [SCEV] Extract and strengthen isHighCostExpansion.

Sanjoy Das sanjoy at playingwithpointers.com
Sat Apr 11 23:58:42 PDT 2015


Hi atrick,

  1. extract `isHighCostExpansion` from IndVarSimplify into
     SCEVExpander. This part is NFC.

  2. teach `isHighCostExpansion` to consider divisions by power-of-two
     constants as cheap.

A test case is added for (2).  (2) is needed for a new user of
`isHighCostExpansion` that will be added in a subsequent change.

http://reviews.llvm.org/D8993

Files:
  include/llvm/Analysis/ScalarEvolutionExpander.h
  lib/Analysis/ScalarEvolutionExpander.cpp
  lib/Transforms/Scalar/IndVarSimplify.cpp
  test/Transforms/IndVarSimplify/lftr-udiv-tripcount.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8993.23653.patch
Type: text/x-patch
Size: 10211 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150412/333bf2d3/attachment.bin>


More information about the llvm-commits mailing list