[llvm] Fix some typos in machine verifier comments and trace output (PR #160049)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 22 01:21:26 PDT 2025
https://github.com/danstadelmann created https://github.com/llvm/llvm-project/pull/160049
Stumbled across a typo in the `MachineVerifier` file and since I had it open, I changed some other comments.
Not important but why not leave it a bit cleaner :slightly_smiling_face:
It's basically part of the CodeGen Directory and therefore maybe something for @rnk but since it does not change any functionality I guess any maintainer could approve it.
>From 901a9b3bfb34895a6c80799c874b3d28b447f3a4 Mon Sep 17 00:00:00 2001
From: Daniel Stadelmann <dstadelmann at thermoplan.ch>
Date: Mon, 22 Sep 2025 10:12:32 +0200
Subject: [PATCH] Fix some typos in machine verifier comments and trace output
Signed-off-by: Daniel Stadelmann <dasta_7 at hotmail.com>
---
llvm/lib/CodeGen/MachineVerifier.cpp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index e911ce8a75828..70f0c711d5f6f 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -1549,7 +1549,7 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
report("G_BUILD_VECTOR result element type must match source type", MI);
if (DstTy.getNumElements() != MI->getNumOperands() - 1)
- report("G_BUILD_VECTOR must have an operand for each elemement", MI);
+ report("G_BUILD_VECTOR must have an operand for each element", MI);
for (const MachineOperand &MO : llvm::drop_begin(MI->operands(), 2))
if (MRI->getType(MI->getOperand(1).getReg()) != MRI->getType(MO.getReg()))
@@ -2398,7 +2398,7 @@ void MachineVerifier::visitMachineInstrBefore(const MachineInstr *MI) {
// The next two checks allow COPY between physical and virtual registers,
// when the virtual register has a scalable size and the physical register
- // has a fixed size. These checks allow COPY between *potentialy* mismatched
+ // has a fixed size. These checks allow COPY between *potentially* mismatched
// sizes. However, once RegisterBankSelection occurs, MachineVerifier should
// be able to resolve a fixed size for the scalable vector, and at that
// point this function will know for sure whether the sizes are mismatched
@@ -3213,13 +3213,13 @@ struct VRegFilter {
private:
static constexpr unsigned SparseUniverseMax = 10 * 1024 * 8;
- // VRegs indexed within SparseUniverseMax are tracked by Sparse, those beyound
- // are tracked by Dense. The only purpose of the threashold and the Dense set
+ // VRegs indexed within SparseUniverseMax are tracked by Sparse, those beyond
+ // are tracked by Dense. The only purpose of the threshold and the Dense set
// is to have a reasonably growing memory usage in pathological cases (large
// number of very sparse VRegFilter instances live at the same time). In
// practice even in the worst-by-execution time cases having all elements
// tracked by Sparse (very large SparseUniverseMax scenario) tends to be more
- // space efficient than if tracked by Dense. The threashold is set to keep the
+ // space efficient than if tracked by Dense. The threshold is set to keep the
// worst-case memory usage within 2x of figures determined empirically for
// "all Dense" scenario in such worst-by-execution-time cases.
BitVector Sparse;
@@ -3459,7 +3459,7 @@ void MachineVerifier::visitMachineFunctionAfter() {
// Check live-in list of each MBB. If a register is live into MBB, check
// that the register is in regsLiveOut of each predecessor block. Since
- // this must come from a definition in the predecesssor or its live-in
+ // this must come from a definition in the predecessor or its live-in
// list, this will catch a live-through case where the predecessor does not
// have the register in its live-in list. This currently only checks
// registers that have no aliases, are not allocatable and are not
More information about the llvm-commits
mailing list