/llvm-project/clang/unittests/Analysis/FlowSensitive/ |
H A D | LoggerTest.cpp | 15 int Branches = 0; member 22 Branches += Other.Branches; in join() 28 return std::tie(LHS.Elements, LHS.Branches, LHS.Joins) == in operator ==() 29 std::tie(RHS.Elements, RHS.Branches, RHS.Joins); in operator ==() 49 ++L.Branches; in transferBranch() 80 OS << "recordState(Elements=" << L.Elements << ", Branches=" << L.Branches in recordState() 118 recordState(Elements=0, Branches=0, Joins=0) in TEST() 121 recordState(Elements=1, Branches=0, Joins=0) in TEST() 124 recordState(Elements=2, Branches=0, Joins=0) in TEST() 125 recordState(Elements=2, Branches=0, Joins=0) in TEST() [all …]
|
/llvm-project/clang-tools-extra/clang-tidy/bugprone/ |
H A D | BranchCloneCheck.cpp | 27 /// Determines if the bodies of two branches in a switch statements are Type I 327 diag(IS->getBeginLoc(), "if with identical then and else branches"); 334 // To find all the duplicates, we collect all the branches into a vector. 335 llvm::SmallVector<const Stmt *, 4> Branches; 339 Branches.push_back(Cur->getThen()); 350 Branches.push_back(Else); 355 size_t N = Branches.size(); 359 // We have already seen Branches[i] as a clone of an earlier branch. 367 Branches[I]->IgnoreContainers(), 368 Branches[ 129 llvm::SmallVector<const Stmt *, 4> Branches; check() local 213 llvm::SmallVector<SwitchBranch, 4> Branches; check() local [all...] |
/llvm-project/clang-tools-extra/pseudo/unittests/ |
H A D | DirectiveTreeTest.cpp |
|
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/bugprone/ |
H A D | branch-clone.rst | 6 Checks for repeated branches in ``if/else if/else`` chains, consecutive 7 repeated branches in ``switch`` statements and identical true and false 8 branches in conditional operators. 21 ``then`` and ``else`` branches are identical and the code is equivalent the 35 The check detects repeated branches in longer ``if/else if/else`` chains 57 In ``switch`` statements the check only reports repeated branches when they are 77 Here the check reports that the ``'a'`` and ``'A'`` branches are identical 78 (and that the ``'b'`` and ``'B'`` branches are also identical), but does not 79 report that the ``default:`` branch is also identical to the first two branches. 110 Note: This check also reports situations where branches becom [all...] |
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/ |
H A D | branch-clone.cpp | 5 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: if with identical then and else branches [bugprone-bran… in test_basic1() 16 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: if with identical then and else branches [bugprone-bran… in test_basic2() 29 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: if with identical then and else branches [bugprone-bran… in test_basic3() 80 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: if with identical then and else branches [bugprone-bran… in test_basic8() 95 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: if with identical then and else branches [bugprone-bran… in test_basic9() 127 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: if with identical then and else branches [bugprone-bran… in test_basic11() 151 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: if with identical then and else branches [bugprone-bran… in test_basic12() 201 // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: if with identical then and else branches [bugprone-bran… in test_macro1() 214 // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: if with identical then and else branches [bugprone-bran… in test_macro2() 224 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: if with identical then and else branches [bugprone-bran… in test_macro3() [all …]
|
/llvm-project/llvm/tools/llvm-cov/ |
H A D | CoverageExporterLcov.cpp | 31 // - "BRF:<number of branches found>" 32 // - "BRH:<number of branches hit>" 82 std::vector<llvm::coverage::CountedRegion> Branches; in collectNestedBranches() local 90 // Recursively collect branches from nested expansions. in collectNestedBranches() 94 append_range(Branches, NestedExBranches); in collectNestedBranches() 96 // Add branches from this level of expansion. in collectNestedBranches() 101 Branches.push_back(B); in collectNestedBranches() 105 return Branches; in collectNestedBranches() 117 std::vector<llvm::coverage::CountedRegion> Branches = in renderBranchExecutionCounts() local 120 // Recursively collect branches fo in renderBranchExecutionCounts() [all...] |
H A D | CoverageExporterJson.cpp | 21 // -- Branches: array => List of Branches in the file 32 // -- Branches: array => List of Branches in the expansion 143 std::vector<llvm::coverage::CountedRegion> Branches; in collectNestedBranches() local 147 // Recursively collect branches from nested expansions. in collectNestedBranches() 150 append_range(Branches, NestedExBranches); in collectNestedBranches() 152 // Add branches from this level of expansion. in collectNestedBranches() 156 Branches.push_back(B); in collectNestedBranches() 159 return Branches; in collectNestedBranches() [all...] |
H A D | CoverageSummaryInfo.cpp | 19 static auto sumBranches(const ArrayRef<CountedRegion> &Branches) { in sumBranches() 22 for (const auto &BR : Branches) { in sumBranches() 24 // "True" Condition Branches. in sumBranches() 30 // "False" Condition Branches. in sumBranches() 109 // Compute the branch coverage, including branches from expansions. in get() 20 sumBranches(size_t & NumBranches,size_t & CoveredBranches,const ArrayRef<CountedRegion> & Branches) sumBranches() argument
|
/llvm-project/bolt/include/bolt/Core/ |
H A D | DynoStats.h | 32 D(FORWARD_COND_BRANCHES, "executed forward branches", Fn) \ 33 D(FORWARD_COND_BRANCHES_TAKEN, "taken forward branches", Fn) \ 34 D(BACKWARD_COND_BRANCHES, "executed backward branches", Fn) \ 35 D(BACKWARD_COND_BRANCHES_TAKEN, "taken backward branches", Fn) \ 36 D(UNCOND_BRANCHES, "executed unconditional branches", Fn) \ 43 D(JUMP_TABLE_BRANCHES, "taken jump table branches", Fn) \ 44 D(UNKNOWN_INDIRECT_BRANCHES, "taken unknown indirect branches", Fn) \ 45 D(ALL_BRANCHES, "total branches", Fadd(ALL_CONDITIONAL, UNCOND_BRANCHES)) \ 46 D(ALL_TAKEN, "taken branches", Fadd(TAKEN_CONDITIONAL, UNCOND_BRANCHES)) \ 47 D(NONTAKEN_CONDITIONAL, "non-taken conditional branches", \ [all …]
|
/llvm-project/llvm/test/MC/RISCV/ |
H A D | long-jump-disable-relax.s | 1 ## Test that long branches are not relaxed with -riscv-asm-relax-branches=0 4 # RUN: -riscv-asm-relax-branches=0 %t/pass.s \ 8 # RUN: -riscv-asm-relax-branches=0 %t/fail.s 2>&1 \ 14 ## Branches to undefined symbols should not be relaxed 25 ## Branches to defined in-range symbols should work normally 37 ## Branches to defined out-of-range symbols should report an error
|
/llvm-project/clang-tools-extra/pseudo/lib/ |
H A D | DirectiveTree.cpp |
|
/llvm-project/llvm/test/MC/Hexagon/PacketRules/ |
H A D | endloop_branches.s | 5 # CHECK: 4:1: error: Branches cannot be in a packet with hardware loops 9 # CHECK: 8:1: error: Branches cannot be in a packet with hardware loops 13 # CHECK: 12:1: error: Branches cannot be in a packet with hardware loops 17 # CHECK: 16:1: error: Branches cannot be in a packet with hardware loops
|
/llvm-project/bolt/include/bolt/Profile/ |
H A D | DataReader.h | 82 int64_t Branches; member 84 BranchInfo(Location From, Location To, int64_t Mispreds, int64_t Branches) in BranchInfo() 86 Branches(Branches) {} in BranchInfo() 141 /// Returns the total number of executed branches in this function 142 /// by counting the number of executed branches for each BranchInfo 196 /// instead of branches. 242 /// function, analogous to FuncBranchData but for samples instead of branches. 331 /// <number of mispredictions> <number of branches> 340 /// The example records branches from symbol main, offset 3fb, to DSO ld-2.21, 341 /// offset 12, with 4 mispredictions and 221 branches. [all …]
|
/llvm-project/llvm/lib/Target/SystemZ/ |
H A D | SystemZLongBranch.cpp | 9 // This pass makes sure that all branches are in range. There are several ways 11 // branches are in range and successively replace those that turn out not 14 // branches until no more changes are needed and a fixed point is reached. 20 // An alternative approach is to assume that all branches must be 22 // branches that, even under this pessimistic assumption, turn out to be 34 // On SystemZ, long branches are only needed for functions bigger than 64k, 39 // (1) Work out the address that each block would have if no branches 40 // need relaxing. Exit the pass early if all branches are in range 43 // (2) Work out the address that each block would have if all branches 47 // and relaxing those that need to be relaxed. For backward branches, [all...] |
/llvm-project/llvm/examples/IRTransforms/ |
H A D | SimplifyCFG.cpp | 23 // This simplification replaces conditional branches with constant integer 24 // conditions with unconditional branches. 135 // Eliminate branches with constant conditionals. This is the first version, 140 // Eliminate branches with constant conditionals. in eliminateCondBranches_v1() 142 // Skip blocks without conditional branches as terminators. in eliminateCondBranches_v1() 147 // Skip blocks with conditional branches without ConstantInt conditions. in eliminateCondBranches_v1() 169 // Eliminate branches with constant conditionals. This is the second 176 // Eliminate branches with constant conditionals. in eliminateCondBranches_v2() 178 // Skip blocks without conditional branches as terminators. in eliminateCondBranches_v2() 183 // Skip blocks with conditional branches withou in eliminateCondBranches_v2() [all...] |
/llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc/ |
H A D | PPCFixupKinds.h | 19 // 24-bit PC relative relocation for direct branches like 'b' and 'bl'. 22 // 24-bit PC relative relocation for direct branches like 'b' and 'bl' where 26 /// 14-bit PC relative relocation for conditional branches. 29 /// 24-bit absolute relocation for direct branches like 'ba' and 'bla'. 32 /// 14-bit absolute relocation for conditional branches.
|
/llvm-project/bolt/docs/ |
H A D | OptimizingClang.md | 81 660155947 : executed forward branches (-2.3%) 82 48252553 : taken forward branches (-57.2%) 83 129897961 : executed backward branches (+13.8%) 84 52389551 : taken backward branches (-19.5%) 85 35650038 : executed unconditional branches (-33.2%) 92 20467109 : taken jump table branches (=) 93 825703946 : total branches (-2.1%) 94 136292142 : taken branches (-41.1%) 95 689411804 : non-taken conditional branches (+12.6%) 96 100642104 : taken conditional branches ( [all...] |
/llvm-project/polly/test/ScopDetect/ |
H A D | non-affine-loop.ll | 1 ; RUN: opt %loadNPMPolly -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=false … 2 ; RUN: opt %loadNPMPolly -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true … 3 ; RUN: opt %loadNPMPolly -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=false -polly-… 4 ; RUN: opt %loadNPMPolly -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -polly-… 5 ; RUN: opt %loadNPMPolly -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -polly-…
|
/llvm-project/llvm/test/CodeGen/Mips/compactbranches/ |
H A D | compact-branch-policy.ll | 1 ; Check that -mips-compact-branches={never,optimal,always} is accepted and honoured. 2 ; RUN: llc -mtriple=mips -mcpu=mips32r6 -mips-compact-branches=never < %s | FileCheck %s -check-prefix=NEVER 3 ; RUN: llc -mtriple=mips -mcpu=mips32r6 -mips-compact-branches=optimal < %s | FileCheck %s -check-prefix=OPTIMAL 4 ; RUN: llc -mtriple=mips -mcpu=mips32r6 -mips-compact-branches=always < %s | FileCheck %s -check-prefix=ALWAYS
|
/llvm-project/llvm/lib/Target/ARC/ |
H A D | ARCBranchFinalize.cpp | 1 //===- ARCBranchFinalize.cpp - ARC conditional branches ---------*- C++ -*-===// 9 // This pass takes existing conditional branches and expands them into longer 10 // range conditional branches. 63 "ARC finalize branches", false, false) 66 "ARC finalize branches", false, false) in INITIALIZE_PASS_DEPENDENCY() 146 std::vector<MachineInstr *> Branches; in runOnMachineFunction() local 164 Branches.push_back(&MI); in runOnMachineFunction()
|
/llvm-project/bolt/lib/Profile/ |
H A D | DataReader.cpp | 99 int64_t BranchCount = BI.Branches; in getNumExecutedBranches() 152 BI.Branches += Count; in bumpBranchCount() 165 BI.Branches += Count; in bumpCallCount() 179 BI.Branches += Count; in bumpEntryCount() 184 Branches += BI.Branches; in mergeWith() 191 << " " << Twine::utohexstr(To.Offset) << " " << Mispreds << " " << Branches in print() 371 // There is a slight skew introduced here as branches originated from RETs in readProfile() 381 BB->setExecutionCount(Count + BI.Branches); in readProfile() 389 if (!recordBranch(BF, BI.From.Offset, BI.To.Offset, BI.Branches, in readProfile() 504 // a valid profile. It could happen to a function without branches when we in evaluateProfileData() [all …]
|
/llvm-project/llvm/test/MC/ARM/ |
H A D | thumb2-branches.s | 4 @ unconditional branches accept narrow suffix and encode to short encodings 14 @ unconditional branches accept wide suffix and encode to wide encodings 28 @ unconditional branches without width suffix encode depending of offset size 46 @ unconditional branches with width narrow suffix in IT block 60 @ unconditional branches with wide suffix in IT block 82 @ conditional branches accept narrow suffix and encode to short encodings 92 @ unconditional branches accept wide suffix and encode to wide encodings 112 @ unconditional branches without width suffix encode depending of offset size 153 @ unconditional branches accept narrow suffix and encode to short encodings 163 @ unconditional branches accept wide suffix and encode to wide encodings [all …]
|
/llvm-project/llvm/test/tools/llvm-cov/ |
H A D | branch-templates.cpp |
|
/llvm-project/llvm/test/tools/llvm-cov/Inputs/ |
H A D | binary-formats.canonical.json | 5 CHECK-SAME: {"branches":[], 12 CHECK-SAME: "summary":{"branches":{"count":0,"covered":0,"notcovered":0,"percent":0}, 20 CHECK-SAME: {"branches":[], 28 CHECK-SAME: {"branches":{"count":0,"covered":0,"notcovered":0,"percent":0},
|
/llvm-project/llvm/test/CodeGen/Mips/ |
H A D | reloc-jalr.ll | 10 ; RUN: -O2 -mcpu=mips32r6 -mips-compact-branches=always < %s | \ 14 ; RUN: -O2 -mcpu=mips64r6 -mips-compact-branches=always < %s | \ 18 ; RUN: -O2 -mcpu=mips32r6 -mips-compact-branches=never < %s | \ 22 ; RUN: -O2 -mcpu=mips64r6 -mips-compact-branches=never < %s | \ 40 ; RUN: -O0 -mcpu=mips32r6 -mips-compact-branches=always < %s | \ 44 ; RUN: -O0 -mcpu=mips64r6 -mips-compact-branches=always < %s | \ 48 ; RUN: -O0 -mcpu=mips32r6 -mips-compact-branches=never < %s | \ 52 ; RUN: -O0 -mcpu=mips64r6 -mips-compact-branches=never < %s | \
|