Igor Breger | b4442f3 | 2017-02-10 07:05:56 +0000 | [diff] [blame] | 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 | |
| 20 | namespace llvm { |
| 21 | |
| 22 | class X86Subtarget; |
Igor Breger | 531a203 | 2017-03-26 08:11:12 +0000 | [diff] [blame] | 23 | class X86TargetMachine; |
Igor Breger | b4442f3 | 2017-02-10 07:05:56 +0000 | [diff] [blame] | 24 | |
| 25 | /// This class provides the information for the target register banks. |
| 26 | class X86LegalizerInfo : public LegalizerInfo { |
| 27 | private: |
| 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; |
Igor Breger | 531a203 | 2017-03-26 08:11:12 +0000 | [diff] [blame] | 31 | const X86TargetMachine &TM; |
Igor Breger | b4442f3 | 2017-02-10 07:05:56 +0000 | [diff] [blame] | 32 | |
| 33 | public: |
Igor Breger | 531a203 | 2017-03-26 08:11:12 +0000 | [diff] [blame] | 34 | X86LegalizerInfo(const X86Subtarget &STI, const X86TargetMachine &TM); |
Igor Breger | b4442f3 | 2017-02-10 07:05:56 +0000 | [diff] [blame] | 35 | |
| 36 | private: |
| 37 | void setLegalizerInfo32bit(); |
| 38 | void setLegalizerInfo64bit(); |
Igor Breger | 321cf3c | 2017-03-03 08:06:46 +0000 | [diff] [blame] | 39 | void setLegalizerInfoSSE1(); |
| 40 | void setLegalizerInfoSSE2(); |
Igor Breger | 605b965 | 2017-05-08 09:03:37 +0000 | [diff] [blame] | 41 | void setLegalizerInfoSSE41(); |
Igor Breger | 617be6e | 2017-05-23 08:23:51 +0000 | [diff] [blame] | 42 | void setLegalizerInfoAVX(); |
Igor Breger | 605b965 | 2017-05-08 09:03:37 +0000 | [diff] [blame] | 43 | void setLegalizerInfoAVX2(); |
| 44 | void setLegalizerInfoAVX512(); |
| 45 | void setLegalizerInfoAVX512DQ(); |
| 46 | void setLegalizerInfoAVX512BW(); |
Igor Breger | b4442f3 | 2017-02-10 07:05:56 +0000 | [diff] [blame] | 47 | }; |
Igor Breger | 531a203 | 2017-03-26 08:11:12 +0000 | [diff] [blame] | 48 | } // namespace llvm |
Igor Breger | b4442f3 | 2017-02-10 07:05:56 +0000 | [diff] [blame] | 49 | #endif |