From 36dca60f5cfb9c858f3e962221ee5f2fa41794e8 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 23 Mar 2011 23:34:19 +0000 Subject: [PATCH] Enable GlobalMerge on darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128183 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMGlobalMerge.cpp | 6 ------ test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll | 2 +- test/CodeGen/ARM/global-merge.ll | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/Target/ARM/ARMGlobalMerge.cpp b/lib/Target/ARM/ARMGlobalMerge.cpp index ab6c00e6e1a..3f0238387a2 100644 --- a/lib/Target/ARM/ARMGlobalMerge.cpp +++ b/lib/Target/ARM/ARMGlobalMerge.cpp @@ -53,7 +53,6 @@ #define DEBUG_TYPE "arm-global-merge" #include "ARM.h" -#include "ARMTargetMachine.h" #include "llvm/CodeGen/Passes.h" #include "llvm/Attributes.h" #include "llvm/Constants.h" @@ -168,11 +167,6 @@ bool ARMGlobalMerge::doInitialization(Module &M) { unsigned MaxOffset = TLI->getMaximalGlobalOffset(); bool Changed = false; - // Disable this pass on darwin. The debugger is not yet ready to extract - // variable's info from a merged global. - if (TLI->getTargetMachine().getSubtarget().isTargetDarwin()) - return false; - // Grab all non-const globals. for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) { diff --git a/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll b/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll index ec76f71d884..94842124fb0 100644 --- a/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll +++ b/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll @@ -1,5 +1,5 @@ ; RUN: llc < %s | FileCheck %s -; XFAIL: * + target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32" target triple = "thumbv7-apple-darwin10" diff --git a/test/CodeGen/ARM/global-merge.ll b/test/CodeGen/ARM/global-merge.ll index 49e546c13bf..28bf2214740 100644 --- a/test/CodeGen/ARM/global-merge.ll +++ b/test/CodeGen/ARM/global-merge.ll @@ -1,5 +1,4 @@ ; RUN: llc < %s -mtriple=thumb-apple-darwin | FileCheck %s -; XFAIL: * ; Test the ARMGlobalMerge pass. Use -march=thumb because it has a small ; value for the maximum offset (127).