From 17d3fea677753e6e3e82ffe2cbdeccbf5f2e7497 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 9 Feb 2011 17:54:19 +0000 Subject: Driver/Frontend: Wire up -mregparm=. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125201 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGCall.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/CGCall.cpp') diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 60a138c419..cc8dbcb1df 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -755,10 +755,10 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, if (RetAttrs) PAL.push_back(llvm::AttributeWithIndex::get(0, RetAttrs)); - // FIXME: we need to honor command line settings also. - // FIXME: RegParm should be reduced in case of nested functions and/or global - // register variable. + // FIXME: RegParm should be reduced in case of global register variable. signed RegParm = FI.getRegParm(); + if (!RegParm) + RegParm = CodeGenOpts.NumRegisterParameters; unsigned PointerWidth = getContext().Target.getPointerWidth(0); for (CGFunctionInfo::const_arg_iterator it = FI.arg_begin(), -- cgit v1.2.3