llvm.org GIT mirror llvm / 2cc32b1
[docs] change a few code-blocks to llvm from text git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309117 91177308-0d34-0410-b5e6-96231b3b80d8 Nuno Lopes 2 years ago
2 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
195195 In order to access the 18th integer in the array, you would need to do the
196196 following:
197197
198 .. code-block:: text
198 .. code-block:: llvm
199199
200200 %idx = getelementptr { [40 x i32]* }, { [40 x i32]* }* %, i64 0, i32 0
201201 %arr = load [40 x i32]** %idx
171171 ``%obj`` after the safepoint and update any following uses appropriately. The
172172 resulting relocation sequence is:
173173
174 .. code-block:: text
174 .. code-block:: llvm
175175
176176 define i8 addrspace(1)* @test1(i8 addrspace(1)* %obj)
177177 gc "statepoint-example" {
272272 If we extend our previous example to include a pointless derived pointer,
273273 we get:
274274
275 .. code-block:: text
275 .. code-block:: llvm
276276
277277 define i8 addrspace(1)* @test1(i8 addrspace(1)* %obj)
278278 gc "statepoint-example" {
318318 --that requires that a TLS variable must be written to before and after a call
319319 to unmanaged code. The resulting relocation sequence is:
320320
321 .. code-block:: text
321 .. code-block:: llvm
322322
323323 @flag = thread_local global i32 0, align 4
324324
701701
702702 As an example, given this code:
703703
704 .. code-block:: text
704 .. code-block:: llvm
705705
706706 define i8 addrspace(1)* @test1(i8 addrspace(1)* %obj)
707707 gc "statepoint-example" {
711711
712712 The pass would produce this IR:
713713
714 .. code-block:: text
714 .. code-block:: llvm
715715
716716 define i8 addrspace(1)* @test1(i8 addrspace(1)* %obj)
717717 gc "statepoint-example" {
788788
789789 This pass would produce the following IR:
790790
791 .. code-block:: text
791 .. code-block:: llvm
792792
793793 define void @test() gc "statepoint-example" {
794794 call void @do_safepoint()