1*3ca95b02SDimitry Andric //===-- LanaiMachineFuctionInfo.cpp - Lanai machine function info ---===//
2*3ca95b02SDimitry Andric //
3*3ca95b02SDimitry Andric //                     The LLVM Compiler Infrastructure
4*3ca95b02SDimitry Andric //
5*3ca95b02SDimitry Andric // This file is distributed under the University of Illinois Open Source
6*3ca95b02SDimitry Andric // License. See LICENSE.TXT for details.
7*3ca95b02SDimitry Andric //
8*3ca95b02SDimitry Andric //===----------------------------------------------------------------------===//
9*3ca95b02SDimitry Andric 
10*3ca95b02SDimitry Andric #include "LanaiMachineFunctionInfo.h"
11*3ca95b02SDimitry Andric 
12*3ca95b02SDimitry Andric using namespace llvm;
13*3ca95b02SDimitry Andric 
anchor()14*3ca95b02SDimitry Andric void LanaiMachineFunctionInfo::anchor() {}
15*3ca95b02SDimitry Andric 
getGlobalBaseReg()16*3ca95b02SDimitry Andric unsigned LanaiMachineFunctionInfo::getGlobalBaseReg() {
17*3ca95b02SDimitry Andric   // Return if it has already been initialized.
18*3ca95b02SDimitry Andric   if (GlobalBaseReg)
19*3ca95b02SDimitry Andric     return GlobalBaseReg;
20*3ca95b02SDimitry Andric 
21*3ca95b02SDimitry Andric   return GlobalBaseReg =
22*3ca95b02SDimitry Andric              MF.getRegInfo().createVirtualRegister(&Lanai::GPRRegClass);
23*3ca95b02SDimitry Andric }
24