1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/include/llvm
Gor Nishanov cc3ff9c81d [Coroutines] Part 9: Add cleanup subfunction.
Summary:
[Coroutines] Part 9: Add cleanup subfunction.

This patch completes coroutine heap allocation elision. Now, the heap elision example from docs\Coroutines.rst compiles and produces expected result (see test/Transform/Coroutines/ex3.ll)

Intrinsic Changes:
* coro.free gets a token parameter tying it to coro.id to allow reliably discovering all coro.frees associated with a particular coroutine.
* coro.id gets an extra parameter that points back to a coroutine function. This allows to check whether a coro.id describes the enclosing function or it belongs to a different function that was later inlined.

CoroSplit now creates three subfunctions:
# f$resume - resume logic
# f$destroy - cleanup logic, followed by a deallocation code
# f$cleanup - just the cleanup code

CoroElide pass during devirtualization replaces coro.destroy with either f$destroy or f$cleanup depending whether heap elision is performed or not.

Other fixes, improvements:
* Fixed buglet in Shape::buildFrame that was not creating coro.save properly if coroutine has more than one suspend point.

* Switched to using variable width suspend index field (no longer limited to 32 bit index field can be as little as i1 or as large as i<whatever-size_t-is>)

Reviewers: majnemer

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 279971
2016-08-29 14:34:12 +00:00
..
ADT Work around PR29097 to get the module bots going again. 2016-08-23 15:38:59 +00:00
Analysis [Loop Vectorizer] Fixed memory confilict checks. 2016-08-28 08:53:53 +00:00
AsmParser [AsmParser] Expose an API to parse a string starting with a type. 2016-03-08 00:37:07 +00:00
Bitcode Constify some path in the bitcode writer (NFC) 2016-08-19 06:06:18 +00:00
CodeGen Move code only used by codegen out of MC. NFC. 2016-08-29 12:33:42 +00:00
Config Use posix_fallocate instead of ftruncate. 2016-07-19 20:19:56 +00:00
DebugInfo Resubmit "Write the TPI stream from a PDB to Yaml." 2016-08-18 16:49:29 +00:00
ExecutionEngine [Orc] Simplify LogicalDylib and move it back inside CompileOnDemandLayer. Also 2016-08-29 00:54:29 +00:00
IR [Coroutines] Part 9: Add cleanup subfunction. 2016-08-29 14:34:12 +00:00
IRReader [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
LibDriver [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
LineEditor Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
Linker Linker: teach the IR mover to return llvm::Error. 2016-05-27 05:21:35 +00:00
LTO [ThinLTO] Move loading of cache entry to client 2016-08-26 23:29:14 +00:00
MC Move code only used by codegen out of MC. NFC. 2016-08-29 12:33:42 +00:00
Object llvm-objdump: Add Hexagon printer changes for -S/-l options 2016-08-18 21:50:13 +00:00
ObjectYAML [macho2yaml] Don't write empty linkedit data 2016-08-17 21:46:04 +00:00
Option Option parser: class for consuming a joined arg in addition to all remaining args 2016-04-15 00:23:30 +00:00
Passes [PM] Significantly refactor the pass pipeline parsing to be easier to 2016-08-03 03:21:41 +00:00
ProfileData [Coverage] Mark more methods const (NFC) 2016-07-22 21:11:55 +00:00
Support Implement getRandomBytes() function 2016-08-26 08:14:54 +00:00
TableGen [TableGen] Autobrief-ize Record. NFC. 2016-07-14 14:53:14 +00:00
Target [TargetLowering] remove fdiv and frem from canOpTrap() (PR29114) 2016-08-29 13:32:41 +00:00
Transforms [PM] Introduce basic update capabilities to the new PM's CGSCC pass 2016-08-24 09:37:14 +00:00
CMakeLists.txt
InitializePasses.h [GlobalISel] Add a fallback path to SDISel. 2016-08-27 00:18:31 +00:00
LinkAllIR.h Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
LinkAllPasses.h [PM] Port the always inliner to the new pass manager in a much more 2016-08-17 02:56:20 +00:00
module.modulemap Update modulemap for Msf -> MSF rename. 2016-07-30 12:05:17 +00:00
module.modulemap.build
Pass.h Remove unused header. 2016-05-25 22:56:58 +00:00
PassAnalysisSupport.h Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
PassInfo.h
PassRegistry.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
PassSupport.h [LPM] Reinstate r271781 which reinstated r271652 to replace the 2016-06-04 19:57:55 +00:00