Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/PowerPC/PPCInstrBuilder.h
Line
Count
Source (jump to first uncovered line)
1
//===-- PPCInstrBuilder.h - Aides for building PPC insts --------*- 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
// This file exposes functions that may be used with BuildMI from the
10
// MachineInstrBuilder.h file to simplify generating frame and constant pool
11
// references.
12
//
13
// For reference, the order of operands for memory references is:
14
// (Operand), Dest Reg, Base Reg, and either Reg Index or Immediate
15
// Displacement.
16
//
17
//===----------------------------------------------------------------------===//
18
19
#ifndef LLVM_LIB_TARGET_POWERPC_PPCINSTRBUILDER_H
20
#define LLVM_LIB_TARGET_POWERPC_PPCINSTRBUILDER_H
21
22
#include "llvm/CodeGen/MachineInstrBuilder.h"
23
24
namespace llvm {
25
26
/// addFrameReference - This function is used to add a reference to the base of
27
/// an abstract object on the stack frame of the current function.  This
28
/// reference has base register as the FrameIndex offset until it is resolved.
29
/// This allows a constant offset to be specified as well...
30
///
31
static inline const MachineInstrBuilder&
32
addFrameReference(const MachineInstrBuilder &MIB, int FI, int Offset = 0,
33
5.57k
                  bool mem = true) {
34
5.57k
  if (mem)
35
5.57k
    return MIB.addImm(Offset).addFrameIndex(FI);
36
0
  else
37
0
    return MIB.addFrameIndex(FI).addImm(Offset);
38
5.57k
}
Unexecuted instantiation: PPCBranchSelector.cpp:llvm::addFrameReference(llvm::MachineInstrBuilder const&, int, int, bool)
PPCInstrInfo.cpp:llvm::addFrameReference(llvm::MachineInstrBuilder const&, int, int, bool)
Line
Count
Source
33
5.48k
                  bool mem = true) {
34
5.48k
  if (mem)
35
5.48k
    return MIB.addImm(Offset).addFrameIndex(FI);
36
0
  else
37
0
    return MIB.addFrameIndex(FI).addImm(Offset);
38
5.48k
}
Unexecuted instantiation: PPCEarlyReturn.cpp:llvm::addFrameReference(llvm::MachineInstrBuilder const&, int, int, bool)
PPCFrameLowering.cpp:llvm::addFrameReference(llvm::MachineInstrBuilder const&, int, int, bool)
Line
Count
Source
33
24
                  bool mem = true) {
34
24
  if (mem)
35
24
    return MIB.addImm(Offset).addFrameIndex(FI);
36
0
  else
37
0
    return MIB.addFrameIndex(FI).addImm(Offset);
38
24
}
Unexecuted instantiation: PPCMIPeephole.cpp:llvm::addFrameReference(llvm::MachineInstrBuilder const&, int, int, bool)
PPCRegisterInfo.cpp:llvm::addFrameReference(llvm::MachineInstrBuilder const&, int, int, bool)
Line
Count
Source
33
73
                  bool mem = true) {
34
73
  if (mem)
35
73
    return MIB.addImm(Offset).addFrameIndex(FI);
36
0
  else
37
0
    return MIB.addFrameIndex(FI).addImm(Offset);
38
73
}
Unexecuted instantiation: PPCQPXLoadSplat.cpp:llvm::addFrameReference(llvm::MachineInstrBuilder const&, int, int, bool)
Unexecuted instantiation: PPCTOCRegDeps.cpp:llvm::addFrameReference(llvm::MachineInstrBuilder const&, int, int, bool)
Unexecuted instantiation: PPCTLSDynamicCall.cpp:llvm::addFrameReference(llvm::MachineInstrBuilder const&, int, int, bool)
Unexecuted instantiation: PPCVSXCopy.cpp:llvm::addFrameReference(llvm::MachineInstrBuilder const&, int, int, bool)
Unexecuted instantiation: PPCVSXFMAMutate.cpp:llvm::addFrameReference(llvm::MachineInstrBuilder const&, int, int, bool)
Unexecuted instantiation: PPCVSXSwapRemoval.cpp:llvm::addFrameReference(llvm::MachineInstrBuilder const&, int, int, bool)
39
40
} // End llvm namespace
41
42
#endif