[PATCH] D26593: [X86][GlobalISel] Add minimal call lowering support to the IRTranslator

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 04:47:44 PST 2016


dberris added inline comments.


================
Comment at: lib/Target/X86/X86CallLowering.h:32-33
+
+  bool lowerReturn(MachineIRBuilder &MIRBuiler, const Value *Val,
+                   unsigned VReg) const override;
+
----------------
zvi wrote:
> dberris wrote:
> > I may be missing something obvious, but why does call lowering need to lower a return? I would have thought return-lowering might happen in function lowering.
> The CallLowering interface is a target-hook for lowering both caller and calee -related constructs. This patch only implements the callee part. The caller-part (i.e. lowering call sites) will be added in the future.
I think I'm still missing something but maybe this is because of my confusion in naming -- this class is named `X86CallLowering` but it's implementing the lowering of the return instruction and the formal arguments.

Wouldn't the function-lowering specific ("callee-side") code be better in a class named more appropriately specifically for function-lowering? Because I might expect to see that code alongside stack adjustment and prologue/epilogue lowering of a function rather than for lowering "calls".

Does that make sense?


Repository:
  rL LLVM

https://reviews.llvm.org/D26593





More information about the llvm-commits mailing list