[all-commits] [llvm/llvm-project] ff256c: [Attributor] Derive `willreturn` based on `mustpro...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Thu Mar 11 21:32:01 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ff256c1376fea83272c2d0ba7b33fdea44459495
      https://github.com/llvm/llvm-project/commit/ff256c1376fea83272c2d0ba7b33fdea44459495
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-03-11 (Thu, 11 Mar 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/ArgumentPromotion/aggregate-promote.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll
    M llvm/test/Transforms/Attributor/cb_range_disabled.ll
    M llvm/test/Transforms/Attributor/cb_range_enabled.ll
    M llvm/test/Transforms/Attributor/internal-noalias.ll
    M llvm/test/Transforms/Attributor/noalias.ll
    M llvm/test/Transforms/Attributor/nocapture-1.ll
    M llvm/test/Transforms/Attributor/nofree.ll
    M llvm/test/Transforms/Attributor/nosync.ll
    M llvm/test/Transforms/Attributor/potential.ll
    M llvm/test/Transforms/Attributor/range.ll
    M llvm/test/Transforms/Attributor/readattrs.ll
    M llvm/test/Transforms/Attributor/returned.ll
    M llvm/test/Transforms/Attributor/value-simplify.ll
    M llvm/test/Transforms/Attributor/willreturn.ll

  Log Message:
  -----------
  [Attributor] Derive `willreturn` based on `mustprogress`

Since D86233 we have `mustprogress` which, in combination with
`readonly`, implies `willreturn`. The idea is that every side-effect
has to be modeled as a "write". Consequently, `readonly` means there
is no side-effect, and `mustprogress` guarantees that we cannot "loop"
forever without side-effect.

Reviewed By: fhahn

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




More information about the All-commits mailing list