This is an archive of the discontinued LLVM Phabricator instance.

[MachineOutliner] Avoid outlining XRay pseudo-instructions
AbandonedPublic

Authored by duck-37 on Apr 2 2023, 1:01 PM.

Details

Reviewers
paquette
Summary

Outlining these can cause assertion failures and runs counter to what XRay is meant for anyway (fine-grained profiling via compiler instrumentation). Unblocks https://reviews.llvm.org/D124707

Diff Detail

Event Timeline

duck-37 created this revision.Apr 2 2023, 1:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2023, 1:01 PM
duck-37 requested review of this revision.Apr 2 2023, 1:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2023, 1:01 PM
paquette added inline comments.Apr 3 2023, 10:25 AM
llvm/test/CodeGen/AArch64/machine-outliner-patchable-exit.mir
5

Can you add testcases for the other XRay opcodes too?

duck-37 planned changes to this revision.Apr 3 2023, 10:48 AM
duck-37 added inline comments.
llvm/test/CodeGen/AArch64/machine-outliner-patchable-exit.mir
5

Sure, but it's important to note that the test case for PATCHABLE_FUNCTION_ENTER won't fail

... outside of ARM32, where isMBBSafeToOutlineFrom is overriden without a call to the base class. I'll add a test for this there, and then submit a patch to refactor isMBBSafeToOutlineFrom as well.

duck-37 abandoned this revision.Jun 26 2023, 11:15 AM

Looks like this was fixed in D147982.