Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h
Line
Count
Source (jump to first uncovered line)
1
//=== SystemZMachineFunctionInfo.h - SystemZ machine function info -*- C++ -*-//
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 LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZMACHINEFUNCTIONINFO_H
10
#define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZMACHINEFUNCTIONINFO_H
11
12
#include "llvm/CodeGen/MachineFunction.h"
13
14
namespace llvm {
15
16
class SystemZMachineFunctionInfo : public MachineFunctionInfo {
17
  virtual void anchor();
18
  unsigned LowSavedGPR;
19
  unsigned HighSavedGPR;
20
  unsigned VarArgsFirstGPR;
21
  unsigned VarArgsFirstFPR;
22
  unsigned VarArgsFrameIndex;
23
  unsigned RegSaveFrameIndex;
24
  int FramePointerSaveIndex;
25
  bool ManipulatesSP;
26
  unsigned NumLocalDynamics;
27
28
public:
29
  explicit SystemZMachineFunctionInfo(MachineFunction &MF)
30
    : LowSavedGPR(0), HighSavedGPR(0), VarArgsFirstGPR(0), VarArgsFirstFPR(0),
31
      VarArgsFrameIndex(0), RegSaveFrameIndex(0), FramePointerSaveIndex(0),
32
8.14k
      ManipulatesSP(false), NumLocalDynamics(0) {}
33
34
  // Get and set the first call-saved GPR that should be saved and restored
35
  // by this function.  This is 0 if no GPRs need to be saved or restored.
36
17.1k
  unsigned getLowSavedGPR() const { return LowSavedGPR; }
37
763
  void setLowSavedGPR(unsigned Reg) { LowSavedGPR = Reg; }
38
39
  // Get and set the last call-saved GPR that should be saved and restored
40
  // by this function.
41
770
  unsigned getHighSavedGPR() const { return HighSavedGPR; }
42
763
  void setHighSavedGPR(unsigned Reg) { HighSavedGPR = Reg; }
43
44
  // Get and set the number of fixed (as opposed to variable) arguments
45
  // that are passed in GPRs to this function.
46
0
  unsigned getVarArgsFirstGPR() const { return VarArgsFirstGPR; }
47
0
  void setVarArgsFirstGPR(unsigned GPR) { VarArgsFirstGPR = GPR; }
48
49
  // Likewise FPRs.
50
0
  unsigned getVarArgsFirstFPR() const { return VarArgsFirstFPR; }
51
0
  void setVarArgsFirstFPR(unsigned FPR) { VarArgsFirstFPR = FPR; }
52
53
  // Get and set the frame index of the first stack vararg.
54
0
  unsigned getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
55
0
  void setVarArgsFrameIndex(unsigned FI) { VarArgsFrameIndex = FI; }
56
57
  // Get and set the frame index of the register save area
58
  // (i.e. the incoming stack pointer).
59
0
  unsigned getRegSaveFrameIndex() const { return RegSaveFrameIndex; }
60
0
  void setRegSaveFrameIndex(unsigned FI) { RegSaveFrameIndex = FI; }
61
62
  // Get and set the frame index of where the old frame pointer is stored.
63
2
  int getFramePointerSaveIndex() const { return FramePointerSaveIndex; }
64
2
  void setFramePointerSaveIndex(int Idx) { FramePointerSaveIndex = Idx; }
65
66
  // Get and set whether the function directly manipulates the stack pointer,
67
  // e.g. through STACKSAVE or STACKRESTORE.
68
53.4k
  bool getManipulatesSP() const { return ManipulatesSP; }
69
5
  void setManipulatesSP(bool MSP) { ManipulatesSP = MSP; }
70
71
  // Count number of local-dynamic TLS symbols used.
72
8.09k
  unsigned getNumLocalDynamicTLSAccesses() const { return NumLocalDynamics; }
73
4
  void incNumLocalDynamicTLSAccesses() { ++NumLocalDynamics; }
74
};
75
76
} // end namespace llvm
77
78
#endif