|
| Func (const std::string_view name, Visibility visibility=Visibility::LOCAL) |
|
| ~Func () override |
|
unsigned | GetID () |
| Returns the unique ID.
|
|
void | removeFromParent () override |
| Removes an instruction from the parent.
|
|
void | eraseFromParent () override |
| Removes a function from the program.
|
|
void | AddBlock (Block *block, Block *before=nullptr) |
| Adds a new basic block.
|
|
Prog * | getParent () const |
| Returns the parent block.
|
|
unsigned | AddStackObject (unsigned index, unsigned size, llvm::Align align) |
| Adds a stack object.
|
|
void | RemoveStackObject (unsigned index) |
| Removes a stack object.
|
|
void | SetCallingConv (CallingConv conv) |
| Sets the calling convention.
|
|
CallingConv | GetCallingConv () const |
| Returns the calling convention.
|
|
void | SetVarArg (bool varArg=true) |
| Sets the vararg flag.
|
|
bool | IsVarArg () const |
| Returns the vararg flags.
|
|
void | SetAlignment (llvm::Align align) |
| Sets the alignment of the function.
|
|
std::optional< llvm::Align > | GetAlignment () const override |
| Returns the alignment of a function.
|
|
bool | IsNoInline () const |
| Checks if the function can be inlined.
|
|
void | SetNoInline (bool noinline=true) |
| Prevents the function from being inlined.
|
|
std::string_view | GetFeatures () const |
| Returns the function-specific target features.
|
|
llvm::StringRef | getFeatures () const |
|
void | SetFeatures (const std::string_view features) |
|
std::string_view | GetCPU () const |
| Returns the CPU to compile for.
|
|
llvm::StringRef | getCPU () const |
|
void | SetCPU (const std::string_view cpu) |
|
std::string_view | GetTuneCPU () const |
| Returns the CPU to tune for.
|
|
llvm::StringRef | getTuneCPU () const |
|
void | SetTuneCPU (const std::string_view tuneCPU) |
|
void | SetParameters (const std::vector< FlaggedType > ¶ms) |
| Sets the number of fixed parameters.
|
|
llvm::ArrayRef< FlaggedType > | params () const |
| Returns the list of arguments.
|
|
unsigned | GetNumParams () const |
| Returns the number of parameters.
|
|
void | SetPersonality (Global *func) |
| Set the personality routine.
|
|
ConstRef< Global > | GetPersonality () const |
| Return the personality routine.
|
|
llvm::ArrayRef< StackObject > | objects () const |
| Iterator over stack objects.
|
|
StackObject & | object (unsigned I) |
| Finds a stack object by index.
|
|
const StackObject & | object (unsigned I) const |
| Finds a stack object by index.
|
|
void | remove (iterator it) |
| Removes a block.
|
|
void | erase (iterator it) |
| Erases a block.
|
|
void | insertAfter (iterator it, Block *block) |
| Adds a block.
|
|
void | insert (iterator it, Block *block) |
| Adds a block before another.
|
|
void | clear () |
| Clears all blocks.
|
|
bool | empty () const |
| Checks if the function has any blocks.
|
|
size_t | size () const |
| Returns the size of the function.
|
|
bool | HasAddressTaken () const |
| Checks if the function can be used indirectly.
|
|
bool | IsEntry () const |
| Checks if the function must be present even without uses.
|
|
bool | DoesNotReturn () const |
| Checks if the function never returns.
|
|
bool | HasRaise () const |
| Checks if the function has a raise instruction.
|
|
bool | HasVAStart () const |
| Checks if the function has a va_start instruction.
|
|
bool | HasIndirectCalls () const |
| Checks if the function has indirect calls.
|
|
Block & | getEntryBlock () |
| Returns the entry block.
|
|
const Block & | getEntryBlock () const |
|
iterator | begin () |
|
iterator | end () |
|
const_iterator | begin () const |
|
const_iterator | end () const |
|
reverse_iterator | rbegin () |
|
reverse_iterator | rend () |
|
size_t | inst_size () const |
|
void | RemoveUnreachable () |
| Removes unreachable blocks.
|
|
Prog * | getProg () override |
| Returns the program to which the function belongs.
|
|
void | dump (llvm::raw_ostream &os=llvm::errs()) const override |
| Dumps the representation of the function.
|
|
| Global (Kind kind, const std::string_view name, Visibility visibility=Visibility::LOCAL, unsigned numOps=0) |
|
Kind | GetKind () const |
| Returns the kind of the global.
|
|
bool | Is (Kind kind) const |
| Checks if the global is of a specific kind.
|
|
const std::string_view | GetName () const |
| Returns the name of the global.
|
|
llvm::StringRef | getName () const |
| Returns the name of the basic block for LLVM.
|
|
void | SetVisibility (Visibility visibility) |
| Sets the visibilty of the global.
|
|
Visibility | GetVisibility () const |
| Returns the visibilty of a global.
|
|
bool | IsRoot () const |
| Checks if the symbol can be externally referenced.
|
|
bool | IsLocal () const |
| Checks if the global is hidden in the compilation unit.
|
|
bool | IsWeak () const |
| Checks if a symbol is weak.
|
|
| User (Kind kind, unsigned numOps) |
| Creates a new user.
|
|
virtual | ~User () |
| Cleans up after the use.
|
|
size_t | size () const |
|
op_iterator | op_begin () |
|
op_iterator | op_end () |
|
op_range | operands () |
|
const_op_iterator | op_begin () const |
|
const_op_iterator | op_end () const |
|
const_op_range | operands () const |
|
value_op_iterator | value_op_begin () |
|
value_op_iterator | value_op_end () |
|
value_op_range | operand_values () |
|
const_value_op_iterator | value_op_begin () const |
|
const_value_op_iterator | value_op_end () const |
|
const_value_op_range | operand_values () const |
|
| Value (Kind kind) |
| Constructs a new value.
|
|
| Value (const Value &)=delete |
| Do not allow copying.
|
|
| Value (Value &&)=delete |
| Do not allow moving.
|
|
virtual | ~Value () |
| Destroy the value.
|
|
Kind | GetKind () const |
| Returns the value kind.
|
|
bool | Is (Kind kind) const |
| Checks if the value is of a specific kind.
|
|
bool | IsConstant () const |
| Checks whether the value is a compile-time constant.
|
|
virtual void | replaceAllUsesWith (Value *v) |
| Replaces all uses of this value.
|
|
virtual void | replaceAllUsesWith (Ref< Value > v) |
| Replaces all uses of this with a refernce.
|
|
size_t | use_size () const |
|
bool | use_empty () const |
|
use_iterator | use_begin () |
|
const_use_iterator | use_begin () const |
|
use_iterator | use_end () |
|
const_use_iterator | use_end () const |
|
llvm::iterator_range< use_iterator > | uses () |
|
llvm::iterator_range< const_use_iterator > | uses () const |
|
bool | user_empty () const |
|
user_iterator | user_begin () |
|
const_user_iterator | user_begin () const |
|
user_iterator | user_end () |
|
const_user_iterator | user_end () const |
|
llvm::iterator_range< user_iterator > | users () |
|
llvm::iterator_range< const_user_iterator > | users () const |
|
void | operator= (const Value &)=delete |
| Do not allow assignments.
|
|
void | operator= (Value &&)=delete |
| Do not allow move assignments.
|
|