1*9880d681SAndroid Build Coastguard Worker //===---- PPCCCState.cpp - CCState with PowerPC specific extensions ---------===// 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 "PPCCCState.h" 11*9880d681SAndroid Build Coastguard Worker #include "PPCSubtarget.h" 12*9880d681SAndroid Build Coastguard Worker #include "llvm/IR/Module.h" 13*9880d681SAndroid Build Coastguard Worker using namespace llvm; 14*9880d681SAndroid Build Coastguard Worker 15*9880d681SAndroid Build Coastguard Worker // Identify lowered values that originated from ppcf128 arguments and record 16*9880d681SAndroid Build Coastguard Worker // this. PreAnalyzeCallOperands(const SmallVectorImpl<ISD::OutputArg> & Outs)17*9880d681SAndroid Build Coastguard Workervoid PPCCCState::PreAnalyzeCallOperands( 18*9880d681SAndroid Build Coastguard Worker const SmallVectorImpl<ISD::OutputArg> &Outs) { 19*9880d681SAndroid Build Coastguard Worker for (const auto &I : Outs) { 20*9880d681SAndroid Build Coastguard Worker if (I.ArgVT == llvm::MVT::ppcf128) 21*9880d681SAndroid Build Coastguard Worker OriginalArgWasPPCF128.push_back(true); 22*9880d681SAndroid Build Coastguard Worker else 23*9880d681SAndroid Build Coastguard Worker OriginalArgWasPPCF128.push_back(false); 24*9880d681SAndroid Build Coastguard Worker } 25*9880d681SAndroid Build Coastguard Worker } 26*9880d681SAndroid Build Coastguard Worker PreAnalyzeFormalArguments(const SmallVectorImpl<ISD::InputArg> & Ins)27*9880d681SAndroid Build Coastguard Workervoid PPCCCState::PreAnalyzeFormalArguments( 28*9880d681SAndroid Build Coastguard Worker const SmallVectorImpl<ISD::InputArg> &Ins) { 29*9880d681SAndroid Build Coastguard Worker for (const auto &I : Ins) { 30*9880d681SAndroid Build Coastguard Worker if (I.ArgVT == llvm::MVT::ppcf128) { 31*9880d681SAndroid Build Coastguard Worker OriginalArgWasPPCF128.push_back(true); 32*9880d681SAndroid Build Coastguard Worker } else { 33*9880d681SAndroid Build Coastguard Worker OriginalArgWasPPCF128.push_back(false); 34*9880d681SAndroid Build Coastguard Worker } 35*9880d681SAndroid Build Coastguard Worker } 36*9880d681SAndroid Build Coastguard Worker }