Skip to content

Commit b77e402

Browse files
authored
[llvm][NFC] Fix typos: replace “avaliable” with “available” across various files (#114524)
This pull request corrects multiple occurrences of the typo "avaliable" to "available" across the LLVM and Clang codebase. These changes improve the clarity and accuracy of comments and documentation. Specific modifications are in the following files: 1. clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp: Updated comments in readability checks for cognitive complexity. 2. llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h: Corrected documentation for JITDylib responsibilities. 3. llvm/include/llvm/Target/TargetMacroFusion.td: Fixed descriptions for FusionPredicate variables. 4. llvm/lib/CodeGen/SafeStack.cpp: Improved comments on DominatorTree availability. 5. llvm/lib/Target/RISCV/RISCVSchedSiFive7.td: Enhanced resource usage descriptions for vector units. 6. llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp: Updated invariant description in shift-detect idiom logic. 7. llvm/test/MC/ARM/mve-fp-registers.s: Amended ARM MVE register availability notes. 8. mlir/lib/Bytecode/Reader/BytecodeReader.cpp: Adjusted forward reference descriptions for bytecode reader operations. These changes have no impact on code functionality, focusing solely on documentation clarity. Co-authored-by: wangqiang <[email protected]>
1 parent 8951b51 commit b77e402

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ struct CognitiveComplexity final {
126126
// Limit of 25 is the "upstream"'s default.
127127
static constexpr unsigned DefaultLimit = 25U;
128128

129-
// Based on the publicly-avaliable numbers for some big open-source projects
129+
// Based on the publicly-available numbers for some big open-source projects
130130
// https://sonarcloud.io/projects?languages=c%2Ccpp&size=5 we can estimate:
131131
// value ~20 would result in no allocs for 98% of functions, ~12 for 96%, ~10
132132
// for 91%, ~8 for 88%, ~6 for 84%, ~4 for 77%, ~2 for 64%, and ~1 for 37%.

clang-tools-extra/test/clang-tidy/checkers/readability/function-cognitive-complexity.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ void unittest_false() {
6969
//----------------------------------------------------------------------------//
7070

7171
// break does not increase cognitive complexity.
72-
// only break LABEL does, but it is unavaliable in C or C++
72+
// only break LABEL does, but it is unavailable in C or C++
7373

7474
// continue does not increase cognitive complexity.
75-
// only continue LABEL does, but it is unavaliable in C or C++
75+
// only continue LABEL does, but it is unavailable in C or C++
7676

7777
void unittest_b1_00() {
7878
// CHECK-NOTES: :[[@LINE-1]]:6: warning: function 'unittest_b1_00' has cognitive complexity of 33 (threshold 0) [readability-function-cognitive-complexity]

llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class StaticLibraryDefinitionGenerator : public DefinitionGenerator {
315315

316316
/// Returns a list of filenames of dynamic libraries that this archive has
317317
/// imported. This class does not load these libraries by itself. User is
318-
/// responsible for making sure these libraries are avaliable to the JITDylib.
318+
/// responsible for making sure these libraries are available to the JITDylib.
319319
const std::set<std::string> &getImportedDynamicLibraries() const {
320320
return ImportedDynamicLibraries;
321321
}

llvm/include/llvm/Target/TargetMacroFusion.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def first_fusion_target : FusionTarget;
1414
def second_fusion_target : FusionTarget;
1515
def both_fusion_target : FusionTarget;
1616

17-
// Base class of FusionPredicate, etc. The avaliable variables are:
17+
// Base class of FusionPredicate, etc. The available variables are:
1818
// * const TargetInstrInfo &TII
1919
// * const TargetSubtargetInfo &STI
2020
// * const MachineRegisterInfo &MRI

llvm/lib/CodeGen/SafeStack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ class SafeStackLegacyPass : public FunctionPass {
898898
bool ShouldPreserveDominatorTree;
899899
std::optional<DominatorTree> LazilyComputedDomTree;
900900

901-
// Do we already have a DominatorTree avaliable from the previous pass?
901+
// Do we already have a DominatorTree available from the previous pass?
902902
// Note that we should *NOT* require it, to avoid the case where we end up
903903
// not needing it, but the legacy PM would have computed it for us anyways.
904904
if (auto *DTWP = getAnalysisIfAvailable<DominatorTreeWrapperPass>()) {

llvm/lib/Target/RISCV/RISCVSchedSiFive7.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def SiFive7VS : ProcResource<1>; // Store sequencer
223223
// The VCQ accepts instructions from the the A Pipe and holds them until the
224224
// vector unit is ready to dequeue them. The unit dequeues up to one instruction
225225
// per cycle, in order, as soon as the sequencer for that type of instruction is
226-
// avaliable. This resource is meant to be used for 1 cycle by all vector
226+
// available. This resource is meant to be used for 1 cycle by all vector
227227
// instructions, to model that only one vector instruction may be dequed at a
228228
// time. The actual dequeueing into the sequencer is modeled by the VA, VL, and
229229
// VS sequencer resources below. Each of them will only accept a single

llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2490,7 +2490,7 @@ static bool detectShiftUntilBitTestIdiom(Loop *CurLoop, Value *&BaseX,
24902490
dyn_cast<Instruction>(CurrXPN->getIncomingValueForBlock(LoopHeaderBB));
24912491

24922492
assert(CurLoop->isLoopInvariant(BaseX) &&
2493-
"Expected BaseX to be avaliable in the preheader!");
2493+
"Expected BaseX to be available in the preheader!");
24942494

24952495
if (!NextX || !match(NextX, m_Shl(m_Specific(CurrX), m_One()))) {
24962496
// FIXME: support right-shift?

llvm/test/MC/ARM/mve-fp-registers.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Some simple operations on S, D and Q registers (loads, stores and moves) are
2-
// also avaliable in MVE, even in the integer-only version. Some of these
2+
// also available in MVE, even in the integer-only version. Some of these
33
// instructions (operating on D or Q registers, or FP16 values) are only
44
// available for certain targets.
55

mlir/lib/Bytecode/Reader/BytecodeReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2510,7 +2510,7 @@ LogicalResult BytecodeReader::Impl::defineValues(EncodingReader &reader,
25102510
}
25112511

25122512
Value BytecodeReader::Impl::createForwardRef() {
2513-
// Check for an avaliable existing operation to use. Otherwise, create a new
2513+
// Check for an available existing operation to use. Otherwise, create a new
25142514
// fake operation to use for the reference.
25152515
if (!openForwardRefOps.empty()) {
25162516
Operation *op = &openForwardRefOps.back();

0 commit comments

Comments
 (0)