Coverage Report

Created: 2017-10-03 07:32

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/lib/Target/X86/X86MachineFunctionInfo.cpp
Line
Count
Source (jump to first uncovered line)
1
//===-- X86MachineFunctionInfo.cpp - X86 machine function info ------------===//
2
//
3
//                     The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
10
#include "X86MachineFunctionInfo.h"
11
#include "X86RegisterInfo.h"
12
#include "llvm/CodeGen/MachineRegisterInfo.h"
13
#include "llvm/Target/TargetSubtargetInfo.h"
14
15
using namespace llvm;
16
17
0
void X86MachineFunctionInfo::anchor() { }
18
19
2
void X86MachineFunctionInfo::setRestoreBasePointer(const MachineFunction *MF) {
20
2
  if (
!RestoreBasePointerOffset2
) {
21
2
    const X86RegisterInfo *RegInfo = static_cast<const X86RegisterInfo *>(
22
2
      MF->getSubtarget().getRegisterInfo());
23
2
    unsigned SlotSize = RegInfo->getSlotSize();
24
2
    for (const MCPhysReg *CSR = MF->getRegInfo().getCalleeSavedRegs();
25
12
         unsigned 
Reg12
= *CSR;
++CSR10
) {
26
10
      if (
X86::GR64RegClass.contains(Reg) || 10
X86::GR32RegClass.contains(Reg)4
)
27
10
        RestoreBasePointerOffset -= SlotSize;
28
10
    }
29
2
  }
30
2
}
31