[PATCH] [mips] Mark aggregates returned in registers with the 'inreg' attribute.

Daniel Sanders daniel.sanders at imgtec.com
Thu Sep 4 06:46:59 PDT 2014


Thanks

================
Comment at: lib/CodeGen/TargetInfo.cpp:5535
@@ -5534,2 +5534,3 @@
 
       // O32 returns integer vectors in registers.
+      if (IsO32 && RetTy->isVectorType() &&
----------------
atanasyan wrote:
> Does it have a sense to join two `if` conditions below into the single one?
> 
> ```
> if (!IsO32 || (RetTy->isVectorType() && !RetTy->hasFloatingRepresentation())) {
>   ABIArgInfo ArgInfo = ABIArgInfo::getDirect(returnAggregateInRegs(RetTy, Size));
>   ArgInfo.setInReg(true);
>   return ArgInfo;
> }
> ```
Yes, with an extra comment mentioning the N32/N64. It looked a bit misleading merging the if-statements while only mentioning the O32 case in the comment.

I'll make this change before committing.

http://reviews.llvm.org/D5005






More information about the llvm-commits mailing list