X86LegalizerInfo.h revision 317029
1//===- X86LegalizerInfo.h ------------------------------------------*- C++
2//-*-==//
3//
4//                     The LLVM Compiler Infrastructure
5//
6// This file is distributed under the University of Illinois Open Source
7// License. See LICENSE.TXT for details.
8//
9//===----------------------------------------------------------------------===//
10/// \file
11/// This file declares the targeting of the Machinelegalizer class for X86.
12/// \todo This should be generated by TableGen.
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_LIB_TARGET_X86_X86MACHINELEGALIZER_H
16#define LLVM_LIB_TARGET_X86_X86MACHINELEGALIZER_H
17
18#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
19
20namespace llvm {
21
22class X86Subtarget;
23class X86TargetMachine;
24
25/// This class provides the information for the target register banks.
26class X86LegalizerInfo : public LegalizerInfo {
27private:
28  /// Keep a reference to the X86Subtarget around so that we can
29  /// make the right decision when generating code for different targets.
30  const X86Subtarget &Subtarget;
31  const X86TargetMachine &TM;
32
33public:
34  X86LegalizerInfo(const X86Subtarget &STI, const X86TargetMachine &TM);
35
36private:
37  void setLegalizerInfo32bit();
38  void setLegalizerInfo64bit();
39  void setLegalizerInfoSSE1();
40  void setLegalizerInfoSSE2();
41};
42} // namespace llvm
43#endif
44