[PATCH] D37054: Require address space to be specified when creating functions (2/3)
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 27 05:40:49 PST 2018
arichardson added inline comments.
Comment at: docs/LangRef.rst:772
+If an explicit address space is not given, it will default to zero.
Just wondering if it would be better to put functions without an explicit address space in the program address space?
I think this may be more consistent since creating a new `FunctionType` without an address space will put it in the program address space and not address space zero.
I am not sure if there are any backwards compatibility constraints here since IR generated by an older version will never have the program address space in the datalayout string so they should also end up in address space zero.
Putting everything in the program address space should make it easier for us to keep the existing IR testcases once we expect all functions to be in address space 200.
More information about the llvm-commits