[cfe-commits] r92749 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Chris Lattner
clattner at apple.com
Tue Jan 5 10:48:46 PST 2010
On Jan 5, 2010, at 10:48 AM, Mike Stump wrote:
> Author: mrs
> Date: Tue Jan 5 12:48:04 2010
> New Revision: 92749
>
> URL: http://llvm.org/viewvc/llvm-project?rev=92749&view=rev
> Log:
> Add code to skip the emission of available externally functions at -
> O0. WIP.
Hi Mike,
Please don't add dead code,
-Chris
>
> Modified:
> cfe/trunk/lib/CodeGen/CodeGenModule.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=92749&r1=92748&r2=92749&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Tue Jan 5 12:48:04 2010
> @@ -468,6 +468,16 @@
> if (!CGRef->isDeclaration())
> continue;
>
> + // Skip available externally functions at -O0
> + // FIXME: these aren't instantiated yet, so we can't yet do this.
> + if (0 && getCodeGenOpts().OptimizationLevel == 0)
> + if (const FunctionDecl *FD =
> dyn_cast<FunctionDecl>(D.getDecl())) {
> + GVALinkage Linkage = GetLinkageForFunction(getContext(),
> FD, Features);
> +
> + if (Linkage == GVA_C99Inline)
> + continue;
> + }
> +
> // Otherwise, emit the definition and move on to the next one.
> EmitGlobalDefinition(D);
> }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list