3 Commits

Author SHA1 Message Date
Tyler Nowicki
4db57ab958
[Coroutines] Improve dump of BB label to avoid str copies (#112374)
* This avoids the need to call printAsOperand that requires use of an
ostream and thus avoids a str copy.
* ModuleSlotTracker is used to get a BB # for BB's without names when
dumping SuspendCrossingInfo and materialization info.
* getBasicBlockLabel() is changed to dumpBasicBlockLabel() that directly
prints the label to dbgs()
* The label corresponds with the print-before BB #s.
* This change does not require any additional arguments to be added to
dump() methods, at least those that currently do not require any args.

Co-authored-by: tnowicki <tnowicki.nowicki@amd.com>
2024-10-16 00:37:29 -04:00
Tyler Nowicki
e82fcda147
[Coroutines] Move util headers to include/llvm (#111599)
Plugin libraries that use coroutines can do so right now, however, to
provide their own ABI they need to be able to use various headers, some
of which such are required (such as the ABI header). This change exposes
the coro utils and required headers by moving them to
include/llvm/Transforms/Coroutines. My experience with our out-of-tree
plugin ABI has been that at least these headers are needed. The headers
moved are:
* ABI.h (ABI object)
* CoroInstr.h (helpers)
 * Coroshape.h (Shape object)
 * MaterializationUtils.h (helpers)
 * SpillingUtils.h (helpers)
 * SuspendCrossingInfo.h (analysis)

This has no code changes other than those required to move the headers
and these are:
 * include guard name changes
 * include path changes
 * minor clang-format induced changes
 * removal of LLVM_LIBRARY_VISIBILITY
2024-10-09 14:34:19 -04:00
Tyler Nowicki
2670565afc
[Coroutines] Move materialization code into its own utils (#108240)
* Move materialization out of CoroFrame to MaterializationUtils.h
* Move spill related utilities that were used by materialization to
SpillUtils
* Move isSuspendBlock (needed by materialization) to CoroInternal

See RFC for more info:
https://discourse.llvm.org/t/rfc-abi-objects-for-coroutines/81057
2024-09-12 14:01:23 -04:00