This is an archive of the discontinued LLVM Phabricator instance.

[X86][GlobalISel] Move GlobalISel source files to a dedicated subdir
ClosedPublic

Authored by MaskRay on Aug 21 2023, 11:56 PM.

Details

Summary

Similar to D81116 (AArch64): separate the GISel components for
organization purposes and match other targets.

Diff Detail

Event Timeline

MaskRay created this revision.Aug 21 2023, 11:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2023, 11:56 PM
MaskRay requested review of this revision.Aug 21 2023, 11:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2023, 11:56 PM
pengfei added inline comments.Aug 22 2023, 1:11 AM
llvm/lib/Target/X86/CMakeLists.txt
87–90

Move them to the top to keep alphabetical order.

Since only AArch64 + RiscV currently use a subdir - why not just move them up instead?

Since only AArch64 + RiscV currently use a subdir - why not just move them up instead?

I am confused. {AArch64,M68k,PowerPC,RISCV}/GISel are present. This patch creates X86/GISel/. What do you suggest?

llvm/lib/Target/X86/CMakeLists.txt
87–90

My reasoning is that placing files before directories is also an order, but I can move GISel if you are strong about it...

Since only AArch64 + RiscV currently use a subdir - why not just move them up instead?

I am confused. {AArch64,M68k,PowerPC,RISCV}/GISel are present. This patch creates X86/GISel/. What do you suggest?

I'm confused too :) If the plan is to eventually just have GISel why have them in a subdir?

Since only AArch64 + RiscV currently use a subdir - why not just move them up instead?

I am confused. {AArch64,M68k,PowerPC,RISCV}/GISel are present. This patch creates X86/GISel/. What do you suggest?

I'm confused too :) If the plan is to eventually just have GISel why have them in a subdir?

This X86/GISel directory makes it clear what files are GlobalISel related. X86/ contains other files (Subtarget,TargetMachine,X86-specific codegen optimizations,etc) and some SelectionDAG related files.
If eventually we can get rid of SelectionDAG (not sure how feasible it is, but looks like a project of 10+ years), we would still have some X86/ files.
This X86/GISel directory would still be useful to separate GlobalISel related files.

Matt added a subscriber: Matt.Aug 22 2023, 9:35 PM
This revision is now accepted and ready to land.Aug 23 2023, 1:38 AM
This revision was landed with ongoing or failed builds.Aug 23 2023, 8:58 AM
This revision was automatically updated to reflect the committed changes.