9#ifndef LLVM_SANDBOXIR_FUNCTION_H
10#define LLVM_SANDBOXIR_FUNCTION_H
18 GlobalObject, llvm::GlobalObject> {
22 LLVMBBToBB(
Context &Ctx) : Ctx(Ctx) {}
24 return *cast<BasicBlock>(Ctx.
getValue(&LLVMBB));
35 return From->getSubclassID() == ClassID::Function;
47 size_t arg_size()
const {
return cast<llvm::Function>(
Val)->arg_size(); }
48 bool arg_empty()
const {
return cast<llvm::Function>(
Val)->arg_empty(); }
52 LLVMBBToBB BBGetter(
Ctx);
56 LLVMBBToBB BBGetter(
Ctx);
63 assert(isa<llvm::Function>(
Val) &&
"Expected Function!");
BlockVerifier::State From
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class represents an incoming formal argument to a Function.
LLVM Basic Block Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
Argument of a sandboxir::Function.
Contains a list of sandboxir::Instruction's.
sandboxir::Value * getValue(llvm::Value *V) const
Module * getModule(llvm::Module *LLVMM) const
Argument * getArg(unsigned Idx) const
FunctionType * getFunctionType() const
void dumpOS(raw_ostream &OS) const final
void dumpNameAndArgs(raw_ostream &OS) const
void verify() const final
Should crash if there is something wrong with the instruction.
static bool classof(const sandboxir::Value *From)
For isa/dyn_cast.
mapped_iterator< llvm::Function::iterator, LLVMBBToBB > iterator
Provides API functions, like getIterator() and getReverseIterator() to GlobalIFunc,...
In SandboxIR the Module is mainly used to access the list of global objects.
A SandboxIR Value has users. This is the base class.
llvm::Value * Val
The LLVM Value that corresponds to this SandboxIR Value.
Context & Ctx
All values point to the context.