-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recover meta nodes in replace_code_newstyle (#31871)
Copy meta nodes from IRCode to CodeInfo
- Loading branch information
Showing
3 changed files
with
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# This file is a part of Julia. License is MIT: https://julialang.org/license | ||
|
||
# RUN: julia --startup-file=no %s %t && llvm-link -S %t/* -o %t/module.ll | ||
# RUN: cat %t/module.ll | FileCheck %s | ||
|
||
## Notes: | ||
# This script uses the `emit` function (defined llvmpasses.jl) to emit either | ||
# optimized or unoptimized LLVM IR. Each function is emitted individually and | ||
# `llvm-link` is used to create a single module that can be passed to opt. | ||
# The order in which files are emitted and linked is important since `lit` will | ||
# process the test cases in order. | ||
|
||
include(joinpath("..", "testhelpers", "llvmpasses.jl")) | ||
|
||
# CHECK-LABEL: @julia_simple_noinline | ||
@noinline function simple_noinline(A, B) | ||
return A + B | ||
end | ||
|
||
# CHECK: attributes #{{[0-9]+}} = {{{([a-z]+ )*}} noinline {{([a-z]+ )*}}} | ||
emit(simple_noinline, Float64, Float64) |