Skip to content

Commit 020041d

Browse files
author
Krzysztof Parzyszek
committed
Update spelling of {analyze,insert,remove}Branch in strings and comments
These names have been changed from CamelCase to camelCase, but there were many places (comments mostly) that still used the old names. This change is NFC.
1 parent 1fbb1d6 commit 020041d

25 files changed

+82
-82
lines changed

libcxxabi/test/test_demangle.pass.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -12990,9 +12990,9 @@ const char* cases[][2] =
1299012990
{"_ZN4llvm3X8621GetCondBranchFromCondENS0_8CondCodeE", "llvm::X86::GetCondBranchFromCond(llvm::X86::CondCode)"},
1299112991
{"_ZN4llvm3X8626GetOppositeBranchConditionENS0_8CondCodeE", "llvm::X86::GetOppositeBranchCondition(llvm::X86::CondCode)"},
1299212992
{"_ZNK4llvm12X86InstrInfo24isUnpredicatedTerminatorEPKNS_12MachineInstrE", "llvm::X86InstrInfo::isUnpredicatedTerminator(llvm::MachineInstr const*) const"},
12993-
{"_ZNK4llvm12X86InstrInfo13AnalyzeBranchERNS_17MachineBasicBlockERPS1_S4_RNS_15SmallVectorImplINS_14MachineOperandEEEb", "llvm::X86InstrInfo::AnalyzeBranch(llvm::MachineBasicBlock&, llvm::MachineBasicBlock*&, llvm::MachineBasicBlock*&, llvm::SmallVectorImpl<llvm::MachineOperand>&, bool) const"},
12994-
{"_ZNK4llvm12X86InstrInfo12RemoveBranchERNS_17MachineBasicBlockE", "llvm::X86InstrInfo::RemoveBranch(llvm::MachineBasicBlock&) const"},
12995-
{"_ZNK4llvm12X86InstrInfo12InsertBranchERNS_17MachineBasicBlockEPS1_S3_RKNS_15SmallVectorImplINS_14MachineOperandEEENS_8DebugLocE", "llvm::X86InstrInfo::InsertBranch(llvm::MachineBasicBlock&, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineOperand> const&, llvm::DebugLoc) const"},
12993+
{"_ZNK4llvm12X86InstrInfo13analyzeBranchERNS_17MachineBasicBlockERPS1_S4_RNS_15SmallVectorImplINS_14MachineOperandEEEb", "llvm::X86InstrInfo::analyzeBranch(llvm::MachineBasicBlock&, llvm::MachineBasicBlock*&, llvm::MachineBasicBlock*&, llvm::SmallVectorImpl<llvm::MachineOperand>&, bool) const"},
12994+
{"_ZNK4llvm12X86InstrInfo12removeBranchERNS_17MachineBasicBlockE", "llvm::X86InstrInfo::removeBranch(llvm::MachineBasicBlock&) const"},
12995+
{"_ZNK4llvm12X86InstrInfo12insertBranchERNS_17MachineBasicBlockEPS1_S3_RKNS_15SmallVectorImplINS_14MachineOperandEEENS_8DebugLocE", "llvm::X86InstrInfo::insertBranch(llvm::MachineBasicBlock&, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineOperand> const&, llvm::DebugLoc) const"},
1299612996
{"_ZNK4llvm12X86InstrInfo11copyPhysRegERNS_17MachineBasicBlockENS_14ilist_iteratorINS_12MachineInstrEEENS_8DebugLocEjjb", "llvm::X86InstrInfo::copyPhysReg(llvm::MachineBasicBlock&, llvm::ilist_iterator<llvm::MachineInstr>, llvm::DebugLoc, unsigned int, unsigned int, bool) const"},
1299712997
{"_ZNK4llvm12X86InstrInfo19storeRegToStackSlotERNS_17MachineBasicBlockENS_14ilist_iteratorINS_12MachineInstrEEEjbiPKNS_19TargetRegisterClassEPKNS_18TargetRegisterInfoE", "llvm::X86InstrInfo::storeRegToStackSlot(llvm::MachineBasicBlock&, llvm::ilist_iterator<llvm::MachineInstr>, unsigned int, bool, int, llvm::TargetRegisterClass const*, llvm::TargetRegisterInfo const*) const"},
1299812998
{"_ZN4llvm17addFrameReferenceERKNS_19MachineInstrBuilderEii", "llvm::addFrameReference(llvm::MachineInstrBuilder const&, int, int)"},
@@ -13545,9 +13545,9 @@ const char* cases[][2] =
1354513545
{"_ZNK4llvm16ARMBaseInstrInfo28CreateTargetHazardRecognizerEPKNS_13TargetMachineEPKNS_11ScheduleDAGE", "llvm::ARMBaseInstrInfo::CreateTargetHazardRecognizer(llvm::TargetMachine const*, llvm::ScheduleDAG const*) const"},
1354613546
{"_ZNK4llvm16ARMBaseInstrInfo34CreateTargetPostRAHazardRecognizerEPKNS_18InstrItineraryDataEPKNS_11ScheduleDAGE", "llvm::ARMBaseInstrInfo::CreateTargetPostRAHazardRecognizer(llvm::InstrItineraryData const*, llvm::ScheduleDAG const*) const"},
1354713547
{"_ZNK4llvm16ARMBaseInstrInfo21convertToThreeAddressERNS_14ilist_iteratorINS_17MachineBasicBlockEEERNS1_INS_12MachineInstrEEEPNS_13LiveVariablesE", "llvm::ARMBaseInstrInfo::convertToThreeAddress(llvm::ilist_iterator<llvm::MachineBasicBlock>&, llvm::ilist_iterator<llvm::MachineInstr>&, llvm::LiveVariables*) const"},
13548-
{"_ZNK4llvm16ARMBaseInstrInfo13AnalyzeBranchERNS_17MachineBasicBlockERPS1_S4_RNS_15SmallVectorImplINS_14MachineOperandEEEb", "llvm::ARMBaseInstrInfo::AnalyzeBranch(llvm::MachineBasicBlock&, llvm::MachineBasicBlock*&, llvm::MachineBasicBlock*&, llvm::SmallVectorImpl<llvm::MachineOperand>&, bool) const"},
13549-
{"_ZNK4llvm16ARMBaseInstrInfo12RemoveBranchERNS_17MachineBasicBlockE", "llvm::ARMBaseInstrInfo::RemoveBranch(llvm::MachineBasicBlock&) const"},
13550-
{"_ZNK4llvm16ARMBaseInstrInfo12InsertBranchERNS_17MachineBasicBlockEPS1_S3_RKNS_15SmallVectorImplINS_14MachineOperandEEENS_8DebugLocE", "llvm::ARMBaseInstrInfo::InsertBranch(llvm::MachineBasicBlock&, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineOperand> const&, llvm::DebugLoc) const"},
13548+
{"_ZNK4llvm16ARMBaseInstrInfo13analyzeBranchERNS_17MachineBasicBlockERPS1_S4_RNS_15SmallVectorImplINS_14MachineOperandEEEb", "llvm::ARMBaseInstrInfo::analyzeBranch(llvm::MachineBasicBlock&, llvm::MachineBasicBlock*&, llvm::MachineBasicBlock*&, llvm::SmallVectorImpl<llvm::MachineOperand>&, bool) const"},
13549+
{"_ZNK4llvm16ARMBaseInstrInfo12removeBranchERNS_17MachineBasicBlockE", "llvm::ARMBaseInstrInfo::removeBranch(llvm::MachineBasicBlock&) const"},
13550+
{"_ZNK4llvm16ARMBaseInstrInfo12insertBranchERNS_17MachineBasicBlockEPS1_S3_RKNS_15SmallVectorImplINS_14MachineOperandEEENS_8DebugLocE", "llvm::ARMBaseInstrInfo::insertBranch(llvm::MachineBasicBlock&, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineOperand> const&, llvm::DebugLoc) const"},
1355113551
{"_ZNK4llvm16ARMBaseInstrInfo22ReverseBranchConditionERNS_15SmallVectorImplINS_14MachineOperandEEE", "llvm::ARMBaseInstrInfo::ReverseBranchCondition(llvm::SmallVectorImpl<llvm::MachineOperand>&) const"},
1355213552
{"_ZNK4llvm16ARMBaseInstrInfo20PredicateInstructionEPNS_12MachineInstrERKNS_15SmallVectorImplINS_14MachineOperandEEE", "llvm::ARMBaseInstrInfo::PredicateInstruction(llvm::MachineInstr*, llvm::SmallVectorImpl<llvm::MachineOperand> const&) const"},
1355313553
{"_ZN4llvm27getMatchingCondBranchOpcodeEi", "llvm::getMatchingCondBranchOpcode(int)"},
@@ -14257,9 +14257,9 @@ const char* cases[][2] =
1425714257
{"_ZNK4llvm15TargetInstrInfo19isLoadFromStackSlotEPKNS_12MachineInstrERi", "llvm::TargetInstrInfo::isLoadFromStackSlot(llvm::MachineInstr const*, int&) const"},
1425814258
{"_ZNK4llvm15TargetInstrInfo18isStoreToStackSlotEPKNS_12MachineInstrERi", "llvm::TargetInstrInfo::isStoreToStackSlot(llvm::MachineInstr const*, int&) const"},
1425914259
{"_ZNK4llvm15TargetInstrInfo21convertToThreeAddressERNS_14ilist_iteratorINS_17MachineBasicBlockEEERNS1_INS_12MachineInstrEEEPNS_13LiveVariablesE", "llvm::TargetInstrInfo::convertToThreeAddress(llvm::ilist_iterator<llvm::MachineBasicBlock>&, llvm::ilist_iterator<llvm::MachineInstr>&, llvm::LiveVariables*) const"},
14260-
{"_ZNK4llvm15TargetInstrInfo13AnalyzeBranchERNS_17MachineBasicBlockERPS1_S4_RNS_15SmallVectorImplINS_14MachineOperandEEEb", "llvm::TargetInstrInfo::AnalyzeBranch(llvm::MachineBasicBlock&, llvm::MachineBasicBlock*&, llvm::MachineBasicBlock*&, llvm::SmallVectorImpl<llvm::MachineOperand>&, bool) const"},
14261-
{"_ZNK4llvm15TargetInstrInfo12RemoveBranchERNS_17MachineBasicBlockE", "llvm::TargetInstrInfo::RemoveBranch(llvm::MachineBasicBlock&) const"},
14262-
{"_ZNK4llvm15TargetInstrInfo12InsertBranchERNS_17MachineBasicBlockEPS1_S3_RKNS_15SmallVectorImplINS_14MachineOperandEEENS_8DebugLocE", "llvm::TargetInstrInfo::InsertBranch(llvm::MachineBasicBlock&, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineOperand> const&, llvm::DebugLoc) const"},
14260+
{"_ZNK4llvm15TargetInstrInfo13analyzeBranchERNS_17MachineBasicBlockERPS1_S4_RNS_15SmallVectorImplINS_14MachineOperandEEEb", "llvm::TargetInstrInfo::analyzeBranch(llvm::MachineBasicBlock&, llvm::MachineBasicBlock*&, llvm::MachineBasicBlock*&, llvm::SmallVectorImpl<llvm::MachineOperand>&, bool) const"},
14261+
{"_ZNK4llvm15TargetInstrInfo12removeBranchERNS_17MachineBasicBlockE", "llvm::TargetInstrInfo::removeBranch(llvm::MachineBasicBlock&) const"},
14262+
{"_ZNK4llvm15TargetInstrInfo12insertBranchERNS_17MachineBasicBlockEPS1_S3_RKNS_15SmallVectorImplINS_14MachineOperandEEENS_8DebugLocE", "llvm::TargetInstrInfo::insertBranch(llvm::MachineBasicBlock&, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::SmallVectorImpl<llvm::MachineOperand> const&, llvm::DebugLoc) const"},
1426314263
{"_ZNK4llvm15TargetInstrInfo19isProfitableToIfCvtERNS_17MachineBasicBlockEjjff", "llvm::TargetInstrInfo::isProfitableToIfCvt(llvm::MachineBasicBlock&, unsigned int, unsigned int, float, float) const"},
1426414264
{"_ZNK4llvm15TargetInstrInfo19isProfitableToIfCvtERNS_17MachineBasicBlockEjjS2_jjff", "llvm::TargetInstrInfo::isProfitableToIfCvt(llvm::MachineBasicBlock&, unsigned int, unsigned int, llvm::MachineBasicBlock&, unsigned int, unsigned int, float, float) const"},
1426514265
{"_ZNK4llvm15TargetInstrInfo25isProfitableToDupForIfCvtERNS_17MachineBasicBlockEjff", "llvm::TargetInstrInfo::isProfitableToDupForIfCvt(llvm::MachineBasicBlock&, unsigned int, float, float) const"},

