This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Strip redundant AdSize override prefix
ClosedPublic

Authored by Amir on Mar 3 2022, 10:07 PM.

Details

Summary

Since LLVM MC now preserves redundant AdSize override prefix (0x67), remove it
in BOLT explicitly (-x86-strip-redundant-adsize, on by default).

Test Plan:
bin/llvm-lit -a bolt/test/X86/addr32.s

Diff Detail

Event Timeline

Amir created this revision.Mar 3 2022, 10:07 PM
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Amir requested review of this revision.Mar 3 2022, 10:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2022, 10:07 PM
Amir updated this revision to Diff 412933.Mar 3 2022, 10:27 PM

Update test

Amir updated this revision to Diff 412943.Mar 3 2022, 11:45 PM

Update test, fix shared build

@maksfb, @rafaelauler
Ping. We need this functionality to strip redundant addr32 prefix in BOLT which would otherwise be preserved as a result of D120592.

rafauler accepted this revision.Mar 16 2022, 5:38 AM

LGTM (nit below)

bolt/lib/Target/X86/X86MCPlusBuilder.cpp
43–44

Can we call this (...)AddressSize and -address-size? I find adsize to be a bit confusing.

This revision is now accepted and ready to land.Mar 16 2022, 5:38 AM
Amir updated this revision to Diff 415853.Mar 16 2022, 8:52 AM

Address nit

Amir updated this revision to Diff 415854.Mar 16 2022, 8:55 AM
Amir marked an inline comment as done.

Fix test

This revision was landed with ongoing or failed builds.Mar 16 2022, 9:38 AM
This revision was automatically updated to reflect the committed changes.