[PATCH] D105733: [OpaquePtr] Require matching signature in getCalledFunction()

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 12 14:24:48 PDT 2021


nikic added a comment.

@dexonsmith While there are many calls of getCalledFunction() that could deal with bitcast stripping, there are also a significant number that rely on the current behavior for correctness. E.g. pretty much any code dealing with intrinsics assumes that the call matches the intrinsic signature. There are a few places that do things similar to the problematic ValueTracking usage, i.e. assume that the number of arguments on the function and call are correlated (FuncAttrs is another example that does this). Of course, it would be better if they didn't do that -- but then again, there are over 500 calls to getCalledFunction() in LLVM, and they all need to be audited for whether the new interpretation is safe or adjusted to make it safe. Failing to do so will result in assertion failures in an area where we have essentially zero test coverage.

Which is why I'm arguing that this should be a new method, which can be used after safety has been audited for individual callers.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105733/new/

https://reviews.llvm.org/D105733



More information about the llvm-commits mailing list