[llvm-commits] [PATCH] Keep address space in global opt

Joey Gouly joey.gouly at arm.com
Thu Jan 10 02:34:21 PST 2013


Thanks, committed in r172051.

-----Original Message-----
From: Nick Lewycky [mailto:nicholas at mxc.ca] 
Sent: 09 January 2013 20:38
To: Joey Gouly
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] [PATCH] Keep address space in global opt

Joey Gouly wrote:
> Hi all,
>
> Currently in 'TryToShrinkGlobalToBoolean' (inside GlobalOpt), the address
> space of the global is dropped.
>
> Attached is the patch to fix it.
>
> Ok to commit?

--- a/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/lib/Transforms/IPO/GlobalOpt.cpp
@@ -1825,7 +1824,7 @@ static bool 
TryToShrinkGlobalToBoolean(GlobalVariable *GV, Constant *OtherVal) {
                                               GlobalValue::InternalLinkage,
 
ConstantInt::getFalse(GV->getContext()),
                                               GV->getName()+".b",
-                                             GV->getThreadLocalMode());
+                                             GV->getThreadLocalMode(), 
GV->getType()->getAddressSpace());

Exceeds 80 columns.

Thanks for migrating the test to FileCheck. You can submit after you've 
fixed the 80col violation.

Nick








More information about the llvm-commits mailing list