#include "AVRTargetMachine.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/TargetRegistry.h"
#include "AVR.h"
#include "AVRMachineFunctionInfo.h"
#include "AVRTargetObjectFile.h"
#include "MCTargetDesc/AVRMCTargetDesc.h"
#include "TargetInfo/AVRTargetInfo.h"
#include <optional>
namespace llvm {
static const char *AVRDataLayout = …;
static StringRef getCPU(StringRef CPU) { … }
static Reloc::Model getEffectiveRelocModel(std::optional<Reloc::Model> RM) { … }
AVRTargetMachine::AVRTargetMachine(const Target &T, const Triple &TT,
StringRef CPU, StringRef FS,
const TargetOptions &Options,
std::optional<Reloc::Model> RM,
std::optional<CodeModel::Model> CM,
CodeGenOptLevel OL, bool JIT)
: … { … }
namespace {
class AVRPassConfig : public TargetPassConfig { … };
}
TargetPassConfig *AVRTargetMachine::createPassConfig(PassManagerBase &PM) { … }
void AVRPassConfig::addIRPasses() { … }
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAVRTarget() { … }
const AVRSubtarget *AVRTargetMachine::getSubtargetImpl() const { … }
const AVRSubtarget *AVRTargetMachine::getSubtargetImpl(const Function &) const { … }
MachineFunctionInfo *AVRTargetMachine::createMachineFunctionInfo(
BumpPtrAllocator &Allocator, const Function &F,
const TargetSubtargetInfo *STI) const { … }
bool AVRPassConfig::addInstSelector() { … }
void AVRPassConfig::addPreSched2() { … }
void AVRPassConfig::addPreEmitPass() { … }
}