2002-10-26 06:55:53 +08:00
|
|
|
//===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
|
2005-04-22 07:38:14 +08:00
|
|
|
//
|
2003-10-21 23:17:13 +08: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.
|
2005-04-22 07:38:14 +08:00
|
|
|
//
|
2003-10-21 23:17:13 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2002-10-26 06:55:53 +08: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-12 06:41:34 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2002-10-30 01:43:38 +08:00
|
|
|
class TargetMachine;
|
2005-07-11 13:17:48 +08:00
|
|
|
class PassManager;
|
2003-08-14 02:15:29 +08:00
|
|
|
class FunctionPass;
|
2003-12-28 17:47:19 +08:00
|
|
|
class IntrinsicLowering;
|
2005-07-11 13:17:48 +08:00
|
|
|
class MachineCodeEmitter;
|
2002-10-26 06:55:53 +08:00
|
|
|
|
2004-08-24 16:18:44 +08:00
|
|
|
enum X86VectorEnum {
|
|
|
|
NoSSE, SSE, SSE2, SSE3
|
|
|
|
};
|
|
|
|
|
|
|
|
extern X86VectorEnum X86Vector;
|
2005-07-07 02:59:04 +08:00
|
|
|
extern bool X86ScalarSSE;
|
2004-08-24 16:18:44 +08:00
|
|
|
|
2005-01-07 15:48:33 +08:00
|
|
|
/// createX86PatternInstructionSelector - This pass converts an LLVM function
|
|
|
|
/// into a machine code representation in a more aggressive way.
|
|
|
|
///
|
|
|
|
FunctionPass *createX86PatternInstructionSelector(TargetMachine &TM);
|
|
|
|
|
2003-12-01 13:18:30 +08:00
|
|
|
/// createX86SSAPeepholeOptimizerPass - Create a pass to perform SSA-based X86
|
|
|
|
/// specific peephole optimizations.
|
|
|
|
///
|
|
|
|
FunctionPass *createX86SSAPeepholeOptimizerPass();
|
|
|
|
|
2003-01-13 08:45:29 +08:00
|
|
|
/// createX86PeepholeOptimizer - Create a pass to perform X86 specific peephole
|
|
|
|
/// optimizations.
|
2002-10-26 06:55:53 +08:00
|
|
|
///
|
2003-08-14 02:15:29 +08:00
|
|
|
FunctionPass *createX86PeepholeOptimizerPass();
|
2002-12-29 04:26:16 +08:00
|
|
|
|
2003-01-13 08:45:29 +08: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-29 04:26:16 +08:00
|
|
|
///
|
2003-08-14 02:15:29 +08:00
|
|
|
FunctionPass *createX86FloatingPointStackifierPass();
|
2002-10-30 06:37:54 +08:00
|
|
|
|
2003-07-24 04:25:08 +08:00
|
|
|
/// createX86CodePrinterPass - Returns a pass that prints the X86
|
|
|
|
/// assembly code for a MachineFunction to the given output stream,
|
2005-07-11 13:17:48 +08:00
|
|
|
/// using the given target machine description.
|
2002-10-30 06:37:54 +08:00
|
|
|
///
|
2005-07-11 13:17:48 +08:00
|
|
|
FunctionPass *createX86CodePrinterPass(std::ostream &o, TargetMachine &tm);
|
2002-10-26 06:55:53 +08:00
|
|
|
|
2005-07-11 13:17:48 +08:00
|
|
|
/// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
|
|
|
|
/// to the specified MCE object.
|
|
|
|
FunctionPass *createX86CodeEmitterPass(MachineCodeEmitter &MCE);
|
|
|
|
|
|
|
|
/// addX86ELFObjectWriterPass - Add passes to the FPM that output the generated
|
2005-06-27 14:30:12 +08:00
|
|
|
/// code as an ELF object file.
|
|
|
|
///
|
2005-07-11 13:17:48 +08:00
|
|
|
void addX86ELFObjectWriterPass(PassManager &FPM,
|
|
|
|
std::ostream &o, TargetMachine &tm);
|
2005-06-27 14:30:12 +08:00
|
|
|
|
2003-08-14 02:15:29 +08:00
|
|
|
/// createX86EmitCodeToMemory - Returns a pass that converts a register
|
|
|
|
/// allocated function into raw machine code in a dynamically
|
|
|
|
/// allocated chunk of memory.
|
2002-10-26 06:55:53 +08:00
|
|
|
///
|
2003-08-14 02:15:29 +08:00
|
|
|
FunctionPass *createEmitX86CodeToMemory();
|
2002-10-26 06:55:53 +08:00
|
|
|
|
2005-01-07 15:48:33 +08:00
|
|
|
} // End llvm namespace
|
|
|
|
|
2003-08-03 23:48:55 +08:00
|
|
|
// Defines symbolic names for X86 registers. This defines a mapping from
|
|
|
|
// register name to register number.
|
|
|
|
//
|
|
|
|
#include "X86GenRegisterNames.inc"
|
|
|
|
|
2003-08-04 05:57:05 +08:00
|
|
|
// Defines symbolic names for the X86 instructions.
|
|
|
|
//
|
|
|
|
#include "X86GenInstrNames.inc"
|
2002-10-26 06:55:53 +08:00
|
|
|
|
|
|
|
#endif
|