This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][MC] Added missing isCall/isBranch flags
ClosedPublic

Authored by dp on Jul 15 2021, 8:41 AM.

Details

Summary

These flags are required for Comgr to annotate jump targets.
This is a supplement for D99955.

Diff Detail

Event Timeline

dp created this revision.Jul 15 2021, 8:41 AM
dp requested review of this revision.Jul 15 2021, 8:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2021, 8:41 AM
foad added a comment.Jul 15 2021, 8:54 AM

I don't know much about comgr. Is it possible to add some kind of testing for this?

Can you just copy it from pseudo TSFlags?

dp added a comment.Jul 15 2021, 9:57 AM

Looks like it is not possible to query values of these flags in assembler and I'm not aware of any other tools that would allow this.
The flags are utilized by MCInstrAnalysis.

Comgr uses MCInstrAnalysis functionality to identify calls and branches:

const MCInstrAnalysis MIA = ...
if (MIA && MIA->isCall(Inst) ...)

I had to test the patch using Comgr.

dp added a comment.Jul 15 2021, 9:59 AM

Can you just copy it from pseudo TSFlags?

Sure. I'll update the patch, hopefully it will be simpler.

dp updated this revision to Diff 359055.Jul 15 2021, 11:04 AM

Updated to address reviewer's comments.

This revision is now accepted and ready to land.Jul 15 2021, 11:11 AM
This revision was landed with ongoing or failed builds.Jul 16 2021, 4:57 AM
This revision was automatically updated to reflect the committed changes.