llvm/docs/WritingAnLLVMBackend.rst

+17-17
Original file line numberDiff line numberDiff line change
@@ -1100,21 +1100,21 @@ Branch Folding and If Conversion
11001100
--------------------------------
11011101

11021102
Performance can be improved by combining instructions or by eliminating
1103-
instructions that are never reached. The ``AnalyzeBranch`` method in
1103+
instructions that are never reached. The ``analyzeBranch`` method in
11041104
``XXXInstrInfo`` may be implemented to examine conditional instructions and
1105-
remove unnecessary instructions. ``AnalyzeBranch`` looks at the end of a
1105+
remove unnecessary instructions. ``analyzeBranch`` looks at the end of a
11061106
machine basic block (MBB) for opportunities for improvement, such as branch
11071107
folding and if conversion. The ``BranchFolder`` and ``IfConverter`` machine
11081108
function passes (see the source files ``BranchFolding.cpp`` and
1109-
``IfConversion.cpp`` in the ``lib/CodeGen`` directory) call ``AnalyzeBranch``
1109+
``IfConversion.cpp`` in the ``lib/CodeGen`` directory) call ``analyzeBranch``
11101110
to improve the control flow graph that represents the instructions.
11111111

1112-
Several implementations of ``AnalyzeBranch`` (for ARM, Alpha, and X86) can be
1113-
examined as models for your own ``AnalyzeBranch`` implementation. Since SPARC
1114-
does not implement a useful ``AnalyzeBranch``, the ARM target implementation is
1112+
Several implementations of ``analyzeBranch`` (for ARM, Alpha, and X86) can be
1113+
examined as models for your own ``analyzeBranch`` implementation. Since SPARC
1114+
does not implement a useful ``analyzeBranch``, the ARM target implementation is
11151115
shown below.
11161116

