This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Move function splitting tests from X86 to Generic (NFC)
ClosedPublic

Authored by dhoekwater on Aug 9 2023, 4:36 PM.

Details

Summary

Machine function splitting will become available for AArch64; since MFS
is no longer X86-only, the tests for generic behavior should live
somewhere other than tests/CodeGen/X86.

MFS implementation doesn't vary much across platforms, and most tests
should be identical between X86 and AArch64 besides instruction
selection, so the tests can live together in tests/CodeGen/Generic.

Diff Detail

Event Timeline

dhoekwater created this revision.Aug 9 2023, 4:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2023, 4:36 PM
dhoekwater requested review of this revision.Aug 9 2023, 4:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2023, 4:36 PM
dhoekwater updated this revision to Diff 548818.Aug 9 2023, 4:40 PM
dhoekwater retitled this revision from [CodeGen] Move function splitting tests from X86 to Generic to [CodeGen] Move function splitting tests from X86 to Generic (NFC).

Make sure it's clear this is an NFC change

snehasish accepted this revision.Aug 9 2023, 4:45 PM

lgtm

llvm/test/CodeGen/Generic/machine-function-splitter.ll
10

nit: Move this comment above the RUN: sed line since that's required for AFDO.

11

s/X86-MFS/MFS-X86/ to be consistent with the convention you've set in the prior RUN lines?

This revision is now accepted and ready to land.Aug 9 2023, 4:45 PM
dhoekwater updated this revision to Diff 548830.Aug 9 2023, 5:24 PM

Add some common prefixes so we don't have to duplicate everything on AArch64

dhoekwater marked 2 inline comments as done.Aug 9 2023, 5:26 PM
dhoekwater added inline comments.
llvm/test/CodeGen/Generic/machine-function-splitter.ll
11

Good point, I just changed the convention to be PREFIX-ARCHITECTURE for lines unique to a given architecture and PREFIX for lines common among X86/AArch64, so we don't duplicate lots of FileCheck lines.

lgtm

llvm/test/CodeGen/Generic/machine-function-splitter.ll
380

There's a whitespace change here now though the content hasn't changed. Can you update the diff to drop these changes?

dhoekwater marked an inline comment as done.

Undo whitespace changes

shenhan accepted this revision.Aug 15 2023, 9:50 AM