Igor Breger | b4442f3 | 2017-02-10 07:05:56 +0000 | [diff] [blame] | 1 | //===- X86LegalizerInfo.h ------------------------------------------*- C++ |
| 2 | //-*-==// |
| 3 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 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 |
Igor Breger | b4442f3 | 2017-02-10 07:05:56 +0000 | [diff] [blame] | 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; |
Igor Breger | 531a203 | 2017-03-26 08:11:12 +0000 | [diff] [blame] | 22 | class X86TargetMachine; |
Igor Breger | b4442f3 | 2017-02-10 07:05:56 +0000 | [diff] [blame] | 23 | |
| 24 | /// This class provides the information for the target register banks. |
| 25 | class X86LegalizerInfo : public LegalizerInfo { |
| 26 | private: |
| 27 | /// Keep a reference to the X86Subtarget around so that we can |
| 28 | /// make the right decision when generating code for different targets. |
| 29 | const X86Subtarget &Subtarget; |
Igor Breger | 531a203 | 2017-03-26 08:11:12 +0000 | [diff] [blame] | 30 | const X86TargetMachine &TM; |
Igor Breger | b4442f3 | 2017-02-10 07:05:56 +0000 | [diff] [blame] | 31 | |
| 32 | public: |
Igor Breger | 531a203 | 2017-03-26 08:11:12 +0000 | [diff] [blame] | 33 | X86LegalizerInfo(const X86Subtarget &STI, const X86TargetMachine &TM); |
Igor Breger | b4442f3 | 2017-02-10 07:05:56 +0000 | [diff] [blame] | 34 | |
| 35 | private: |
| 36 | void setLegalizerInfo32bit(); |
| 37 | void setLegalizerInfo64bit(); |
Igor Breger | 321cf3c | 2017-03-03 08:06:46 +0000 | [diff] [blame] | 38 | void setLegalizerInfoSSE1(); |
| 39 | void setLegalizerInfoSSE2(); |
Igor Breger | 605b965 | 2017-05-08 09:03:37 +0000 | [diff] [blame] | 40 | void setLegalizerInfoSSE41(); |
Igor Breger | 617be6e | 2017-05-23 08:23:51 +0000 | [diff] [blame] | 41 | void setLegalizerInfoAVX(); |
Igor Breger | 605b965 | 2017-05-08 09:03:37 +0000 | [diff] [blame] | 42 | void setLegalizerInfoAVX2(); |
| 43 | void setLegalizerInfoAVX512(); |
| 44 | void setLegalizerInfoAVX512DQ(); |
| 45 | void setLegalizerInfoAVX512BW(); |
Igor Breger | b4442f3 | 2017-02-10 07:05:56 +0000 | [diff] [blame] | 46 | }; |
Igor Breger | 531a203 | 2017-03-26 08:11:12 +0000 | [diff] [blame] | 47 | } // namespace llvm |
Igor Breger | b4442f3 | 2017-02-10 07:05:56 +0000 | [diff] [blame] | 48 | #endif |