This is an archive of the discontinued LLVM Phabricator instance.

IR: Check inalloca call argument originating from parameter
Needs ReviewPublic

Authored by majnemer on May 2 2014, 9:22 AM.

Details

Reviewers
nlewycky
rnk
Summary

Catch more mismatches involving inalloca.

Diff Detail

Event Timeline

majnemer updated this revision to Diff 9036.May 2 2014, 9:22 AM
majnemer retitled this revision from to IR: Check inalloca call argument originating from parameter.
majnemer updated this object.
majnemer added a reviewer: rnk.
majnemer added a subscriber: Unknown Object (MLST).
rnk added a reviewer: nlewycky.May 2 2014, 3:23 PM
rnk edited edge metadata.May 2 2014, 3:28 PM

So, we don't generally fail verification because somebody gave us well-formed but nonsensical IR. I kind of compromised on the last verifier change because I think it will save us lots of time, and we can revert it if somebody objects. Consider the FAQ about calling convention mismatches:

http://llvm.org/docs/FAQ.html#why-does-instcombine-simplifycfg-turn-a-call-to-a-function-with-a-mismatched-calling-convention-into-unreachable-why-not-make-the-verifier-reject-it

It's not clear to me that this new check will find lots of optimizer bugs for us, but I could be proven wrong, and yes, it might take more time to figure it out without a verifier check. Anyway, I think we need a second opinion to keep going in this direction, so I added Nick.

If we do go this direction, we can strengthen this check to fail if the call site isn't musttail, because the argument memory won't match up unless tail call succeeds.

majnemer updated this revision to Diff 9063.May 4 2014, 4:44 PM
majnemer edited edge metadata.

Address review comments.