From 6eaf840a3dc4fbbc0cf195e23c9d6bd3d91fabe8 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Fri, 13 Jun 2014 14:24:23 +0000 Subject: [PATCH] Docs: remove extra {} around result types. It makes the types look like they're single-element structures. And when we have instructions that *do* result in a struct, that can get confusing rather quickly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210905 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.rst | 194 +++++++++++++++++++++++------------------------ 1 file changed, 97 insertions(+), 97 deletions(-) diff --git a/docs/LangRef.rst b/docs/LangRef.rst index 80bcb53a829..cb94d3967b1 100644 --- a/docs/LangRef.rst +++ b/docs/LangRef.rst @@ -117,8 +117,8 @@ And the hard way: .. code-block:: llvm - %0 = add i32 %X, %X ; yields {i32}:%0 - %1 = add i32 %0, %0 ; yields {i32}:%1 + %0 = add i32 %X, %X ; yields i32:%0 + %1 = add i32 %0, %0 ; yields i32:%1 %result = add i32 %1, %1 This last way of multiplying ``%X`` by 8 illustrates several important @@ -3577,9 +3577,9 @@ Example: .. code-block:: llvm %retval = invoke i32 @Test(i32 15) to label %Continue - unwind label %TestCleanup ; {i32}:retval set + unwind label %TestCleanup ; i32:retval set %retval = invoke coldcc i32 %Testfnptr(i32 15) to label %Continue - unwind label %TestCleanup ; {i32}:retval set + unwind label %TestCleanup ; i32:retval set .. _i_resume: @@ -3668,10 +3668,10 @@ Syntax: :: - = add , ; yields {ty}:result - = add nuw , ; yields {ty}:result - = add nsw , ; yields {ty}:result - = add nuw nsw , ; yields {ty}:result + = add , ; yields ty:result + = add nuw , ; yields ty:result + = add nsw , ; yields ty:result + = add nuw nsw , ; yields ty:result Overview: """"""""" @@ -3707,7 +3707,7 @@ Example: .. code-block:: llvm - = add i32 4, %var ; yields {i32}:result = 4 + %var + = add i32 4, %var ; yields i32:result = 4 + %var .. _i_fadd: @@ -3719,7 +3719,7 @@ Syntax: :: - = fadd [fast-math flags]* , ; yields {ty}:result + = fadd [fast-math flags]* , ; yields ty:result Overview: """"""""" @@ -3746,7 +3746,7 @@ Example: .. code-block:: llvm - = fadd float 4.0, %var ; yields {float}:result = 4.0 + %var + = fadd float 4.0, %var ; yields float:result = 4.0 + %var '``sub``' Instruction ^^^^^^^^^^^^^^^^^^^^^ @@ -3756,10 +3756,10 @@ Syntax: :: - = sub , ; yields {ty}:result - = sub nuw , ; yields {ty}:result - = sub nsw , ; yields {ty}:result - = sub nuw nsw , ; yields {ty}:result + = sub , ; yields ty:result + = sub nuw , ; yields ty:result + = sub nsw , ; yields ty:result + = sub nuw nsw , ; yields ty:result Overview: """"""""" @@ -3798,8 +3798,8 @@ Example: .. code-block:: llvm - = sub i32 4, %var ; yields {i32}:result = 4 - %var - = sub i32 0, %val ; yields {i32}:result = -%var + = sub i32 4, %var ; yields i32:result = 4 - %var + = sub i32 0, %val ; yields i32:result = -%var .. _i_fsub: @@ -3811,7 +3811,7 @@ Syntax: :: - = fsub [fast-math flags]* , ; yields {ty}:result + = fsub [fast-math flags]* , ; yields ty:result Overview: """"""""" @@ -3841,8 +3841,8 @@ Example: .. code-block:: llvm - = fsub float 4.0, %var ; yields {float}:result = 4.0 - %var - = fsub float -0.0, %val ; yields {float}:result = -%var + = fsub float 4.0, %var ; yields float:result = 4.0 - %var + = fsub float -0.0, %val ; yields float:result = -%var '``mul``' Instruction ^^^^^^^^^^^^^^^^^^^^^ @@ -3852,10 +3852,10 @@ Syntax: :: - = mul , ; yields {ty}:result - = mul nuw , ; yields {ty}:result - = mul nsw , ; yields {ty}:result - = mul nuw nsw , ; yields {ty}:result + = mul , ; yields ty:result + = mul nuw , ; yields ty:result + = mul nsw , ; yields ty:result + = mul nuw nsw , ; yields ty:result Overview: """"""""" @@ -3895,7 +3895,7 @@ Example: .. code-block:: llvm - = mul i32 4, %var ; yields {i32}:result = 4 * %var + = mul i32 4, %var ; yields i32:result = 4 * %var .. _i_fmul: @@ -3907,7 +3907,7 @@ Syntax: :: - = fmul [fast-math flags]* , ; yields {ty}:result + = fmul [fast-math flags]* , ; yields ty:result Overview: """"""""" @@ -3934,7 +3934,7 @@ Example: .. code-block:: llvm - = fmul float 4.0, %var ; yields {float}:result = 4.0 * %var + = fmul float 4.0, %var ; yields float:result = 4.0 * %var '``udiv``' Instruction ^^^^^^^^^^^^^^^^^^^^^^ @@ -3944,8 +3944,8 @@ Syntax: :: - = udiv , ; yields {ty}:result - = udiv exact , ; yields {ty}:result + = udiv , ; yields ty:result + = udiv exact , ; yields ty:result Overview: """"""""" @@ -3978,7 +3978,7 @@ Example: .. code-block:: llvm - = udiv i32 4, %var ; yields {i32}:result = 4 / %var + = udiv i32 4, %var ; yields i32:result = 4 / %var '``sdiv``' Instruction ^^^^^^^^^^^^^^^^^^^^^^ @@ -3988,8 +3988,8 @@ Syntax: :: - = sdiv , ; yields {ty}:result - = sdiv exact , ; yields {ty}:result + = sdiv , ; yields ty:result + = sdiv exact , ; yields ty:result Overview: """"""""" @@ -4024,7 +4024,7 @@ Example: .. code-block:: llvm - = sdiv i32 4, %var ; yields {i32}:result = 4 / %var + = sdiv i32 4, %var ; yields i32:result = 4 / %var .. _i_fdiv: @@ -4036,7 +4036,7 @@ Syntax: :: - = fdiv [fast-math flags]* , ; yields {ty}:result + = fdiv [fast-math flags]* , ; yields ty:result Overview: """"""""" @@ -4063,7 +4063,7 @@ Example: .. code-block:: llvm - = fdiv float 4.0, %var ; yields {float}:result = 4.0 / %var + = fdiv float 4.0, %var ; yields float:result = 4.0 / %var '``urem``' Instruction ^^^^^^^^^^^^^^^^^^^^^^ @@ -4073,7 +4073,7 @@ Syntax: :: - = urem , ; yields {ty}:result + = urem , ; yields ty:result Overview: """"""""" @@ -4105,7 +4105,7 @@ Example: .. code-block:: llvm - = urem i32 4, %var ; yields {i32}:result = 4 % %var + = urem i32 4, %var ; yields i32:result = 4 % %var '``srem``' Instruction ^^^^^^^^^^^^^^^^^^^^^^ @@ -4115,7 +4115,7 @@ Syntax: :: - = srem , ; yields {ty}:result + = srem , ; yields ty:result Overview: """"""""" @@ -4160,7 +4160,7 @@ Example: .. code-block:: llvm - = srem i32 4, %var ; yields {i32}:result = 4 % %var + = srem i32 4, %var ; yields i32:result = 4 % %var .. _i_frem: @@ -4172,7 +4172,7 @@ Syntax: :: - = frem [fast-math flags]* , ; yields {ty}:result + = frem [fast-math flags]* , ; yields ty:result Overview: """"""""" @@ -4200,7 +4200,7 @@ Example: .. code-block:: llvm - = frem float 4.0, %var ; yields {float}:result = 4.0 % %var + = frem float 4.0, %var ; yields float:result = 4.0 % %var .. _bitwiseops: @@ -4221,10 +4221,10 @@ Syntax: :: - = shl , ; yields {ty}:result - = shl nuw , ; yields {ty}:result - = shl nsw , ; yields {ty}:result - = shl nuw nsw , ; yields {ty}:result + = shl , ; yields ty:result + = shl nuw , ; yields ty:result + = shl nsw , ; yields ty:result + = shl nuw nsw , ; yields ty:result Overview: """"""""" @@ -4262,9 +4262,9 @@ Example: .. code-block:: llvm - = shl i32 4, %var ; yields {i32}: 4 << %var - = shl i32 4, 2 ; yields {i32}: 16 - = shl i32 1, 10 ; yields {i32}: 1024 + = shl i32 4, %var ; yields i32: 4 << %var + = shl i32 4, 2 ; yields i32: 16 + = shl i32 1, 10 ; yields i32: 1024 = shl i32 1, 32 ; undefined = shl <2 x i32> < i32 1, i32 1>, < i32 1, i32 2> ; yields: result=<2 x i32> < i32 2, i32 4> @@ -4276,8 +4276,8 @@ Syntax: :: - = lshr , ; yields {ty}:result - = lshr exact , ; yields {ty}:result + = lshr , ; yields ty:result + = lshr exact , ; yields ty:result Overview: """"""""" @@ -4311,10 +4311,10 @@ Example: .. code-block:: llvm - = lshr i32 4, 1 ; yields {i32}:result = 2 - = lshr i32 4, 2 ; yields {i32}:result = 1 - = lshr i8 4, 3 ; yields {i8}:result = 0 - = lshr i8 -2, 1 ; yields {i8}:result = 0x7F + = lshr i32 4, 1 ; yields i32:result = 2 + = lshr i32 4, 2 ; yields i32:result = 1 + = lshr i8 4, 3 ; yields i8:result = 0 + = lshr i8 -2, 1 ; yields i8:result = 0x7F = lshr i32 1, 32 ; undefined = lshr <2 x i32> < i32 -2, i32 4>, < i32 1, i32 2> ; yields: result=<2 x i32> < i32 0x7FFFFFFF, i32 1> @@ -4326,8 +4326,8 @@ Syntax: :: - = ashr , ; yields {ty}:result - = ashr exact , ; yields {ty}:result + = ashr , ; yields ty:result + = ashr exact , ; yields ty:result Overview: """"""""" @@ -4362,10 +4362,10 @@ Example: .. code-block:: llvm - = ashr i32 4, 1 ; yields {i32}:result = 2 - = ashr i32 4, 2 ; yields {i32}:result = 1 - = ashr i8 4, 3 ; yields {i8}:result = 0 - = ashr i8 -2, 1 ; yields {i8}:result = -1 + = ashr i32 4, 1 ; yields i32:result = 2 + = ashr i32 4, 2 ; yields i32:result = 1 + = ashr i8 4, 3 ; yields i8:result = 0 + = ashr i8 -2, 1 ; yields i8:result = -1 = ashr i32 1, 32 ; undefined = ashr <2 x i32> < i32 -2, i32 4>, < i32 1, i32 3> ; yields: result=<2 x i32> < i32 -1, i32 0> @@ -4377,7 +4377,7 @@ Syntax: :: - = and , ; yields {ty}:result + = and , ; yields ty:result Overview: """"""""" @@ -4414,9 +4414,9 @@ Example: .. code-block:: llvm - = and i32 4, %var ; yields {i32}:result = 4 & %var - = and i32 15, 40 ; yields {i32}:result = 8 - = and i32 4, 8 ; yields {i32}:result = 0 + = and i32 4, %var ; yields i32:result = 4 & %var + = and i32 15, 40 ; yields i32:result = 8 + = and i32 4, 8 ; yields i32:result = 0 '``or``' Instruction ^^^^^^^^^^^^^^^^^^^^ @@ -4426,7 +4426,7 @@ Syntax: :: - = or , ; yields {ty}:result + = or , ; yields ty:result Overview: """"""""" @@ -4463,9 +4463,9 @@ Example: :: - = or i32 4, %var ; yields {i32}:result = 4 | %var - = or i32 15, 40 ; yields {i32}:result = 47 - = or i32 4, 8 ; yields {i32}:result = 12 + = or i32 4, %var ; yields i32:result = 4 | %var + = or i32 15, 40 ; yields i32:result = 47 + = or i32 4, 8 ; yields i32:result = 12 '``xor``' Instruction ^^^^^^^^^^^^^^^^^^^^^ @@ -4475,7 +4475,7 @@ Syntax: :: - = xor , ; yields {ty}:result + = xor , ; yields ty:result Overview: """"""""" @@ -4513,10 +4513,10 @@ Example: .. code-block:: llvm - = xor i32 4, %var ; yields {i32}:result = 4 ^ %var - = xor i32 15, 40 ; yields {i32}:result = 39 - = xor i32 4, 8 ; yields {i32}:result = 12 - = xor i32 %V, -1 ; yields {i32}:result = ~%V + = xor i32 4, %var ; yields i32:result = 4 ^ %var + = xor i32 15, 40 ; yields i32:result = 39 + = xor i32 4, 8 ; yields i32:result = 12 + = xor i32 %V, -1 ; yields i32:result = ~%V Vector Operations ----------------- @@ -4782,7 +4782,7 @@ Syntax: :: - = alloca [inalloca] [, ] [, align ] ; yields {type*}:result + = alloca [inalloca] [, ] [, align ] ; yields type*:result Overview: """"""""" @@ -4824,10 +4824,10 @@ Example: .. code-block:: llvm - %ptr = alloca i32 ; yields {i32*}:ptr - %ptr = alloca i32, i32 4 ; yields {i32*}:ptr - %ptr = alloca i32, i32 4, align 1024 ; yields {i32*}:ptr - %ptr = alloca i32, align 1024 ; yields {i32*}:ptr + %ptr = alloca i32 ; yields i32*:ptr + %ptr = alloca i32, i32 4 ; yields i32*:ptr + %ptr = alloca i32, i32 4, align 1024 ; yields i32*:ptr + %ptr = alloca i32, align 1024 ; yields i32*:ptr .. _i_load: @@ -4910,9 +4910,9 @@ Examples: .. code-block:: llvm - %ptr = alloca i32 ; yields {i32*}:ptr - store i32 3, i32* %ptr ; yields {void} - %val = load i32* %ptr ; yields {i32}:val = i32 3 + %ptr = alloca i32 ; yields i32*:ptr + store i32 3, i32* %ptr ; yields void + %val = load i32* %ptr ; yields i32:val = i32 3 .. _i_store: @@ -4924,8 +4924,8 @@ Syntax: :: - store [volatile] , * [, align ][, !nontemporal !] ; yields {void} - store atomic [volatile] , * [singlethread] , align ; yields {void} + store [volatile] , * [, align ][, !nontemporal !] ; yields void + store atomic [volatile] , * [singlethread] , align ; yields void Overview: """"""""" @@ -4989,9 +4989,9 @@ Example: .. code-block:: llvm - %ptr = alloca i32 ; yields {i32*}:ptr - store i32 3, i32* %ptr ; yields {void} - %val = load i32* %ptr ; yields {i32}:val = i32 3 + %ptr = alloca i32 ; yields i32*:ptr + store i32 3, i32* %ptr ; yields void + %val = load i32* %ptr ; yields i32:val = i32 3 .. _i_fence: @@ -5003,7 +5003,7 @@ Syntax: :: - fence [singlethread] ; yields {void} + fence [singlethread] ; yields void Overview: """"""""" @@ -5046,8 +5046,8 @@ Example: .. code-block:: llvm - fence acquire ; yields {void} - fence singlethread seq_cst ; yields {void} + fence acquire ; yields void + fence singlethread seq_cst ; yields void .. _i_cmpxchg: @@ -5059,7 +5059,7 @@ Syntax: :: - cmpxchg [weak] [volatile] * , , [singlethread] ; yields { , i1 } + cmpxchg [weak] [volatile] * , , [singlethread] ; yields { ty, i1 } Overview: """"""""" @@ -5127,7 +5127,7 @@ Example: loop: %cmp = phi i32 [ %orig, %entry ], [%old, %loop] %squared = mul i32 %cmp, %cmp - %val_success = cmpxchg i32* %ptr, i32 %cmp, i32 %squared acq_rel monotonic ; yields { i32, i1 } + %val_success = cmpxchg i32* %ptr, i32 %cmp, i32 %squared acq_rel monotonic ; yields { i32, i1 } %value_loaded = extractvalue { i32, i1 } %val_success, 0 %success = extractvalue { i32, i1 } %val_success, 1 br i1 %success, label %done, label %loop @@ -5145,7 +5145,7 @@ Syntax: :: - atomicrmw [volatile] * , [singlethread] ; yields {ty} + atomicrmw [volatile] * , [singlethread] ; yields ty Overview: """"""""" @@ -5206,7 +5206,7 @@ Example: .. code-block:: llvm - %old = atomicrmw add i32* %ptr, i32 1 acquire ; yields {i32} + %old = atomicrmw add i32* %ptr, i32 1 acquire ; yields i32 .. _i_getelementptr: @@ -5940,7 +5940,7 @@ Syntax: :: - = icmp , ; yields {i1} or {}:result + = icmp , ; yields i1 or :result Overview: """"""""" @@ -6031,7 +6031,7 @@ Syntax: :: - = fcmp , ; yields {i1} or {}:result + = fcmp , ; yields i1 or :result Overview: """"""""" @@ -6336,7 +6336,7 @@ Example: call void %foo(i8 97 signext) %struct.A = type { i32, i8 } - %r = call %struct.A @foo() ; yields { 32, i8 } + %r = call %struct.A @foo() ; yields { i32, i8 } %gr = extractvalue %struct.A %r, 0 ; yields i32 %gr1 = extractvalue %struct.A %r, 1 ; yields i8 %Z = call void @foo() noreturn ; indicates that %foo never returns normally @@ -8498,7 +8498,7 @@ Examples: .. code-block:: llvm - %r2 = call float @llvm.fmuladd.f32(float %a, float %b, float %c) ; yields {float}:r2 = (a * b) + c + %r2 = call float @llvm.fmuladd.f32(float %a, float %b, float %c) ; yields float:r2 = (a * b) + c Half Precision Floating Point Intrinsics ---------------------------------------- -- 2.34.1