2002-10-25 22:55:53 +00:00
|
|
|
//===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
|
2003-10-21 15:17:13 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2002-10-25 22:55:53 +00:00
|
|
|
//
|
|
|
|
// This file contains the entry points for global functions defined in the x86
|
|
|
|
// target library, as used by the LLVM JIT.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef TARGET_X86_H
|
|
|
|
#define TARGET_X86_H
|
|
|
|
|
|
|
|
#include <iosfwd>
|
2003-11-11 22:41:34 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2002-10-29 17:43:38 +00:00
|
|
|
class TargetMachine;
|
2003-08-13 18:15:29 +00:00
|
|
|
class FunctionPass;
|
2003-12-28 09:47:19 +00:00
|
|
|
class IntrinsicLowering;
|
2002-10-25 22:55:53 +00:00
|
|
|
|
2003-07-26 23:49:58 +00:00
|
|
|
/// createX86SimpleInstructionSelector - This pass converts an LLVM function
|
2003-08-03 15:48:55 +00:00
|
|
|
/// into a machine code representation in a very simple peep-hole fashion. The
|
2002-10-25 22:55:53 +00:00
|
|
|
/// generated code sucks but the implementation is nice and simple.
|
|
|
|
///
|
2003-12-28 21:23:38 +00:00
|
|
|
FunctionPass *createX86SimpleInstructionSelector(TargetMachine &TM);
|
2002-10-25 22:55:53 +00:00
|
|
|
|
2004-04-06 19:34:00 +00:00
|
|
|
/// createX86ReallySimpleInstructionSelector - This pass converts an LLVM
|
|
|
|
/// function into a machine code representation in an even simpler fashion
|
|
|
|
/// than above.
|
|
|
|
///
|
|
|
|
FunctionPass *createX86ReallySimpleInstructionSelector(TargetMachine &TM);
|
|
|
|
|
2003-08-11 14:59:22 +00:00
|
|
|
/// createX86PatternInstructionSelector - This pass converts an LLVM function
|
|
|
|
/// into a machine code representation using pattern matching and a machine
|
|
|
|
/// description file.
|
|
|
|
///
|
2003-12-28 21:23:38 +00:00
|
|
|
FunctionPass *createX86PatternInstructionSelector(TargetMachine &TM);
|
2003-08-11 14:59:22 +00:00
|
|
|
|
2003-12-01 05:18:30 +00:00
|
|
|
/// createX86SSAPeepholeOptimizerPass - Create a pass to perform SSA-based X86
|
|
|
|
/// specific peephole optimizations.
|
|
|
|
///
|
|
|
|
FunctionPass *createX86SSAPeepholeOptimizerPass();
|
|
|
|
|
2003-01-13 00:45:29 +00:00
|
|
|
/// createX86PeepholeOptimizer - Create a pass to perform X86 specific peephole
|
|
|
|
/// optimizations.
|
2002-10-25 22:55:53 +00:00
|
|
|
///
|
2003-08-13 18:15:29 +00:00
|
|
|
FunctionPass *createX86PeepholeOptimizerPass();
|
2002-12-28 20:26:16 +00:00
|
|
|
|
2003-12-13 05:36:22 +00:00
|
|
|
/// createX86FloatingPointKiller - This function returns a pass which
|
|
|
|
/// kills every floating point register at the end of each basic block
|
|
|
|
/// because our FloatingPointStackifier cannot handle them.
|
|
|
|
///
|
|
|
|
FunctionPass *createX86FloatingPointKillerPass();
|
|
|
|
|
2003-01-13 00:45:29 +00:00
|
|
|
/// createX86FloatingPointStackifierPass - This function returns a pass which
|
|
|
|
/// converts floating point register references and pseudo instructions into
|
|
|
|
/// floating point stack references and physical instructions.
|
2002-12-28 20:26:16 +00:00
|
|
|
///
|
2003-08-13 18:15:29 +00:00
|
|
|
FunctionPass *createX86FloatingPointStackifierPass();
|
2002-10-29 22:37:54 +00:00
|
|
|
|
2003-07-23 20:25:08 +00:00
|
|
|
/// createX86CodePrinterPass - Returns a pass that prints the X86
|
|
|
|
/// assembly code for a MachineFunction to the given output stream,
|
|
|
|
/// using the given target machine description. This should work
|
|
|
|
/// regardless of whether the function is in SSA form.
|
2002-10-29 22:37:54 +00:00
|
|
|
///
|
2003-08-13 18:15:29 +00:00
|
|
|
FunctionPass *createX86CodePrinterPass(std::ostream &o,TargetMachine &tm);
|
2002-10-25 22:55:53 +00:00
|
|
|
|
2003-08-13 18:15:29 +00:00
|
|
|
/// createX86EmitCodeToMemory - Returns a pass that converts a register
|
|
|
|
/// allocated function into raw machine code in a dynamically
|
|
|
|
/// allocated chunk of memory.
|
2002-10-25 22:55:53 +00:00
|
|
|
///
|
2003-08-13 18:15:29 +00:00
|
|
|
FunctionPass *createEmitX86CodeToMemory();
|
2002-10-25 22:55:53 +00:00
|
|
|
|
2003-08-03 15:48:55 +00:00
|
|
|
// Defines symbolic names for X86 registers. This defines a mapping from
|
|
|
|
// register name to register number.
|
|
|
|
//
|
2003-11-11 22:41:34 +00:00
|
|
|
} // End llvm namespace
|
|
|
|
|
2003-08-03 15:48:55 +00:00
|
|
|
#include "X86GenRegisterNames.inc"
|
|
|
|
|
2003-08-03 21:57:05 +00:00
|
|
|
// Defines symbolic names for the X86 instructions.
|
|
|
|
//
|
|
|
|
#include "X86GenInstrNames.inc"
|
2002-10-25 22:55:53 +00:00
|
|
|
|
|
|
|
#endif
|