0
llvm에서 커널을 사용하여 얻은 전역 주석을 이해하려고 노력하고 있지만 몇 가지 사항에 다소 혼란 스럽습니다. 문제 이해 llvm.global.annotations
@sgv = internal constant [4 x i8] c"222\00"
@fgv = internal constant [0 x i8] zeroinitializer
@lvgv = internal constant [0 x i8*] zeroinitializer
@llvm.global.annotations = appending global [1 x { i8*, i8*, i8*, i8*, i32 }] [{ i8*, i8*, i8*, i8*, i32 } { i8* bitcast (void (float addrspace(1)*, float addrspace(1)*, float addrspace(1)*)* @add_kernel to i8*), i8* getelementptr inbounds ([4 x i8]* @sgv, i32 0, i32 0), i8* getelementptr inbounds ([0 x i8]* @fgv, i32 0, i32 0), i8* bitcast ([0 x i8*]* @lvgv to i8*), i32 0 }], section "llvm.metadata"
define void @add_kernel(float addrspace(1)* %out, float addrspace(1)* %in1, float addrspace(1)* %in2) #0 {
그래서 나는 SGV, FGV & lvgv 부분을 이해할 수있다. 그러나 글로벌 주석을 볼 때 혼란 스럽다는 부분이 있습니다.
[1 x { i8*, i8*, i8*, i8*, i32 }] -- what does the first list mean
[{ i8*, i8*, i8*, i8*, i32 } --> This part before the kernel. What does this signify.
i8* getelementptr inbounds ([4 x i8]* @sgv, i32 0, i32 0), --> In this part am
assuming the i32 0, i32 0 refer to the GEP indexes ?
이 주석이 어떻게 구성되어 있고이 전역 주석을 사용하는지 더 자세히 설명해야합니다.
오크 .. 고맙습니다. – ssarangi