1 //===---- PPCCCState.h - CCState with PowerPC specific extensions -----------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef PPCCCSTATE_H
10 #define PPCCCSTATE_H
11 
12 #include "PPCISelLowering.h"
13 #include "llvm/ADT/SmallVector.h"
14 #include "llvm/CodeGen/CallingConvLower.h"
15 
16 namespace llvm {
17 
18 class PPCCCState : public CCState {
19 public:
20 
21   void
22   PreAnalyzeCallOperands(const SmallVectorImpl<ISD::OutputArg> &Outs);
23   void
24   PreAnalyzeFormalArguments(const SmallVectorImpl<ISD::InputArg> &Ins);
25 
26 private:
27 
28   // Records whether the value has been lowered from an ppcf128.
29   SmallVector<bool, 4> OriginalArgWasPPCF128;
30 
31 public:
32   PPCCCState(CallingConv::ID CC, bool isVarArg, MachineFunction &MF,
33              SmallVectorImpl<CCValAssign> &locs, LLVMContext &C)
34         : CCState(CC, isVarArg, MF, locs, C) {}
35 
36   bool WasOriginalArgPPCF128(unsigned ValNo) { return OriginalArgWasPPCF128[ValNo]; }
37   void clearWasPPCF128() { OriginalArgWasPPCF128.clear(); }
38 };
39 }
40 
41 #endif
42