[OpenMP][FIX] Remove unsound reasoning about written to values
authorJohannes Doerfert <johannes@jdoerfert.de>
Tue, 13 Dec 2022 22:35:50 +0000 (14:35 -0800)
committerJohannes Doerfert <johannes@jdoerfert.de>
Wed, 14 Dec 2022 02:44:20 +0000 (18:44 -0800)
commit8be3133ecdb7c34891c702030a40e6d20f3e3bd4
tree8362e24c4af29253b68682071b4d28a7b8796ba4
parent23333bb6b77544997943a63f7f97c39065fad8b8
[OpenMP][FIX] Remove unsound reasoning about written to values

Even if a value is for sure written we need to visit the call sites as
they might end up inside the function that reads and writes the value.
In a follow up we can introduce correct reasoning to avoid the backwards
traversal in this case and instead check if any call site between the
write and the read might reach a potential write we want to exclude.
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/value-simplify-assume.ll
llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll