Skip to content

Commit

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

* Move utilities to include/llvm/Transform/Coroutines
  • Loading branch information
tnowicki committed Sep 19, 2024
1 parent cb38006 commit c1c55a5
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 @@ -29,7 +29,7 @@ namespace coro {
// ABI operations. The ABIs (e.g. Switch, Async, Retcon{Once}) are the common
// ABIs.

class LLVM_LIBRARY_VISIBILITY BaseABI {
class BaseABI {
public:
BaseABI(Function &F, Shape &S)
: F(F), Shape(S), IsMaterializable(coro::isTriviallyMaterializable) {}
Expand Down Expand Up @@ -57,7 +57,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 @@ -72,7 +72,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 @@ -87,7 +87,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 c1c55a5

Please sign in to comment.