emit vector info of traceback table.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/BinaryFormat/XCOFF.cpp | ||
---|---|---|
142 | Something is wrong if Value != 0u, but I think it's normal when we have more parameters than the uint32 type could encode. And in those situation, as Hubert suggested, we could print ... to represent any values that we could not decode. Please have a test case for this case as well. | |
llvm/lib/Object/XCOFFObjectFile.cpp | ||
852 | This Error as an parameter in the constructor is too easy to get ignored. If we need to do this, we would do the whole set which includes making this constructor private, and have a Create function to return an error or the object, which is described here: https://llvm.org/docs/ProgrammersManual.html#fallible-constructors | |
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
2043 | This .get() won't work if you are compiling in a non-assert mode. | |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp | ||
70 | Please fix all clang-tidy warnings. | |
70 | Instead of traversing this array for 3 times (getFixedParmsNum, getFloatingPointParmsNum, getVectorParmsNum), why not just still increment the corresponding data member in appendParameterType()? | |
107 | You could pull this out of the every case, and put it just before the switch statement. As you are doing it for every case. | |
110 | You could pull this out of the every case, and put it just after the switch statement. As you are doing it for every case. | |
131 | An assert here would be good. |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp | ||
---|---|---|
70 | I think we only use here for getFloatingPointParmsNum, getVectorParmsNum once. | |
107 | it can not pull out, for there are other parameter type (for example FixedType), we do not need deal with in the function. | |
131 | I can not add assert here for there are other parameter type (for example FixedType). |
llvm/lib/BinaryFormat/XCOFF.cpp | ||
---|---|---|
225–226 | minor style nit. | |
251 | default assert here? | |
llvm/lib/Object/XCOFFObjectFile.cpp | ||
915–917 | ||
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
1959 | Only checking error in assert won't work in non-assertion build. | |
2006 | I think we are only supposed to set this bit when the special register VRSAVE is saved on stack. | |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp | ||
70 | It's possible these functions got called later for other purposes and we don't know. | |
100 |
llvm/include/llvm/Object/XCOFFObjectFile.h | ||
---|---|---|
399 | Let's remove this "friend" so that no one could call the constructor directly. | |
llvm/lib/Object/XCOFFObjectFile.cpp | ||
953 | I thought we only need to do this ErrorAsOutParameter once at the beginning of the function. Why do we need to do it 3 times at here and 981 and 992? | |
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
2019 | There is also a VSCR register, do we need to check that? Or are we inferring checking V0 to V31 would be enough to find out if any vmx instruction is used? If so, a comment would be desired. | |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp | ||
94 | What if we don't have parameters that are vectors, but we use vectors inside of the function? I thought we should set HasVectorInfo in those situation as well. | |
191 | Address the Lint comment. | |
llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable-vectorinfo.ll | ||
57 | Is it possible to have tests for these fields? |
llvm/include/llvm/Object/XCOFFObjectFile.h | ||
---|---|---|
399 | thanks | |
llvm/lib/BinaryFormat/XCOFF.cpp | ||
251 | there 4 cases for 2 bits, I do not think we need default here. | |
llvm/lib/Object/XCOFFObjectFile.cpp | ||
915–917 | thanks | |
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
1959 | thanks | |
2006 | Hubert point out that XL sets the bit (at least when there are other vector registers saved) , maybe we need double confirm with hubert @hubert.reinterpretcast | |
2019 | I do not think we need to check the VSCR. for "Special instructions | |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp | ||
94 | thanks for point out. | |
llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable-vectorinfo.ll | ||
57 | I can not add a test case for it. There is error as " error in backend: variadic arguments for vector types are unimplemented for AIX" |
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
2006 | You're both right. XL sets the bit (I don't think it was supposed to). The funny thing is that setting the bit prevents a possible misinterpretation of the traceback table by the XL C++ runtime because of a confluence of errors. |
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
1870 | I have concerns about writing our own version of this function. | |
2005 | ||
llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable-vectorinfo.ll | ||
57 | Sure. I saw you add a test case to test the error for HasVarArgs, which is good. | |
llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable-vectorinfo_hasvarg.ll | ||
5 ↗ | (On Diff #315854) | I don't think we want to use include in the lit test. You could write the declaration yourself. And you probably don't even need to call vec_abs if you just want to check if HasVarArgs bit is set? |
llvm/include/llvm/CodeGen/MachineRegisterInfo.h | ||
---|---|---|
857 ↗ | (On Diff #349315) | If this is necessary, could we add a test case for it? Right now, even setting the third parameter to always be false, I don't see any lit failing. |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h | ||
123 | Do you need to store this info? |
llvm/include/llvm/CodeGen/MachineRegisterInfo.h | ||
---|---|---|
857 ↗ | (On Diff #349315) | I do not think we need to new test case , if (UsedPhysRegMask.test(PhysReg)) return true; ---> if (!SkipTestUsedPhysRegMask && UsedPhysRegMask.test(PhysReg)) return true; and the the default value of SkipTestUsedPhysRegMask is false, it means , all the behaviors not change. the behaviors only changes when SkipTestUsedPhysRegMask =true; and we have invoked |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h | ||
123 | yes, I can delete the variable . |
llvm/include/llvm/CodeGen/MachineRegisterInfo.h | ||
---|---|---|
861–862 ↗ | (On Diff #349639) | Please change accordingly for the isPhysRegModified above as well. |
857 ↗ | (On Diff #349315) | Discussed offline, we need to add a test if the extra parameter is needed. |
llvm/lib/BinaryFormat/XCOFF.cpp | ||
146–147 | nit | |
151 | Nit: Remove else. | |
265 | nit: Remove else | |
llvm/lib/CodeGen/MachineRegisterInfo.cpp | ||
587 ↗ | (On Diff #349639) | I think this parameter name is too verbose. Suggest: |
llvm/lib/Object/XCOFFObjectFile.cpp | ||
961 | nit | |
975 | Is llvm-objdump capable of decoding the traceback table? Do we want to have a test case using llvm-objdump? Or are we thinking to put it on another patch? | |
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
1889 | Could we add a comment saying that we would only treat instructions uses vector register as vector instructions? | |
1889 | For the places that we use raw boolean value, could we have a comment beside to state what that value is for? | |
2028–2033 | ||
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp | ||
149 | Could we use a switch statement here instead instead of ifs? Also report_fatal_error if the Type is something we don't know. |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp | ||
---|---|---|
205–208 | Could we combine the above two if statement? |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h | ||
---|---|---|
129 | 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. |
llvm/lib/Object/XCOFFObjectFile.cpp | ||
---|---|---|
975 | we have patch which can decode traceback table of object file. https://reviews.llvm.org/D89049 | |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp | ||
205–208 | can not combine it, for Elt == FixedType && !hasVectorParms() , it only need one bit, so when Bits ==31, we can still put one bit of FixedType which do not have hasVectorParms(). | |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h | ||
129 | we do not store the parameter types when the parameter is on stack. |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h | ||
---|---|---|
129 | in the llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable.ll , there are some parameter are stored on stack. |
llvm/include/llvm/CodeGen/MachineRegisterInfo.h | ||
---|---|---|
860 ↗ | (On Diff #350672) | |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h | ||
129 | 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:
Notice the two i are missing around the last f. | |
llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable-vectorinfo.ll | ||
105 | Could we add a comment here for this padding as well? |
llvm/include/llvm/CodeGen/MachineRegisterInfo.h | ||
---|---|---|
860 ↗ | (On Diff #350672) | thanks |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h | ||
129 | we only care about the parameter which are passed in register for Parameter type. |
llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable-vectorinfo.ll | ||
---|---|---|
105 | thanks |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp | ||
---|---|---|
205–208 | So what would not work for the suggestions I made? |
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp | ||
---|---|---|
205–208 | change as suggestion, thanks |
Let's remove this "friend" so that no one could call the constructor directly.