Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimizer: support callsite annotations of @inline and @noinline #40754

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Next Next commit
Revert "handle constant-prop' and generalize a bit"
This reverts commit ebf8a37.
  • Loading branch information
aviatesk committed Jun 18, 2021
commit 70939e85a69e290bdeb6e29062dc727437e2932f
28 changes: 0 additions & 28 deletions .buildkite/pipeline.yml

This file was deleted.

1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ StatementMacros:
- checked_intrinsic_ctype
- cvt_iintrinsic
- fpiseq_n
- fpislt_n
- ter_fintrinsic
- ter_intrinsic_ctype
- un_fintrinsic
Expand Down
4 changes: 1 addition & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
CODEOWNERS @JuliaLang/github-actions
/.github/ @JuliaLang/github-actions
/.buildkite/ @JuliaLang/github-actions
/.github/workflows/ @JuliaLang/github-actions
66 changes: 63 additions & 3 deletions CITATION.bib
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,68 @@ @article{Julia-2017
pages={65--98},
year={2017},
publisher={SIAM},
doi={10.1137/141000671},
url={https://epubs.siam.org/doi/10.1137/141000671}
doi={10.1137/141000671}
}

% For more details on research related to Julia, see https://julialang.org/research
% The following citations are about specific aspects of Julia.

@article{Julia-2019-a,
author = {Bezanson, Jeff and Chen, Jiahao and Chung, Benjamin and Karpinski, Stefan and Shah, Viral B. and Vitek, Jan and Zoubritzky, Lionel},
title = {Julia: Dynamism and Performance Reconciled by Design},
journal = {Proc. ACM Program. Lang.},
issue_date = {November 2018},
volume = {2},
number = {OOPSLA},
month = oct,
year = {2018},
issn = {2475-1421},
pages = {120:1--120:23},
articleno = {120},
numpages = {23},
url = {https://doi.acm.org/10.1145/3276490},
doi = {10.1145/3276490},
acmid = {3276490},
publisher = {ACM},
address = {New York, NY, USA},
keywords = {dynamic languages, just-in-time compilation, multiple dispatch},
}

@article{Julia-2019-b,
author = {Zappa Nardelli, Francesco and Belyakova, Julia and Pelenitsyn, Artem and Chung, Benjamin and Bezanson, Jeff and Vitek, Jan},
title = {Julia Subtyping: A Rational Reconstruction},
journal = {Proc. ACM Program. Lang.},
issue_date = {November 2018},
volume = {2},
number = {OOPSLA},
month = oct,
year = {2018},
issn = {2475-1421},
pages = {113:1--113:27},
articleno = {113},
numpages = {27},
url = {https://doi.acm.org/10.1145/3276483},
doi = {10.1145/3276483},
acmid = {3276483},
publisher = {ACM},
address = {New York, NY, USA},
keywords = {Multiple Dispatch, Subtyping},
}

@inproceedings{Julia-2014,
author = {Bezanson, Jeff and Chen, Jiahao and Karpinski, Stefan and Shah, Viral and Edelman, Alan},
title = {Array Operators Using Multiple Dispatch: A Design Methodology for Array Implementations in Dynamic Languages},
booktitle = {Proceedings of ACM SIGPLAN International Workshop on Libraries, Languages, and Compilers for Array Programming},
series = {ARRAY'14},
year = {2014},
isbn = {978-1-4503-2937-8},
location = {Edinburgh, United Kingdom},
pages = {56:56--56:61},
articleno = {56},
numpages = {6},
url = {https://doi.acm.org/10.1145/2627373.2627383},
doi = {10.1145/2627373.2627383},
acmid = {2627383},
publisher = {ACM},
address = {New York, NY, USA},
keywords = {Julia, array indexing, dynamic dispatch, multiple dispatch, static analysis, type inference},
}
366 changes: 0 additions & 366 deletions HISTORY.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ USE_SYSTEM_BLAS:=0
USE_SYSTEM_LAPACK:=0
USE_SYSTEM_GMP:=0
USE_SYSTEM_MPFR:=0
USE_SYSTEM_LIBSUITESPARSE:=0
USE_SYSTEM_SUITESPARSE:=0
USE_SYSTEM_LIBUV:=0
USE_SYSTEM_UTF8PROC:=0
USE_SYSTEM_MBEDTLS:=0
Expand Down Expand Up @@ -1168,7 +1168,7 @@ BB_TRIPLET := $(subst $(SPACE),-,$(filter-out cxx%,$(filter-out libgfortran%,$(s
LIBGFORTRAN_VERSION := $(subst libgfortran,,$(filter libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN))))

# This is the set of projects that BinaryBuilder dependencies are hooked up for.
BB_PROJECTS := BLASTRAMPOLINE OPENBLAS LLVM LIBSUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 NGHTTP2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV ZLIB P7ZIP CSL
BB_PROJECTS := BLASTRAMPOLINE OPENBLAS LLVM SUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 NGHTTP2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV ZLIB P7ZIP CSL
define SET_BB_DEFAULT
# First, check to see if BB is disabled on a global setting
ifeq ($$(USE_BINARYBUILDER),0)
Expand All @@ -1187,7 +1187,7 @@ $(foreach proj,$(BB_PROJECTS),$(eval $(call SET_BB_DEFAULT,$(proj))))

# Warn if the user tries to build something that requires `gfortran` but they don't have it installed.
ifeq ($(FC_VERSION),)
ifneq ($(USE_BINARYBUILDER_OPENBLAS)$(USE_BINARYBUILDER_LIBSUITESPARSE),11)
ifneq ($(USE_BINARYBUILDER_OPENBLAS)$(USE_BINARYBUILDER_SUITESPARSE),11)
$(error "Attempting to build OpenBLAS or SuiteSparse without a functioning fortran compiler!")
endif
endif
Expand Down Expand Up @@ -1243,7 +1243,7 @@ else ifneq ($(USEMSVC), 1)
endif

ifeq ($(OS), Linux)
OSLIBS += -Wl,--no-as-needed -ldl -lrt -lpthread -latomic -Wl,--export-dynamic,--as-needed,--no-whole-archive
OSLIBS += -Wl,--no-as-needed -ldl -lrt -lpthread -Wl,--export-dynamic,--as-needed,--no-whole-archive
# Detect if ifunc is supported
IFUNC_DETECT_SRC := 'void (*f0(void))(void) { return (void(*)(void))0L; }; void f(void) __attribute__((ifunc("f0")));'
ifeq (supported, $(shell echo $(IFUNC_DETECT_SRC) | $(CC) -Werror -x c - -S -o /dev/null > /dev/null 2>&1 && echo supported))
Expand All @@ -1269,7 +1269,7 @@ endif

ifeq ($(OS), FreeBSD)
JLDFLAGS := -Wl,-Bdynamic
OSLIBS += -lelf -lkvm -lrt -lpthread -latomic
OSLIBS += -lelf -lkvm -lrt -lpthread

# Tweak order of libgcc_s in DT_NEEDED,
# make it loaded first to
Expand Down Expand Up @@ -1374,8 +1374,8 @@ endif
ifeq ($(USE_SYSTEM_BLAS),1)
# Since the names don't line up (`BLAS` vs. `OPENBLAS`), manually gate:
USE_BINARYBUILDER_OPENBLAS := 0
# Disable BB LIBSUITESPARSE if we're using system BLAS
USE_BINARYBUILDER_LIBSUITESPARSE := 0
# Disable BB SuiteSparse if we're using system BLAS
USE_BINARYBUILDER_SUITESPARSE := 0
endif

ifeq ($(USE_SYSTEM_LIBM),1)
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ ifeq ($(BUNDLE_DEBUG_LIBS),1)
JL_PRIVATE_LIBS-0 += libjulia-internal-debug
endif
ifeq ($(USE_GPL_LIBS), 1)
JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBSUITESPARSE) += libamd libbtf libcamd libccolamd libcholmod libcolamd libklu libldl librbio libspqr libsuitesparseconfig libumfpack
JL_PRIVATE_LIBS-0 += libsuitesparse_wrapper
JL_PRIVATE_LIBS-$(USE_SYSTEM_SUITESPARSE) += libamd libbtf libcamd libccolamd libcholmod libcolamd libklu libldl librbio libspqr libsuitesparseconfig libumfpack
endif
JL_PRIVATE_LIBS-$(USE_SYSTEM_PCRE) += libpcre2-8
JL_PRIVATE_LIBS-$(USE_SYSTEM_DSFMT) += libdSFMT
Expand All @@ -188,7 +189,7 @@ else
JL_PRIVATE_LIBS-$(USE_SYSTEM_ZLIB) += libz
endif
ifeq ($(USE_LLVM_SHLIB),1)
JL_PRIVATE_LIBS-$(USE_SYSTEM_LLVM) += libLLVM libLLVM-12jl
JL_PRIVATE_LIBS-$(USE_SYSTEM_LLVM) += libLLVM libLLVM-11jl
endif
JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBUNWIND) += libunwind

Expand Down
81 changes: 73 additions & 8 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
Julia v1.8 Release Notes
Julia v1.7 Release Notes
========================


New language features
---------------------

* `Module(:name, false, false)` can be used to create a `module` that does not import `Core`. ([#40110])
* `(; a, b) = x` can now be used to destructure properties `a` and `b` of `x`. This syntax is equivalent to `a = getproperty(x, :a)`
and similarly for `b`. ([#39285])
* Implicit multiplication by juxtaposition is now allowed for radical symbols (e.g., `x√y` and `x∛y`). ([#40173])
* The short-circuiting operators `&&` and `||` can now be dotted to participate in broadcast fusion
as `.&&` and `.||`. ([#39594])
* `⫪` (U+2AEA, `\Top`, `\downvDash`) and `⫫` (U+2AEB, `\Bot`, `\upvDash`, `\indep`)
may now be used as binary operators with comparison precedence. ([#39403])
* `@noinline` can now be used at function callsites and `@inline` and `@noinline` can be used in `do` blocks. ([#40754]).
aviatesk marked this conversation as resolved.
Show resolved Hide resolved

Language changes
----------------

* `macroexpand`, `@macroexpand`, and `@macroexpand1` no longer wrap errors in a `LoadError`. To reduce breakage, `@test_throws` has been modified so that many affected tests will still pass ([#38379]].

Compiler/Runtime improvements
-----------------------------
Expand All @@ -19,10 +24,12 @@ Compiler/Runtime improvements
Command-line option changes
---------------------------

* The Julia `--project` option and the `JULIA_PROJECT` environment variable now support selecting shared environments like `.julia/environments/myenv` the same way the package management console does: use `julia --project=@myenv` resp. `export JULIA_PROJECT="@myenv"` ([#40025]).


Multi-threading changes
-----------------------

* If the `JULIA_NUM_THREADS` environment variable is set to `auto`, then the number of threads will be set to the number of CPU threads ([#38952])

Build system changes
--------------------
Expand All @@ -31,50 +38,108 @@ Build system changes
New library functions
---------------------

* Two argument methods `findmax(f, domain)`, `argmax(f, domain)` and the corresponding `min` versions ([#27613]).
* `isunordered(x)` returns true if `x` is value that is normally unordered, such as `NaN` or `missing`.
* New macro `Base.@invokelatest f(args...; kwargs...)` provides a convenient way to call `Base.invokelatest(f, args...; kwargs...)` ([#37971])
* New macro `Base.@invoke f(arg1::T1, arg2::T2; kwargs...)` provides an easier syntax to call `invoke(f, Tuple{T1,T2}; kwargs...)` ([#38438])
* Two arguments method `lock(f, lck)` now accepts a `Channel` as the second argument. ([#39312])
* New functor `Returns(value)`, which returns `value` for any arguments ([#39794])
* New macro `Base.@invoke f(arg1::T1, arg2::T2; kwargs...)` provides an easier syntax to call `invoke(f, Tuple{T1,T2}, arg1, arg2; kwargs...)` ([#38438])

New library features
--------------------

* The optional keyword argument `context` of `sprint` can now be set to a tuple of `:key => value` pairs to specify multiple attributes. ([#39381])
* `bytes2hex` and `hex2bytes` are no longer limited to arguments of type `Union{String,AbstractVector{UInt8}}` and now only require that they're iterable and have a length. ([#39710])

Standard library changes
------------------------

* `count` and `findall` now accept an `AbstractChar` argument to search for a character in a string ([#38675]).
* `range` now supports the `range(start, stop)` and `range(start, stop, length)` methods ([#39228]).
* `range` now supports `start` as an optional keyword argument ([#38041]).
* `islowercase` and `isuppercase` are now compliant with the Unicode lower/uppercase categories ([#38574]).
* `iseven` and `isodd` functions now support non-`Integer` numeric types ([#38976]).
* `escape_string` can now receive a collection of characters in the keyword
`keep` that are to be kept as they are. ([#38597]).
* `getindex` can now be used on `NamedTuple`s with multiple values ([#38878])
* Subtypes of `AbstractRange` now correctly follow the general array indexing
behavior when indexed by `Bool`s, erroring for scalar `Bool`s and treating
arrays (including ranges) of `Bool` as an logical index ([#31829])
* `keys(::RegexMatch)` is now defined to return the capture's keys, by name if named, or by index if not ([#37299]).
* `keys(::Generator)` is now defined to return the iterator's keys ([#34678])
* `RegexMatch` now iterate to give their captures. ([#34355]).
* `Test.@test` now accepts `broken` and `skip` boolean keyword arguments, which
mimic `Test.@test_broken` and `Test.@test_skip` behavior, but allows skipping
tests failing only under certain conditions. For example
```julia
if T == Float64
@test_broken isequal(complex(one(T)) / complex(T(Inf), T(-Inf)), complex(zero(T), zero(T)))
else
@test isequal(complex(one(T)) / complex(T(Inf), T(-Inf)), complex(zero(T), zero(T)))
end
```
can be replaced by
```julia
@test isequal(complex(one(T)) / complex(T(Inf), T(-Inf)), complex(zero(T), zero(T))) broken=(T == Float64)
```
([#39322])

#### Package Manager


#### LinearAlgebra

* Use [Libblastrampoline](https://github.com/staticfloat/libblastrampoline/) to pick a BLAS and LAPACK at runtime. By default it forwards to OpenBLAS in the Julia distribution. The forwarding mechanism can be used by packages to replace the BLAS and LAPACK with user preferences. ([#39455])
* On aarch64, OpenBLAS now uses an ILP64 BLAS like all other 64-bit platforms. ([#39436])
* OpenBLAS is updated to 0.3.13. ([#39216])
* SuiteSparse is updated to 5.8.1. ([#39455])
* The shape of an `UpperHessenberg` matrix is preserved under certain arithmetic operations, e.g. when multiplying or dividing by an `UpperTriangular` matrix. ([#40039])
* `cis(A)` now supports matrix arguments ([#40194]).
* `dot` now supports `UniformScaling` with `AbstractMatrix` ([#40250]).

#### Markdown


#### Printf
* Now uses `textwidth` for formatting `%s` and `%c` widths ([#41085]).


#### Random


#### REPL


#### SparseArrays


#### Dates

#### Downloads
* The `Dates.periods` function can be used to get the `Vector` of `Period`s that comprise a `CompoundPeriod` ([#39169]).

#### Statistics


#### Sockets

#### Tar

#### Distributed


#### UUIDs


#### Mmap

* `mmap` is now exported ([#39816]).

#### DelimitedFiles

* `readdlm` now defaults to `use_mmap=false` on all OSes for consistent reliability in abnormal filesystem situations ([#40415]).

Deprecated or removed
---------------------
- Multiple successive semicolons in an array expresion were previously ignored (e.g. `[1 ;; 2] == [1 ; 2]`). Multiple semicolons are being reserved for future syntax and may have different behavior in a future release.


External dependencies
Expand Down
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ helpful to start contributing to the Julia codebase.

- [**StackOverflow**](https://stackoverflow.com/questions/tagged/julia-lang)
- [**Twitter**](https://twitter.com/JuliaLanguage)
- [**Meetup**](https://julia.meetup.com/)
- [**Learning resources**](https://julialang.org/learning/)

## Binary Installation
Expand Down Expand Up @@ -72,14 +73,14 @@ First, make sure you have all the [required
dependencies](https://github.com/JuliaLang/julia/blob/master/doc/build/build.md#required-build-tools-and-external-libraries) installed.
Then, acquire the source code by cloning the git repository:

git clone https://github.com/JuliaLang/julia.git
git clone git://github.com/JuliaLang/julia.git

By default you will be building the latest unstable version of
Julia. However, most users should use the most recent stable version
of Julia. You can get this version by changing to the Julia directory
and running:

git checkout v1.6.1
git checkout v1.6.0

Now run `make` to build the `julia` executable.

Expand Down Expand Up @@ -144,7 +145,10 @@ Support for editing Julia is available for many
[Sublime Text](https://github.com/JuliaEditorSupport/Julia-sublime), and many
others.

Supported IDEs include: [julia-vscode](https://github.com/JuliaEditorSupport/julia-vscode) (VS
Code plugin), [Juno](http://junolab.org/) (Atom plugin). [Jupyter](https://jupyter.org/)
notebooks are available through the [IJulia](https://github.com/JuliaLang/IJulia.jl) package, and
[Pluto](https://github.com/fonsp/Pluto.jl) notebooks through the Pluto.jl package.
Supported IDEs include: [Juno](http://junolab.org/) (Atom plugin),
[julia-vscode](https://github.com/JuliaEditorSupport/julia-vscode) (VS
Code plugin), and
[julia-intellij](https://github.com/JuliaEditorSupport/julia-intellij)
(IntelliJ IDEA plugin). The popular [Jupyter](https://jupyter.org/)
notebook interface is available through
[IJulia](https://github.com/JuliaLang/IJulia.jl).
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.0-DEV
1.7.0-DEV
Loading