[llvm] 0c2e900 - [SystemZ] Fix variable names to reflect Coding Standards (#161899)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 9 05:29:53 PDT 2025
Author: dvldogg13
Date: 2025-10-09T14:29:49+02:00
New Revision: 0c2e900074a4a412afdbee5e56b1a513ea97b90f
URL: https://github.com/llvm/llvm-project/commit/0c2e900074a4a412afdbee5e56b1a513ea97b90f
DIFF: https://github.com/llvm/llvm-project/commit/0c2e900074a4a412afdbee5e56b1a513ea97b90f.diff
LOG: [SystemZ] Fix variable names to reflect Coding Standards (#161899)
Reflecting the [Coding
Standards](https://llvm.org/docs/CodingStandards.html), the following
changes were made to reflect this guideline.
```
Variable names should be nouns (as they represent state). The name should be camel case, and start with an upper-case letter (e.g. Leader or Boats).
```
The first letter in the variable names are changed to upper-case and
reflect being camel case.
Added:
Modified:
llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinterCommon.cpp
llvm/lib/Target/SystemZ/SystemZConstantPoolValue.cpp
llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinterCommon.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinterCommon.cpp
index af79070db7b96..275165d2acb07 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinterCommon.cpp
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinterCommon.cpp
@@ -184,8 +184,8 @@ void SystemZInstPrinterCommon::printPCRelTLSOperand(const MCInst *MI,
// Output the TLS marker if present.
if ((unsigned)OpNum + 1 < MI->getNumOperands()) {
const MCOperand &MO = MI->getOperand(OpNum + 1);
- const MCSymbolRefExpr &refExp = cast<MCSymbolRefExpr>(*MO.getExpr());
- switch (refExp.getSpecifier()) {
+ const MCSymbolRefExpr &RefExp = cast<MCSymbolRefExpr>(*MO.getExpr());
+ switch (RefExp.getSpecifier()) {
case SystemZ::S_TLSGD:
O << ":tls_gdcall:";
break;
@@ -195,7 +195,7 @@ void SystemZInstPrinterCommon::printPCRelTLSOperand(const MCInst *MI,
default:
llvm_unreachable("Unexpected symbol kind");
}
- O << refExp.getSymbol().getName();
+ O << RefExp.getSymbol().getName();
}
}
diff --git a/llvm/lib/Target/SystemZ/SystemZConstantPoolValue.cpp b/llvm/lib/Target/SystemZ/SystemZConstantPoolValue.cpp
index fce6393969a2d..8c31579b4f799 100644
--- a/llvm/lib/Target/SystemZ/SystemZConstantPoolValue.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZConstantPoolValue.cpp
@@ -13,10 +13,9 @@
using namespace llvm;
-SystemZConstantPoolValue::
-SystemZConstantPoolValue(const GlobalValue *gv,
- SystemZCP::SystemZCPModifier modifier)
- : MachineConstantPoolValue(gv->getType()), GV(gv), Modifier(modifier) {}
+SystemZConstantPoolValue::SystemZConstantPoolValue(
+ const GlobalValue *GV, SystemZCP::SystemZCPModifier Modifier)
+ : MachineConstantPoolValue(GV->getType()), GV(GV), Modifier(Modifier) {}
SystemZConstantPoolValue *
SystemZConstantPoolValue::Create(const GlobalValue *GV,
diff --git a/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp b/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp
index 34d58e05ff3e4..5313fba3bed1d 100644
--- a/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp
@@ -352,10 +352,9 @@ int SystemZHazardRecognizer::groupingCost(SUnit *SU) const {
// Similarly, a group-ending SU may either fit well (last in group), or
// end the group prematurely.
if (SC->EndGroup) {
- unsigned resultingGroupSize =
- (CurrGroupSize + getNumDecoderSlots(SU));
- if (resultingGroupSize < 3)
- return (3 - resultingGroupSize);
+ unsigned ResultingGroupSize = (CurrGroupSize + getNumDecoderSlots(SU));
+ if (ResultingGroupSize < 3)
+ return (3 - ResultingGroupSize);
return -1;
}
More information about the llvm-commits
mailing list