[all-commits] [llvm/llvm-project] bf7a16: [InlineFunction] Update valid return attributes at...

annamthomas via All-commits all-commits at lists.llvm.org
Thu Apr 2 11:14:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bf7a16a768719355976b3acde37884f0fcf1bf4d
      https://github.com/llvm/llvm-project/commit/bf7a16a768719355976b3acde37884f0fcf1bf4d
  Author: Anna Thomas <anna at azul.com>
  Date:   2020-04-02 (Thu, 02 Apr 2020)

  Changed paths:
    M llvm/lib/Transforms/Utils/InlineFunction.cpp
    A llvm/test/Transforms/Inline/ret_attr_update.ll

  Log Message:
  -----------
  [InlineFunction] Update valid return attributes at callsite within callee body

Consider a callee function that has a call (C) within it which feeds
into the return. When we inline that callee into a callsite that has
return attributes, we can backward propagate valid attributes to the
call (C) within that inlined callee body.

This is safe to do so only if we can guarantee transfer of execution to
successor in the window of instructions between return value (i.e. the
call C) and the return instruction.

Also, this is valid only for attributes which are a property of a
callsite and not those that are not dependent on the ABI, or a property
of the call itself.

Reviewed-By: reames, jdoerfert

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




More information about the All-commits mailing list