[all-commits] [llvm/llvm-project] e32bd3: [CostModel] mostly remove cost-kind predicate for ...

RotateRight via All-commits all-commits at lists.llvm.org
Fri Nov 20 08:37:41 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e32bd35120438734e58ef3e2c85d36fda47d1be5
      https://github.com/llvm/llvm-project/commit/e32bd35120438734e58ef3e2c85d36fda47d1be5
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-11-20 (Fri, 20 Nov 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/test/Analysis/CostModel/ARM/arith-overflow.ll
    M llvm/test/Analysis/CostModel/ARM/arith-ssat.ll
    M llvm/test/Analysis/CostModel/ARM/arith-usat.ll
    M llvm/test/Analysis/CostModel/ARM/intrinsic-cost-kinds.ll
    M llvm/test/Analysis/CostModel/X86/fmaxnum-size-latency.ll
    M llvm/test/Analysis/CostModel/X86/fminnum-size-latency.ll
    M llvm/test/Analysis/CostModel/X86/intrinsic-cost-kinds.ll
    M llvm/test/Transforms/LoopVectorize/X86/gather_scatter.ll

  Log Message:
  -----------
  [CostModel] mostly remove cost-kind predicate for intrinsics in basic TTI implementation

This is re-applying a combination of f7eac51b9b3f and 8ec7ea3ddce7 as one patch
to avoid regressions now that we have better testing in place.

Those were reverted with 32dd5870ee31 because of crashing in experimental intrinsics.
That bug should be fixed with 7ae346434.

Paraphrased original commit messages:

This is the last step in removing cost-kind as a consideration in the
basic class model for intrinsics.
See D89461 for the start of that.
Subsequent commits dealt with each of the special-case intrinsics that
had customization here in the basic class. This should remove a barrier
to retrying D87188 (canonicalization to the abs intrinsic).

The ARM and x86 cost diffs seen here may be wrong because the
target-specific overrides have their own bugs, but we hope this is
less wrong - if something has a significant throughput cost, then it
should have a significant size / blended cost too by default.

The only behavioral diff in current regression tests is shown in the
x86 scatter-gather test (which is misplaced or broken because it runs
the entire -O3 pipeline) - we unrolled less, and we assume that is
a improvement.

Exception: in general, we want the *size* cost for a scalar call to be
cheap even if the other costs are expensive - we expect it to just be
a branch with some optional stack manipulation.

It is likely that we will want to carve out some
exceptions/overrides to this rule as follow-up patches for
calls that have some general and/or target-specific difference
to the expected lowering.

This was noticed as a regression in unrolling, so we have a test
for that now along with a couple of direct cost model tests.

If the assumed scalarization costs for the oversized vector
calls are not realistic, that would be another follow-up
refinement of the cost models.

Differential Revision: https://reviews.llvm.org/D90554




More information about the All-commits mailing list