Displaying 2 results from an estimated 2 matches for "_z1fpii".
2019 Jun 30
2
Information Loss of Array Type in Function Interface in IR Generated by Clang
...or your prompt reply!
Sure, I can implement a AST visitor to go through the AST to get the information but I just wonder whether there is any other way to let Clang do so.
What I am considering is how to let the generated IR looks like below, which some tools realize:
define dso_local i32 @_Z1fPii([51 x i32]* %A, i32 %x) local_unnamed_addr #0 !dbg !7 {
entry:
...
}
Best regards,
------------------------------------------
Tingyuan LIANG
MPhil Student
Department of Electronic and Computer Engineering
The Hong Kong University of Science and Technology
________________________________
From: Dav...
2019 Jun 30
2
Information Loss of Array Type in Function Interface in IR Generated by Clang
...used is :
clang -O1 -emit-llvm -S -g tmp.cc -o tmp.bc
Thanks in advance for your time and suggestion! ^_^
C source code:
int f ( int A[51], int x)
{
return A[x];
}
===========================
generated IR:
; Function Attrs: norecurse nounwind readonly uwtable
define dso_local i32 @_Z1fPii(i32* nocapture readonly %A, i32 %x) local_unnamed_addr #0 !dbg !7 {
entry:
call void @llvm.dbg.value(metadata i32* %A, metadata !13, metadata !DIExpression()), !dbg !15
call void @llvm.dbg.value(metadata i32 %x, metadata !14, metadata !DIExpression()), !dbg !16
%idxprom = sext i32 %x to i64,...