This is an archive of the discontinued LLVM Phabricator instance.

[MSan] Don't create zero offsets in getShadowPtrForArgument(). NFC
ClosedPublic

Authored by glider on Mar 15 2018, 5:30 AM.

Details

Summary

For MSan instrumentation with MS.ParamTLS and MS.ParamOriginTLS being TLS variables, the CreateAdd() with ArgOffset==0 is a no-op, because the compiler is able to fold the addition of 0.
But for KMSAN, which receives ParamTLS and ParamOriginTLS from a call to the runtime library, this introduces a stray instruction which complicates reading/testing the IR.

Diff Detail

Event Timeline

glider created this revision.Mar 15 2018, 5:30 AM
glider updated this revision to Diff 138553.Mar 15 2018, 7:47 AM

Formatted the patch with clang-format

eugenis accepted this revision.Mar 16 2018, 4:13 PM
This revision is now accepted and ready to land.Mar 16 2018, 4:13 PM

Committed revision 327829.

This revision was automatically updated to reflect the committed changes.