1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/lib/AsmParser
Matt Arsenault 204d4c1d7b Allow DataLayout to specify addrspace for allocas.
LLVM makes several assumptions about address space 0. However,
alloca is presently constrained to always return this address space.
There's no real way to avoid using alloca, so without this
there is no way to opt out of these assumptions.

The problematic assumptions include:
- That the pointer size used for the stack is the same size as
  the code size pointer, which is also the maximum sized pointer.

- That 0 is an invalid, non-dereferencable pointer value.

These are problems for AMDGPU because alloca is used to
implement the private address space, which uses a 32-bit
index as the pointer value. Other pointers are 64-bit
and behave more like LLVM's notion of generic address
space. By changing the address space used for allocas,
we can change our generic pointer type to be LLVM's generic
pointer type which does have similar properties.

llvm-svn: 299888
2017-04-10 22:27:50 +00:00
..
CMakeLists.txt modules: Add explicit dependency on intrinsics_gen 2015-06-16 00:44:12 +00:00
LLLexer.cpp [IR] Add AllowContract to FastMathFlags 2017-03-28 20:11:52 +00:00
LLLexer.h Remove empty non-virtual destructors or mark them =default when non-public 2015-04-11 15:32:26 +00:00
LLParser.cpp Allow DataLayout to specify addrspace for allocas. 2017-04-10 22:27:50 +00:00
LLParser.h Allow DataLayout to specify addrspace for allocas. 2017-04-10 22:27:50 +00:00
LLToken.h [IR] Add AllowContract to FastMathFlags 2017-03-28 20:11:52 +00:00
LLVMBuild.txt
Parser.cpp [AsmParser] Expose an API to parse a string starting with a type. 2016-03-08 00:37:07 +00:00