[Attributor][FIX] Avoid empty bin in AAPointerInfo
authorJohannes Doerfert <johannes@jdoerfert.de>
Tue, 21 Jun 2022 19:52:37 +0000 (14:52 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Wed, 22 Jun 2022 02:30:57 +0000 (21:30 -0500)
commitb7cc3b10c549f6648a267a3ebc5171c42cdcecc5
tree1259a3ac78875ace70195970ab7d3c849395826c
parent083010312aa4a0ba0cd5299bd3b039af8fb6d58f
[Attributor][FIX] Avoid empty bin in AAPointerInfo

This avoid creating empty bins in AAPointerInfo which can lead to
segfaults. Also ensure we do not try to translate from callee to caller
except if we really take the argument state and move it to the call site
argument state.

Fixes: https://github.com/llvm/llvm-project/issues/55726
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/pointer-info.ll [new file with mode: 0644]