Petar Jovanovic | fac93e2 | 2018-02-23 11:06:40 +0000 | [diff] [blame] | 1 | //===- 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" |
Roman Tereshin | f34d7ec | 2018-05-31 16:16:49 +0000 | [diff] [blame^] | 15 | #include "MipsTargetMachine.h" |
Petar Jovanovic | fac93e2 | 2018-02-23 11:06:40 +0000 | [diff] [blame] | 16 | |
| 17 | using namespace llvm; |
| 18 | |
| 19 | MipsLegalizerInfo::MipsLegalizerInfo(const MipsSubtarget &ST) { |
Petar Jovanovic | 366857a | 2018-04-11 15:12:32 +0000 | [diff] [blame] | 20 | using namespace TargetOpcode; |
| 21 | |
| 22 | const LLT s32 = LLT::scalar(32); |
| 23 | |
| 24 | getActionDefinitionsBuilder(G_ADD).legalFor({s32}); |
| 25 | |
Petar Jovanovic | fac93e2 | 2018-02-23 11:06:40 +0000 | [diff] [blame] | 26 | computeTables(); |
Roman Tereshin | f34d7ec | 2018-05-31 16:16:49 +0000 | [diff] [blame^] | 27 | verify(*ST.getInstrInfo()); |
Petar Jovanovic | fac93e2 | 2018-02-23 11:06:40 +0000 | [diff] [blame] | 28 | } |