[all-commits] [llvm/llvm-project] 676f28: [CostModel][AArch64] Don't dereference CostTblEntr...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Sep 29 08:42:18 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 676f2809b5eb632cebac672112f42148771f4617
      https://github.com/llvm/llvm-project/commit/676f2809b5eb632cebac672112f42148771f4617
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-09-29 (Wed, 29 Sep 2021)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp

  Log Message:
  -----------
  [CostModel][AArch64] Don't dereference CostTblEntry before null check.

Fix static analysis warning that we check for null Entry after dereferencing it.

I don't think this can actually happen as i8/i16 should legalize to use the i32 path which should return a cost - but I'd rather play it safe that rely on an implicit type legalization.


  Commit: 7674bd4d44921d2d110cfb56f2674d4e6e8a68e3
      https://github.com/llvm/llvm-project/commit/7674bd4d44921d2d110cfb56f2674d4e6e8a68e3
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-09-29 (Wed, 29 Sep 2021)

  Changed paths:
    M clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.cpp

  Log Message:
  -----------
  [clang-tidy] Merges separate isa<>/assert/unreachable/dyn_cast<>/cast<> calls

We can directly use cast<> instead of separate dyn_cast<> with assertions as cast<> will perform this for us.

Similarly we can replace a if(isa<>)+cast<>/dyn_cast<> with if(dyn_cast<>)


  Commit: 17f1fc1e5452186795b04fd388532f8bca26c31b
      https://github.com/llvm/llvm-project/commit/17f1fc1e5452186795b04fd388532f8bca26c31b
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-09-29 (Wed, 29 Sep 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/test/Analysis/CostModel/X86/interleaved-load-i16-stride-2.ll
    M llvm/test/Analysis/CostModel/X86/interleaved-load-i16-stride-3.ll
    M llvm/test/Analysis/CostModel/X86/interleaved-load-i16-stride-4.ll
    M llvm/test/Analysis/CostModel/X86/interleaved-load-i16-stride-5.ll
    M llvm/test/Analysis/CostModel/X86/interleaved-load-i16-stride-6.ll
    M llvm/test/Analysis/CostModel/X86/interleaved-load-i8-stride-2.ll
    M llvm/test/Analysis/CostModel/X86/interleaved-store-i16-stride-2.ll
    M llvm/test/Analysis/CostModel/X86/interleaved-store-i16-stride-3.ll
    M llvm/test/Analysis/CostModel/X86/interleaved-store-i16-stride-4.ll
    M llvm/test/Analysis/CostModel/X86/interleaved-store-i16-stride-5.ll
    M llvm/test/Analysis/CostModel/X86/interleaved-store-i16-stride-6.ll
    M llvm/test/Analysis/CostModel/X86/interleaved-store-i8-stride-2.ll
    M llvm/test/Transforms/LoopVectorize/X86/interleaving.ll

  Log Message:
  -----------
  [TTI] BasicTTI::getInterleavedMemoryOpCost(): use getScalarizationOverhead()

getScalarizationOverhead() results in a somewhat better cost estimation than counting the insertion/extraction costs directly. Notably, this is still overestimating the costs.

Original Patch by: @lebedev.ri (Roman Lebedev)

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


Compare: https://github.com/llvm/llvm-project/compare/210cbcf4767b...17f1fc1e5452


More information about the All-commits mailing list