This is an archive of the discontinued LLVM Phabricator instance.

[HWASAN] Inline fast pass of instrumentMemAccessOutline
ClosedPublic

Authored by vitalybuka on Aug 30 2023, 12:05 AM.

Details

Summary

Usually pointer tag will match tag in the shadow, so we can keep
inlining this check keeping the rest in outlined part.

It imroves performance by about 25%, but increases code size by 30%.
Existing outlining reduces performance by 30%, but saves code size by 80%.
So we still significantly reduce code size with minimal performance loss.

Diff Detail

Event Timeline

vitalybuka created this revision.Aug 30 2023, 12:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2023, 12:05 AM
vitalybuka requested review of this revision.Aug 30 2023, 12:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2023, 12:05 AM
fmayer added inline comments.Aug 30 2023, 2:21 PM
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
896–898

This comment is a bit confusing. Maybe "TODO: use the tag we loaded for the check below"?

vitalybuka added inline comments.Aug 30 2023, 9:24 PM
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
896–898

That not what I meant to say, but I guess I will just remove TODO
I am not very positive that we will proceed on that one anyway

remove comment

vitalybuka marked an inline comment as done.Aug 31 2023, 1:22 PM
fmayer accepted this revision.Aug 31 2023, 3:08 PM
This revision is now accepted and ready to land.Aug 31 2023, 3:08 PM