1117-
``AnalyzeBranch`` returns a Boolean value and takes four parameters:
1117+
``analyzeBranch`` returns a Boolean value and takes four parameters:
11181118

11191119
* ``MachineBasicBlock &MBB`` --- The incoming block to be examined.
11201120

@@ -1130,12 +1130,12 @@ shown below.
11301130
In the simplest case, if a block ends without a branch, then it falls through
11311131
to the successor block. No destination blocks are specified for either ``TBB``
11321132
or ``FBB``, so both parameters return ``NULL``. The start of the
1133-
``AnalyzeBranch`` (see code below for the ARM target) shows the function
1133+
``analyzeBranch`` (see code below for the ARM target) shows the function
11341134
parameters and the code for the simplest case.
11351135

11361136
.. code-block:: c++
11371137

1138-
bool ARMInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,
1138+
bool ARMInstrInfo::analyzeBranch(MachineBasicBlock &MBB,
11391139
MachineBasicBlock *&TBB,
11401140
MachineBasicBlock *&FBB,
11411141
std::vector<MachineOperand> &Cond) const
@@ -1145,7 +1145,7 @@ parameters and the code for the simplest case.
11451145
return false;
11461146
11471147
If a block ends with a single unconditional branch instruction, then
1148-
``AnalyzeBranch`` (shown below) should return the destination of that branch in
1148+
``analyzeBranch`` (shown below) should return the destination of that branch in
11491149
the ``TBB`` parameter.
11501150

11511151
.. code-block:: c++
@@ -1171,7 +1171,7 @@ instruction and return the penultimate branch in the ``TBB`` parameter.
11711171

11721172
A block may end with a single conditional branch instruction that falls through
11731173
to successor block if the condition evaluates to false. In that case,
1174-
``AnalyzeBranch`` (shown below) should return the destination of that
1174+
``analyzeBranch`` (shown below) should return the destination of that
11751175
conditional branch in the ``TBB`` parameter and a list of operands in the
11761176
``Cond`` parameter to evaluate the condition.
11771177

@@ -1186,7 +1186,7 @@ conditional branch in the ``TBB`` parameter and a list of operands in the
11861186
}
11871187

11881188
If a block ends with both a conditional branch and an ensuing unconditional
1189-
branch, then ``AnalyzeBranch`` (shown below) should return the conditional
1189+
branch, then ``analyzeBranch`` (shown below) should return the conditional
11901190
branch destination (assuming it corresponds to a conditional evaluation of
11911191
"``true``") in the ``TBB`` parameter and the unconditional branch destination
11921192
in the ``FBB`` (corresponding to a conditional evaluation of "``false``"). A
@@ -1209,14 +1209,14 @@ parameter.
12091209
For the last two cases (ending with a single conditional branch or ending with
12101210
one conditional and one unconditional branch), the operands returned in the
12111211
``Cond`` parameter can be passed to methods of other instructions to create new
1212-
branches or perform other operations. An implementation of ``AnalyzeBranch``
1213-
requires the helper methods ``RemoveBranch`` and ``InsertBranch`` to manage
1212+
branches or perform other operations. An implementation of ``analyzeBranch``
1213+
requires the helper methods ``removeBranch`` and ``insertBranch`` to manage
12141214
subsequent operations.
12151215

