This is an archive of the discontinued LLVM Phabricator instance.

[EfficiencySanitizer] Using '$' instead of '#' for struct counter name
ClosedPublic

Authored by slthakur on Sep 8 2016, 2:32 AM.

Details

Reviewers
zhaoqin
bruening
Summary

For MIPS '#' is the start of comment line. Therefore we get assembler errors if # is used in the structure names.

Diff Detail

Repository
rL LLVM

Event Timeline

slthakur updated this revision to Diff 70668.Sep 8 2016, 2:32 AM
slthakur retitled this revision from to [EfficiencySanitizer] Using '_' instead of '#' for struct counter name.
slthakur updated this object.
slthakur added a reviewer: bruening.
slthakur set the repository for this revision to rL LLVM.
slthakur added a project: Restricted Project.
slthakur added subscribers: jaydeep, llvm-commits.
zhaoqin requested changes to this revision.Sep 8 2016, 9:39 AM
zhaoqin edited edge metadata.

We use '#' to make the name less likely to conflict with user defined variables.
Can we use some other char that cannot be used by program variables e.g., '+' or '-' instead of '_'.
Also, you also need update names in test/Instrumentation/EfficiencySanitizer/ and runtime tests.

This revision now requires changes to proceed.Sep 8 2016, 9:39 AM
slthakur updated this revision to Diff 71141.Sep 13 2016, 4:25 AM
slthakur retitled this revision from [EfficiencySanitizer] Using '_' instead of '#' for struct counter name to [EfficiencySanitizer] Using '$' instead of '#' for struct counter name.
slthakur edited edge metadata.

Addressed review comments.

zhaoqin accepted this revision.Sep 21 2016, 12:20 PM
zhaoqin edited edge metadata.

LGTM with nits
Please test before commit.

lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
315

Replace # in the comment

317

ditto

This revision is now accepted and ready to land.Sep 21 2016, 12:20 PM
slthakur closed this revision.Sep 22 2016, 1:48 AM

Addressed nits and committed in rL282141