xref: /freebsd/contrib/llvm-project/llvm/lib/Target/X86/GISel/X86LegalizerInfo.h (revision 7a6dacaca14b62ca4b74406814becb87a3fefac0)
1 //===- X86LegalizerInfo.h ------------------------------------------*- C++
2 //-*-==//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 /// \file
10 /// This file declares the targeting of the Machinelegalizer class for X86.
11 /// \todo This should be generated by TableGen.
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_X86_X86MACHINELEGALIZER_H
15 #define LLVM_LIB_TARGET_X86_X86MACHINELEGALIZER_H
16 
17 #include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
18 
19 namespace llvm {
20 
21 class X86Subtarget;
22 class X86TargetMachine;
23 
24 class X86LegalizerInfo : public LegalizerInfo {
25 private:
26   /// Keep a reference to the X86Subtarget around so that we can
27   /// make the right decision when generating code for different targets.
28   const X86Subtarget &Subtarget;
29 
30 public:
31   X86LegalizerInfo(const X86Subtarget &STI, const X86TargetMachine &TM);
32 
33   bool legalizeIntrinsic(LegalizerHelper &Helper,
34                          MachineInstr &MI) const override;
35 };
36 } // namespace llvm
37 #endif
38