aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-02 17:51:27 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-02 17:51:27 +0000
commit08ae3de4c90a9c4b79fedf878760144df6758ecc (patch)
tree2516bb121413e38c3fd6ea639cf1698bfd36a57f /lib/CodeGen/CGDecl.cpp
parentef77d54a493a18d8e2dae772230987e5c01bfb04 (diff)
Don't use static globals for params as it confuses the optimzer that their values are never being used in the function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68328 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r--lib/CodeGen/CGDecl.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 1277404e16..b8f5ca85cf 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -426,12 +426,6 @@ void CodeGenFunction::EmitParmDecl(const VarDecl &D, llvm::Value *Arg) {
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);