[OpenMPOpt] ICV tracking for calls
authorsstefan1 <sstipanovic@s-energize.com>
Wed, 12 Aug 2020 10:20:53 +0000 (12:20 +0200)
committersstefan1 <sstipanovic@s-energize.com>
Wed, 19 Aug 2020 09:43:12 +0000 (11:43 +0200)
commitb0b32e649011d9a60165b9b53eb2764b7da9c8ca
treeebe64abc43fe827523d8ff1de067960d7bada213
parenteedf18fc1f5fc71bb896204abf41fc5a2dbf25f7
[OpenMPOpt] ICV tracking for calls

Introduce two new AAs. AAICVTrackerFunctionReturned which checks if a
function can have a unique ICV value after it is finished, and
AAICVCallSiteReturned which checks AAICVTrackerFunctionReturned for a
call site. This enables us to check the value of a call and if it
changes the ICV. This also changes the approach in
`getReplacementValues()` to a worklist-based approach so we can explore
all relevant BBs.

Differential Revision: https://reviews.llvm.org/D85544
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
llvm/test/Transforms/OpenMP/icv_tracking.ll