mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
16c247c68a
Currently, gc.relocates are defined in terms of indices into the statepoint's operand list. Given the gc args are at the end of a variable length list of operands, this makes interpreting their indices by hand a tad challenging. We can simplify the statepoint sequence and improve readability quite a bit by pulling these new operands into their own named operand bundle. This patch defines a new operand bundle tag "gc-live". The semantics of the bundle are the same as the existing gc arguments of a statepoint. This patch simply introduces the definition and codegen for the bundle, future patches will migrate RS4GC to emitting the new form. Interestingly, with this done and the recent migration to using deopt and gc-transition bundles, we really don't have much left in the statepoint itself. It really looks like the existing ID and flags fields are redundant; we have (existing!) attributes for all of them. I think we'll be able to reduce the gc.statepoint signature to simply a wrapped call (e.g. actual target and actual arguments). Differential Revision: https://reviews.llvm.org/D80937
31 lines
881 B
LLVM
31 lines
881 B
LLVM
; RUN: llvm-as < %s | llvm-bcanalyzer -dump -disable-histogram | FileCheck %s
|
|
|
|
; CHECK: <OPERAND_BUNDLE_TAGS_BLOCK
|
|
; CHECK-NEXT: <OPERAND_BUNDLE_TAG
|
|
; CHECK-NEXT: <OPERAND_BUNDLE_TAG
|
|
; CHECK-NEXT: <OPERAND_BUNDLE_TAG
|
|
; CHECK-NEXT: <OPERAND_BUNDLE_TAG
|
|
; CHECK-NEXT: <OPERAND_BUNDLE_TAG
|
|
; CHECK-NEXT: <OPERAND_BUNDLE_TAG
|
|
; CHECK-NEXT: <OPERAND_BUNDLE_TAG
|
|
; CHECK-NEXT: <OPERAND_BUNDLE_TAG
|
|
; CHECK-NEXT: </OPERAND_BUNDLE_TAGS_BLOCK
|
|
|
|
; CHECK: <FUNCTION_BLOCK
|
|
; CHECK: <OPERAND_BUNDLE
|
|
; CHECK: <OPERAND_BUNDLE
|
|
; CHECK-NOT: <OPERAND_BUNDLE
|
|
; CHECK: </FUNCTION_BLOCK
|
|
|
|
; CHECK: Block ID #{{[0-9]+}} (OPERAND_BUNDLE_TAGS_BLOCK)
|
|
|
|
declare void @callee0()
|
|
|
|
define void @f0(i32* %ptr) {
|
|
entry:
|
|
%l = load i32, i32* %ptr
|
|
%x = add i32 42, 1
|
|
call void @callee0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ]
|
|
ret void
|
|
}
|