summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/global-merge-addrspace.ll
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2015-04-18 01:21:58 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2015-04-18 01:21:58 +0000
commit35e80553937f84d1b562f00fa757ee700d142f99 (patch)
treeeb2a6bfe37934f479a2459bf68d9c4a669cfd421 /test/CodeGen/ARM/global-merge-addrspace.ll
parent20b39c653c3db539a728cd67faf7b6026619e4e2 (diff)
[GlobalMerge] Look at uses to create smaller global sets.
Instead of merging everything together, look at the users of GlobalVariables, and try to group them by function, to create sets of globals used "together". Using that information, a less-aggressive alternative is to keep merging everything together *except* globals that are only ever used alone, that is, those for which it's clearly non-profitable to merge with others. In my testing, grouping by Function is too aggressive, but grouping by BasicBlock is too conservative. Anything in-between isn't trivially available, so stick with Function grouping for now. cl::opts are added for testing; both enabled by default. A few of the testcases aren't testing the merging proper, but just various edge cases when merging does occur. Update them to use the previous grouping behavior. Also, one of the tests is unrelated to GlobalMerge; change it accordingly. While there, switch to r234666' flags rather than the brutal -O3. Differential Revision: http://reviews.llvm.org/D8070 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/global-merge-addrspace.ll')
-rw-r--r--test/CodeGen/ARM/global-merge-addrspace.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CodeGen/ARM/global-merge-addrspace.ll b/test/CodeGen/ARM/global-merge-addrspace.ll
index 7b71e89bbe7..73a3afb7e4e 100644
--- a/test/CodeGen/ARM/global-merge-addrspace.ll
+++ b/test/CodeGen/ARM/global-merge-addrspace.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=thumb-apple-darwin -O3 | FileCheck %s
+; RUN: llc < %s -mtriple=thumb-apple-darwin -arm-global-merge -global-merge-group-by-use=false | FileCheck %s
; Test the GlobalMerge pass. Check that the pass does not crash when using
; multiple address spaces.