Skip to content

Commit

Permalink
[llvm/llvm-project][Coroutines] Move various util headers to include/…
Browse files Browse the repository at this point in the history
…llvm for plugin libraries

* Move utilities to include/llvm/Transform/Coroutines
  • Loading branch information
tnowicki committed Sep 4, 2024
1 parent f57bffa commit f15d042
Show file tree
Hide file tree
Showing 16 changed files with 98 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
// coroutine lowering.
//===----------------------------------------------------------------------===//

#ifndef LIB_TRANSFORMS_COROUTINES_ABI_H
#define LIB_TRANSFORMS_COROUTINES_ABI_H
#ifndef LLVM_TRANSFORMS_COROUTINES_ABI_H
#define LLVM_TRANSFORMS_COROUTINES_ABI_H

#include "CoroShape.h"
#include "MaterializationUtils.h"
#include "SuspendCrossingInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Transforms/Coroutines/CoroShape.h"
#include "llvm/Transforms/Coroutines/MaterializationUtils.h"
#include "llvm/Transforms/Coroutines/SuspendCrossingInfo.h"

namespace llvm {

Expand All @@ -35,7 +35,7 @@ namespace coro {
// last argument. This is used to lookup a generator for the custom ABI from
// a set of generators provided to the CoroSplitPass constructor.
//
class LLVM_LIBRARY_VISIBILITY BaseABI {
class BaseABI {
public:
BaseABI(Function &F, Shape &S)
: F(F), Shape(S), IsMaterializable(coro::isTriviallyMaterializable) {}
Expand Down Expand Up @@ -63,7 +63,7 @@ class LLVM_LIBRARY_VISIBILITY BaseABI {
std::function<bool(Instruction &I)> IsMaterializable;
};

class LLVM_LIBRARY_VISIBILITY SwitchABI : public BaseABI {
class SwitchABI : public BaseABI {
public:
SwitchABI(Function &F, coro::Shape &S) : BaseABI(F, S) {}

Expand All @@ -78,7 +78,7 @@ class LLVM_LIBRARY_VISIBILITY SwitchABI : public BaseABI {
TargetTransformInfo &TTI) override;
};

class LLVM_LIBRARY_VISIBILITY AsyncABI : public BaseABI {
class AsyncABI : public BaseABI {
public:
AsyncABI(Function &F, coro::Shape &S) : BaseABI(F, S) {}

Expand All @@ -93,7 +93,7 @@ class LLVM_LIBRARY_VISIBILITY AsyncABI : public BaseABI {
TargetTransformInfo &TTI) override;
};

class LLVM_LIBRARY_VISIBILITY AnyRetconABI : public BaseABI {
class AnyRetconABI : public BaseABI {
public:
AnyRetconABI(Function &F, coro::Shape &S) : BaseABI(F, S) {}

Expand Down
Loading

0 comments on commit f15d042

Please sign in to comment.