[PATCH] D149288: [X86] Introduce a large data threshold for the medium code model

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 13:58:14 PDT 2023


rnk added a comment.

What about storing some kind of "large data attribute" on the global itself in the IR? That would help make sure the medium code model flags don't have to be passed to ThinLTO backend action compilations, for example, and give intuitive semantics to linking together objects compiled in the large, medium, and small code models.

The other consideration is making this feature easy for other frontends (Rust) to use, and your solution does make that easy. The best I can come up with is an LLVM pass or helper function in LLVM that annotates IR globals appropriately given a size threshold from the frontend.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149288/new/

https://reviews.llvm.org/D149288



More information about the llvm-commits mailing list