[llvm-commits] [llvm] r70630 - /llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp

Chris Lattner clattner at apple.com
Sat May 2 10:25:28 PDT 2009


On May 2, 2009, at 9:21 AM, Nick Lewycky wrote:

> Author: nicholas
> Date: Sat May  2 11:21:50 2009
> New Revision: 70630
>
> URL: http://llvm.org/viewvc/llvm-project?rev=70630&view=rev
> Log:
> Don't append ".b" to the names of globals that are being shrunk to  
> booleans.

Why not?  This is useful to know when looking at dumps, what does this  
fix?

-Chris

>
>
> Modified:
>    llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
>
> Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp?rev=70630&r1=70629&r2=70630&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Sat May  2 11:21:50  
> 2009
> @@ -1549,10 +1549,12 @@
>
>   // Create the new global, initializing it to false.
>   GlobalVariable *NewGV = new GlobalVariable(Type::Int1Ty, false,
> -         GlobalValue::InternalLinkage, ConstantInt::getFalse(),
> -                                             GV->getName()+".b",
> +                                              
> GlobalValue::InternalLinkage,
> +                                             ConstantInt::getFalse(),
> +                                             "",
>                                              (Module *)NULL,
>                                              GV->isThreadLocal());
> +  NewGV->takeName(GV);
>   GV->getParent()->getGlobalList().insert(GV, NewGV);
>
>   Constant *InitVal = GV->getInitializer();
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list