X86LegalizerInfo.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #ifndef LLVM_LIB_TARGET_X86_X86MACHINELEGALIZER_H
  14. #define LLVM_LIB_TARGET_X86_X86MACHINELEGALIZER_H
  15. #include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
  16. namespace llvm {
  17. class X86Subtarget;
  18. class X86TargetMachine;
  19. /// This class provides the information for the target register banks.
  20. class X86LegalizerInfo : public LegalizerInfo {
  21. private:
  22. /// Keep a reference to the X86Subtarget around so that we can
  23. /// make the right decision when generating code for different targets.
  24. const X86Subtarget &Subtarget;
  25. const X86TargetMachine &TM;
  26. public:
  27. X86LegalizerInfo(const X86Subtarget &STI, const X86TargetMachine &TM);
  28. bool legalizeIntrinsic(LegalizerHelper &Helper,
  29. MachineInstr &MI) const override;
  30. private:
  31. void setLegalizerInfo32bit();
  32. void setLegalizerInfo64bit();
  33. void setLegalizerInfoSSE1();
  34. void setLegalizerInfoSSE2();
  35. void setLegalizerInfoSSE41();
  36. void setLegalizerInfoAVX();
  37. void setLegalizerInfoAVX2();
  38. void setLegalizerInfoAVX512();
  39. void setLegalizerInfoAVX512DQ();
  40. void setLegalizerInfoAVX512BW();
  41. };
  42. } // namespace llvm
  43. #endif