2017-02-10 15:05:56 +08:00
|
|
|
//===- X86LegalizerInfo.h ------------------------------------------*- C++
|
|
|
|
//-*-==//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
/// \file
|
|
|
|
/// This file declares the targeting of the Machinelegalizer class for X86.
|
|
|
|
/// \todo This should be generated by TableGen.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_LIB_TARGET_X86_X86MACHINELEGALIZER_H
|
|
|
|
#define LLVM_LIB_TARGET_X86_X86MACHINELEGALIZER_H
|
|
|
|
|
|
|
|
#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class X86Subtarget;
|
2017-03-26 16:11:12 +08:00
|
|
|
class X86TargetMachine;
|
2017-02-10 15:05:56 +08:00
|
|
|
|
|
|
|
/// This class provides the information for the target register banks.
|
|
|
|
class X86LegalizerInfo : public LegalizerInfo {
|
|
|
|
private:
|
|
|
|
/// Keep a reference to the X86Subtarget around so that we can
|
|
|
|
/// make the right decision when generating code for different targets.
|
|
|
|
const X86Subtarget &Subtarget;
|
2017-03-26 16:11:12 +08:00
|
|
|
const X86TargetMachine &TM;
|
2017-02-10 15:05:56 +08:00
|
|
|
|
|
|
|
public:
|
2017-03-26 16:11:12 +08:00
|
|
|
X86LegalizerInfo(const X86Subtarget &STI, const X86TargetMachine &TM);
|
2017-02-10 15:05:56 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
void setLegalizerInfo32bit();
|
|
|
|
void setLegalizerInfo64bit();
|
2017-03-03 16:06:46 +08:00
|
|
|
void setLegalizerInfoSSE1();
|
|
|
|
void setLegalizerInfoSSE2();
|
2017-02-10 15:05:56 +08:00
|
|
|
};
|
2017-03-26 16:11:12 +08:00
|
|
|
} // namespace llvm
|
2017-02-10 15:05:56 +08:00
|
|
|
#endif
|