llvm-project/llvm/lib/Transforms/Coroutines
Matt Arsenault 3c1fc768ed 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 [CMake] NFC. Updating CMake dependency specifications 2016-11-17 04:36:50 +00:00
CoroCleanup.cpp [Coroutines] Part 15a: Lower coro.subfn.addr in CoroCleanup 2016-09-30 18:41:35 +00:00
CoroEarly.cpp [Coroutines] Part13: Handle single edge PHINodes across suspends 2016-09-09 05:39:00 +00:00
CoroElide.cpp Allow DataLayout to specify addrspace for allocas. 2017-04-10 22:27:50 +00:00
CoroFrame.cpp [coroutines] Make CoroSplit pass deterministic 2017-04-08 00:49:46 +00:00
CoroInstr.h [Coroutines] Add header guard to header that's missing one. 2017-01-30 16:32:20 +00:00
CoroInternal.h [Coroutines] Part 10: Add coroutine promise support. 2016-08-31 00:35:41 +00:00
CoroSplit.cpp Rename AttributeSet to AttributeList 2017-03-21 16:57:19 +00:00
Coroutines.cpp Rename AttributeSet to AttributeList 2017-03-21 16:57:19 +00:00
LLVMBuild.txt