#include "llvm/CodeGen/GCMetadata.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/MC/MCContext.h"
usingnamespacellvm;
static bool DoLowering(Function &F, GCStrategy &S);
namespace {
class LowerIntrinsics : public FunctionPass { … };
class GCMachineCodeAnalysis : public MachineFunctionPass { … };
}
PreservedAnalyses GCLoweringPass::run(Function &F,
FunctionAnalysisManager &FAM) { … }
INITIALIZE_PASS_BEGIN(LowerIntrinsics, "gc-lowering", "GC Lowering", false,
false)
INITIALIZE_PASS_DEPENDENCY(GCModuleInfo)
INITIALIZE_PASS_END(LowerIntrinsics, "gc-lowering", "GC Lowering", false, false)
FunctionPass *llvm::createGCLoweringPass() { … }
char LowerIntrinsics::ID = …;
char &llvm::GCLoweringID = …;
LowerIntrinsics::LowerIntrinsics() : … { … }
StringRef LowerIntrinsics::getPassName() const { … }
void LowerIntrinsics::getAnalysisUsage(AnalysisUsage &AU) const { … }
bool LowerIntrinsics::doInitialization(Module &M) { … }
static bool CouldBecomeSafePoint(Instruction *I) { … }
static bool InsertRootInitializers(Function &F, ArrayRef<AllocaInst *> Roots) { … }
bool LowerIntrinsics::runOnFunction(Function &F) { … }
bool DoLowering(Function &F, GCStrategy &S) { … }
char GCMachineCodeAnalysis::ID = …;
char &llvm::GCMachineCodeAnalysisID = …;
INITIALIZE_PASS(…)
GCMachineCodeAnalysis::GCMachineCodeAnalysis() : … { … }
void GCMachineCodeAnalysis::getAnalysisUsage(AnalysisUsage &AU) const { … }
MCSymbol *GCMachineCodeAnalysis::InsertLabel(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MI,
const DebugLoc &DL) const { … }
void GCMachineCodeAnalysis::VisitCallPoint(MachineBasicBlock::iterator CI) { … }
void GCMachineCodeAnalysis::FindSafePoints(MachineFunction &MF) { … }
void GCMachineCodeAnalysis::FindStackOffsets(MachineFunction &MF) { … }
bool GCMachineCodeAnalysis::runOnMachineFunction(MachineFunction &MF) { … }