|
|
|||
File indexing completed on 2026-05-10 08:43:38
0001 //===-- llvm/CodeGen/TargetOpcodes.h - Target Indep Opcodes -----*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 // 0009 // This file defines the target independent instruction opcodes. 0010 // 0011 //===----------------------------------------------------------------------===// 0012 0013 #ifndef LLVM_CODEGEN_TARGETOPCODES_H 0014 #define LLVM_CODEGEN_TARGETOPCODES_H 0015 0016 namespace llvm { 0017 0018 /// Invariant opcodes: All instruction sets have these as their low opcodes. 0019 /// 0020 namespace TargetOpcode { 0021 enum { 0022 #define HANDLE_TARGET_OPCODE(OPC) OPC, 0023 #define HANDLE_TARGET_OPCODE_MARKER(IDENT, OPC) IDENT = OPC, 0024 #include "llvm/Support/TargetOpcodes.def" 0025 }; 0026 } // end namespace TargetOpcode 0027 0028 /// Check whether the given Opcode is a generic opcode that is not supposed 0029 /// to appear after ISel. 0030 inline bool isPreISelGenericOpcode(unsigned Opcode) { 0031 return Opcode >= TargetOpcode::PRE_ISEL_GENERIC_OPCODE_START && 0032 Opcode <= TargetOpcode::PRE_ISEL_GENERIC_OPCODE_END; 0033 } 0034 0035 /// Check whether the given Opcode is a target-specific opcode. 0036 inline bool isTargetSpecificOpcode(unsigned Opcode) { 0037 return Opcode > TargetOpcode::PRE_ISEL_GENERIC_OPCODE_END; 0038 } 0039 0040 /// \returns true if \p Opcode is an optimization hint opcode which is not 0041 /// supposed to appear after ISel. 0042 inline bool isPreISelGenericOptimizationHint(unsigned Opcode) { 0043 return Opcode >= TargetOpcode::PRE_ISEL_GENERIC_OPTIMIZATION_HINT_START && 0044 Opcode <= TargetOpcode::PRE_ISEL_GENERIC_OPTIMIZATION_HINT_END; 0045 } 0046 0047 } // end namespace llvm 0048 0049 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|