[llvm-commits] [patch] Support "inreg sret"
Anton Korobeynikov
anton at korobeynikov.info
Wed Jul 25 01:00:41 PDT 2012
> Testing with clang/utils/ABITest found another issue: The callee would
> still pop 4 bytes of the stack for the struct pointer (and the caller
> compensate for that). With the attached patch that is disabled when
> the struct pointer is in a register.
Looks good. Also, while you're here - maybe it's better to extract this mess:
if (!Subtarget->is64Bit() && !Subtarget->isTargetWindows() &&
!(CS.getCallingConv() == CallingConv::Fast ||
CS.getCallingConv() == CallingConv::GHC) &&
- CS.paramHasAttr(1, Attribute::StructRet))
+ CS.paramHasAttr(1, Attribute::StructRet) &&
+ !CS.paramHasAttr(1, Attribute::InReg))
Into small separate helper? Just to increase the readability.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
More information about the llvm-commits
mailing list