[PATCH] D98118: GlobalISel: Partially fix handling of byval arguments

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 8 13:17:52 PST 2021


paquette added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CallLowering.cpp:632
+
+      if (VA.isMemLoc() && !Flags.isByVal()) {
         // Individual pieces may have been spilled to the stack and others
----------------
Only check `VA.isMemLoc` once?

```
if (VA.isMemLoc()) {
  if (!Flags.isByVal()) {
    ...
    continue;
  }
  ...
  continue;
}
```


================
Comment at: llvm/lib/CodeGen/GlobalISel/CallLowering.cpp:659
+               "didn't expect split byval pointer");
+        if (Handler.isIncomingArgumentHandler())
+          MIRBuilder.buildCopy(Args[i].Regs[0], StackAddr);
----------------
I don't think this check is necessary yet. Maybe better as an assert for now?


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

https://reviews.llvm.org/D98118



More information about the llvm-commits mailing list