1 //===-- SparcV9BurgISel.h ---------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
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.
8 //===----------------------------------------------------------------------===//
10 // Global functions exposed by the BURG-based instruction selector
11 // for the SparcV9 target.
13 //===----------------------------------------------------------------------===//
15 #ifndef SPARCV9BURGISEL_H
16 #define SPARCV9BURGISEL_H
18 //#include "llvm/DerivedTypes.h"
19 //#include "llvm/Instruction.h"
20 //#include "SparcV9Internals.h"
30 class MachineCodeForInstruction;
33 /// ConstantMayNotFitInImmedField - Test if this constant may not fit in the
34 /// immediate field of the machine instructions (probably) generated for this
37 bool ConstantMayNotFitInImmedField (const Constant *CV, const Instruction *I);
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.
45 void CreateCodeToLoadConst (const TargetMachine &target, Function *F,
46 Value *val, Instruction *dest, std::vector<MachineInstr*> &mvec,
47 MachineCodeForInstruction &mcfi);
49 /// createSparcV9BurgInstSelector - Creates and returns a new SparcV9
50 /// BURG-based instruction selection pass.
52 FunctionPass *createSparcV9BurgInstSelector(TargetMachine &TM);
54 } // End llvm namespace