[PATCH] D99812: [PowerPC] [GlobalISel] Implementation of formal arguments lowering in the IRTranslator for the PPC backend

Kit Barton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 14:09:14 PDT 2021


kbarton added a comment.

Thank you for working on this!

I think this looks good. I have one minor comment to remove the TODO you added. There's also a couple outstanding comments from @nemanjai and @arsenm that need to be addressed.



================
Comment at: llvm/lib/Target/PowerPC/GISel/PPCCallLowering.cpp:150
+
+  // TODO get the bitwidth (second argument) from TargetMachine or machine info
+  auto AddrReg = MIRBuilder.buildFrameIndex(LLT::pointer(0, 64), FI);
----------------
I think you should be able to get the size with:

```
MIRBuilder.getMF().getTarget().getPointerSizeInBits()
```

I would prefer if you would do this now, instead of a TODO to fix later. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99812



More information about the llvm-commits mailing list