[PATCH] Improve the cost evaluation of LSR

Wei Mi wmi at google.com
Mon May 11 14:06:38 PDT 2015


Hi,

I separated the existing and new cost model code, and used the following options to choose the cost model.

  -lsrmodel                                               - Choose the LSR cost model:
    =basic                                                -   enable basic cost model
    =aggr-unlimited                                       -   enable aggressive cost model and assume unlimited hard regs
    =aggr-estimate                                        -   enable aggressive cost model and estimate reg pressure
    =aggr-few                                             -   enable aggressive cost model and assume very few hard regs

-lsrmodel=basic is the existing implementation.  -lsrmodel=aggr-estimate is the new cost model. -lsrmodel=aggr-unlimited and -lsrmodel=aggr-few represent the cases when we have unlimited hardregs or very few hardregs.

It is very appreciated to try the new cost model on various platforms, so it can be improved based on more testcases.

Other changes includes adding two testcases and fixing an inst increase regression on x86.

Thanks,
Wei.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9429

Files:
  include/llvm/Analysis/TargetTransformInfo.h
  include/llvm/Analysis/TargetTransformInfoImpl.h
  include/llvm/CodeGen/BasicTTIImpl.h
  include/llvm/Target/TargetLowering.h
  lib/Analysis/TargetTransformInfo.cpp
  lib/Target/AArch64/AArch64ISelLowering.cpp
  lib/Target/AArch64/AArch64ISelLowering.h
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/ARM/ARMISelLowering.h
  lib/Transforms/Scalar/LoopStrengthReduce.cpp
  test/Transforms/LoopStrengthReduce/new_cost_1.ll
  test/Transforms/LoopStrengthReduce/new_cost_2.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9429.25507.patch
Type: text/x-patch
Size: 44495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150511/19d0314a/attachment.bin>


More information about the llvm-commits mailing list