#include "llvm/ADT/DepthFirstIterator.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/TargetSubtargetInfo.h"
#include "llvm/InitializePasses.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDwarf.h"
usingnamespacellvm;
static cl::opt<bool> VerifyCFI("verify-cfiinstrs",
cl::desc("Verify Call Frame Information instructions"),
cl::init(false),
cl::Hidden);
namespace {
class CFIInstrInserter : public MachineFunctionPass { … };
}
char CFIInstrInserter::ID = …;
INITIALIZE_PASS(…)
FunctionPass *llvm::createCFIInstrInserter() { … }
void CFIInstrInserter::calculateCFAInfo(MachineFunction &MF) { … }
void CFIInstrInserter::calculateOutgoingCFAInfo(MBBCFAInfo &MBBInfo) { … }
void CFIInstrInserter::updateSuccCFAInfo(MBBCFAInfo &MBBInfo) { … }
bool CFIInstrInserter::insertCFIInstrs(MachineFunction &MF) { … }
void CFIInstrInserter::reportCFAError(const MBBCFAInfo &Pred,
const MBBCFAInfo &Succ) { … }
void CFIInstrInserter::reportCSRError(const MBBCFAInfo &Pred,
const MBBCFAInfo &Succ) { … }
unsigned CFIInstrInserter::verify(MachineFunction &MF) { … }