LLVM API Documentation
#include "X86.h"#include "X86InstrInfo.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/CodeGen/Passes.h"#include "llvm/Target/TargetInstrInfo.h"#include "llvm/Target/TargetMachine.h"#include "llvm/Support/Debug.h"#include "llvm/Support/Compiler.h"#include "llvm/ADT/DepthFirstIterator.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Statistic.h"#include "llvm/ADT/STLExtras.h"#include <algorithm>

Go to the source code of this file.
Defines | |
| #define | DEBUG_TYPE "x86-codegen" |
| #define | ASSERT_SORTED(TABLE) |
Functions | |
| STATISTIC (NumFXCH,"Number of fxch instructions inserted") | |
| STATISTIC (NumFP,"Number of floating point instructions") | |
| FunctionPass * | llvm::createX86FloatingPointStackifierPass () |
| static unsigned | getFPReg (const MachineOperand &MO) |
| static bool | TableIsSorted (const TableEntry *Table, unsigned NumEntries) |
| static int | Lookup (const TableEntry *Table, unsigned N, unsigned Opcode) |
| static unsigned | getConcreteOpcode (unsigned Opcode) |
Variables | |
| static const TableEntry | OpcodeTable [] |
| static const TableEntry | PopTable [] |
| static const TableEntry | ForwardST0Table [] |
| static const TableEntry | ReverseST0Table [] |
| static const TableEntry | ForwardSTiTable [] |
| static const TableEntry | ReverseSTiTable [] |
| #define ASSERT_SORTED | ( | TABLE | ) |
Value:
{ static bool TABLE##Checked = false; \
if (!TABLE##Checked) { \
assert(TableIsSorted(TABLE, array_lengthof(TABLE)) && \
"All lookup tables must be sorted for efficient access!"); \
TABLE##Checked = true; \
} \
}
Definition at line 327 of file X86FloatingPoint.cpp.
Referenced by getConcreteOpcode().
| #define DEBUG_TYPE "x86-codegen" |
Definition at line 31 of file X86FloatingPoint.cpp.
Definition at line 507 of file X86FloatingPoint.cpp.
References llvm::array_lengthof(), ASSERT_SORTED, and Lookup().
| static unsigned getFPReg | ( | const MachineOperand & | MO | ) | [static] |
getFPReg - Return the X86::FPx register number for the specified operand. For example, this returns 3 for X86::FP3.
Definition at line 170 of file X86FloatingPoint.cpp.
References llvm::MachineOperand::getReg(), llvm::MachineOperand::isReg(), and Reg.
| STATISTIC | ( | NumFP | , | |
| "Number of floating point instructions" | ||||
| ) |
| STATISTIC | ( | NumFXCH | , | |
| "Number of fxch instructions inserted" | ||||
| ) |
| static bool TableIsSorted | ( | const TableEntry * | Table, | |
| unsigned | NumEntries | |||
| ) | [static] |
Definition at line 310 of file X86FloatingPoint.cpp.
const TableEntry ForwardST0Table[] [static] |
Initial value:
{
{ X86::ADD_Fp32 , X86::ADD_FST0r },
{ X86::ADD_Fp64 , X86::ADD_FST0r },
{ X86::ADD_Fp80 , X86::ADD_FST0r },
{ X86::DIV_Fp32 , X86::DIV_FST0r },
{ X86::DIV_Fp64 , X86::DIV_FST0r },
{ X86::DIV_Fp80 , X86::DIV_FST0r },
{ X86::MUL_Fp32 , X86::MUL_FST0r },
{ X86::MUL_Fp64 , X86::MUL_FST0r },
{ X86::MUL_Fp80 , X86::MUL_FST0r },
{ X86::SUB_Fp32 , X86::SUB_FST0r },
{ X86::SUB_Fp64 , X86::SUB_FST0r },
{ X86::SUB_Fp80 , X86::SUB_FST0r },
}
Definition at line 707 of file X86FloatingPoint.cpp.
const TableEntry ForwardSTiTable[] [static] |
Initial value:
{
{ X86::ADD_Fp32 , X86::ADD_FrST0 },
{ X86::ADD_Fp64 , X86::ADD_FrST0 },
{ X86::ADD_Fp80 , X86::ADD_FrST0 },
{ X86::DIV_Fp32 , X86::DIVR_FrST0 },
{ X86::DIV_Fp64 , X86::DIVR_FrST0 },
{ X86::DIV_Fp80 , X86::DIVR_FrST0 },
{ X86::MUL_Fp32 , X86::MUL_FrST0 },
{ X86::MUL_Fp64 , X86::MUL_FrST0 },
{ X86::MUL_Fp80 , X86::MUL_FrST0 },
{ X86::SUB_Fp32 , X86::SUBR_FrST0 },
{ X86::SUB_Fp64 , X86::SUBR_FrST0 },
{ X86::SUB_Fp80 , X86::SUBR_FrST0 },
}
Definition at line 739 of file X86FloatingPoint.cpp.
Definition at line 297 of file X86FloatingPoint.cpp.
char ID [static] |
Definition at line 55 of file X86FloatingPoint.cpp.
Definition at line 70 of file X86FloatingPoint.cpp.
Referenced by llvm::LiveIntervals::computeNumbering(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::SPURegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::IA64RegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::emitPrologue(), llvm::SPURegisterInfo::emitPrologue(), llvm::SparcRegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::emitPrologue(), llvm::MipsRegisterInfo::emitPrologue(), llvm::IA64RegisterInfo::emitPrologue(), llvm::ARMRegisterInfo::emitPrologue(), llvm::AlphaRegisterInfo::emitPrologue(), llvm::BasicBlockSDNode::getBasicBlock(), llvm::TargetInstrInfoImpl::GetFunctionSizeInBytes(), llvm::ARMInstrInfo::GetInstSizeInBytes(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::FunctionLoweringInfo::set(), and llvm::SelectionDAGLowering::visitBitTestHeader().
const TableEntry OpcodeTable[] [static] |
Definition at line 345 of file X86FloatingPoint.cpp.
const TableEntry PopTable[] [static] |
Initial value:
{
{ X86::ADD_FrST0 , X86::ADD_FPrST0 },
{ X86::DIVR_FrST0, X86::DIVR_FPrST0 },
{ X86::DIV_FrST0 , X86::DIV_FPrST0 },
{ X86::IST_F16m , X86::IST_FP16m },
{ X86::IST_F32m , X86::IST_FP32m },
{ X86::MUL_FrST0 , X86::MUL_FPrST0 },
{ X86::ST_F32m , X86::ST_FP32m },
{ X86::ST_F64m , X86::ST_FP64m },
{ X86::ST_Frr , X86::ST_FPrr },
{ X86::SUBR_FrST0, X86::SUBR_FPrST0 },
{ X86::SUB_FrST0 , X86::SUB_FPrST0 },
{ X86::UCOM_FIr , X86::UCOM_FIPr },
{ X86::UCOM_FPr , X86::UCOM_FPPr },
{ X86::UCOM_Fr , X86::UCOM_FPr },
}
Definition at line 521 of file X86FloatingPoint.cpp.
Definition at line 72 of file X86FloatingPoint.cpp.
const TableEntry ReverseST0Table[] [static] |
Initial value:
{
{ X86::ADD_Fp32 , X86::ADD_FST0r },
{ X86::ADD_Fp64 , X86::ADD_FST0r },
{ X86::ADD_Fp80 , X86::ADD_FST0r },
{ X86::DIV_Fp32 , X86::DIVR_FST0r },
{ X86::DIV_Fp64 , X86::DIVR_FST0r },
{ X86::DIV_Fp80 , X86::DIVR_FST0r },
{ X86::MUL_Fp32 , X86::MUL_FST0r },
{ X86::MUL_Fp64 , X86::MUL_FST0r },
{ X86::MUL_Fp80 , X86::MUL_FST0r },
{ X86::SUB_Fp32 , X86::SUBR_FST0r },
{ X86::SUB_Fp64 , X86::SUBR_FST0r },
{ X86::SUB_Fp80 , X86::SUBR_FST0r },
}
Definition at line 723 of file X86FloatingPoint.cpp.
const TableEntry ReverseSTiTable[] [static] |
Initial value:
{
{ X86::ADD_Fp32 , X86::ADD_FrST0 },
{ X86::ADD_Fp64 , X86::ADD_FrST0 },
{ X86::ADD_Fp80 , X86::ADD_FrST0 },
{ X86::DIV_Fp32 , X86::DIV_FrST0 },
{ X86::DIV_Fp64 , X86::DIV_FrST0 },
{ X86::DIV_Fp80 , X86::DIV_FrST0 },
{ X86::MUL_Fp32 , X86::MUL_FrST0 },
{ X86::MUL_Fp64 , X86::MUL_FrST0 },
{ X86::MUL_Fp80 , X86::MUL_FrST0 },
{ X86::SUB_Fp32 , X86::SUB_FrST0 },
{ X86::SUB_Fp64 , X86::SUB_FrST0 },
{ X86::SUB_Fp80 , X86::SUB_FrST0 },
}
Definition at line 755 of file X86FloatingPoint.cpp.
Definition at line 71 of file X86FloatingPoint.cpp.
Definition at line 73 of file X86FloatingPoint.cpp.
| const TargetInstrInfo* TII |
Definition at line 69 of file X86FloatingPoint.cpp.
Definition at line 298 of file X86FloatingPoint.cpp.
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.