2020-04-09 18:07:36 +08:00
|
|
|
; RUN: opt -passes=attributor --attributor-disable=false -attributor-annotate-decl-cs -S < %s | FileCheck %s
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
|
|
|
|
declare noalias i8* @malloc(i64)
|
|
|
|
|
|
|
|
declare void @nocapture_func_frees_pointer(i8* nocapture)
|
|
|
|
|
|
|
|
declare void @func_throws(...)
|
|
|
|
|
|
|
|
declare void @sync_func(i8* %p)
|
|
|
|
|
2019-10-15 06:29:05 +08:00
|
|
|
declare void @sync_will_return(i8* %p) willreturn nounwind
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
|
|
|
|
declare void @no_sync_func(i8* nocapture %p) nofree nosync willreturn
|
|
|
|
|
|
|
|
declare void @nofree_func(i8* nocapture %p) nofree nosync willreturn
|
|
|
|
|
|
|
|
declare void @foo(i32* %p)
|
|
|
|
|
|
|
|
declare void @foo_nounw(i32* %p) nounwind nofree
|
|
|
|
|
|
|
|
declare i32 @no_return_call() noreturn
|
|
|
|
|
|
|
|
declare void @free(i8* nocapture)
|
|
|
|
|
|
|
|
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
|
|
|
|
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: @nofree_arg_only(i8* nocapture nofree %p1, i8* nocapture %p2)
|
2019-11-18 04:35:04 +08:00
|
|
|
define void @nofree_arg_only(i8* %p1, i8* %p2) {
|
|
|
|
tail call void @free(i8* %p2)
|
|
|
|
tail call void @nofree_func(i8* %p1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
; TEST 1 - negative, pointer freed in another function.
|
|
|
|
|
|
|
|
define void @test1() {
|
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: @malloc(i64 4)
|
|
|
|
; CHECK-NEXT: @nocapture_func_frees_pointer(i8* noalias nocapture %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @nocapture_func_frees_pointer(i8* %1)
|
|
|
|
tail call void (...) @func_throws()
|
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 2 - negative, call to a sync function.
|
|
|
|
|
|
|
|
define void @test2() {
|
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: @malloc(i64 4)
|
|
|
|
; CHECK-NEXT: @sync_func(i8* %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @sync_func(i8* %1)
|
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 3 - 1 malloc, 1 free
|
|
|
|
|
|
|
|
define void @test3() {
|
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = alloca i8, i64 4
|
|
|
|
; CHECK-NEXT: @no_sync_func(i8* noalias nocapture nofree %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @no_sync_func(i8* %1)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NOT: @free(i8* %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-11-18 04:35:04 +08:00
|
|
|
define void @test3a(i8* %p) {
|
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = alloca i8, i64 4
|
|
|
|
; CHECK-NEXT: tail call void @nofree_arg_only
|
2019-11-18 04:35:04 +08:00
|
|
|
tail call void @nofree_arg_only(i8* %1, i8* %p)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NOT: @free(i8* %1)
|
2019-11-18 04:35:04 +08:00
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2020-03-28 15:15:59 +08:00
|
|
|
declare noalias i8* @aligned_alloc(i64, i64)
|
|
|
|
|
|
|
|
define void @test3b(i8* %p) {
|
|
|
|
%1 = tail call noalias i8* @aligned_alloc(i64 32, i64 128)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = alloca i8, i64 128, align 32
|
|
|
|
; CHECK-NEXT: tail call void @nofree_arg_only
|
2020-03-28 15:15:59 +08:00
|
|
|
tail call void @nofree_arg_only(i8* %1, i8* %p)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NOT: @free(i8* %1)
|
2020-03-28 15:15:59 +08:00
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; leave alone non-constant alignments.
|
|
|
|
define void @test3c(i64 %alignment) {
|
|
|
|
%1 = tail call noalias i8* @aligned_alloc(i64 %alignment, i64 128)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: tail call noalias i8* @aligned_alloc
|
2020-03-28 15:15:59 +08:00
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
declare noalias i8* @calloc(i64, i64)
|
|
|
|
|
|
|
|
define void @test0() {
|
|
|
|
%1 = tail call noalias i8* @calloc(i64 2, i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = alloca i8, i64 8
|
|
|
|
; CHECK-NEXT: %calloc_bc = bitcast i8* %1 to i8*
|
|
|
|
; CHECK-NEXT: call void @llvm.memset.p0i8.i64(i8* %calloc_bc, i8 0, i64 8, i1 false)
|
|
|
|
; CHECK-NEXT: @no_sync_func(i8* noalias nocapture nofree %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @no_sync_func(i8* %1)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NOT: @free(i8* %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2020-03-28 15:15:59 +08:00
|
|
|
; TEST 4
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
define void @test4() {
|
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = alloca i8, i64 4
|
|
|
|
; CHECK-NEXT: @nofree_func(i8* noalias nocapture nofree %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @nofree_func(i8* %1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 5 - not all exit paths have a call to free, but all uses of malloc
|
|
|
|
; are in nofree functions and are not captured
|
|
|
|
|
2019-11-18 04:35:04 +08:00
|
|
|
define void @test5(i32, i8* %p) {
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
%2 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %2 = alloca i8, i64 4
|
|
|
|
; CHECK-NEXT: icmp eq i32 %0, 0
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
%3 = icmp eq i32 %0, 0
|
|
|
|
br i1 %3, label %5, label %4
|
|
|
|
|
|
|
|
4: ; preds = %1
|
|
|
|
tail call void @nofree_func(i8* %2)
|
|
|
|
br label %6
|
|
|
|
|
|
|
|
5: ; preds = %1
|
2019-11-18 04:35:04 +08:00
|
|
|
tail call void @nofree_arg_only(i8* %2, i8* %p)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @free(i8* %2)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NOT: @free(i8* %2)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
br label %6
|
|
|
|
|
|
|
|
6: ; preds = %5, %4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 6 - all exit paths have a call to free
|
|
|
|
|
|
|
|
define void @test6(i32) {
|
|
|
|
%2 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %2 = alloca i8, i64 4
|
|
|
|
; CHECK-NEXT: icmp eq i32 %0, 0
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
%3 = icmp eq i32 %0, 0
|
|
|
|
br i1 %3, label %5, label %4
|
|
|
|
|
|
|
|
4: ; preds = %1
|
|
|
|
tail call void @nofree_func(i8* %2)
|
|
|
|
tail call void @free(i8* %2)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NOT: @free(i8* %2)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
br label %6
|
|
|
|
|
|
|
|
5: ; preds = %1
|
|
|
|
tail call void @free(i8* %2)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NOT: @free(i8* %2)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
br label %6
|
|
|
|
|
|
|
|
6: ; preds = %5, %4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 7 - free is dead.
|
|
|
|
|
|
|
|
define void @test7() {
|
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: alloca i8, i64 4
|
|
|
|
; CHECK-NEXT: tail call i32 @no_return_call()
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call i32 @no_return_call()
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NOT: @free(i8* %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 8 - Negative: bitcast pointer used in capture function
|
|
|
|
|
|
|
|
define void @test8() {
|
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = tail call noalias i8* @malloc(i64 4)
|
|
|
|
; CHECK-NEXT: @no_sync_func(i8* noalias nocapture nofree %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @no_sync_func(i8* %1)
|
|
|
|
%2 = bitcast i8* %1 to i32*
|
|
|
|
store i32 10, i32* %2
|
|
|
|
%3 = load i32, i32* %2
|
|
|
|
tail call void @foo(i32* %2)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: @free(i8* nonnull align 4 dereferenceable(4) %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 9 - FIXME: malloc should be converted.
|
|
|
|
define void @test9() {
|
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = tail call noalias i8* @malloc(i64 4)
|
|
|
|
; CHECK-NEXT: @no_sync_func(i8* noalias nocapture nofree %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @no_sync_func(i8* %1)
|
|
|
|
%2 = bitcast i8* %1 to i32*
|
|
|
|
store i32 10, i32* %2
|
|
|
|
%3 = load i32, i32* %2
|
|
|
|
tail call void @foo_nounw(i32* %2)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: @free(i8* nonnull align 4 dereferenceable(4) %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 10 - 1 malloc, 1 free
|
|
|
|
|
|
|
|
define i32 @test10() {
|
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = alloca i8, i64 4
|
|
|
|
; CHECK-NEXT: @no_sync_func(i8* noalias nocapture nofree %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @no_sync_func(i8* %1)
|
|
|
|
%2 = bitcast i8* %1 to i32*
|
|
|
|
store i32 10, i32* %2
|
|
|
|
%3 = load i32, i32* %2
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NOT: @free(i8* %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret i32 %3
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 @test_lifetime() {
|
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = alloca i8, i64 4
|
|
|
|
; CHECK-NEXT: @no_sync_func(i8* noalias nocapture nofree %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @no_sync_func(i8* %1)
|
|
|
|
call void @llvm.lifetime.start.p0i8(i64 4, i8* %1)
|
|
|
|
%2 = bitcast i8* %1 to i32*
|
|
|
|
store i32 10, i32* %2
|
|
|
|
%3 = load i32, i32* %2
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NOT: @free(i8* %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret i32 %3
|
|
|
|
}
|
|
|
|
|
2020-03-28 15:15:59 +08:00
|
|
|
; TEST 11
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
|
|
|
|
define void @test11() {
|
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: test11
|
|
|
|
; CHECK-NEXT: alloc
|
|
|
|
; CHECK-NEXT: @sync_will_return(i8* %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @sync_will_return(i8* %1)
|
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; TEST 12
|
|
|
|
define i32 @irreducible_cfg(i32 %0) {
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: alloca i8, i64 4
|
|
|
|
; CHECK-NEXT: %3 = bitcast
|
2019-10-13 12:14:15 +08:00
|
|
|
%2 = call noalias i8* @malloc(i64 4)
|
|
|
|
%3 = bitcast i8* %2 to i32*
|
|
|
|
store i32 10, i32* %3, align 4
|
|
|
|
%4 = icmp eq i32 %0, 1
|
|
|
|
br i1 %4, label %5, label %7
|
|
|
|
|
|
|
|
5: ; preds = %1
|
|
|
|
%6 = add nsw i32 %0, 5
|
|
|
|
br label %13
|
|
|
|
|
|
|
|
7: ; preds = %1
|
|
|
|
br label %8
|
|
|
|
|
|
|
|
8: ; preds = %13, %7
|
|
|
|
%.0 = phi i32 [ %14, %13 ], [ 1, %7 ]
|
|
|
|
%9 = load i32, i32* %3, align 4
|
|
|
|
%10 = add nsw i32 %9, -1
|
|
|
|
store i32 %10, i32* %3, align 4
|
|
|
|
%11 = icmp ne i32 %9, 0
|
|
|
|
br i1 %11, label %12, label %15
|
|
|
|
|
|
|
|
12: ; preds = %8
|
|
|
|
br label %13
|
|
|
|
|
|
|
|
13: ; preds = %12, %5
|
|
|
|
%.1 = phi i32 [ %6, %5 ], [ %.0, %12 ]
|
|
|
|
%14 = add nsw i32 %.1, 1
|
|
|
|
br label %8
|
|
|
|
|
|
|
|
15: ; preds = %8
|
|
|
|
%16 = load i32, i32* %3, align 4
|
|
|
|
%17 = bitcast i32* %3 to i8*
|
|
|
|
call void @free(i8* %17)
|
|
|
|
%18 = load i32, i32* %3, align 4
|
|
|
|
ret i32 %18
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
}
|
|
|
|
|
2019-10-13 12:14:15 +08:00
|
|
|
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
define i32 @malloc_in_loop(i32 %0) {
|
|
|
|
%2 = alloca i32, align 4
|
|
|
|
%3 = alloca i32*, align 8
|
|
|
|
store i32 %0, i32* %2, align 4
|
|
|
|
br label %4
|
|
|
|
|
|
|
|
4: ; preds = %8, %1
|
|
|
|
%5 = load i32, i32* %2, align 4
|
|
|
|
%6 = add nsw i32 %5, -1
|
|
|
|
store i32 %6, i32* %2, align 4
|
|
|
|
%7 = icmp sgt i32 %6, 0
|
|
|
|
br i1 %7, label %8, label %11
|
|
|
|
|
|
|
|
8: ; preds = %4
|
|
|
|
%9 = call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: alloca i8, i64 4
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
%10 = bitcast i8* %9 to i32*
|
2019-10-13 12:14:15 +08:00
|
|
|
store i32 1, i32* %10, align 8
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
br label %4
|
|
|
|
|
|
|
|
11: ; preds = %4
|
|
|
|
ret i32 5
|
|
|
|
}
|
|
|
|
|
|
|
|
; Malloc/Calloc too large
|
|
|
|
define i32 @test13() {
|
|
|
|
%1 = tail call noalias i8* @malloc(i64 256)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = tail call noalias i8* @malloc(i64 256)
|
|
|
|
; CHECK-NEXT: @no_sync_func(i8* noalias nofree %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @no_sync_func(i8* %1)
|
|
|
|
%2 = bitcast i8* %1 to i32*
|
|
|
|
store i32 10, i32* %2
|
|
|
|
%3 = load i32, i32* %2
|
|
|
|
tail call void @free(i8* %1)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: tail call void @free(i8* noalias nonnull align 4 dereferenceable(4) %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
ret i32 %3
|
|
|
|
}
|
|
|
|
|
2019-12-18 03:36:10 +08:00
|
|
|
define i32 @test_sle() {
|
|
|
|
%1 = tail call noalias i8* @malloc(i64 -1)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = tail call noalias i8* @malloc(i64 -1)
|
|
|
|
; CHECK-NEXT: @no_sync_func(i8* noalias nofree %1)
|
2019-12-18 03:36:10 +08:00
|
|
|
tail call void @no_sync_func(i8* %1)
|
|
|
|
%2 = bitcast i8* %1 to i32*
|
|
|
|
store i32 10, i32* %2
|
|
|
|
%3 = load i32, i32* %2
|
|
|
|
tail call void @free(i8* %1)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: tail call void @free(i8* noalias nonnull align 4 dereferenceable(4) %1)
|
2019-12-18 03:41:09 +08:00
|
|
|
ret i32 %3
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 @test_overflow() {
|
|
|
|
%1 = tail call noalias i8* @calloc(i64 65537, i64 65537)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = tail call noalias i8* @calloc(i64 65537, i64 65537)
|
|
|
|
; CHECK-NEXT: @no_sync_func(i8* noalias nofree %1)
|
2019-12-18 03:41:09 +08:00
|
|
|
tail call void @no_sync_func(i8* %1)
|
|
|
|
%2 = bitcast i8* %1 to i32*
|
|
|
|
store i32 10, i32* %2
|
|
|
|
%3 = load i32, i32* %2
|
|
|
|
tail call void @free(i8* %1)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: tail call void @free(i8* noalias nonnull align 4 dereferenceable(4) %1)
|
2019-12-18 03:36:10 +08:00
|
|
|
ret i32 %3
|
|
|
|
}
|
|
|
|
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
define void @test14() {
|
|
|
|
%1 = tail call noalias i8* @calloc(i64 64, i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = tail call noalias i8* @calloc(i64 64, i64 4)
|
|
|
|
; CHECK-NEXT: @no_sync_func(i8* noalias nofree %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
tail call void @no_sync_func(i8* %1)
|
|
|
|
tail call void @free(i8* %1)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: tail call void @free(i8* noalias %1)
|
[Attributor] Heap-To-Stack Conversion
D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.
Reviewers: jdoerfert, uenoku, hfinkel, efriedma
Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65408
llvm-svn: 371942
2019-09-16 05:47:41 +08:00
|
|
|
ret void
|
|
|
|
}
|
2019-10-13 11:54:08 +08:00
|
|
|
|
|
|
|
define void @test15(i64 %S) {
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = tail call noalias i8* @malloc(i64 %S)
|
2019-10-13 11:54:08 +08:00
|
|
|
%1 = tail call noalias i8* @malloc(i64 %S)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NEXT: @no_sync_func(i8* noalias nofree %1)
|
2019-10-13 12:14:15 +08:00
|
|
|
tail call void @no_sync_func(i8* %1)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NEXT: @free(i8* noalias %1)
|
2019-10-13 12:14:15 +08:00
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @test16a(i8 %v, i8** %P) {
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = alloca
|
2019-10-13 12:14:15 +08:00
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NEXT: store i8 %v, i8* %1
|
2019-10-13 12:14:15 +08:00
|
|
|
store i8 %v, i8* %1
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NEXT: @no_sync_func(i8* noalias nocapture nofree nonnull dereferenceable(1) %1)
|
2019-10-13 12:14:15 +08:00
|
|
|
tail call void @no_sync_func(i8* %1)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NOT: @free(i8* %1)
|
2020-02-20 12:00:43 +08:00
|
|
|
tail call void @free(i8* nonnull dereferenceable(1) %1)
|
2019-10-13 12:14:15 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @test16b(i8 %v, i8** %P) {
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = tail call noalias i8* @malloc(i64 4)
|
2019-10-13 12:14:15 +08:00
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NEXT: store i8* %1, i8** %P
|
2019-10-13 12:14:15 +08:00
|
|
|
store i8* %1, i8** %P
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NEXT: @no_sync_func(i8* nocapture nofree %1)
|
2019-10-13 12:14:15 +08:00
|
|
|
tail call void @no_sync_func(i8* %1)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NEXT: @free(i8* %1)
|
2019-10-13 12:14:15 +08:00
|
|
|
tail call void @free(i8* %1)
|
2019-10-13 11:54:08 +08:00
|
|
|
ret void
|
|
|
|
}
|
2019-10-15 06:29:05 +08:00
|
|
|
|
|
|
|
define void @test16c(i8 %v, i8** %P) {
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = alloca
|
2019-10-15 06:29:05 +08:00
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NEXT: store i8* %1, i8** %P
|
2019-10-15 06:29:05 +08:00
|
|
|
store i8* %1, i8** %P
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NEXT: @no_sync_func(i8* nocapture nofree %1)
|
2019-10-15 06:29:05 +08:00
|
|
|
tail call void @no_sync_func(i8* %1) nounwind
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NOT: @free
|
2019-10-15 06:29:05 +08:00
|
|
|
tail call void @free(i8* %1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @test16d(i8 %v, i8** %P) {
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK: %1 = tail call noalias i8* @malloc(i64 4)
|
2019-10-15 06:29:05 +08:00
|
|
|
%1 = tail call noalias i8* @malloc(i64 4)
|
2020-04-09 18:07:36 +08:00
|
|
|
; CHECK-NEXT: store i8* %1, i8** %P
|
2019-10-15 06:29:05 +08:00
|
|
|
store i8* %1, i8** %P
|
|
|
|
ret void
|
|
|
|
}
|