Go to file
Dylan McKay ced2fe68f3 Add default address space for functions to the data layout (1/3)
Summary:
This adds initial support for letting targets specify which address
spaces their functions should reside in by default.

If a function is created by a frontend, it will get the default address space specified in the DataLayout, unless the frontend explicitly uses a more general `llvm::Function` constructor. Function address spaces will become a part of the bitcode and textual IR forms, as we do not have access to a data layout whilst parsing LL.

It will be possible to write IR that explicitly has `addrspace(n)` on a function. In this case, the function will reside in the specified space, ignoring the default in the DL.

This is the first step towards placing functions into the correct
address space for Harvard architectures.

Full patchset
* Add program address space to data layout D37052
* Require address space to be specified when creating functions D37054
* [clang] Require address space to be specified when creating functions D37057

Reviewers: pcc, arsenm, kparzysz, hfinkel, theraven

Reviewed By: theraven

Subscribers: arichardson, simoncook, rengolin, wdng, uabelho, bjope, asb, llvm-commits

Differential Revision: https://reviews.llvm.org/D37052

llvm-svn: 325479
2018-02-19 09:56:22 +00:00
clang [CodeGen] Initialize large arrays by copying from a global 2018-02-19 09:49:11 +00:00
clang-tools-extra [clangd] Add "clangd.trace" VSCode setting to enable tracing. 2018-02-19 09:43:46 +00:00
compiler-rt Recognize all NetBSD architectures in UBSan 2018-02-17 13:35:09 +00:00
debuginfo-tests [debuginfo-tests] Support moving debuginfo-tests to llvm/projects 2017-12-12 16:54:20 +00:00
libclc amdgpu/half_recip: Switch implementation to native_recip 2018-02-13 22:09:46 +00:00
libcxx Fix test failure on compilers w/o deduction guides 2018-02-15 02:41:19 +00:00
libcxxabi [demangler] Support for exception specifications on function types. 2018-02-14 01:08:20 +00:00
libunwind [cmake] [libunwind] LLVM_FOUND isn't always set, so just test if 2018-01-27 19:31:44 +00:00
lld Simplify. 2018-02-17 23:37:26 +00:00
lldb Add DEBUGSERVER_PATH to the cache so it'll be available for tests. 2018-02-17 23:06:15 +00:00
llgo
llvm Add default address space for functions to the data layout (1/3) 2018-02-19 09:56:22 +00:00
openmp [OMPT] Omissionin in OMPT Formatting 2018-02-17 09:54:10 +00:00
parallel-libs
polly [ScopBuilder] scalar-indep: Fix mutually referencing PHIs. 2018-02-12 21:09:40 +00:00
README.md

README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.