|
|
|||
File indexing completed on 2026-05-10 08:43:24
0001 //===- llvm/CodeGen/GlobalISel/InstructionSelector.h ------------*- 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 /// \file This file declares the API for the instruction selector. 0010 // 0011 //===----------------------------------------------------------------------===// 0012 0013 #ifndef LLVM_CODEGEN_GLOBALISEL_INSTRUCTIONSELECTOR_H 0014 #define LLVM_CODEGEN_GLOBALISEL_INSTRUCTIONSELECTOR_H 0015 0016 #include "llvm/CodeGen/GlobalISel/GIMatchTableExecutor.h" 0017 0018 namespace llvm { 0019 class GISelObserverWrapper; 0020 0021 class InstructionSelector : public GIMatchTableExecutor { 0022 public: 0023 virtual ~InstructionSelector(); 0024 0025 /// Select the (possibly generic) instruction \p I to only use target-specific 0026 /// opcodes. It is OK to insert multiple instructions, but they cannot be 0027 /// generic pre-isel instructions. 0028 /// 0029 /// \returns whether selection succeeded. 0030 /// \pre I.getParent() && I.getParent()->getParent() 0031 /// \post 0032 /// if returns true: 0033 /// for I in all mutated/inserted instructions: 0034 /// !isPreISelGenericOpcode(I.getOpcode()) 0035 virtual bool select(MachineInstr &I) = 0; 0036 0037 // FIXME: Eliminate dependency on TargetPassConfig for NewPM transition 0038 const TargetPassConfig *TPC = nullptr; 0039 0040 MachineOptimizationRemarkEmitter *MORE = nullptr; 0041 0042 /// Note: InstructionSelect does not track changed instructions. 0043 /// changingInstr() and changedInstr() will never be called on these 0044 /// observers. 0045 GISelObserverWrapper *AllObservers = nullptr; 0046 }; 0047 } // 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 |
|