#include "llvm/CodeGen/MachineCycleAnalysis.h"
#include "llvm/ADT/GenericCycleImpl.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/MachineSSAContext.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/InitializePasses.h"
usingnamespacellvm;
template class llvm::GenericCycleInfo<llvm::MachineSSAContext>;
template class llvm::GenericCycle<llvm::MachineSSAContext>;
char MachineCycleInfoWrapperPass::ID = …;
MachineCycleInfoWrapperPass::MachineCycleInfoWrapperPass()
: … { … }
INITIALIZE_PASS_BEGIN(MachineCycleInfoWrapperPass, "machine-cycles",
"Machine Cycle Info Analysis", true, true)
INITIALIZE_PASS_END(MachineCycleInfoWrapperPass, "machine-cycles",
"Machine Cycle Info Analysis", true, true)
void MachineCycleInfoWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const { … }
bool MachineCycleInfoWrapperPass::runOnMachineFunction(MachineFunction &Func) { … }
void MachineCycleInfoWrapperPass::print(raw_ostream &OS, const Module *) const { … }
void MachineCycleInfoWrapperPass::releaseMemory() { … }
namespace {
class MachineCycleInfoPrinterPass : public MachineFunctionPass { … };
}
char MachineCycleInfoPrinterPass::ID = …;
MachineCycleInfoPrinterPass::MachineCycleInfoPrinterPass()
: … { … }
INITIALIZE_PASS_BEGIN(MachineCycleInfoPrinterPass, "print-machine-cycles",
"Print Machine Cycle Info Analysis", true, true)
INITIALIZE_PASS_DEPENDENCY(MachineCycleInfoWrapperPass)
INITIALIZE_PASS_END(MachineCycleInfoPrinterPass, "print-machine-cycles",
"Print Machine Cycle Info Analysis", true, true)
void MachineCycleInfoPrinterPass::getAnalysisUsage(AnalysisUsage &AU) const { … }
bool MachineCycleInfoPrinterPass::runOnMachineFunction(MachineFunction &F) { … }
bool llvm::isCycleInvariant(const MachineCycle *Cycle, MachineInstr &I) { … }