On Nov 5, 2007, at 1:20 PM, Dale Johannesen wrote:
> Author: johannes
> Date: Mon Nov 5 15:20:28 2007
> New Revision: 43734
>
> URL: http://llvm.org/viewvc/llvm-project?rev=43734&view=rev
> Log:
> Make labels work in asm blocks; allow labels as
> parameters. Rename ValueRefList to ParamList
> in AsmParser, since its only use is for parameters.
Hey Dale,
> +"LASM$foo": ; preds = %entry
> + call void asm sideeffect ".file \22block12.c\22", "~{dirflag},~
> {fpsr},~{flags}"( )
> + call void asm sideeffect ".line 1", "~{dirflag},~{fpsr},~{flags}"( )
> + call void asm sideeffect "int $$1", "~{dirflag},~{fpsr},~{flags},~
> {memory}"( )
> + call void asm sideeffect ".file \22block12.c\22", "~{dirflag},~
> {fpsr},~{flags}"( )
> + call void asm sideeffect ".line 2", "~{dirflag},~{fpsr},~{flags}"( )
> + call void asm sideeffect "brl ${0:l}", "X,~{dirflag},~{fpsr},~
> {flags},~{memory}"( label %"LASM$foo" )
This is somewhat dangerous: I think there is code in the compiler
that assumes that only phi nodes and terminators use basic block.
One specific problem with this is that the data-flow machinery won't
know that the asm branches to LASM$foo, so misoptimizations can
happen. I guess the question is how common this is an how important
it is that it works :)
-Chris
_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits