[llvm-commits] [llvm] r64583 - in /llvm/trunk: lib/Transforms/IPO/GlobalOpt.cpp test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll
Chris Lattner
clattner at apple.com
Sun Feb 15 10:15:39 PST 2009
On Feb 15, 2009, at 1:56 AM, Duncan Sands wrote:
> Author: baldrick
> Date: Sun Feb 15 03:56:08 2009
> New Revision: 64583
>
> URL: http://llvm.org/viewvc/llvm-project?rev=64583&view=rev
> Log:
> If the target of an alias has internal linkage, then the
> alias can be morphed into the target. Implement this
> transform, and fix a crash in the existing transform at
> the same time.
Nice!
>
> +++ llvm/trunk/test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll
> Sun Feb 15 03:56:08 2009
> @@ -0,0 +1,12 @@
> +; RUN: llvm-as < %s | opt -globalopt | llvm-dis | grep {define void
> @a}
> +
> +define internal void @f() {
> + ret void
> +}
I don't think that renaming "f" is ok if it is also marked "attribute
used". If there were inline asm referring to the name "f", then it
would cease to work if renamed to "a".
-Chris
> +
> + at a = alias void ()* @f
> +
> +define void @g() {
> + call void()* @a()
> + ret void
> +}
>
>
> _______________________________________________
> 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