LLVM 20.0.0git
|
#include "llvm/SandboxIR/SandboxIR.h"
Public Types | |
using | const_block_iterator = mapped_iterator< llvm::PHINode::const_block_iterator, LLVMBBToBB > |
Public Types inherited from llvm::sandboxir::Instruction | |
enum class | Opcode { OP , OPCODES , DEF_INSTR } |
Public Types inherited from llvm::sandboxir::User | |
using | op_iterator = OperandUseIterator |
using | const_op_iterator = OperandUseIterator |
using | op_range = iterator_range< op_iterator > |
using | const_op_range = iterator_range< const_op_iterator > |
Public Types inherited from llvm::sandboxir::Value | |
enum class | ClassID : unsigned { DEF_VALUE , DEF_USER , DEF_INSTR } |
using | use_iterator = UserUseIterator |
using | const_use_iterator = UserUseIterator |
using | user_iterator = mapped_iterator< sandboxir::UserUseIterator, UseToUser > |
using | const_user_iterator = user_iterator |
Static Public Member Functions | |
static PHINode * | create (Type *Ty, unsigned NumReservedValues, Instruction *InsertBefore, Context &Ctx, const Twine &Name="") |
static bool | classof (const Value *From) |
For isa/dyn_cast. | |
static unsigned | getOperandNumForIncomingValue (unsigned Idx) |
static unsigned | getIncomingValueNumForOperand (unsigned Idx) |
Static Public Member Functions inherited from llvm::sandboxir::Instruction | |
static const char * | getOpcodeName (Opcode Opc) |
static bool | classof (const sandboxir::Value *From) |
For isa/dyn_cast. | |
Static Public Member Functions inherited from llvm::sandboxir::User | |
static bool | classof (const Value *From) |
For isa/dyn_cast. | |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::sandboxir::Instruction | |
Instruction (ClassID ID, Opcode Opc, llvm::Instruction *I, sandboxir::Context &SBCtx) | |
llvm::Instruction * | getTopmostLLVMInstruction () const |
A SandboxIR Instruction may map to multiple LLVM IR Instruction. | |
virtual SmallVector< llvm::Instruction *, 1 > | getLLVMInstrs () const =0 |
\Returns the LLVM IR Instructions that this SandboxIR maps to in program order. | |
Protected Member Functions inherited from llvm::sandboxir::User | |
User (ClassID ID, llvm::Value *V, Context &Ctx) | |
Use | getOperandUseDefault (unsigned OpIdx, bool Verify) const |
\Returns the Use edge that corresponds to OpIdx . | |
virtual Use | getOperandUseInternal (unsigned OpIdx, bool Verify) const =0 |
\Returns the Use for the OpIdx'th operand. | |
unsigned | getUseOperandNoDefault (const Use &Use) const |
The default implementation works only for single-LLVMIR-instruction Users and only if they match exactly the LLVM instruction. | |
virtual unsigned | getUseOperandNo (const Use &Use) const =0 |
\Returns the operand index of Use . | |
void | swapOperandsInternal (unsigned OpIdxA, unsigned OpIdxB) |
void | verifyUserOfLLVMUse (const llvm::Use &Use) const |
Protected Member Functions inherited from llvm::sandboxir::Value | |
void | clearValue () |
Value (ClassID SubclassID, llvm::Value *Val, Context &Ctx) | |
Value (const Value &)=delete | |
Disable copies. | |
Value & | operator= (const Value &)=delete |
Static Protected Member Functions inherited from llvm::sandboxir::Value | |
static const char * | getSubclassIDStr (ClassID ID) |
Protected Attributes inherited from llvm::sandboxir::Instruction | |
Opcode | Opc |
Protected Attributes inherited from llvm::sandboxir::Value | |
ClassID | SubclassID |
For isa/dyn_cast. | |
unsigned | UID |
A unique ID used for forming the name (used for debugging). | |
llvm::Value * | Val = nullptr |
The LLVM Value that corresponds to this SandboxIR Value. | |
Context & | Ctx |
All values point to the context. | |
Definition at line 1623 of file SandboxIR.h.
using llvm::sandboxir::PHINode::const_block_iterator = mapped_iterator<llvm::PHINode::const_block_iterator, LLVMBBToBB> |
Definition at line 1642 of file SandboxIR.h.
void PHINode::addIncoming | ( | Value * | V, |
BasicBlock * | BB | ||
) |
Definition at line 1030 of file SandboxIR.cpp.
References llvm::sandboxir::Value::Ctx, llvm::sandboxir::Tracker::emplaceIfTracking(), llvm::sandboxir::Context::getTracker(), and llvm::sandboxir::Value::Val.
Referenced by llvm::sandboxir::PHIRemoveIncoming::revert().
|
inline |
Definition at line 1645 of file SandboxIR.h.
References block_begin(), llvm::sandboxir::Value::Ctx, and llvm::sandboxir::Value::Val.
Referenced by block_begin(), and blocks().
|
inline |
Definition at line 1650 of file SandboxIR.h.
References block_end(), llvm::sandboxir::Value::Ctx, and llvm::sandboxir::Value::Val.
Referenced by block_end(), and blocks().
|
inline |
Definition at line 1655 of file SandboxIR.h.
References block_begin(), block_end(), and llvm::make_range().
|
static |
Definition at line 992 of file SandboxIR.cpp.
References llvm::PHINode::Create(), llvm::sandboxir::Context::createPHINode(), llvm::sandboxir::Value::Ctx, llvm::sandboxir::Instruction::getTopmostLLVMInstruction(), and Name.
int PHINode::getBasicBlockIndex | ( | const BasicBlock * | BB | ) | const |
Definition at line 1055 of file SandboxIR.cpp.
References llvm::sandboxir::Value::Val.
Referenced by removeIncomingValue().
BasicBlock * PHINode::getIncomingBlock | ( | const Use & | U | ) | const |
Definition at line 1018 of file SandboxIR.cpp.
References llvm::sandboxir::Value::Ctx, llvm::sandboxir::Context::getValue(), and llvm::sandboxir::Value::Val.
BasicBlock * PHINode::getIncomingBlock | ( | unsigned | Idx | ) | const |
Definition at line 1014 of file SandboxIR.cpp.
References llvm::sandboxir::Value::Ctx, llvm::sandboxir::Context::getValue(), Idx, and llvm::sandboxir::Value::Val.
Referenced by replaceIncomingBlockWith(), and llvm::sandboxir::PHIRemoveIncoming::revert().
Definition at line 1004 of file SandboxIR.cpp.
References llvm::sandboxir::Value::Ctx, getIncomingValue(), llvm::sandboxir::Context::getValue(), Idx, and llvm::sandboxir::Value::Val.
Referenced by getIncomingValue(), and llvm::sandboxir::PHIRemoveIncoming::revert().
Value * PHINode::getIncomingValueForBlock | ( | const BasicBlock * | BB | ) | const |
Definition at line 1059 of file SandboxIR.cpp.
References llvm::sandboxir::Value::Ctx, llvm::sandboxir::Context::getValue(), and llvm::sandboxir::Value::Val.
|
inlinestatic |
Definition at line 1671 of file SandboxIR.h.
References llvm::PHINode::getIncomingValueNumForOperand(), and Idx.
|
inline |
Definition at line 1663 of file SandboxIR.h.
References llvm::sandboxir::Value::Val.
Referenced by removeIncomingValueIf(), and llvm::sandboxir::PHIRemoveIncoming::revert().
|
inlinestatic |
Definition at line 1668 of file SandboxIR.h.
References llvm::PHINode::getOperandNumForIncomingValue(), and Idx.
|
inline |
Definition at line 1689 of file SandboxIR.h.
References llvm::sandboxir::Value::Val.
Value * PHINode::hasConstantValue | ( | ) | const |
Definition at line 1065 of file SandboxIR.cpp.
References llvm::sandboxir::Value::Ctx, llvm::sandboxir::Context::getValue(), and llvm::sandboxir::Value::Val.
|
inline |
Definition at line 1659 of file SandboxIR.h.
References llvm::sandboxir::User::operands().
|
inline |
Definition at line 1661 of file SandboxIR.h.
References llvm::sandboxir::User::operands().
|
inline |
Definition at line 1692 of file SandboxIR.h.
References llvm::sandboxir::Value::Val.
Value * PHINode::removeIncomingValue | ( | BasicBlock * | BB | ) |
Definition at line 1045 of file SandboxIR.cpp.
References llvm::sandboxir::Value::Ctx, llvm::sandboxir::Tracker::emplaceIfTracking(), getBasicBlockIndex(), llvm::sandboxir::Context::getTracker(), llvm::sandboxir::Context::getValue(), and llvm::sandboxir::Value::Val.
Definition at line 1037 of file SandboxIR.cpp.
References llvm::sandboxir::Value::Ctx, llvm::sandboxir::Tracker::emplaceIfTracking(), llvm::sandboxir::Context::getTracker(), llvm::sandboxir::Context::getValue(), Idx, and llvm::sandboxir::Value::Val.
Referenced by removeIncomingValueIf(), and llvm::sandboxir::PHIAddIncoming::revert().
void PHINode::removeIncomingValueIf | ( | function_ref< bool(unsigned)> | Predicate | ) |
Definition at line 1076 of file SandboxIR.cpp.
References getNumIncomingValues(), Idx, and removeIncomingValue().
void PHINode::replaceIncomingBlockWith | ( | const BasicBlock * | Old, |
BasicBlock * | New | ||
) |
Definition at line 1069 of file SandboxIR.cpp.
References assert(), getIncomingBlock(), llvm::sandboxir::User::getNumOperands(), Idx, setIncomingBlock(), and llvm::sandboxir::Value::Val.
void PHINode::setIncomingBlock | ( | unsigned | Idx, |
BasicBlock * | BB | ||
) |
Definition at line 1023 of file SandboxIR.cpp.
References llvm::sandboxir::PHISetIncoming::Block, llvm::sandboxir::Value::Ctx, llvm::sandboxir::Tracker::emplaceIfTracking(), llvm::sandboxir::Context::getTracker(), Idx, and llvm::sandboxir::Value::Val.
Referenced by replaceIncomingBlockWith(), llvm::sandboxir::PHISetIncoming::revert(), and llvm::sandboxir::PHIRemoveIncoming::revert().
Definition at line 1007 of file SandboxIR.cpp.
References llvm::sandboxir::Value::Ctx, llvm::sandboxir::Tracker::emplaceIfTracking(), llvm::sandboxir::Context::getTracker(), Idx, llvm::sandboxir::Value::Val, and llvm::sandboxir::PHISetIncoming::Value.
Referenced by llvm::sandboxir::PHISetIncoming::revert(), and llvm::sandboxir::PHIRemoveIncoming::revert().