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