In order to access the 18th integer in the array, you would need to do the
following:
-.. code-block:: text
+.. code-block:: llvm
%idx = getelementptr { [40 x i32]* }, { [40 x i32]* }* %, i64 0, i32 0
%arr = load [40 x i32]** %idx
``%obj`` after the safepoint and update any following uses appropriately. The
resulting relocation sequence is:
-.. code-block:: text
+.. code-block:: llvm
define i8 addrspace(1)* @test1(i8 addrspace(1)* %obj)
gc "statepoint-example" {
If we extend our previous example to include a pointless derived pointer,
we get:
-.. code-block:: text
+.. code-block:: llvm
define i8 addrspace(1)* @test1(i8 addrspace(1)* %obj)
gc "statepoint-example" {
--that requires that a TLS variable must be written to before and after a call
to unmanaged code. The resulting relocation sequence is:
-.. code-block:: text
+.. code-block:: llvm
@flag = thread_local global i32 0, align 4
As an example, given this code:
-.. code-block:: text
+.. code-block:: llvm
define i8 addrspace(1)* @test1(i8 addrspace(1)* %obj)
gc "statepoint-example" {
The pass would produce this IR:
-.. code-block:: text
+.. code-block:: llvm
define i8 addrspace(1)* @test1(i8 addrspace(1)* %obj)
gc "statepoint-example" {
This pass would produce the following IR:
-.. code-block:: text
+.. code-block:: llvm
define void @test() gc "statepoint-example" {
call void @do_safepoint()