Coverage Report

Created: 2018-11-12 17:33

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelect.h
Line
Count
Source
1
//== llvm/CodeGen/GlobalISel/InstructionSelect.h -----------------*- C++ -*-==//
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
/// \file This file describes the interface of the MachineFunctionPass
10
/// responsible for selecting (possibly generic) machine instructions to
11
/// target-specific instructions.
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_CODEGEN_GLOBALISEL_INSTRUCTIONSELECT_H
15
#define LLVM_CODEGEN_GLOBALISEL_INSTRUCTIONSELECT_H
16
17
#include "llvm/CodeGen/GlobalISel/InstructionSelector.h"
18
#include "llvm/CodeGen/MachineFunctionPass.h"
19
20
namespace llvm {
21
/// This pass is responsible for selecting generic machine instructions to
22
/// target-specific instructions.  It relies on the InstructionSelector provided
23
/// by the target.
24
/// Selection is done by examining blocks in post-order, and instructions in
25
/// reverse order.
26
///
27
/// \post for all inst in MF: not isPreISelGenericOpcode(inst.opcode)
28
class InstructionSelect : public MachineFunctionPass {
29
public:
30
  static char ID;
31
7.01k
  StringRef getPassName() const override { return "InstructionSelect"; }
32
33
  void getAnalysisUsage(AnalysisUsage &AU) const override;
34
35
7.01k
  MachineFunctionProperties getRequiredProperties() const override {
36
7.01k
    return MachineFunctionProperties()
37
7.01k
        .set(MachineFunctionProperties::Property::IsSSA)
38
7.01k
        .set(MachineFunctionProperties::Property::Legalized)
39
7.01k
        .set(MachineFunctionProperties::Property::RegBankSelected);
40
7.01k
  }
41
42
7.01k
  MachineFunctionProperties getSetProperties() const override {
43
7.01k
    return MachineFunctionProperties().set(
44
7.01k
        MachineFunctionProperties::Property::Selected);
45
7.01k
  }
46
47
  InstructionSelect();
48
49
  bool runOnMachineFunction(MachineFunction &MF) override;
50
};
51
} // End namespace llvm.
52
53
#endif