LCOV - code coverage report
Current view: top level - include/llvm/CodeGen - TargetOpcodes.h (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 1 1 100.0 %
Date: 2018-10-20 13:21:21 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===-- llvm/CodeGen/TargetOpcodes.h - Target Indep Opcodes -----*- 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             : //
      10             : // This file defines the target independent instruction opcodes.
      11             : //
      12             : //===----------------------------------------------------------------------===//
      13             : 
      14             : #ifndef LLVM_CODEGEN_TARGETOPCODES_H
      15             : #define LLVM_CODEGEN_TARGETOPCODES_H
      16             : 
      17             : namespace llvm {
      18             : 
      19             : /// Invariant opcodes: All instruction sets have these as their low opcodes.
      20             : ///
      21             : namespace TargetOpcode {
      22             : enum {
      23             : #define HANDLE_TARGET_OPCODE(OPC) OPC,
      24             : #define HANDLE_TARGET_OPCODE_MARKER(IDENT, OPC) IDENT = OPC,
      25             : #include "llvm/Support/TargetOpcodes.def"
      26             : };
      27             : } // end namespace TargetOpcode
      28             : 
      29             : /// Check whether the given Opcode is a generic opcode that is not supposed
      30             : /// to appear after ISel.
      31             : inline bool isPreISelGenericOpcode(unsigned Opcode) {
      32    25019287 :   return Opcode >= TargetOpcode::PRE_ISEL_GENERIC_OPCODE_START &&
      33             :          Opcode <= TargetOpcode::PRE_ISEL_GENERIC_OPCODE_END;
      34             : }
      35             : 
      36             : /// Check whether the given Opcode is a target-specific opcode.
      37             : inline bool isTargetSpecificOpcode(unsigned Opcode) {
      38             :   return Opcode > TargetOpcode::PRE_ISEL_GENERIC_OPCODE_END;
      39             : }
      40             : } // end namespace llvm
      41             : 
      42             : #endif

Generated by: LCOV version 1.13