Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bpftrace
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bpftrace
Commits
342fd6d0
Commit
342fd6d0
authored
Jan 16, 2019
by
Matheus Marchini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: fix codegen test fot call_hist
parent
3da19809
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
31 deletions
+40
-31
tests/codegen/call_hist.cpp
tests/codegen/call_hist.cpp
+40
-31
No files found.
tests/codegen/call_hist.cpp
View file @
342fd6d0
...
...
@@ -20,50 +20,59 @@ entry:
%"@x_key" = alloca i64, align 8
%get_pid_tgid = tail call i64 inttoptr (i64 14 to i64 ()*)()
%1 = lshr i64 %get_pid_tgid, 32
%2 = icmp ugt i64 %get_pid_tgid, 281474976710655
%3 = zext i1 %2 to i64
%4 = shl nuw nsw i64 %3, 4
%5 = lshr i64 %1, %4
%6 = icmp sgt i64 %5, 255
%7 = zext i1 %6 to i64
%8 = shl nuw nsw i64 %7, 3
%9 = lshr i64 %5, %8
%10 = or i64 %8, %4
%11 = icmp sgt i64 %9, 15
%2 = icmp eq i64 %1, 0
br i1 %2, label %log2.exit, label %hist.is_not_zero.i
hist.is_not_zero.i: ; preds = %entry
%3 = icmp ugt i64 %get_pid_tgid, 281474976710655
%4 = zext i1 %3 to i64
%5 = shl nuw nsw i64 %4, 4
%6 = lshr i64 %1, %5
%7 = icmp sgt i64 %6, 255
%8 = zext i1 %7 to i64
%9 = shl nuw nsw i64 %8, 3
%10 = lshr i64 %6, %9
%11 = icmp sgt i64 %10, 15
%12 = zext i1 %11 to i64
%13 = shl nuw nsw i64 %12, 2
%14 = lshr i64 %9, %13
%15 = or i64 %10, %13
%16 = icmp sgt i64 %14, 3
%17 = zext i1 %16 to i64
%18 = shl nuw nsw i64 %17, 1
%19 = lshr i64 %14, %18
%20 = or i64 %15, %18
%21 = icmp sgt i64 %19, 1
%22 = zext i1 %21 to i64
%23 = or i64 %20, %22
%24 = bitcast i64* %"@x_key" to i8*
call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %24)
store i64 %23, i64* %"@x_key", align 8
%14 = lshr i64 %10, %13
%15 = or i64 %5, %9
%16 = or i64 %15, %13
%17 = or i64 %16, 2
%18 = icmp sgt i64 %14, 3
%19 = zext i1 %18 to i64
%20 = shl nuw nsw i64 %19, 1
%21 = lshr i64 %14, %20
%22 = add nuw nsw i64 %20, %17
%23 = icmp sgt i64 %21, 1
%24 = zext i1 %23 to i64
%25 = or i64 %22, %24
br label %log2.exit
log2.exit: ; preds = %entry, %hist.is_not_zero.i
%log22 = phi i64 [ %25, %hist.is_not_zero.i ], [ 1, %entry ]
%26 = bitcast i64* %"@x_key" to i8*
call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %26)
store i64 %log22, i64* %"@x_key", align 8
%pseudo = tail call i64 @llvm.bpf.pseudo(i64 1, i64 1)
%lookup_elem = call i8* inttoptr (i64 1 to i8* (i8*, i8*)*)(i64 %pseudo, i64* nonnull %"@x_key")
%map_lookup_cond = icmp eq i8* %lookup_elem, null
br i1 %map_lookup_cond, label %lookup_merge, label %lookup_success
lookup_success: ; preds = %
entry
%2
5
= load i64, i8* %lookup_elem, align 8
%phitmp = add i64 %2
5
, 1
lookup_success: ; preds = %
log2.exit
%2
7
= load i64, i8* %lookup_elem, align 8
%phitmp = add i64 %2
7
, 1
br label %lookup_merge
lookup_merge: ; preds = %
entry
, %lookup_success
%lookup_elem_val.0 = phi i64 [ %phitmp, %lookup_success ], [ 1, %
entry
]
%2
6
= bitcast i64* %"@x_val" to i8*
call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %2
6
)
lookup_merge: ; preds = %
log2.exit
, %lookup_success
%lookup_elem_val.0 = phi i64 [ %phitmp, %lookup_success ], [ 1, %
log2.exit
]
%2
8
= bitcast i64* %"@x_val" to i8*
call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %2
8
)
store i64 %lookup_elem_val.0, i64* %"@x_val", align 8
%pseudo1 = call i64 @llvm.bpf.pseudo(i64 1, i64 1)
%update_elem = call i64 inttoptr (i64 2 to i64 (i8*, i8*, i8*, i64)*)(i64 %pseudo1, i64* nonnull %"@x_key", i64* nonnull %"@x_val", i64 0)
call void @llvm.lifetime.end.p0i8(i64 -1, i8* nonnull %24)
call void @llvm.lifetime.end.p0i8(i64 -1, i8* nonnull %26)
call void @llvm.lifetime.end.p0i8(i64 -1, i8* nonnull %28)
ret i64 0
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment