|
LLVM
8.0.1
|
A basic block represents a single entry single exit section of code. More...
|
Functions | |
| LLVMValueRef | LLVMBasicBlockAsValue (LLVMBasicBlockRef BB) |
| Convert a basic block instance to a value type. More... | |
| LLVMBool | LLVMValueIsBasicBlock (LLVMValueRef Val) |
| Determine whether an LLVMValueRef is itself a basic block. More... | |
| LLVMBasicBlockRef | LLVMValueAsBasicBlock (LLVMValueRef Val) |
| Convert an LLVMValueRef to an LLVMBasicBlockRef instance. More... | |
| const char * | LLVMGetBasicBlockName (LLVMBasicBlockRef BB) |
| Obtain the string name of a basic block. More... | |
| LLVMValueRef | LLVMGetBasicBlockParent (LLVMBasicBlockRef BB) |
| Obtain the function to which a basic block belongs. More... | |
| LLVMValueRef | LLVMGetBasicBlockTerminator (LLVMBasicBlockRef BB) |
| Obtain the terminator instruction for a basic block. More... | |
| unsigned | LLVMCountBasicBlocks (LLVMValueRef Fn) |
| Obtain the number of basic blocks in a function. More... | |
| void | LLVMGetBasicBlocks (LLVMValueRef Fn, LLVMBasicBlockRef *BasicBlocks) |
| Obtain all of the basic blocks in a function. More... | |
| LLVMBasicBlockRef | LLVMGetFirstBasicBlock (LLVMValueRef Fn) |
| Obtain the first basic block in a function. More... | |
| LLVMBasicBlockRef | LLVMGetLastBasicBlock (LLVMValueRef Fn) |
| Obtain the last basic block in a function. More... | |
| LLVMBasicBlockRef | LLVMGetNextBasicBlock (LLVMBasicBlockRef BB) |
| Advance a basic block iterator. More... | |
| LLVMBasicBlockRef | LLVMGetPreviousBasicBlock (LLVMBasicBlockRef BB) |
| Go backwards in a basic block iterator. More... | |
| LLVMBasicBlockRef | LLVMGetEntryBasicBlock (LLVMValueRef Fn) |
| Obtain the basic block that corresponds to the entry point of a function. More... | |
| LLVMBasicBlockRef | LLVMCreateBasicBlockInContext (LLVMContextRef C, const char *Name) |
| Create a new basic block without inserting it into a function. More... | |
| LLVMBasicBlockRef | LLVMAppendBasicBlockInContext (LLVMContextRef C, LLVMValueRef Fn, const char *Name) |
| Append a basic block to the end of a function. More... | |
| LLVMBasicBlockRef | LLVMAppendBasicBlock (LLVMValueRef Fn, const char *Name) |
| Append a basic block to the end of a function using the global context. More... | |
| LLVMBasicBlockRef | LLVMInsertBasicBlockInContext (LLVMContextRef C, LLVMBasicBlockRef BB, const char *Name) |
| Insert a basic block in a function before another basic block. More... | |
| LLVMBasicBlockRef | LLVMInsertBasicBlock (LLVMBasicBlockRef InsertBeforeBB, const char *Name) |
| Insert a basic block in a function using the global context. More... | |
| void | LLVMDeleteBasicBlock (LLVMBasicBlockRef BB) |
| Remove a basic block from a function and delete it. More... | |
| void | LLVMRemoveBasicBlockFromParent (LLVMBasicBlockRef BB) |
| Remove a basic block from a function. More... | |
| void | LLVMMoveBasicBlockBefore (LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos) |
| Move a basic block to before another one. More... | |
| void | LLVMMoveBasicBlockAfter (LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos) |
| Move a basic block to after another one. More... | |
| LLVMValueRef | LLVMGetFirstInstruction (LLVMBasicBlockRef BB) |
| Obtain the first instruction in a basic block. More... | |
| LLVMValueRef | LLVMGetLastInstruction (LLVMBasicBlockRef BB) |
| Obtain the last instruction in a basic block. More... | |
A basic block represents a single entry single exit section of code.
Basic blocks contain a list of instructions which form the body of the block.
Basic blocks belong to functions. They have the type of label.
Basic blocks are themselves values. However, the C API models them as LLVMBasicBlockRef.
| LLVMBasicBlockRef LLVMAppendBasicBlock | ( | LLVMValueRef | Fn, |
| const char * | Name | ||
| ) |
Append a basic block to the end of a function using the global context.
Definition at line 2550 of file Core.cpp.
References LLVMAppendBasicBlockInContext(), and LLVMGetGlobalContext().
| LLVMBasicBlockRef LLVMAppendBasicBlockInContext | ( | LLVMContextRef | C, |
| LLVMValueRef | Fn, | ||
| const char * | Name | ||
| ) |
Append a basic block to the end of a function.
Definition at line 2544 of file Core.cpp.
References llvm::BasicBlock::Create(), llvm::unwrap(), and llvm::wrap().
Referenced by LLVMAppendBasicBlock().
| LLVMValueRef LLVMBasicBlockAsValue | ( | LLVMBasicBlockRef | BB | ) |
Convert a basic block instance to a value type.
Definition at line 2469 of file Core.cpp.
References llvm::unwrap(), and llvm::wrap().
| unsigned LLVMCountBasicBlocks | ( | LLVMValueRef | Fn | ) |
Obtain the number of basic blocks in a function.
| Fn | Function value to operate on. |
Definition at line 2493 of file Core.cpp.
References llvm::size().
| LLVMBasicBlockRef LLVMCreateBasicBlockInContext | ( | LLVMContextRef | C, |
| const char * | Name | ||
| ) |
Create a new basic block without inserting it into a function.
Definition at line 2539 of file Core.cpp.
References llvm::BasicBlock::Create(), llvm::unwrap(), and llvm::wrap().
| void LLVMDeleteBasicBlock | ( | LLVMBasicBlockRef | BB | ) |
Remove a basic block from a function and delete it.
This deletes the basic block from its containing function and deletes the basic block itself.
Definition at line 2566 of file Core.cpp.
References llvm::unwrap().
| const char* LLVMGetBasicBlockName | ( | LLVMBasicBlockRef | BB | ) |
Obtain the string name of a basic block.
Definition at line 2481 of file Core.cpp.
References llvm::unwrap().
| LLVMValueRef LLVMGetBasicBlockParent | ( | LLVMBasicBlockRef | BB | ) |
Obtain the function to which a basic block belongs.
Definition at line 2485 of file Core.cpp.
References getParent(), llvm::unwrap(), and llvm::wrap().
| void LLVMGetBasicBlocks | ( | LLVMValueRef | Fn, |
| LLVMBasicBlockRef * | BasicBlocks | ||
| ) |
Obtain all of the basic blocks in a function.
This operates on a function value. The BasicBlocks parameter is a pointer to a pre-allocated array of LLVMBasicBlockRef of at least LLVMCountBasicBlocks() in length. This array is populated with LLVMBasicBlockRef instances.
Definition at line 2497 of file Core.cpp.
References llvm::wrap().
| LLVMValueRef LLVMGetBasicBlockTerminator | ( | LLVMBasicBlockRef | BB | ) |
Obtain the terminator instruction for a basic block.
If the basic block does not have a terminator (it is not well-formed if it doesn't), then NULL is returned.
The returned LLVMValueRef corresponds to an llvm::Instruction.
Definition at line 2489 of file Core.cpp.
References llvm::unwrap(), and llvm::wrap().
| LLVMBasicBlockRef LLVMGetEntryBasicBlock | ( | LLVMValueRef | Fn | ) |
Obtain the basic block that corresponds to the entry point of a function.
Definition at line 2503 of file Core.cpp.
References llvm::wrap().
| LLVMBasicBlockRef LLVMGetFirstBasicBlock | ( | LLVMValueRef | Fn | ) |
Obtain the first basic block in a function.
The returned basic block can be used as an iterator. You will likely eventually call into LLVMGetNextBasicBlock() with it.
Definition at line 2507 of file Core.cpp.
References llvm::Function::begin(), llvm::Function::end(), I, and llvm::wrap().
| LLVMValueRef LLVMGetFirstInstruction | ( | LLVMBasicBlockRef | BB | ) |
Obtain the first instruction in a basic block.
The returned LLVMValueRef corresponds to a llvm::Instruction instance.
Definition at line 2588 of file Core.cpp.
References llvm::BasicBlock::begin(), llvm::BasicBlock::end(), I, llvm::unwrap(), and llvm::wrap().
| LLVMBasicBlockRef LLVMGetLastBasicBlock | ( | LLVMValueRef | Fn | ) |
Obtain the last basic block in a function.
Definition at line 2515 of file Core.cpp.
References llvm::Function::begin(), llvm::Function::end(), I, and llvm::wrap().
| LLVMValueRef LLVMGetLastInstruction | ( | LLVMBasicBlockRef | BB | ) |
Obtain the last instruction in a basic block.
The returned LLVMValueRef corresponds to an LLVM:Instruction.
Definition at line 2596 of file Core.cpp.
References llvm::BasicBlock::begin(), llvm::BasicBlock::end(), I, llvm::unwrap(), and llvm::wrap().
| LLVMBasicBlockRef LLVMGetNextBasicBlock | ( | LLVMBasicBlockRef | BB | ) |
Advance a basic block iterator.
Definition at line 2523 of file Core.cpp.
References llvm::Function::end(), llvm::BasicBlock::getParent(), I, llvm::unwrap(), and llvm::wrap().
| LLVMBasicBlockRef LLVMGetPreviousBasicBlock | ( | LLVMBasicBlockRef | BB | ) |
Go backwards in a basic block iterator.
Definition at line 2531 of file Core.cpp.
References llvm::Function::begin(), llvm::BasicBlock::getParent(), I, llvm::unwrap(), and llvm::wrap().
| LLVMBasicBlockRef LLVMInsertBasicBlock | ( | LLVMBasicBlockRef | InsertBeforeBB, |
| const char * | Name | ||
| ) |
Insert a basic block in a function using the global context.
Definition at line 2561 of file Core.cpp.
References LLVMGetGlobalContext(), and LLVMInsertBasicBlockInContext().
| LLVMBasicBlockRef LLVMInsertBasicBlockInContext | ( | LLVMContextRef | C, |
| LLVMBasicBlockRef | BB, | ||
| const char * | Name | ||
| ) |
Insert a basic block in a function before another basic block.
The function to add to is determined by the function of the passed basic block.
Definition at line 2554 of file Core.cpp.
References llvm::BasicBlock::Create(), llvm::BasicBlock::getParent(), llvm::unwrap(), and llvm::wrap().
Referenced by LLVMInsertBasicBlock().
| void LLVMMoveBasicBlockAfter | ( | LLVMBasicBlockRef | BB, |
| LLVMBasicBlockRef | MovePos | ||
| ) |
Move a basic block to after another one.
Definition at line 2578 of file Core.cpp.
References llvm::unwrap().
| void LLVMMoveBasicBlockBefore | ( | LLVMBasicBlockRef | BB, |
| LLVMBasicBlockRef | MovePos | ||
| ) |
Move a basic block to before another one.
Definition at line 2574 of file Core.cpp.
References llvm::unwrap().
| void LLVMRemoveBasicBlockFromParent | ( | LLVMBasicBlockRef | BB | ) |
Remove a basic block from a function.
This deletes the basic block from its containing function but keep the basic block alive.
Definition at line 2570 of file Core.cpp.
References llvm::unwrap().
| LLVMBasicBlockRef LLVMValueAsBasicBlock | ( | LLVMValueRef | Val | ) |
Convert an LLVMValueRef to an LLVMBasicBlockRef instance.
Definition at line 2477 of file Core.cpp.
References llvm::wrap().
| LLVMBool LLVMValueIsBasicBlock | ( | LLVMValueRef | Val | ) |
Determine whether an LLVMValueRef is itself a basic block.
Definition at line 2473 of file Core.cpp.
References llvm::unwrap().
1.8.13