[llvm] Reland [CGData] llvm-cgdata #89884 (PR #101461)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 21:13:27 PDT 2024


MaskRay wrote:

> > Related patches have introduced `llvm/lib/CodeGenData` and `llvm/include/llvm/CodeGenData/`. Adding new directories under `llvm/lib` and `llvm/include/llvm` require more discussions.
> > I think you need to ask more folks about their opinions, my intuition is that reusing `llvm/lib/Object` might be a choice. The `.cpp` files seem to use Support and Object, and therefore need to live at a layer higher than LLVMObject per [llvm.org/docs/CodingStandards.html#library-layering](https://llvm.org/docs/CodingStandards.html#library-layering)
> 
> Thank you for the guidance on layering within lib and include. Based on the conventions from the link you provided, placing `CodeGenData` files under `llvm/lib/Object` is an option. However, to avoid clutter and maintain distinct functionality, a separate `CodeGenData` directory might be preferable, similar to the `ProfileData` setup which also uses `Support` and `Object`.
> 
> I'm open to other opinions on this matter. Could you please add more reviewers relevant to this discussion? If the consensus favors a different placement, I will create a separate PR (NFC) to accommodate that change, instead of making changes in place here.

Beside existing reviewers, @efriedma-quic @nikic @RKSimon Do you have suggestions on the directory name? (currently `llvm/lib/CodeGenData/`, which I feel a bit confusing when `llvm/lib/CodeGenTypes/` is present)

https://github.com/llvm/llvm-project/pull/101461


More information about the llvm-commits mailing list