blob: 88bd9c24496dd40b278fc385dabb62aa5863e9ab [file] [log] [blame]
Petar Jovanovicfac93e22018-02-23 11:06:40 +00001//===- MipsLegalizerInfo.cpp ------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9/// \file
10/// This file implements the targeting of the Machinelegalizer class for Mips.
11/// \todo This should be generated by TableGen.
12//===----------------------------------------------------------------------===//
13
14#include "MipsLegalizerInfo.h"
15#include "llvm/CodeGen/TargetOpcodes.h"
Craig Topper2fa14362018-03-29 17:21:10 +000016#include "llvm/CodeGen/ValueTypes.h"
Petar Jovanovicfac93e22018-02-23 11:06:40 +000017#include "llvm/IR/DerivedTypes.h"
18#include "llvm/IR/Type.h"
Petar Jovanovicfac93e22018-02-23 11:06:40 +000019
20using namespace llvm;
21
22MipsLegalizerInfo::MipsLegalizerInfo(const MipsSubtarget &ST) {
Petar Jovanovic366857a2018-04-11 15:12:32 +000023 using namespace TargetOpcode;
24
25 const LLT s32 = LLT::scalar(32);
26
27 getActionDefinitionsBuilder(G_ADD).legalFor({s32});
28
Petar Jovanovicfac93e22018-02-23 11:06:40 +000029 computeTables();
30}