[OpenMP][FIX] Use name + type checks not only name checks for calls
authorJohannes Doerfert <johannes@jdoerfert.de>
Tue, 20 Jul 2021 03:31:51 +0000 (22:31 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Thu, 22 Jul 2021 03:51:05 +0000 (22:51 -0500)
commitc4b1fe05dd62c81077a14750de0b6ae3366747e2
tree90caa3a3b73dba182be1dc848cf2d934cfeebf3d
parentc7781a097878d097bdce2b71a5c9cd18129558ea
[OpenMP][FIX] Use name + type checks not only name checks for calls

A call that is analyzed in an optimization needs to be verified against
the name and type of the runtime function to avoid that we look at
arguments that do not exist (anymore). This can happen if the signature
was rewritten. Since we will not set RFI.Declaration if the type doesn't
match we can use it (if it's not null) to determine if the signature is
as expected.

Differential Revision: https://reviews.llvm.org/D106341
llvm/lib/Transforms/IPO/OpenMPOpt.cpp