blob: c72271b677900ee92422af9de94f7baa4cc045b7 [file] [log] [blame]
Jacques Pienaarfcef3e42016-03-28 13:09:54 +00001//===-- LanaiMachineFuctionInfo.cpp - Lanai machine function info ---===//
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
10#include "LanaiMachineFunctionInfo.h"
11
12using namespace llvm;
13
14void LanaiMachineFunctionInfo::anchor() {}
15
16unsigned LanaiMachineFunctionInfo::getGlobalBaseReg() {
17 // Return if it has already been initialized.
18 if (GlobalBaseReg)
19 return GlobalBaseReg;
20
21 return GlobalBaseReg =
22 MF.getRegInfo().createVirtualRegister(&Lanai::GPRRegClass);
23}