[PATCH] D69808: [RISCV GlobalISel] Add lowerReturn for calling conv.

weiwei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 18 09:03:36 PST 2019


wwei marked an inline comment as done.
wwei added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVCallLowering.cpp:72
 
   if (Val != nullptr) {
+    // TODO: Only integer, pointer and aggregate types are supported now.
----------------
lewis-revill wrote:
> I don't know whether other people prefer this as well, but I'd prefer the condition here to be reversed and simply duplicate the 
> 
> ```
> MIRBuilder.insertInstr(Ret);
> return true;
> ```
> 
> IE:
> 
> ```
> if (Val == nullptr) {
>   MIRBuilder.insertInstr(Ret);
>   return true;
> }
> 
> // ...
> 
> MIRBuilder.insertInstr(Ret);
> return true;
> ```
To make the code look clearer and simpler, I will encapsulate a function to handle this condition.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D69808





More information about the llvm-commits mailing list