[RPOFuncAttrs] Fix norecurse detection
authorArthur Eubanks <aeubanks@google.com>
Fri, 17 Jun 2022 22:59:53 +0000 (15:59 -0700)
committerArthur Eubanks <aeubanks@google.com>
Sat, 18 Jun 2022 19:20:10 +0000 (12:20 -0700)
commite4406cefa053567d047d0e4ec20a70bbeade4d10
treebb198af04f3dd8c068af85100dc27dd1864ae3c8
parenteb15c80c89a5adecdb4865f01f7a589738c82a5d
[RPOFuncAttrs] Fix norecurse detection

We wanted to check if all uses of the function are direct calls, but the
code didn't account for passing the function as a parameter.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D128104
llvm/lib/Transforms/IPO/FunctionAttrs.cpp
llvm/test/Transforms/FunctionAttrs/norecurse.ll