[all-commits] [llvm/llvm-project] cc9155: [SCEV] Delay strengthening of nowrap flags

Nikita Popov via All-commits all-commits at lists.llvm.org
Sun Nov 1 13:19:32 PST 2020


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

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

  Log Message:
  -----------
  [SCEV] Delay strengthening of nowrap flags

Strengthening nowrap flags is relatively expensive. Make sure we
only do it if we're actually going to use the flags -- we don't
use them for many recursive invocations. Additionally, if we're
reusing an existing SCEV node, there's no point in trying to
strengthen the flags if we don't have any new baseline facts.

This change falls slightly short of being NFC, because the way
flags during add+addrec / mul+addrec folding are handled may be
more precise (as less operands are included in the calculation).




More information about the All-commits mailing list