[PATCH] D92953: [GlobalISel] Base implementation for sret demotion.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 15:12:19 PST 2020


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CallLowering.cpp:578-587
+  for (EVT VT : SplitVTs) {
+    unsigned NumParts =
+        TLI->getNumRegistersForCallingConv(Context, CallConv, VT);
+    MVT RegVT = TLI->getRegisterTypeForCallingConv(Context, CallConv, VT);
+    Type *PartTy = EVT(RegVT).getTypeForEVT(Context);
+
+    for (unsigned I = 0; I < NumParts; ++I) {
----------------
I think something is off here because this shouldn't depend on the NumRegistersForCallingConv code


================
Comment at: llvm/tools/llvm-exegesis/lib/Assembler.cpp:124-138
 void BasicBlockFiller::addReturn(const DebugLoc &DL) {
   // Insert the return code.
   const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo();
   if (TII->getReturnOpcode() < TII->getNumOpcodes()) {
     BuildMI(MBB, DL, TII->get(TII->getReturnOpcode()));
   } else {
     MachineIRBuilder MIB(MF);
----------------
I'm surprised this is here


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92953



More information about the llvm-commits mailing list