]> granicus.if.org Git - llvm/commit
[Attributor][FIX] Do not apply h2s for arbitrary mallocs
authorJohannes Doerfert <jdoerfert@anl.gov>
Sun, 13 Oct 2019 03:54:08 +0000 (03:54 +0000)
committerJohannes Doerfert <jdoerfert@anl.gov>
Sun, 13 Oct 2019 03:54:08 +0000 (03:54 +0000)
commitcfbbef223104b06bdc3c865658df211dde6a9f78
treeb845f3d854fe70f2983f5a1539fc09cff477f138
parent62bc91d4abf29b3b763e7de5e5d0005e5d9e7c08
[Attributor][FIX] Do not apply h2s for arbitrary mallocs

H2S did apply to mallocs of non-constant sizes if the uses were OK. This
is now forbidden through reording of the "good" and "bad" cases in the
conditional.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374698 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/Attributor.cpp
test/Transforms/FunctionAttrs/heap_to_stack.ll