[PATCH] D103651: [AIX][XCOFF] generate eh_info when vector registers are saved according to the traceback table.

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 17 11:39:16 PDT 2021


jasonliu added inline comments.


================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:2198
+  // The EH Info Table, aka, 'compat unwind section' on AIX, have the following
+  // format: struct eh_info_t {
+  //   unsigned version;           /* EH info verion 0 */
----------------
nit:


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1912
 
+uint16_t PPCAIXAsmPrinter::getNumberOfVRSaved() {
+  // Calculate the number of VRs be saved.
----------------
I'm thinking if it's better to move this calculation into SetupMachineFunction.
And have a private data member (i.e. CurrentFnVRSavedNum) to record the result, so that we don't need to calculate it multiply times below.


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1935
+
+  if (!TargetLoweringObjectFileXCOFF::ShouldEmitEHBlock(MF) &&
+      (getNumberOfVRSaved() > 0))
----------------
A comment above to explain why we want to emit exception info table in this condition would be useful. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103651



More information about the llvm-commits mailing list