llvm/llvm/lib/SandboxIR/Instruction.cpp

//===- Instruction.cpp - The Instructions of Sandbox IR -------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "llvm/SandboxIR/Instruction.h"
#include "llvm/SandboxIR/Function.h"

namespace llvm::sandboxir {

const char *Instruction::getOpcodeName(Opcode Opc) {}

llvm::Instruction *Instruction::getTopmostLLVMInstruction() const {}

BBIterator Instruction::getIterator() const {}

Instruction *Instruction::getNextNode() const {}

Instruction *Instruction::getPrevNode() const {}

void Instruction::removeFromParent() {}

void Instruction::eraseFromParent() {}

void Instruction::moveBefore(BasicBlock &BB, const BBIterator &WhereIt) {}

void Instruction::insertBefore(Instruction *BeforeI) {}

void Instruction::insertAfter(Instruction *AfterI) {}

void Instruction::insertInto(BasicBlock *BB, const BBIterator &WhereIt) {}

BasicBlock *Instruction::getParent() const {}

bool Instruction::classof(const sandboxir::Value *From) {}

void Instruction::setHasNoUnsignedWrap(bool B) {}

void Instruction::setHasNoSignedWrap(bool B) {}

void Instruction::setFast(bool B) {}

void Instruction::setIsExact(bool B) {}

void Instruction::setHasAllowReassoc(bool B) {}

void Instruction::setHasNoNaNs(bool B) {}

void Instruction::setHasNoInfs(bool B) {}

void Instruction::setHasNoSignedZeros(bool B) {}

void Instruction::setHasAllowReciprocal(bool B) {}

void Instruction::setHasAllowContract(bool B) {}

void Instruction::setFastMathFlags(FastMathFlags FMF) {}

void Instruction::copyFastMathFlags(FastMathFlags FMF) {}

Type *Instruction::getAccessType() const {}

void Instruction::setHasApproxFunc(bool B) {}

#ifndef NDEBUG
void Instruction::dumpOS(raw_ostream &OS) const {
  OS << "Unimplemented! Please override dump().";
}
#endif // NDEBUG

VAArgInst *VAArgInst::create(Value *List, Type *Ty, InsertPosition Pos,
                             Context &Ctx, const Twine &Name) {}

Value *VAArgInst::getPointerOperand() {}

FreezeInst *FreezeInst::create(Value *V, InsertPosition Pos, Context &Ctx,
                               const Twine &Name) {}

FenceInst *FenceInst::create(AtomicOrdering Ordering, InsertPosition Pos,
                             Context &Ctx, SyncScope::ID SSID) {}

void FenceInst::setOrdering(AtomicOrdering Ordering) {}

void FenceInst::setSyncScopeID(SyncScope::ID SSID) {}

Value *SelectInst::create(Value *Cond, Value *True, Value *False,
                          InsertPosition Pos, Context &Ctx, const Twine &Name) {}

void SelectInst::swapValues() {}

bool SelectInst::classof(const Value *From) {}

BranchInst *BranchInst::create(BasicBlock *IfTrue, InsertPosition Pos,
                               Context &Ctx) {}

BranchInst *BranchInst::create(BasicBlock *IfTrue, BasicBlock *IfFalse,
                               Value *Cond, InsertPosition Pos, Context &Ctx) {}

bool BranchInst::classof(const Value *From) {}

Value *BranchInst::getCondition() const {}

BasicBlock *BranchInst::getSuccessor(unsigned SuccIdx) const {}

void BranchInst::setSuccessor(unsigned Idx, BasicBlock *NewSucc) {}

BasicBlock *BranchInst::LLVMBBToSBBB::operator()(llvm::BasicBlock *BB) const {}
const BasicBlock *
BranchInst::ConstLLVMBBToSBBB::operator()(const llvm::BasicBlock *BB) const {}

void LoadInst::setVolatile(bool V) {}

LoadInst *LoadInst::create(Type *Ty, Value *Ptr, MaybeAlign Align,
                           InsertPosition Pos, bool IsVolatile, Context &Ctx,
                           const Twine &Name) {}

bool LoadInst::classof(const Value *From) {}

Value *LoadInst::getPointerOperand() const {}

void StoreInst::setVolatile(bool V) {}

StoreInst *StoreInst::create(Value *V, Value *Ptr, MaybeAlign Align,
                             InsertPosition Pos, bool IsVolatile,
                             Context &Ctx) {}

bool StoreInst::classof(const Value *From) {}

Value *StoreInst::getValueOperand() const {}

Value *StoreInst::getPointerOperand() const {}

UnreachableInst *UnreachableInst::create(InsertPosition Pos, Context &Ctx) {}

bool UnreachableInst::classof(const Value *From) {}

ReturnInst *ReturnInst::createCommon(Value *RetVal, IRBuilder<> &Builder,
                                     Context &Ctx) {}

ReturnInst *ReturnInst::create(Value *RetVal, InsertPosition Pos,
                               Context &Ctx) {}

Value *ReturnInst::getReturnValue() const {}

FunctionType *CallBase::getFunctionType() const {}

Value *CallBase::getCalledOperand() const {}

Use CallBase::getCalledOperandUse() const {}

Function *CallBase::getCalledFunction() const {}
Function *CallBase::getCaller() {}

void CallBase::setCalledFunction(Function *F) {}

CallInst *CallInst::create(FunctionType *FTy, Value *Func,
                           ArrayRef<Value *> Args, InsertPosition Pos,
                           Context &Ctx, const Twine &NameStr) {}

InvokeInst *InvokeInst::create(FunctionType *FTy, Value *Func,
                               BasicBlock *IfNormal, BasicBlock *IfException,
                               ArrayRef<Value *> Args, InsertPosition Pos,
                               Context &Ctx, const Twine &NameStr) {}

BasicBlock *InvokeInst::getNormalDest() const {}
BasicBlock *InvokeInst::getUnwindDest() const {}
void InvokeInst::setNormalDest(BasicBlock *BB) {}
void InvokeInst::setUnwindDest(BasicBlock *BB) {}
LandingPadInst *InvokeInst::getLandingPadInst() const {}
BasicBlock *InvokeInst::getSuccessor(unsigned SuccIdx) const {}

CallBrInst *CallBrInst::create(FunctionType *FTy, Value *Func,
                               BasicBlock *DefaultDest,
                               ArrayRef<BasicBlock *> IndirectDests,
                               ArrayRef<Value *> Args, InsertPosition Pos,
                               Context &Ctx, const Twine &NameStr) {}

Value *CallBrInst::getIndirectDestLabel(unsigned Idx) const {}
Value *CallBrInst::getIndirectDestLabelUse(unsigned Idx) const {}
BasicBlock *CallBrInst::getDefaultDest() const {}
BasicBlock *CallBrInst::getIndirectDest(unsigned Idx) const {}
llvm::SmallVector<BasicBlock *, 16> CallBrInst::getIndirectDests() const {}
void CallBrInst::setDefaultDest(BasicBlock *BB) {}
void CallBrInst::setIndirectDest(unsigned Idx, BasicBlock *BB) {}
BasicBlock *CallBrInst::getSuccessor(unsigned Idx) const {}

LandingPadInst *LandingPadInst::create(Type *RetTy, unsigned NumReservedClauses,
                                       InsertPosition Pos, Context &Ctx,
                                       const Twine &Name) {}

void LandingPadInst::setCleanup(bool V) {}

Constant *LandingPadInst::getClause(unsigned Idx) const {}

Value *FuncletPadInst::getParentPad() const {}

void FuncletPadInst::setParentPad(Value *ParentPad) {}

Value *FuncletPadInst::getArgOperand(unsigned Idx) const {}

void FuncletPadInst::setArgOperand(unsigned Idx, Value *V) {}

CatchSwitchInst *CatchPadInst::getCatchSwitch() const {}

CatchPadInst *CatchPadInst::create(Value *ParentPad, ArrayRef<Value *> Args,
                                   InsertPosition Pos, Context &Ctx,
                                   const Twine &Name) {}

CleanupPadInst *CleanupPadInst::create(Value *ParentPad, ArrayRef<Value *> Args,
                                       InsertPosition Pos, Context &Ctx,
                                       const Twine &Name) {}

CatchReturnInst *CatchReturnInst::create(CatchPadInst *CatchPad, BasicBlock *BB,
                                         InsertPosition Pos, Context &Ctx) {}

CatchPadInst *CatchReturnInst::getCatchPad() const {}

void CatchReturnInst::setCatchPad(CatchPadInst *CatchPad) {}

BasicBlock *CatchReturnInst::getSuccessor() const {}

void CatchReturnInst::setSuccessor(BasicBlock *NewSucc) {}

Value *CatchReturnInst::getCatchSwitchParentPad() const {}

CleanupReturnInst *CleanupReturnInst::create(CleanupPadInst *CleanupPad,
                                             BasicBlock *UnwindBB,
                                             InsertPosition Pos, Context &Ctx) {}

CleanupPadInst *CleanupReturnInst::getCleanupPad() const {}

void CleanupReturnInst::setCleanupPad(CleanupPadInst *CleanupPad) {}

BasicBlock *CleanupReturnInst::getUnwindDest() const {}

void CleanupReturnInst::setUnwindDest(BasicBlock *NewDest) {}

Value *GetElementPtrInst::create(Type *Ty, Value *Ptr,
                                 ArrayRef<Value *> IdxList, InsertPosition Pos,
                                 Context &Ctx, const Twine &NameStr) {}

Type *GetElementPtrInst::getSourceElementType() const {}

Type *GetElementPtrInst::getResultElementType() const {}

Value *GetElementPtrInst::getPointerOperand() const {}

Type *GetElementPtrInst::getPointerOperandType() const {}

BasicBlock *PHINode::LLVMBBToBB::operator()(llvm::BasicBlock *LLVMBB) const {}

PHINode *PHINode::create(Type *Ty, unsigned NumReservedValues,
                         InsertPosition Pos, Context &Ctx, const Twine &Name) {}

bool PHINode::classof(const Value *From) {}

Value *PHINode::getIncomingValue(unsigned Idx) const {}
void PHINode::setIncomingValue(unsigned Idx, Value *V) {}
BasicBlock *PHINode::getIncomingBlock(unsigned Idx) const {}
BasicBlock *PHINode::getIncomingBlock(const Use &U) const {}
void PHINode::setIncomingBlock(unsigned Idx, BasicBlock *BB) {}
void PHINode::addIncoming(Value *V, BasicBlock *BB) {}
Value *PHINode::removeIncomingValue(unsigned Idx) {}
Value *PHINode::removeIncomingValue(BasicBlock *BB) {}
int PHINode::getBasicBlockIndex(const BasicBlock *BB) const {}
Value *PHINode::getIncomingValueForBlock(const BasicBlock *BB) const {}
Value *PHINode::hasConstantValue() const {}
void PHINode::replaceIncomingBlockWith(const BasicBlock *Old, BasicBlock *New) {}
void PHINode::removeIncomingValueIf(function_ref<bool(unsigned)> Predicate) {}

CmpInst *CmpInst::create(Predicate P, Value *S1, Value *S2, InsertPosition Pos,
                         Context &Ctx, const Twine &Name) {}
CmpInst *CmpInst::createWithCopiedFlags(Predicate P, Value *S1, Value *S2,
                                        const Instruction *F,
                                        InsertPosition Pos, Context &Ctx,
                                        const Twine &Name) {}

Type *CmpInst::makeCmpResultType(Type *OpndType) {}

void CmpInst::setPredicate(Predicate P) {}

void CmpInst::swapOperands() {}

void ICmpInst::swapOperands() {}

void FCmpInst::swapOperands() {}

#ifndef NDEBUG
void CmpInst::dumpOS(raw_ostream &OS) const {
  dumpCommonPrefix(OS);
  dumpCommonSuffix(OS);
}

void CmpInst::dump() const {
  dumpOS(dbgs());
  dbgs() << "\n";
}
#endif // NDEBUG

static llvm::Instruction::CastOps getLLVMCastOp(Instruction::Opcode Opc) {}

/// \Returns the LLVM opcode that corresponds to \p Opc.
static llvm::Instruction::UnaryOps getLLVMUnaryOp(Instruction::Opcode Opc) {}

CatchSwitchInst *CatchSwitchInst::create(Value *ParentPad, BasicBlock *UnwindBB,
                                         unsigned NumHandlers,
                                         InsertPosition Pos, Context &Ctx,
                                         const Twine &Name) {}

Value *CatchSwitchInst::getParentPad() const {}

void CatchSwitchInst::setParentPad(Value *ParentPad) {}

BasicBlock *CatchSwitchInst::getUnwindDest() const {}

void CatchSwitchInst::setUnwindDest(BasicBlock *UnwindDest) {}

void CatchSwitchInst::addHandler(BasicBlock *Dest) {}

ResumeInst *ResumeInst::create(Value *Exn, InsertPosition Pos, Context &Ctx) {}

Value *ResumeInst::getValue() const {}

SwitchInst *SwitchInst::create(Value *V, BasicBlock *Dest, unsigned NumCases,
                               InsertPosition Pos, Context &Ctx,
                               const Twine &Name) {}

Value *SwitchInst::getCondition() const {}

void SwitchInst::setCondition(Value *V) {}

BasicBlock *SwitchInst::getDefaultDest() const {}

void SwitchInst::setDefaultDest(BasicBlock *DefaultCase) {}
ConstantInt *SwitchInst::findCaseDest(BasicBlock *BB) {}

void SwitchInst::addCase(ConstantInt *OnVal, BasicBlock *Dest) {}

SwitchInst::CaseIt SwitchInst::removeCase(CaseIt It) {}

BasicBlock *SwitchInst::getSuccessor(unsigned Idx) const {}

void SwitchInst::setSuccessor(unsigned Idx, BasicBlock *NewSucc) {}

Value *UnaryOperator::create(Instruction::Opcode Op, Value *OpV,
                             InsertPosition Pos, Context &Ctx,
                             const Twine &Name) {}

Value *UnaryOperator::createWithCopiedFlags(Instruction::Opcode Op, Value *OpV,
                                            Value *CopyFrom, InsertPosition Pos,
                                            Context &Ctx, const Twine &Name) {}

/// \Returns the LLVM opcode that corresponds to \p Opc.
static llvm::Instruction::BinaryOps getLLVMBinaryOp(Instruction::Opcode Opc) {}
Value *BinaryOperator::create(Instruction::Opcode Op, Value *LHS, Value *RHS,
                              InsertPosition Pos, Context &Ctx,
                              const Twine &Name) {}

Value *BinaryOperator::createWithCopiedFlags(Instruction::Opcode Op, Value *LHS,
                                             Value *RHS, Value *CopyFrom,
                                             InsertPosition Pos, Context &Ctx,
                                             const Twine &Name) {}

void PossiblyDisjointInst::setIsDisjoint(bool B) {}

void AtomicRMWInst::setAlignment(Align Align) {}

void AtomicRMWInst::setVolatile(bool V) {}

void AtomicRMWInst::setOrdering(AtomicOrdering Ordering) {}

void AtomicRMWInst::setSyncScopeID(SyncScope::ID SSID) {}

Value *AtomicRMWInst::getPointerOperand() {}

Value *AtomicRMWInst::getValOperand() {}

AtomicRMWInst *AtomicRMWInst::create(BinOp Op, Value *Ptr, Value *Val,
                                     MaybeAlign Align, AtomicOrdering Ordering,
                                     InsertPosition Pos, Context &Ctx,
                                     SyncScope::ID SSID, const Twine &Name) {}

void AtomicCmpXchgInst::setSyncScopeID(SyncScope::ID SSID) {}

Value *AtomicCmpXchgInst::getPointerOperand() {}

Value *AtomicCmpXchgInst::getCompareOperand() {}

Value *AtomicCmpXchgInst::getNewValOperand() {}

AtomicCmpXchgInst *
AtomicCmpXchgInst::create(Value *Ptr, Value *Cmp, Value *New, MaybeAlign Align,
                          AtomicOrdering SuccessOrdering,
                          AtomicOrdering FailureOrdering, InsertPosition Pos,
                          Context &Ctx, SyncScope::ID SSID, const Twine &Name) {}

void AtomicCmpXchgInst::setAlignment(Align Align) {}

void AtomicCmpXchgInst::setVolatile(bool V) {}

void AtomicCmpXchgInst::setWeak(bool IsWeak) {}

void AtomicCmpXchgInst::setSuccessOrdering(AtomicOrdering Ordering) {}

void AtomicCmpXchgInst::setFailureOrdering(AtomicOrdering Ordering) {}

AllocaInst *AllocaInst::create(Type *Ty, unsigned AddrSpace, InsertPosition Pos,
                               Context &Ctx, Value *ArraySize,
                               const Twine &Name) {}

Type *AllocaInst::getAllocatedType() const {}

void AllocaInst::setAllocatedType(Type *Ty) {}

void AllocaInst::setAlignment(Align Align) {}

void AllocaInst::setUsedWithInAlloca(bool V) {}

Value *AllocaInst::getArraySize() {}

PointerType *AllocaInst::getType() const {}

Value *CastInst::create(Type *DestTy, Opcode Op, Value *Operand,
                        InsertPosition Pos, Context &Ctx, const Twine &Name) {}

bool CastInst::classof(const Value *From) {}

Type *CastInst::getSrcTy() const {}

Type *CastInst::getDestTy() const {}

void PossiblyNonNegInst::setNonNeg(bool B) {}

Value *InsertElementInst::create(Value *Vec, Value *NewElt, Value *Idx,
                                 InsertPosition Pos, Context &Ctx,
                                 const Twine &Name) {}

Value *ExtractElementInst::create(Value *Vec, Value *Idx, InsertPosition Pos,
                                  Context &Ctx, const Twine &Name) {}

Value *ShuffleVectorInst::create(Value *V1, Value *V2, Value *Mask,
                                 InsertPosition Pos, Context &Ctx,
                                 const Twine &Name) {}

Value *ShuffleVectorInst::create(Value *V1, Value *V2, ArrayRef<int> Mask,
                                 InsertPosition Pos, Context &Ctx,
                                 const Twine &Name) {}

void ShuffleVectorInst::setShuffleMask(ArrayRef<int> Mask) {}

VectorType *ShuffleVectorInst::getType() const {}

void ShuffleVectorInst::commute() {}

Constant *ShuffleVectorInst::getShuffleMaskForBitcode() const {}

Constant *ShuffleVectorInst::convertShuffleMaskForBitcode(ArrayRef<int> Mask,
                                                          Type *ResultTy) {}

VectorType *ExtractElementInst::getVectorOperandType() const {}

Value *ExtractValueInst::create(Value *Agg, ArrayRef<unsigned> Idxs,
                                InsertPosition Pos, Context &Ctx,
                                const Twine &Name) {}

Type *ExtractValueInst::getIndexedType(Type *Agg, ArrayRef<unsigned> Idxs) {}

Value *InsertValueInst::create(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs,
                               InsertPosition Pos, Context &Ctx,
                               const Twine &Name) {}

ConstantTokenNone *ConstantTokenNone::get(Context &Ctx) {}

} // namespace llvm::sandboxir