[PATCH] D100141: [nofree] Restrict semantics to memory visible to caller

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 18 10:55:24 PDT 2021


nlopes added a comment.

I've updated Alive2 with the new semantics and I see one regression:
`llvm/test/Transforms/InstCombine/malloc-free-delete.ll`

  define void @test14(* %foo) nofree {
    free * %foo
    ret void
  }
  =>
  define void @test14(* %foo) nofree {
    call void #trap() nowrite noreturn
    assume i1 0
  }
  
  Transformation doesn't verify!
  
  ERROR: Source is more defined than target
  
  Example:
  * %foo = null

free(null) is a no-op, so I think the test case is buggy. This transformation can only be done if the argument is non-null.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100141/new/

https://reviews.llvm.org/D100141



More information about the llvm-commits mailing list