[cfe-commits] r68328 - /cfe/trunk/lib/CodeGen/CGDecl.cpp

Sanjiv Gupta sanjiv.gupta at microchip.com
Thu Apr 2 10:51:27 PDT 2009


Author: sgupta
Date: Thu Apr  2 12:51:27 2009
New Revision: 68328

URL: http://llvm.org/viewvc/llvm-project?rev=68328&view=rev
Log:

Don't use static globals for params as it confuses the optimzer that their values are never being used in the function.

Modified:
    cfe/trunk/lib/CodeGen/CGDecl.cpp

Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=68328&r1=68327&r2=68328&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Thu Apr  2 12:51:27 2009
@@ -426,12 +426,6 @@
   if (!Ty->isConstantSizeType()) {
     // Variable sized values always are passed by-reference.
     DeclPtr = Arg;
-  } else if (Target.useGlobalsForAutomaticVariables()) {
-    // Targets that don't have stack use global address space for parameters.
-    // Specify external linkage for such globals so that llvm optimizer do
-    // not assume there values initialized as zero.
-    DeclPtr = CreateStaticBlockVarDecl(D, ".arg.",
-                                       llvm::GlobalValue::ExternalLinkage);
   } else {
     // A fixed sized single-value variable becomes an alloca in the entry block.
     const llvm::Type *LTy = ConvertTypeForMem(Ty);





More information about the cfe-commits mailing list