[PATCH] [SimplifyCFG] Swap to using TargetTransformInfo for cost analysis.

James Molloy james.molloy at arm.com
Mon Feb 9 09:08:17 PST 2015


Hi hfinkel, t.p.northover,

We're already using TTI in SimplifyCFG, so remove the hard-baked "cheapness"
heuristic and use TTI directly. Generally NFC intended, but we're using a slightly
different heuristic now so there is a slight test churn.

Test changes:
  * combine-comparisons-by-cse.ll: Removed unneeded branch check.
  * 2014-08-04-muls-it.ll: Test now doesn't branch but emits muleq.
  * coalesce-subregs.ll: Superfluous block check.
  * 2008-01-02-hoist-fp-add.ll: fadd is safe to speculate. Change to udiv.
  * PhiBlockMerge.ll: Superfluous CFG checking code. Main checks still present.
  * select-gep.ll: A variable GEP is not expensive, just TCC_Basic, according to the TTI.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7506

Files:
  lib/Transforms/Utils/SimplifyCFG.cpp
  test/CodeGen/AArch64/arm64-promote-const.ll
  test/CodeGen/AArch64/combine-comparisons-by-cse.ll
  test/CodeGen/ARM/2014-08-04-muls-it.ll
  test/CodeGen/ARM/coalesce-subregs.ll
  test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll
  test/Transforms/SimplifyCFG/PhiBlockMerge.ll
  test/Transforms/SimplifyCFG/select-gep.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7506.19588.patch
Type: text/x-patch
Size: 16856 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150209/30801578/attachment.bin>


More information about the llvm-commits mailing list