[PATCH] D27050: [X86] Add explicit regparm flag for X86-32 calling convention.
Michael Kuperstein via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 09:59:15 PST 2016
mkuper added a comment.
IIRC, The MCU ABI has at least one other difference from -mregparm=3:
MCU will continue passing parameters in-register even if an earlier parameter ends up on the stack, as long as free registers are available. -mregparm will bail once a parameter doesn't fit in a register. So, for something like foo(int a, int b, long long c, int d), MCU will pass {a, b, c} inreg, and mregparm will only do it for {a,b}.
(Interestingly enough, it looks like GCC gets this wrong, and has the -mregparm behavior for -miamcu... :-\ )
================
Comment at: include/llvm/CodeGen/CommandFlags.h:48
+cl::opt<unsigned> RegParm(
+ "regparm", cl::desc("set number of register parameters (X86 only)"),
----------------
I really don't think we should have this (except, possibly, for debugging, in which case it probably needs to be hidden).
As I mentioned on D27051, the information should be contained in the IR.
https://reviews.llvm.org/D27050
More information about the llvm-commits
mailing list