forked from rust-lang/llvm
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This attribute is used to ensure the guard page is triggered on stack overflow. Stack frames larger than the guard page size will generate a call to __probestack to touch each page so the guard page won't be skipped. Reviewed By: majnemer Differential Revision: https://reviews.llvm.org/D34386 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305939 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
4a6869c
commit d00e96a
Showing
4 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
; RUN: opt %s -inline -S | FileCheck %s | ||
|
||
define internal void @inner() "probe-stack"="__probestackinner" { | ||
ret void | ||
} | ||
|
||
define void @outerNoAttribute() { | ||
call void @inner() | ||
ret void | ||
} | ||
|
||
define void @outerConflictingAttribute() "probe-stack"="__probestackouter" { | ||
call void @inner() | ||
ret void | ||
} | ||
|
||
; CHECK: define void @outerNoAttribute() #0 | ||
; CHECK: define void @outerConflictingAttribute() #1 | ||
; CHECK: attributes #0 = { "probe-stack"="__probestackinner" } | ||
; CHECK: attributes #1 = { "probe-stack"="__probestackouter" } |