[all-commits] [llvm/llvm-project] 184852: [CodeMetrics] Don't require speculatability for ep...

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Oct 21 11:30:25 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 184852584231c60156fb4ec7eddb228b13837c39
      https://github.com/llvm/llvm-project/commit/184852584231c60156fb4ec7eddb228b13837c39
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-10-21 (Thu, 21 Oct 2021)

  Changed paths:
    M llvm/lib/Analysis/CodeMetrics.cpp
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/Inline/ephemeral.ll
    M llvm/test/Transforms/SimplifyCFG/unprofitable-pr.ll

  Log Message:
  -----------
  [CodeMetrics] Don't require speculatability for ephemeral values

As discussed in D112016, our current requirement of speculatability
for ephemeral is overly strict: What we really care about is that
the instruction will be DCEd once the assume is dropped. For that
it is sufficient that the instruction is side-effect free and not
a terminator.

In particular, this allows non-dereferenceable loads to be ephemeral
values.

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




More information about the All-commits mailing list