[llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalDCE.cpp
Chris Lattner
clattner at apple.com
Sat Apr 28 21:14:17 PDT 2007
> Index: llvm/lib/Transforms/IPO/GlobalDCE.cpp
> diff -u llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.43 llvm/lib/
> Transforms/IPO/GlobalDCE.cpp:1.44
> --- llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.43 Wed Apr 25 09:27:10
> 2007
> +++ llvm/lib/Transforms/IPO/GlobalDCE.cpp Sat Apr 28 08:44:59 2007
> @@ -75,9 +75,8 @@
>
> for (Module::alias_iterator I = M.alias_begin(), E = M.alias_end();
> I != E; ++I) {
> - Changed |= RemoveUnusedGlobalValue(*I);
> // Aliases are always needed even if they are not used.
> - GlobalIsNeeded(I);
> + MarkUsedGlobalsAsNeeded(cast<Constant>(I->getAliasee()));
You can drop the cast, the method already returns a Constant.
-Chris
More information about the llvm-commits
mailing list