[PATCH] D93659: [AIX][XCOFF] emit vector info of traceback table.

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 10 11:31:52 PDT 2021


jasonliu added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:125
 
-  /// FixedParamNum - Number of fixed parameter.
-  unsigned FixedParamNum = 0;
+  /// FixedParmsNum - The number of fixed parameters
+  unsigned FixedParmsNum = 0;
----------------



================
Comment at: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:128
 
-  /// FloatingParamNum - Number of floating point parameter.
-  unsigned FloatingPointParamNum = 0;
+  /// FloatingParmsNum - The number of floating parameters
+  unsigned FloatingParmsNum = 0;
----------------



================
Comment at: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:131
 
-  /// ParamType - Encode type for every parameter
-  /// in the order of parameters passing in.
-  /// Bitstring starts from the most significant (leftmost) bit.
-  /// '0'b => fixed parameter.
-  /// '10'b => floating point short parameter.
-  /// '11'b => floating point long parameter.
-  uint32_t ParameterType = 0;
+  /// VectorParmsNum - The number of vector parameters
+  unsigned VectorParmsNum = 0;
----------------



================
Comment at: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:135
+  /// ParamTypes - Store all the paramters type.
+  SmallVector<ParamType, 32> ParamtersType;
 
----------------
DiggerLin wrote:
> jasonliu wrote:
> > DiggerLin wrote:
> > > DiggerLin wrote:
> > > > jasonliu wrote:
> > > > > Does this store the parameter types when the parameter is on stack? Right now, it doesn't look like so. And this sounds like we are trying to store all paramters including the one on stack.
> > > > > Could we add a test case for testing parameters on stack?
> > > > we do not store the  parameter types when the parameter is on stack.
> > > in the llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable.ll , there are some parameter are stored on stack.
> > Consider this test case: 
> > ```
> > int foo(int a, int b, int c, float d, int e, int f, int g, int h, int i,  float j, int k) {
> >   return k;
> > }
> > ```
> > The print out I get is: 
> > ```
> > .vbyte  4, 0x10400000                   # Parameter type = i, i, i, f, i, i, i, i, f
> > ```
> > However, I'm expecting this if it supports parameter saved on stack correctly:
> >  # Parameter type = i, i, i, f, i, i, i, i, **i, ** f, **i**
> > 
> > Notice the two `i` are missing around the last `f`.
> we only care about the parameter which are passed in register for Parameter type.
> there are only 8 GPR for parameter saved.  i, i, i, f(occupied on a FPR and burned a GPR), i, i, i, i, already 8 GPR. 
Could you modify the above comment: `/// ParamTypes - Store all the paramters type.`
to be `/// ParamtersType - Store all the parameter's type that are saved on registers.`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93659/new/

https://reviews.llvm.org/D93659



More information about the llvm-commits mailing list