forked from SVF-tools/SVF-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.ll
47 lines (42 loc) · 1.82 KB
/
example.ll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
; ModuleID = 'swap.ll'
source_filename = "swap.c"
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.15.0"
; Function Attrs: noinline nounwind optnone ssp uwtable
define void @swap(i8** %p, i8** %q) #0 {
entry:
%p.addr = alloca i8**, align 8
%q.addr = alloca i8**, align 8
%t = alloca i8*, align 8
store i8** %p, i8*** %p.addr, align 8
store i8** %q, i8*** %q.addr, align 8
%0 = load i8**, i8*** %p.addr, align 8
%1 = load i8*, i8** %0, align 8
store i8* %1, i8** %t, align 8
%2 = load i8**, i8*** %q.addr, align 8
%3 = load i8*, i8** %2, align 8
%4 = load i8**, i8*** %p.addr, align 8
store i8* %3, i8** %4, align 8
%5 = load i8*, i8** %t, align 8
%6 = load i8**, i8*** %q.addr, align 8
store i8* %5, i8** %6, align 8
ret void
}
; Function Attrs: noinline nounwind optnone ssp uwtable
define i32 @main() #0 {
entry:
%a1 = alloca i8, align 1
%b1 = alloca i8, align 1
%a = alloca i8*, align 8
%b = alloca i8*, align 8
store i8* %a1, i8** %a, align 8
store i8* %b1, i8** %b, align 8
call void @swap(i8** %a, i8** %b)
ret i32 0
}
attributes #0 = { noinline nounwind optnone ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
!llvm.module.flags = !{!0, !1}
!llvm.ident = !{!2}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 7, !"PIC Level", i32 2}
!2 = !{!"clang version 10.0.0 "}