[llvm] [NFC][PowerPC] Add getScalarIntVT to return MVT based on arch (PR #115203)

Lei Huang via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 07:15:26 PST 2024


================
@@ -5252,14 +5242,14 @@ static SDValue EmitTailCallStoreFPAndRetAddr(SelectionDAG &DAG, SDValue Chain,
 
 /// CalculateTailCallArgDest - Remember Argument for later processing. Calculate
 /// the position of the argument.
-static void
-CalculateTailCallArgDest(SelectionDAG &DAG, MachineFunction &MF, bool isPPC64,
-                         SDValue Arg, int SPDiff, unsigned ArgOffset,
-                     SmallVectorImpl<TailCallArgumentInfo>& TailCallArguments) {
+static void CalculateTailCallArgDest(
+    SelectionDAG &DAG, MachineFunction &MF, bool IsPPC64, SDValue Arg,
+    int SPDiff, unsigned ArgOffset,
+    SmallVectorImpl<TailCallArgumentInfo> &TailCallArguments) {
   int Offset = ArgOffset + SPDiff;
   uint32_t OpSize = (Arg.getValueSizeInBits() + 7) / 8;
   int FI = MF.getFrameInfo().CreateFixedObject(OpSize, Offset, true);
-  EVT VT = isPPC64 ? MVT::i64 : MVT::i32;
+  EVT VT = IsPPC64 ? MVT::i64 : MVT::i32;
----------------
lei137 wrote:

It is cause this is a static function that doesn't have access to `Subtarget`.  This function is also called from another static function that has no access to `Subtarget` and uses `isPPC64` in a different way.  I didn't think this patch should include trying to fix those dependencies.  I updated the var since it didn't follow the variable name guideline where variables should start with a capital.

https://github.com/llvm/llvm-project/pull/115203


More information about the llvm-commits mailing list