Add micro-optimization which allows us to fold imm into cmp. This allows us to save...
[oota-llvm.git] / lib / Target / MSP430 / MSP430.h
1 //==-- MSP430.h - Top-level interface for MSP430 representation --*- C++ -*-==//
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 contains the entry points for global functions defined in
11 // the LLVM MSP430 backend.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_TARGET_MSP430_H
16 #define LLVM_TARGET_MSP430_H
17
18 #include "llvm/Target/TargetMachine.h"
19
20 namespace MSP430CC {
21   // MSP430 specific condition code.
22   enum CondCodes {
23     COND_E  = 0,  // aka COND_Z
24     COND_NE = 1,  // aka COND_NZ
25     COND_HS = 2,  // aka COND_C
26     COND_LO = 3,  // aka COND_NC
27     COND_GE = 4,
28     COND_L  = 5,
29
30     COND_INVALID = -1
31   };
32 }
33
34 namespace llvm {
35   class MSP430TargetMachine;
36   class FunctionPass;
37   class formatted_raw_ostream;
38
39   FunctionPass *createMSP430ISelDag(MSP430TargetMachine &TM,
40                                     CodeGenOpt::Level OptLevel);
41
42   extern Target TheMSP430Target;
43
44 } // end namespace llvm;
45
46 // Defines symbolic names for MSP430 registers.
47 // This defines a mapping from register name to register number.
48 #include "MSP430GenRegisterNames.inc"
49
50 // Defines symbolic names for the MSP430 instructions.
51 #include "MSP430GenInstrNames.inc"
52
53 #endif