[all-commits] [llvm/llvm-project] b2c760: [Attributor] Ignore uses if a value is simplified

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Wed Feb 12 15:39:39 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b2c76002caae91689e94d4ddd2bf4c3474e82066
      https://github.com/llvm/llvm-project/commit/b2c76002caae91689e94d4ddd2bf4c3474e82066
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-02-12 (Wed, 12 Feb 2020)

  Changed paths:
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/test/Transforms/Attributor/ArgumentPromotion/2008-07-02-array-indexing.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/arg-count-mismatch.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/remove-call-inst.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/solve-after-each-resolving-undefs-for-function.ll
    M llvm/test/Transforms/Attributor/callbacks.ll
    M llvm/test/Transforms/Attributor/liveness.ll
    M llvm/test/Transforms/Attributor/nonnull.ll
    M llvm/test/Transforms/Attributor/value-simplify.ll

  Log Message:
  -----------
  [Attributor] Ignore uses if a value is simplified

If we have a replacement for a value, via AAValueSimplify, the original
value will lose all its uses. Thus, as long as a value is simplified we
can skip the uses in checkForAllUses, given that these uses are
transitive uses for the simplified version and will therefore affect the
simplified version as necessary.

Since this allowed us to remove calls without side-effects and a known
return value, we need to make sure not to eliminate `musttail` calls.
Those we keep around, or later remove the entire `musttail` call chain.




More information about the All-commits mailing list