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.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I didn’t get the idea in the description from the code clearly. The old comparison is still address based. In what scenario that RFI->Declaration can be nullptr? The only difference might be when CB->getCalledFunction() and RFI.Declarion are both nullptr, which will fail the check now.
Comment Actions
Yes. We do not set RFI.Declaration if the type doesn't match what we expect. getCallIfRegularCall should have always checked RFI has a declaration, now it does and that makes sure we see a call to the right function with the right type when we access the operand.