This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Use MCInstPrinter in createRetpolineFunctionTag
ClosedPublic

Authored by Amir on May 8 2023, 12:32 PM.

Details

Summary

Make retpoline functions invariant of X86 register numbers.
retpoline-synthetic.test is known to fail NFC testing due to shifting
register numbers. Use canonical register names instead of tablegen
numbers.

Before:

__retpoline_r51_
__retpoline_mem_r58+DATAat0x200fe8
__retpoline_mem_r51+0
__retpoline_mem_r132+0+8*53

After:

__retpoline_%rax_
__retpoline_mem_%rip+DATAat0x200fe8
__retpoline_mem_%rax+0
__retpoline_mem_%r12+0+8*%rbx

Test Plan:

Diff Detail

Event Timeline

Amir created this revision.May 8 2023, 12:32 PM
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Amir requested review of this revision.May 8 2023, 12:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 8 2023, 12:32 PM
Amir updated this revision to Diff 520512.May 8 2023, 4:30 PM

Update retpoline-synthetic.test

Amir edited the summary of this revision. (Show Details)May 8 2023, 4:36 PM
Amir edited the summary of this revision. (Show Details)
Amir edited the summary of this revision. (Show Details)
Amir updated this revision to Diff 520516.May 8 2023, 4:41 PM

Add llvm-strings test dependency

rafauler accepted this revision.May 8 2023, 4:49 PM

Thanks

This revision is now accepted and ready to land.May 8 2023, 4:49 PM
Amir updated this revision to Diff 520524.May 8 2023, 4:57 PM

Fix test

This revision was automatically updated to reflect the committed changes.