Added SMS for superblocks as an option (experimental)
[oota-llvm.git] / lib / Target / SparcV9 / SparcV9BurgISel.h
1 //===-- SparcV9BurgISel.h ---------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // Global functions exposed by the BURG-based instruction selector
11 // for the SparcV9 target.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef SPARCV9BURGISEL_H
16 #define SPARCV9BURGISEL_H
17
18 //#include "llvm/DerivedTypes.h"
19 //#include "llvm/Instruction.h"
20 //#include "SparcV9Internals.h"
21
22 namespace llvm {
23
24 class Constant;
25 class Instruction;
26 class TargetMachine;
27 class Function;
28 class Value;
29 class MachineInstr;
30 class MachineCodeForInstruction;
31 class FunctionPass;
32
33 /// ConstantMayNotFitInImmedField - Test if this constant may not fit in the
34 /// immediate field of the machine instructions (probably) generated for this
35 /// instruction.
36 ///
37 bool ConstantMayNotFitInImmedField (const Constant *CV, const Instruction *I);
38
39 /// CreateCodeToLoadConst - Create an instruction sequence to put the
40 /// constant `val' into the virtual register `dest'.  `val' may be a Constant
41 /// or a GlobalValue, viz., the constant address of a global variable or
42 /// function.  The generated instructions are returned in `mvec'.  Any temp.
43 /// registers (TmpInstruction) created are recorded in mcfi.
44 ///
45 void CreateCodeToLoadConst (const TargetMachine &target, Function *F,
46   Value *val, Instruction *dest, std::vector<MachineInstr*> &mvec,
47   MachineCodeForInstruction &mcfi);
48
49 /// createSparcV9BurgInstSelector - Creates and returns a new SparcV9
50 /// BURG-based instruction selection pass.
51 ///
52 FunctionPass *createSparcV9BurgInstSelector(TargetMachine &TM);
53
54 } // End llvm namespace
55
56 #endif