[all-commits] [llvm/llvm-project] 12c0bf: tests: add attributes that would normally come fro...

Augie Fackler via All-commits all-commits at lists.llvm.org
Mon Jul 25 14:29:14 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 12c0bf8ba91db377f816afa701cf05beee2ab40b
      https://github.com/llvm/llvm-project/commit/12c0bf8ba91db377f816afa701cf05beee2ab40b
  Author: Augie Fackler <augie at google.com>
  Date:   2022-07-25 (Mon, 25 Jul 2022)

  Changed paths:
    M llvm/test/Analysis/GlobalsModRef/indirect-global.ll
    M llvm/test/Instrumentation/BoundsChecking/simple.ll
    M llvm/test/Transforms/Attributor/heap_to_stack.ll
    M llvm/test/Transforms/Attributor/lowerheap.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/2016-07-17-UseAfterFree.ll
    M llvm/test/Transforms/DeadStoreElimination/calloc-store.ll
    M llvm/test/Transforms/DeadStoreElimination/free.ll
    M llvm/test/Transforms/DeadStoreElimination/multiblock-malloc-free.ll
    M llvm/test/Transforms/DeadStoreElimination/operand-bundles.ll
    M llvm/test/Transforms/DeadStoreElimination/simple.ll
    M llvm/test/Transforms/GVN/calloc-load-removal.ll
    M llvm/test/Transforms/GVN/malloc-load-removal.ll
    M llvm/test/Transforms/GVN/nonescaping-malloc.ll
    M llvm/test/Transforms/GVN/nonescaping.ll
    M llvm/test/Transforms/GlobalOpt/2009-11-16-BrokenPerformHeapAllocSRoA.ll
    M llvm/test/Transforms/GlobalOpt/2021-08-03-StoreOnceLoadMultiCasts.ll
    M llvm/test/Transforms/GlobalOpt/calloc-promote.ll
    M llvm/test/Transforms/GlobalOpt/malloc-promote-1.ll
    M llvm/test/Transforms/GlobalOpt/malloc-promote-2.ll
    M llvm/test/Transforms/GlobalOpt/malloc-promote-4.ll
    M llvm/test/Transforms/GlobalOpt/malloc-promote-5.ll
    M llvm/test/Transforms/GlobalOpt/malloc-promote-opaque-ptr.ll
    M llvm/test/Transforms/GlobalOpt/null-check-is-use-pr35760.ll
    M llvm/test/Transforms/InstCombine/alloc-realloc-free.ll
    M llvm/test/Transforms/InstCombine/badmalloc.ll
    M llvm/test/Transforms/InstCombine/builtin-dynamic-object-size.ll
    M llvm/test/Transforms/InstCombine/compare-unescaped.ll
    M llvm/test/Transforms/InstCombine/deref-alloc-fns.ll
    M llvm/test/Transforms/InstCombine/getelementptr.ll
    M llvm/test/Transforms/InstCombine/malloc-free-mismatched.ll
    M llvm/test/Transforms/InstCombine/malloc-free.ll
    M llvm/test/Transforms/InstCombine/malloc_free_delete_nvptx.ll
    M llvm/test/Transforms/InstCombine/objsize-64.ll
    M llvm/test/Transforms/InstCombine/objsize.ll
    M llvm/test/Transforms/InstCombine/realloc-free.ll
    M llvm/test/Transforms/InstCombine/realloc.ll
    M llvm/test/Transforms/LowerConstantIntrinsics/builtin-object-size-phi.ll
    M llvm/test/Transforms/LowerConstantIntrinsics/objectsize_basic.ll
    M llvm/test/Transforms/MemCpyOpt/memcpy.ll

  Log Message:
  -----------
  tests: add attributes that would normally come from inferattrs

As my goal is to remove at least _some_ functions from the static list
in MemoryBuiltins.cpp, these tests either need to run inferattrs or
statically declare these attributes to keep passing. A couple of tests
had alternate cases which are no longer meaningful, e.g.
`malloc-load-removal.ll`.

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


  Commit: 85063090e95fbd9ad4ee9ad0176beff668d6675f
      https://github.com/llvm/llvm-project/commit/85063090e95fbd9ad4ee9ad0176beff668d6675f
  Author: Augie Fackler <augie at google.com>
  Date:   2022-07-25 (Mon, 25 Jul 2022)

  Changed paths:
    M llvm/lib/Analysis/MemoryBuiltins.cpp
    M llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll
    M llvm/test/Transforms/InstCombine/alloc-realloc-free.ll
    M llvm/test/Transforms/InstCombine/realloc-free.ll
    M llvm/test/Transforms/NewGVN/calloc-load-removal.ll
    M llvm/test/Transforms/NewGVN/malloc-load-removal.ll

  Log Message:
  -----------
  MemoryBuiltins: remove malloc-family funcs from list

We no longer need specialized knowledge of these allocator functions in
this file since we have the correct attributes available now.

As far as I can tell the changes in the attributor tests are due to
things getting more consistent on alloc-family once we remove the static
list entries.

The two test changes in NewGVN merit extra scrutiny: NewGVN appears to
be _extremely_ sensitive to the inaccessiblememonly for reasons that
are beyond me. As a result, I had-enumerated all the attributes on
allocation functions in those two tests instead of using -inferattrs.
I assumed that the two -disable-simplify-libcalls tests there no
longer are sensible since the function declaration now includes all the
relevant attributes.

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


Compare: https://github.com/llvm/llvm-project/compare/cdf8c7b1af77...85063090e95f


More information about the All-commits mailing list