[all-commits] [llvm/llvm-project] 292077: [Local] Treat calls that may not return as being a...

Florian Hahn via All-commits all-commits at lists.llvm.org
Sat Jan 23 08:07:03 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 292077072ec1279d89d21873fe900061e55ef936
      https://github.com/llvm/llvm-project/commit/292077072ec1279d89d21873fe900061e55ef936
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2021-01-23 (Sat, 23 Jan 2021)

  Changed paths:
    M llvm/include/llvm/IR/InstrTypes.h
    M llvm/lib/Transforms/Utils/Local.cpp
    M llvm/test/Feature/OperandBundles/early-cse.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.ll
    M llvm/test/Transforms/Attributor/align.ll
    M llvm/test/Transforms/Attributor/nocapture-1.ll
    M llvm/test/Transforms/Attributor/nocapture-2.ll
    M llvm/test/Transforms/Attributor/nonnull.ll
    M llvm/test/Transforms/Attributor/norecurse.ll
    M llvm/test/Transforms/Attributor/range.ll
    M llvm/test/Transforms/Attributor/readattrs.ll
    M llvm/test/Transforms/BDCE/basic.ll
    M llvm/test/Transforms/CodeGenPrepare/X86/delete-assume-dead-code.ll
    M llvm/test/Transforms/Coroutines/coro-split-00.ll
    M llvm/test/Transforms/Coroutines/coro-split-hidden.ll
    M llvm/test/Transforms/Coroutines/no-suspend.ll
    M llvm/test/Transforms/DeadStoreElimination/MSSA/simple.ll
    M llvm/test/Transforms/DeadStoreElimination/MemDepAnalysis/DeleteThrowableInst.ll
    M llvm/test/Transforms/DeadStoreElimination/MemDepAnalysis/simple.ll
    M llvm/test/Transforms/Inline/dead-calls-willreturn.ll
    M llvm/test/Transforms/InstCombine/constant-fold-libfunc.ll
    M llvm/test/Transforms/InstCombine/nothrow.ll
    M llvm/test/Transforms/InstSimplify/ConstProp/rint.ll
    M llvm/test/Transforms/InstSimplify/remove-dead-call.ll
    M llvm/test/Transforms/InstSimplify/returned.ll
    M llvm/test/Transforms/MemCpyOpt/memcpy.ll
    M llvm/test/Transforms/NewGVN/eliminate-callsite-inline.ll
    M llvm/test/Transforms/OpenMP/parallel_deletion.ll
    M llvm/test/Transforms/Reassociate/erase_inst_made_change.ll

  Log Message:
  -----------
  [Local] Treat calls that may not return as being alive.

With the addition of the `willreturn` attribute, functions that may
not return (e.g. due to an infinite loop) are well defined, if they are
not marked as `willreturn`.

This patch updates `wouldInstructionBeTriviallyDead` to not consider
calls that may not return as dead.

This patch still provides an escape hatch for intrinsics, which are
still assumed as willreturn unconditionally. It will be removed once
all intrinsics definitions have been reviewed and updated.

Reviewed By: jdoerfert

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




More information about the All-commits mailing list