summaryrefslogtreecommitdiffstats
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
commit639f2d92f85d0ad9a475edc5f3427c784f219b9b (patch)
treee35f1a62b5a0f3672d9ace535f3405058f5f0b59
parent1e8860a8f5c1418640683df9cfba7a4c1aeb9a42 (diff)
downloadbcm5719-llvm-639f2d92f85d0ad9a475edc5f3427c784f219b9b.tar.gz
bcm5719-llvm-639f2d92f85d0ad9a475edc5f3427c784f219b9b.zip
Don't use static globals for params as it confuses the optimzer that their values are never being used in the function.
llvm-svn: 68328
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 1277404e169..b8f5ca85cf5 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud