[all-commits] [llvm/llvm-project] 784937: [BasicAA] Use smul_ov helper (NFCI)

Nikita Popov via All-commits all-commits at lists.llvm.org
Sat Nov 7 09:15:08 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 784937b9bbc56ac039ff8d51c47e1ca6743d9297
      https://github.com/llvm/llvm-project/commit/784937b9bbc56ac039ff8d51c47e1ca6743d9297
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-11-07 (Sat, 07 Nov 2020)

  Changed paths:
    M llvm/lib/Analysis/BasicAliasAnalysis.cpp

  Log Message:
  -----------
  [BasicAA] Use smul_ov helper (NFCI)

Instead of performing the multiplication in double the bit width
and using active bits to determine overflow, use the existing
smul_ov() APInt method to detect overflow.

The smul_ov() implementation is not particularly efficient, but
it's still better than doing this a wide, usually 128-bit, type.




More information about the All-commits mailing list