| Anton Korobeynikov | 4403b93 | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 1 | //===-- SystemZISelLowering.cpp - SystemZ DAG Lowering Implementation  -----==// | 
|  | 2 | // | 
|  | 3 | //                     The LLVM Compiler Infrastructure | 
|  | 4 | // | 
|  | 5 | // This file is distributed under the University of Illinois Open Source | 
|  | 6 | // License. See LICENSE.TXT for details. | 
|  | 7 | // | 
|  | 8 | //===----------------------------------------------------------------------===// | 
|  | 9 | // | 
|  | 10 | // This file implements the SystemZTargetLowering class. | 
|  | 11 | // | 
|  | 12 | //===----------------------------------------------------------------------===// | 
|  | 13 |  | 
|  | 14 | #define DEBUG_TYPE "systemz-lower" | 
|  | 15 |  | 
|  | 16 | #include "SystemZISelLowering.h" | 
|  | 17 | #include "SystemZ.h" | 
|  | 18 | #include "SystemZTargetMachine.h" | 
|  | 19 | #include "SystemZSubtarget.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/PseudoSourceValue.h" | 
|  | 32 | #include "llvm/CodeGen/SelectionDAGISel.h" | 
|  | 33 | #include "llvm/CodeGen/ValueTypes.h" | 
|  | 34 | #include "llvm/Support/Debug.h" | 
|  | 35 | #include "llvm/ADT/VectorExtras.h" | 
|  | 36 | using namespace llvm; | 
|  | 37 |  | 
|  | 38 | SystemZTargetLowering::SystemZTargetLowering(SystemZTargetMachine &tm) : | 
|  | 39 | TargetLowering(tm), Subtarget(*tm.getSubtargetImpl()), TM(tm) { | 
|  | 40 |  | 
|  | 41 | // Set up the register classes. | 
|  | 42 | addRegisterClass(MVT::i64, SystemZ::GR64RegisterClass); | 
|  | 43 |  | 
|  | 44 | // Compute derived properties from the register classes | 
|  | 45 | computeRegisterProperties(); | 
|  | 46 |  | 
|  | 47 | // Provide all sorts of operation actions | 
|  | 48 |  | 
|  | 49 | setStackPointerRegisterToSaveRestore(SystemZ::R15); | 
|  | 50 | setSchedulingPreference(SchedulingForLatency); | 
|  | 51 | } | 
|  | 52 |  | 
|  | 53 | SDValue SystemZTargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) { | 
|  | 54 | switch (Op.getOpcode()) { | 
|  | 55 | default: | 
|  | 56 | assert(0 && "unimplemented operand"); | 
|  | 57 | return SDValue(); | 
|  | 58 | } | 
|  | 59 | } | 
|  | 60 |  | 
|  | 61 | //===----------------------------------------------------------------------===// | 
|  | 62 | //                      Calling Convention Implementation | 
|  | 63 | //===----------------------------------------------------------------------===// | 
|  | 64 |  | 
|  | 65 | #include "SystemZGenCallingConv.inc" | 
|  | 66 |  | 
|  | 67 | const char *SystemZTargetLowering::getTargetNodeName(unsigned Opcode) const { | 
|  | 68 | switch (Opcode) { | 
|  | 69 | default: return NULL; | 
|  | 70 | } | 
|  | 71 | } | 
|  | 72 |  |