[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / lib / Target / M68k / GlSel / M68kLegalizerInfo.cpp
blobbcbe62816beb42f65ce6dcf7ac1c50600ab7ee3d
1 //===-- M68kLegalizerInfo.cpp ----------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 /// \file
9 /// This file implements the targeting of the Machinelegalizer class for M68k.
10 //===----------------------------------------------------------------------===//
12 #include "M68kLegalizerInfo.h"
13 #include "llvm/CodeGen/GlobalISel/LegalizerHelper.h"
14 #include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
15 #include "llvm/CodeGen/TargetOpcodes.h"
16 #include "llvm/CodeGen/ValueTypes.h"
17 #include "llvm/IR/DerivedTypes.h"
18 #include "llvm/IR/Type.h"
20 using namespace llvm;
22 M68kLegalizerInfo::M68kLegalizerInfo(const M68kSubtarget &ST) {
23 using namespace TargetOpcode;
24 const LLT S32 = LLT::scalar(32);
25 const LLT P0 = LLT::pointer(0, 32);
26 getActionDefinitionsBuilder(G_LOAD).legalFor({S32});
27 getActionDefinitionsBuilder(G_FRAME_INDEX).legalFor({P0});
28 getActionDefinitionsBuilder(G_ADD).legalFor({S32});
29 getActionDefinitionsBuilder(G_SUB).legalFor({S32});
30 getActionDefinitionsBuilder(G_MUL).legalFor({S32});
31 getActionDefinitionsBuilder(G_UDIV).legalFor({S32});
32 getLegacyLegalizerInfo().computeTables();