#include "CoroInternal.h"
#include "SuspendCrossingInfo.h"
#ifndef LLVM_TRANSFORMS_COROUTINES_SPILLINGINFO_H
#define LLVM_TRANSFORMS_COROUTINES_SPILLINGINFO_H
namespace llvm {
namespace coro {
SpillInfo;
struct AllocaInfo { … };
void collectSpillsFromArgs(SpillInfo &Spills, Function &F,
const SuspendCrossingInfo &Checker);
void collectSpillsAndAllocasFromInsts(
SpillInfo &Spills, SmallVector<AllocaInfo, 8> &Allocas,
SmallVector<Instruction *, 4> &DeadInstructions,
SmallVector<CoroAllocaAllocInst *, 4> &LocalAllocas, Function &F,
const SuspendCrossingInfo &Checker, const DominatorTree &DT,
const coro::Shape &Shape);
void collectSpillsFromDbgInfo(SpillInfo &Spills, Function &F,
const SuspendCrossingInfo &Checker);
void sinkSpillUsesAfterCoroBegin(const DominatorTree &DT,
CoroBeginInst *CoroBegin,
coro::SpillInfo &Spills,
SmallVectorImpl<coro::AllocaInfo> &Allocas);
BasicBlock::iterator getSpillInsertionPt(const coro::Shape &, Value *Def,
const DominatorTree &DT);
}
}
#endif