1216-
``AnalyzeBranch`` should return false indicating success in most circumstances.
1217-
``AnalyzeBranch`` should only return true when the method is stumped about what
1216+
``analyzeBranch`` should return false indicating success in most circumstances.
1217+
``analyzeBranch`` should only return true when the method is stumped about what
12181218
to do, for example, if a block has three terminating branches.
1219-
``AnalyzeBranch`` may return true if it encounters a terminator it cannot
1219+
``analyzeBranch`` may return true if it encounters a terminator it cannot
12201220
handle, such as an indirect branch.
12211221

12221222
.. _instruction-selector:

llvm/include/llvm/CodeGen/MachineInstr.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ class MachineInstr
701701

702702
/// Returns true if this is a conditional, unconditional, or indirect branch.
703703
/// Predicates below can be used to discriminate between
704-
/// these cases, and the TargetInstrInfo::AnalyzeBranch method can be used to
704+
/// these cases, and the TargetInstrInfo::analyzeBranch method can be used to
705705
/// get more information.
706706
bool isBranch(QueryType Type = AnyInBundle) const {
707707
return hasProperty(MCID::Branch, Type);
@@ -715,15 +715,15 @@ class MachineInstr
715715

716716
/// Return true if this is a branch which may fall
717717
/// through to the next instruction or may transfer control flow to some other
718-
/// block. The TargetInstrInfo::AnalyzeBranch method can be used to get more
718+
/// block. The TargetInstrInfo::analyzeBranch method can be used to get more
719719
/// information about this branch.
720720
bool isConditionalBranch(QueryType Type = AnyInBundle) const {
721721
return isBranch(Type) && !isBarrier(Type) && !isIndirectBranch(Type);
722722
}
723723

724724
/// Return true if this is a branch which always
725725
/// transfers control flow to some other block. The
726-
/// TargetInstrInfo::AnalyzeBranch method can be used to get more information
726+
/// TargetInstrInfo::analyzeBranch method can be used to get more information
727727
/// about this branch.
728728
bool isUnconditionalBranch(QueryType Type = AnyInBundle) const {
729729
return isBranch(Type) && isBarrier(Type) && !isIndirectBranch(Type);

llvm/include/llvm/CodeGen/TargetInstrInfo.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ class TargetInstrInfo : public MCInstrInfo {
644644
}
645645

646646
/// Remove the branching code at the end of the specific MBB.
647-
/// This is only invoked in cases where AnalyzeBranch returns success. It
647+
/// This is only invoked in cases where analyzeBranch returns success. It
648648
/// returns the number of instructions that were removed.
649649
/// If \p BytesRemoved is non-null, report the change in code size from the
650650
/// removed instructions.
@@ -654,13 +654,13 @@ class TargetInstrInfo : public MCInstrInfo {
654654
}
655655

656656
/// Insert branch code into the end of the specified MachineBasicBlock. The
657-
/// operands to this method are the same as those returned by AnalyzeBranch.
658-
/// This is only invoked in cases where AnalyzeBranch returns success. It
657+
/// operands to this method are the same as those returned by analyzeBranch.
658+
/// This is only invoked in cases where analyzeBranch returns success. It
659659
/// returns the number of instructions inserted. If \p BytesAdded is non-null,
660660
/// report the change in code size from the added instructions.
661661
///
662662
/// It is also invoked by tail merging to add unconditional branches in
663-
/// cases where AnalyzeBranch doesn't apply because there was no original
663+
/// cases where analyzeBranch doesn't apply because there was no original
664664
/// branch to analyze. At least this much must be implemented, else tail
665665
/// merging needs to be disabled.
666666
///
@@ -837,7 +837,7 @@ class TargetInstrInfo : public MCInstrInfo {
837837
/// Some x86 implementations have 2-cycle cmov instructions.
838838
///
839839
/// @param MBB Block where select instruction would be inserted.
840-
/// @param Cond Condition returned by AnalyzeBranch.
840+
/// @param Cond Condition returned by analyzeBranch.
841841
/// @param TrueReg Virtual register to select when Cond is true.
842842
/// @param FalseReg Virtual register to select when Cond is false.
843843
/// @param CondCycles Latency from Cond+Branch to select output.
@@ -854,15 +854,15 @@ class TargetInstrInfo : public MCInstrInfo {
854854
/// DstReg when Cond is true, and FalseReg to DstReg when Cond is false.
855855
///
856856
/// This function can only be called after canInsertSelect() returned true.
857-
/// The condition in Cond comes from AnalyzeBranch, and it can be assumed
857+
/// The condition in Cond comes from analyzeBranch, and it can be assumed
858858
/// that the same flags or registers required by Cond are available at the
859859
/// insertion point.
860860
///
861861
/// @param MBB Block where select instruction should be inserted.
862862
/// @param I Insertion point.
863863
/// @param DL Source location for debugging.
864864
/// @param DstReg Virtual register to be defined by select instruction.
865-
/// @param Cond Condition as computed by AnalyzeBranch.
865+
/// @param Cond Condition as computed by analyzeBranch.
866866
/// @param TrueReg Virtual register to copy when Cond is true.
867867
/// @param FalseReg Virtual register to copy when Cons is false.
868868
virtual void insertSelect(MachineBasicBlock &MBB,

llvm/include/llvm/MC/MCInstrDesc.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ class MCInstrDesc {
300300

301301
/// Returns true if this is a conditional, unconditional, or
302302
/// indirect branch. Predicates below can be used to discriminate between
303-
/// these cases, and the TargetInstrInfo::AnalyzeBranch method can be used to
303+
/// these cases, and the TargetInstrInfo::analyzeBranch method can be used to
304304
/// get more information.
305305
bool isBranch() const { return Flags & (1ULL << MCID::Branch); }
306306

@@ -310,15 +310,15 @@ class MCInstrDesc {
310310

311311
/// Return true if this is a branch which may fall
312312
/// through to the next instruction or may transfer control flow to some other
313-
/// block. The TargetInstrInfo::AnalyzeBranch method can be used to get more
313+
/// block. The TargetInstrInfo::analyzeBranch method can be used to get more
314314
/// information about this branch.
315315
bool isConditionalBranch() const {
316316
return isBranch() && !isBarrier() && !isIndirectBranch();
317317
}
318318

319319
/// Return true if this is a branch which always
320320
/// transfers control flow to some other block. The
321-
/// TargetInstrInfo::AnalyzeBranch method can be used to get more information
321+
/// TargetInstrInfo::analyzeBranch method can be used to get more information
322322
/// about this branch.
323323
bool isUnconditionalBranch() const {
324324
return isBranch() && isBarrier() && !isIndirectBranch();

llvm/lib/CodeGen/BranchFolding.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1437,7 +1437,7 @@ bool BranchFolder::OptimizeBlock(MachineBasicBlock *MBB) {
14371437
// has been used, but it can happen if tail merging splits a fall-through
14381438
// predecessor of a block.
14391439
// This has to check PrevBB->succ_size() because EH edges are ignored by
1440-
// AnalyzeBranch.
1440+
// analyzeBranch.
14411441
if (PriorCond.empty() && !PriorTBB && MBB->pred_size() == 1 &&
14421442
PrevBB.succ_size() == 1 &&
14431443
!MBB->hasAddressTaken() && !MBB->isEHPad()) {

0 commit comments

Comments
 (0)