#include "XCore.h"
#include "XCoreTargetMachine.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/SelectionDAGISel.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsXCore.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
usingnamespacellvm;
#define DEBUG_TYPE …
#define PASS_NAME …
namespace {
class XCoreDAGToDAGISel : public SelectionDAGISel { … };
class XCoreDAGToDAGISelLegacy : public SelectionDAGISelLegacy { … };
}
char XCoreDAGToDAGISelLegacy::ID = …;
INITIALIZE_PASS(…)
FunctionPass *llvm::createXCoreISelDag(XCoreTargetMachine &TM,
CodeGenOptLevel OptLevel) { … }
bool XCoreDAGToDAGISel::SelectADDRspii(SDValue Addr, SDValue &Base,
SDValue &Offset) { … }
bool XCoreDAGToDAGISel::SelectInlineAsmMemoryOperand(
const SDValue &Op, InlineAsm::ConstraintCode ConstraintID,
std::vector<SDValue> &OutOps) { … }
void XCoreDAGToDAGISel::Select(SDNode *N) { … }
static SDValue
replaceInChain(SelectionDAG *CurDAG, SDValue Chain, SDValue Old, SDValue New)
{ … }
bool XCoreDAGToDAGISel::tryBRIND(SDNode *N) { … }