aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/include/llvm/IR/BasicBlock.h
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/include/llvm/IR/BasicBlock.h
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/include/llvm/IR/BasicBlock.h')
-rw-r--r--contrib/libs/llvm12/include/llvm/IR/BasicBlock.h118
1 files changed, 59 insertions, 59 deletions
diff --git a/contrib/libs/llvm12/include/llvm/IR/BasicBlock.h b/contrib/libs/llvm12/include/llvm/IR/BasicBlock.h
index b79477c0b3..4a8e282ec2 100644
--- a/contrib/libs/llvm12/include/llvm/IR/BasicBlock.h
+++ b/contrib/libs/llvm12/include/llvm/IR/BasicBlock.h
@@ -172,24 +172,24 @@ public:
}
/// Returns a pointer to the first instruction in this block that is not a
- /// PHINode or a debug intrinsic, or any pseudo operation if \c SkipPseudoOp
- /// is true.
- const Instruction *getFirstNonPHIOrDbg(bool SkipPseudoOp = false) const;
- Instruction *getFirstNonPHIOrDbg(bool SkipPseudoOp = false) {
+ /// PHINode or a debug intrinsic, or any pseudo operation if \c SkipPseudoOp
+ /// is true.
+ const Instruction *getFirstNonPHIOrDbg(bool SkipPseudoOp = false) const;
+ Instruction *getFirstNonPHIOrDbg(bool SkipPseudoOp = false) {
return const_cast<Instruction *>(
- static_cast<const BasicBlock *>(this)->getFirstNonPHIOrDbg(
- SkipPseudoOp));
+ static_cast<const BasicBlock *>(this)->getFirstNonPHIOrDbg(
+ SkipPseudoOp));
}
/// Returns a pointer to the first instruction in this block that is not a
- /// PHINode, a debug intrinsic, or a lifetime intrinsic, or any pseudo
- /// operation if \c SkipPseudoOp is true.
- const Instruction *
- getFirstNonPHIOrDbgOrLifetime(bool SkipPseudoOp = false) const;
- Instruction *getFirstNonPHIOrDbgOrLifetime(bool SkipPseudoOp = false) {
+ /// PHINode, a debug intrinsic, or a lifetime intrinsic, or any pseudo
+ /// operation if \c SkipPseudoOp is true.
+ const Instruction *
+ getFirstNonPHIOrDbgOrLifetime(bool SkipPseudoOp = false) const;
+ Instruction *getFirstNonPHIOrDbgOrLifetime(bool SkipPseudoOp = false) {
return const_cast<Instruction *>(
- static_cast<const BasicBlock *>(this)->getFirstNonPHIOrDbgOrLifetime(
- SkipPseudoOp));
+ static_cast<const BasicBlock *>(this)->getFirstNonPHIOrDbgOrLifetime(
+ SkipPseudoOp));
}
/// Returns an iterator to the first instruction in this block that is
@@ -203,18 +203,18 @@ public:
}
/// Return a const iterator range over the instructions in the block, skipping
- /// any debug instructions. Skip any pseudo operations as well if \c
- /// SkipPseudoOp is true.
+ /// any debug instructions. Skip any pseudo operations as well if \c
+ /// SkipPseudoOp is true.
iterator_range<filter_iterator<BasicBlock::const_iterator,
std::function<bool(const Instruction &)>>>
- instructionsWithoutDebug(bool SkipPseudoOp = false) const;
+ instructionsWithoutDebug(bool SkipPseudoOp = false) const;
/// Return an iterator range over the instructions in the block, skipping any
- /// debug instructions. Skip and any pseudo operations as well if \c
- /// SkipPseudoOp is true.
- iterator_range<
- filter_iterator<BasicBlock::iterator, std::function<bool(Instruction &)>>>
- instructionsWithoutDebug(bool SkipPseudoOp = false);
+ /// debug instructions. Skip and any pseudo operations as well if \c
+ /// SkipPseudoOp is true.
+ iterator_range<
+ filter_iterator<BasicBlock::iterator, std::function<bool(Instruction &)>>>
+ instructionsWithoutDebug(bool SkipPseudoOp = false);
/// Return the size of the basic block ignoring debug instructions
filter_iterator<BasicBlock::const_iterator,
@@ -405,51 +405,51 @@ public:
/// Split the basic block into two basic blocks at the specified instruction.
///
- /// If \p Before is true, splitBasicBlockBefore handles the
- /// block splitting. Otherwise, execution proceeds as described below.
+ /// If \p Before is true, splitBasicBlockBefore handles the
+ /// block splitting. Otherwise, execution proceeds as described below.
+ ///
+ /// Note that all instructions BEFORE the specified iterator
+ /// stay as part of the original basic block, an unconditional branch is added
+ /// to the original BB, and the rest of the instructions in the BB are moved
+ /// to the new BB, including the old terminator. The newly formed basic block
+ /// is returned. This function invalidates the specified iterator.
///
- /// Note that all instructions BEFORE the specified iterator
- /// stay as part of the original basic block, an unconditional branch is added
- /// to the original BB, and the rest of the instructions in the BB are moved
- /// to the new BB, including the old terminator. The newly formed basic block
- /// is returned. This function invalidates the specified iterator.
- ///
/// Note that this only works on well formed basic blocks (must have a
- /// terminator), and \p 'I' must not be the end of instruction list (which
- /// would cause a degenerate basic block to be formed, having a terminator
- /// inside of the basic block).
+ /// terminator), and \p 'I' must not be the end of instruction list (which
+ /// would cause a degenerate basic block to be formed, having a terminator
+ /// inside of the basic block).
///
/// Also note that this doesn't preserve any passes. To split blocks while
/// keeping loop information consistent, use the SplitBlock utility function.
- BasicBlock *splitBasicBlock(iterator I, const Twine &BBName = "",
- bool Before = false);
- BasicBlock *splitBasicBlock(Instruction *I, const Twine &BBName = "",
- bool Before = false) {
- return splitBasicBlock(I->getIterator(), BBName, Before);
+ BasicBlock *splitBasicBlock(iterator I, const Twine &BBName = "",
+ bool Before = false);
+ BasicBlock *splitBasicBlock(Instruction *I, const Twine &BBName = "",
+ bool Before = false) {
+ return splitBasicBlock(I->getIterator(), BBName, Before);
+ }
+
+ /// Split the basic block into two basic blocks at the specified instruction
+ /// and insert the new basic blocks as the predecessor of the current block.
+ ///
+ /// This function ensures all instructions AFTER and including the specified
+ /// iterator \p I are part of the original basic block. All Instructions
+ /// BEFORE the iterator \p I are moved to the new BB and an unconditional
+ /// branch is added to the new BB. The new basic block is returned.
+ ///
+ /// Note that this only works on well formed basic blocks (must have a
+ /// terminator), and \p 'I' must not be the end of instruction list (which
+ /// would cause a degenerate basic block to be formed, having a terminator
+ /// inside of the basic block). \p 'I' cannot be a iterator for a PHINode
+ /// with multiple incoming blocks.
+ ///
+ /// Also note that this doesn't preserve any passes. To split blocks while
+ /// keeping loop information consistent, use the SplitBlockBefore utility
+ /// function.
+ BasicBlock *splitBasicBlockBefore(iterator I, const Twine &BBName = "");
+ BasicBlock *splitBasicBlockBefore(Instruction *I, const Twine &BBName = "") {
+ return splitBasicBlockBefore(I->getIterator(), BBName);
}
- /// Split the basic block into two basic blocks at the specified instruction
- /// and insert the new basic blocks as the predecessor of the current block.
- ///
- /// This function ensures all instructions AFTER and including the specified
- /// iterator \p I are part of the original basic block. All Instructions
- /// BEFORE the iterator \p I are moved to the new BB and an unconditional
- /// branch is added to the new BB. The new basic block is returned.
- ///
- /// Note that this only works on well formed basic blocks (must have a
- /// terminator), and \p 'I' must not be the end of instruction list (which
- /// would cause a degenerate basic block to be formed, having a terminator
- /// inside of the basic block). \p 'I' cannot be a iterator for a PHINode
- /// with multiple incoming blocks.
- ///
- /// Also note that this doesn't preserve any passes. To split blocks while
- /// keeping loop information consistent, use the SplitBlockBefore utility
- /// function.
- BasicBlock *splitBasicBlockBefore(iterator I, const Twine &BBName = "");
- BasicBlock *splitBasicBlockBefore(Instruction *I, const Twine &BBName = "") {
- return splitBasicBlockBefore(I->getIterator(), BBName);
- }
-
/// Returns true if there are any uses of this basic block other than
/// direct branches, switches, etc. to it.
bool hasAddressTaken() const {