1//===-- 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}
24