X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FInAlloca.rst;h=c7609cddb4f9c71f83e5276b8443cfb8fe7389c4;hb=6bb0038b54056b71a6cd936024ff0f2c38543228;hp=b3ec86a054005eef074dc08ac5676b23f91fb89a;hpb=2ce21220d8318494f1d3da8d0bcdefca670a2fcd;p=oota-llvm.git diff --git a/docs/InAlloca.rst b/docs/InAlloca.rst index b3ec86a0540..c7609cddb4f 100644 --- a/docs/InAlloca.rst +++ b/docs/InAlloca.rst @@ -5,8 +5,6 @@ Design and Usage of the InAlloca Attribute Introduction ============ -.. Warning:: This feature is unstable and not fully implemented. - The :ref:`inalloca ` attribute is designed to allow taking the address of an aggregate argument that is being passed by value through memory. Primarily, this feature is required for @@ -46,7 +44,6 @@ that passes two default-constructed ``Foo`` objects to ``g`` in the .. code-block:: llvm %struct.Foo = type { i32, i32 } - %callframe.f = type <{ %struct.Foo, %struct.Foo }> declare void @Foo_ctor(%struct.Foo* %this) declare void @Foo_dtor(%struct.Foo* %this) declare void @g(<{ %struct.Foo, %struct.Foo }>* inalloca %memargs) @@ -55,11 +52,11 @@ that passes two default-constructed ``Foo`` objects to ``g`` in the entry: %base = call i8* @llvm.stacksave() %memargs = alloca <{ %struct.Foo, %struct.Foo }> - %b = getelementptr <{ %struct.Foo, %struct.Foo }>*, i32 1 + %b = getelementptr <{ %struct.Foo, %struct.Foo }>* %memargs, i32 1 call void @Foo_ctor(%struct.Foo* %b) ; If a's ctor throws, we must destruct b. - %a = getelementptr <{ %struct.Foo, %struct.Foo }>*, i32 0 + %a = getelementptr <{ %struct.Foo, %struct.Foo }>* %memargs, i32 0 invoke void @Foo_ctor(%struct.Foo* %a) to label %invoke.cont unwind %invoke.unwind