Coverage Report

Created: 2018-07-19 03:59

/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
209
  StringRef getPassName() const override { return "InstructionSelect"; }
32
33
  void getAnalysisUsage(AnalysisUsage &AU) const override;
34
35
6.92k
  MachineFunctionProperties getRequiredProperties() const override {
36
6.92k
    return MachineFunctionProperties()
37
6.92k
        .set(MachineFunctionProperties::Property::IsSSA)
38
6.92k
        .set(MachineFunctionProperties::Property::Legalized)
39
6.92k
        .set(MachineFunctionProperties::Property::RegBankSelected);
40
6.92k
  }
41
42
6.92k
  MachineFunctionProperties getSetProperties() const override {
43
6.92k
    return MachineFunctionProperties().set(
44
6.92k
        MachineFunctionProperties::Property::Selected);
45
6.92k
  }
46
47
  InstructionSelect();
48
49
  bool runOnMachineFunction(MachineFunction &MF) override;
50
};
51
} // End namespace llvm.
52
53
#endif