You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that ProGraML builds the graph by inserting a node for each instruction and variable/constant in the LLVM intermediate representation (IR), and then the final result is made of control flow, data flow, and call flow. But in this way, the Metadata information seems not to be included.
When I add a #pragma unroll in my source C code, there is NOT differece in corresponding LLVM IR except for addtional metadata !llvm.loop !2 following the instruction br.
And thus, the generated graph is the same except for one node representing the br instruction above. The only difference appears in that node's attribute features/full_text. However, the full_text attribute, which includes the entire line of raw LLVM IR information, is usually discarded when using the GNN model. That is, the graph generated with ProGraML does NOT contain any information about Loop optimization. This is a huge disaster for the project I am working on:(
In short, my questions are:
Where the loop optimization information be included in LLVM IR, is it only in Metadata? I guess Yes after referring to LLVM-loop-unrolling.
Does ProGraML use the Metadata information in LLVM IR to construct control flow, data flow, and call flow (as structural information)?
Thanks in advance for any help!!
My test case and corresponding produced results
source C code, then clang-7 -S -emit-llvm dot_product.c is used to obtain the LLVM IR.
Where the loop optimization information be included in LLVM IR, is it only in Metadata? I guess Yes after referring to LLVM-loop-unrolling.
That looks right to me.
Does ProGraML use the Metadata information in LLVM IR to construct control flow, data flow, and call flow (as structural information)?
It doesn't automatically add metadata info to instructions. You would need to extend ProgramGraphBuilder::AddLlvmInstruction() to pull out any extra metadata you want and embed it in the graph as node features. Here is an example of how we do this for instruction profiling data:
❓ Questions
I know that ProGraML builds the graph by inserting a node for each instruction and variable/constant in the LLVM intermediate representation (IR), and then the final result is made of control flow, data flow, and call flow. But in this way, the Metadata information seems not to be included.
When I add a #pragma unroll in my source C code, there is NOT differece in corresponding LLVM IR except for addtional metadata
!llvm.loop !2
following the instructionbr
.And thus, the generated graph is the same except for one node representing the
br
instruction above. The only difference appears in that node's attributefeatures/full_text
. However, thefull_text
attribute, which includes the entire line of raw LLVM IR information, is usually discarded when using the GNN model. That is, the graph generated with ProGraML does NOT contain any information about Loop optimization. This is a huge disaster for the project I am working on:(In short, my questions are:
Thanks in advance for any help!!
My test case and corresponding produced results
source C code, then
clang-7 -S -emit-llvm dot_product.c
is used to obtain the LLVM IR.the corresponding partly LLVM IR and Graph with
#pragma unroll 2
the corresponding partly LLVM IR and Graph without
#pragma unroll 2
The text was updated successfully, but these errors were encountered: