diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-10-02 15:31:34 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-10-02 15:31:34 +0000 |
commit | 6ffce6fa9295699078f81fabb9ca32f6f22bdf09 (patch) | |
tree | d67f67e564f7a2de1a03e0b60e71330c931ae9db /test/Transforms | |
parent | b6adb4216cbc466cae62eff75ec9b2b552ecf866 (diff) | |
download | external_llvm-6ffce6fa9295699078f81fabb9ca32f6f22bdf09.zip external_llvm-6ffce6fa9295699078f81fabb9ca32f6f22bdf09.tar.gz external_llvm-6ffce6fa9295699078f81fabb9ca32f6f22bdf09.tar.bz2 |
Remove "localize global" optimization
Summary:
As discussed in http://llvm-reviews.chandlerc.com/D1754,
this optimization isn't really valid for C, and fires too rarely anyway.
Reviewers: rafael, nicholas
Reviewed By: nicholas
CC: rnk, llvm-commits, nicholas
Differential Revision: http://llvm-reviews.chandlerc.com/D1769
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/GlobalOpt/metadata.ll | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/test/Transforms/GlobalOpt/metadata.ll b/test/Transforms/GlobalOpt/metadata.ll deleted file mode 100644 index ecf3f94..0000000 --- a/test/Transforms/GlobalOpt/metadata.ll +++ /dev/null @@ -1,26 +0,0 @@ -; RUN: opt -S -globalopt < %s | FileCheck %s - -; PR6112 - When globalopt does RAUW(@G, %G), the metadata reference should drop -; to null. Function local metadata that references @G from a different function -; to that containing %G should likewise drop to null. -@G = internal global i8** null - -define i32 @main(i32 %argc, i8** %argv) { -; CHECK-LABEL: @main( -; CHECK: %G = alloca - store i8** %argv, i8*** @G - ret i32 0 -} - -define void @foo(i32 %x) { - call void @llvm.foo(metadata !{i8*** @G, i32 %x}) -; CHECK: call void @llvm.foo(metadata !{null, i32 %x}) - ret void -} - -declare void @llvm.foo(metadata) nounwind readnone - -!named = !{!0} - -!0 = metadata !{i8*** @G} -; CHECK: !0 = metadata !{null} |