This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Print instruction before atomic semantic annotations
ClosedPublic

Authored by DavidSpickett on Feb 11 2019, 8:59 AM.

Details

Summary

Commit r353303 added annotations when acquire semantics
were dropped from an instruction.

printAnnotation was called before printInstruction.
So if you didn't set a separate comment output stream
you got <comment><instr> instead of <instr><comment>
as expected.

To fix this move the new printAnnotation to after
the instruction is printed.

Diff Detail

Repository
rL LLVM

Event Timeline

DavidSpickett created this revision.Feb 11 2019, 8:59 AM
olista01 requested changes to this revision.Feb 13 2019, 5:55 AM
olista01 added a subscriber: olista01.

I think it would be neater to move this annotation printing code to after the regular printAliasInstr/printInstruction calls at the end of the function (line 300). As it is, this patch will drop any other annotations on the instruction, because it doesn't call printAnnotation(O, Annot).

This revision now requires changes to proceed.Feb 13 2019, 5:55 AM
DavidSpickett edited the summary of this revision. (Show Details)

I think it would be neater to move this annotation printing code to after the regular printAliasInstr/printInstruction calls at the end of the function (line 300). As it is, this patch will drop any other annotations on the instruction, because it doesn't call printAnnotation(O, Annot).

Done.

This revision is now accepted and ready to land.Feb 21 2019, 1:53 AM
This revision was automatically updated to reflect the committed changes.