This is an archive of the discontinued LLVM Phabricator instance.

Add support for merging string with alignment larger than one char
ClosedPublic

Authored by rafael on Feb 18 2016, 1:18 PM.

Details

Reviewers
ruiu
Summary

This will be used in a lld patch.

Diff Detail

Event Timeline

rafael updated this revision to Diff 48393.Feb 18 2016, 1:18 PM
rafael retitled this revision from to Add support for merging string with alignment larger than one char.
rafael updated this object.
rafael added a reviewer: ruiu.
rafael added a subscriber: llvm-commits.
ruiu accepted this revision.Feb 18 2016, 1:27 PM
ruiu edited edge metadata.

LGTM

lib/MC/StringTableBuilder.cpp
130

If we can assume that Alignment is always a power of two, then

if (Pos & (Alignment - 1))

would be faster.

189–190
Size = Start + S.size() + (K != RAW);
This revision is now accepted and ready to land.Feb 18 2016, 1:27 PM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in r261326.