1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/test/Transforms/Coroutines
Gor Nishanov e88fabad02 [coroutines] Respect alloca alignment requirements when building coroutine frame
Summary:
If an alloca need to be stored in the coroutine frame and it has an alignment specified and the alignment does not match the natural alignment of the alloca type. Insert appropriate padding into the coroutine frame to make sure that it gets requested alignment.

For example for a packet type (which natural alignment is 1), but alloca alignment is 8, we may need to insert a padding field with required number of bytes to make sure it is properly aligned.

```
%PackedStruct = type <{ i64 }>
...
  %data = alloca %PackedStruct, align 8
```

If the previous field in the coroutine frame had alignment 2, we would have [6 x i8] inserted before %PackedStruct in the coroutine frame:

```
%f.Frame = type { ..., i16, [6 x i8], %PackedStruct }
```

Reviewers: rnk, lewissbaker, modocache

Reviewed By: modocache

Subscribers: EricWF, llvm-commits

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

llvm-svn: 329112
2018-04-03 20:54:20 +00:00
..
ArgAddr.ll
coro-catchswitch.ll
coro-cleanup.ll
coro-debug.ll
coro-early.ll
coro-eh-aware-edge-split.ll
coro-elide.ll
coro-frame.ll
coro-heap-elide.ll
coro-materialize.ll
coro-padding.ll [coroutines] Respect alloca alignment requirements when building coroutine frame 2018-04-03 20:54:20 +00:00
coro-spill-after-phi.ll
coro-spill-corobegin.ll
coro-split-00.ll
coro-split-01.ll
coro-split-02.ll
coro-split-alloc.ll
coro-split-dbg.ll
coro-split-eh.ll
coro-split-hidden.ll [Coroutines] Avoid assert splitting hidden coros 2018-04-02 23:39:40 +00:00
coro-split-musttail.ll
ex0.ll
ex1.ll
ex2.ll
ex3.ll
ex4.ll
ex5.ll
no-suspend.ll
phi-coro-end.ll
restart-trigger.ll
smoketest.ll