[PATCH] D91428: Add support for multiple program address spaces

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 17 12:00:22 PST 2020


arsenm added a comment.

While the IR definitely should support mixing functions with different address spaces, I don't see the point of encoding multiple of these in the datalayout



================
Comment at: llvm/include/llvm/IR/DataLayout.h:125-129
+  /// Vector of address spaces that can contain code
+  /// Always non-empty, contains the default address space by default.
+  /// Harvard architectures can specify a different address space.
+  /// WebAssembly might specify more than one address space.
+  SmallVector<unsigned, 8> ProgramAddrSpaces;
----------------
I don't see why we need a list of program address spaces. The datalayout only needs to know the one to use for situations when generic code needs to synthesize a function out of thin air. Anything beyond that would need target information in the specific pass.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91428



More information about the cfe-commits mailing list