This is an archive of the discontinued LLVM Phabricator instance.

[esan:cfrag] Add option -esan-small-binary
ClosedPublic

Authored by zhaoqin on Jul 5 2016, 2:46 PM.

Details

Summary

Adds option -esan-aux-field-info to control generating binary with auxiliary
struct field information.

Extracts code for creating auxiliary information from
createCacheFragInfoGV into createCacheFragAuxGV.

Adds test struct_field_small.ll for -esan-aux-field-info test.

Diff Detail

Repository
rL LLVM

Event Timeline

zhaoqin updated this revision to Diff 62794.Jul 5 2016, 2:46 PM
zhaoqin retitled this revision from to [esan:cfrag] Add option -esan-small-binary.
zhaoqin updated this object.
zhaoqin added a reviewer: aizatsky.
zhaoqin added subscribers: vitalybuka, zhaoqin, kcc and 3 others.
aizatsky requested changes to this revision.Jul 6 2016, 11:34 AM
aizatsky edited edge metadata.
aizatsky added inline comments.
lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
381 ↗(On Diff #62794)

Add something like:

FieldOffset; // not present in small binary.

test/Instrumentation/EfficiencySanitizer/struct_field_count_basic.ll
12 ↗(On Diff #62794)

Why did this change? Because of the order? Why did the order change?

This revision now requires changes to proceed.Jul 6 2016, 11:34 AM
zhaoqin updated this revision to Diff 62935.Jul 6 2016, 12:32 PM
zhaoqin edited edge metadata.
zhaoqin marked an inline comment as done.

add comment
move createCacheFragAuxGV invocation point to avoid test output changes

zhaoqin updated this revision to Diff 62937.Jul 6 2016, 12:38 PM
zhaoqin edited edge metadata.

adjust indentation

aizatsky accepted this revision.Jul 6 2016, 2:12 PM
aizatsky edited edge metadata.
This revision is now accepted and ready to land.Jul 6 2016, 2:12 PM

I wonder if this flag could be named differently.
"small binary" sounds awfully generic and non-descriptive.

I wonder if this flag could be named differently.
"small binary" sounds awfully generic and non-descriptive.

sure, any suggestion?
-esan-strip-binary, I am not sure if I should use strip
maybe -esan-aux-field-info

zhaoqin updated this revision to Diff 63018.Jul 6 2016, 8:07 PM
zhaoqin edited edge metadata.

rename -esan-small-binar to -esan-aux-field-info

zhaoqin updated this object.Jul 6 2016, 8:11 PM
This revision was automatically updated to reflect the committed changes.