1 //===-- MSP430ISelLowering.cpp - MSP430 DAG Lowering Implementation ------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements the MSP430TargetLowering class.
12 //===----------------------------------------------------------------------===//
14 #define DEBUG_TYPE "msp430-lower"
16 #include "MSP430ISelLowering.h"
18 #include "MSP430TargetMachine.h"
19 #include "MSP430Subtarget.h"
20 #include "llvm/DerivedTypes.h"
21 #include "llvm/Function.h"
22 #include "llvm/Intrinsics.h"
23 #include "llvm/CallingConv.h"
24 #include "llvm/GlobalVariable.h"
25 #include "llvm/GlobalAlias.h"
26 #include "llvm/CodeGen/CallingConvLower.h"
27 #include "llvm/CodeGen/MachineFrameInfo.h"
28 #include "llvm/CodeGen/MachineFunction.h"
29 #include "llvm/CodeGen/MachineInstrBuilder.h"
30 #include "llvm/CodeGen/MachineRegisterInfo.h"
31 #include "llvm/CodeGen/SelectionDAGISel.h"
32 #include "llvm/CodeGen/ValueTypes.h"
33 #include "llvm/Support/Debug.h"
34 #include "llvm/ADT/VectorExtras.h"
37 MSP430TargetLowering::MSP430TargetLowering(MSP430TargetMachine &tm) :
38 TargetLowering(tm), Subtarget(*tm.getSubtargetImpl()), TM(tm) {
40 // Set up the register classes.
41 addRegisterClass(MVT::i16, MSP430::MSP430RegsRegisterClass);
43 // Compute derived properties from the register classes
44 computeRegisterProperties();
47 SDValue MSP430TargetLowering::
48 LowerOperation(SDValue Op, SelectionDAG &DAG) {
49 switch (Op.getOpcode()) {
51 assert(0 && "unimplemented operand");
56 #include "MSP430GenCallingConv.inc"