[cfe-commits] r92749 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Mike Stump
mrs at apple.com
Tue Jan 5 10:48:04 PST 2010
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.
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);
}
More information about the cfe-commits
mailing list