Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/X86/X86MachineFunctionInfo.cpp
Line
Count
Source (jump to first uncovered line)
1
//===-- X86MachineFunctionInfo.cpp - X86 machine function info ------------===//
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
#include "X86MachineFunctionInfo.h"
10
#include "X86RegisterInfo.h"
11
#include "llvm/CodeGen/MachineRegisterInfo.h"
12
#include "llvm/CodeGen/TargetSubtargetInfo.h"
13
14
using namespace llvm;
15
16
0
void X86MachineFunctionInfo::anchor() { }
17
18
2
void X86MachineFunctionInfo::setRestoreBasePointer(const MachineFunction *MF) {
19
2
  if (!RestoreBasePointerOffset) {
20
2
    const X86RegisterInfo *RegInfo = static_cast<const X86RegisterInfo *>(
21
2
      MF->getSubtarget().getRegisterInfo());
22
2
    unsigned SlotSize = RegInfo->getSlotSize();
23
2
    for (const MCPhysReg *CSR = MF->getRegInfo().getCalleeSavedRegs();
24
12
         unsigned Reg = *CSR; 
++CSR10
) {
25
10
      if (X86::GR64RegClass.contains(Reg) || 
X86::GR32RegClass.contains(Reg)4
)
26
10
        RestoreBasePointerOffset -= SlotSize;
27
10
    }
28
2
  }
29
2
}
30