Commit Graph
9 Commits
Author SHA1 Message Date
Mosè GiordanoandValentin Churavy 8ad1419368 [julia] Add LLVM IrView (#6285)
Julia is based on LLVM like other toolchains supported by Compiler
Explorer, and it can emit LLVM IR, but at the moment we only expose it
via the flag `--format=llvm` to the compiler wrapper.

With this PR we add a proper LLVM IR viewer, like the other LLVM-based
toolchains. We add a new option for the wrapper to emit the entire LLVM
module, which has the benefit of being parsable by Compiler Explorer, so
that we can automatically filter out debug information and metadata
annotations.

Preview (from
https://github.com/compiler-explorer/compiler-explorer/issues/4597#issuecomment-2018956112):


![image](https://github.com/compiler-explorer/compiler-explorer/assets/765740/7c2f80b4-9c92-4761-9f6e-393d0ad26935)

We removed the custom `<[source code line] [number of output lines]
[function name] [method types]>` line in the output of the `code_*`
functions, together with the custom ASM parsing, because they invalidate
the output (it isn't valid ASM nor LLVM), and create more problems than
they solve.

This PR was prepared in collaboration with @vchuravy.

This should eventually address #4597, once inlined LLVM functions are
handled by the IR parser in Compiler Explorer, I think @vchuravy can
comment more on that issue.

---------

Co-authored-by: Valentin Churavy <v.churavy@gmail.com>
2024-04-01 22:08:35 -05:00
Mosè Giordano 8ee8be2bcf [julia_wrapper] Slightly improve performance (#6024) 2024-01-20 17:22:57 +01:00
Mosè Giordano 7e899b008d [julia_wrapper] Fix compatibility with Julia v1.10 (#5963)
Fix error reported at
https://github.com/compiler-explorer/compiler-explorer/pull/5927#issuecomment-1882396045.
2024-01-15 14:56:34 -06:00
AlexandAlex Wiens 13e80af4da Fix #5752: Julia: Fix inclusion of methods of imported functions and handling of… (#5768)
… parametric methods

If the code contains a method, specializing a function that is defined
in a different module (e.g. Base), then the method would be ignored.

The `names` function offers the `imported` parameter, which leads to
inclusion of imported functions. However, this also leads to inclusion
of many methods that are not defined in the given code. To only consider
the methods from the input code, the input module `m` is passed to the
method searching call `methods(fun, m)`.

While debugging, another bug surfaced: methods with parametric types
would lead to an error, because the type for these methods is
represented differently. In this cases, `specTypes` is of type
`UnionAll`, which does not have a member `parameters`, but the members
`var` and `body` to represent the parametric structure of the type. Also
see https://docs.julialang.org/en/v1/devdocs/types/#UnionAll-types By
checking the `specType` member for the type `UnionAll`, this can be
fixed.

Fixes #5752

Co-authored-by: Alex Wiens <alex.wiens@uni-paderborn.de>
2023-11-20 21:38:00 -06:00
Valentin Churavy 149762051a [Julia] show options from compiler wrapper not Julia runtime (#4716)
https://github.com/compiler-explorer/compiler-explorer/pull/4674 wasn't
quite finished.
This goes the last mile, and shows the user the options from the
compiler-wrapper.
2023-02-12 13:55:47 -06:00
Mosè Giordano 429a01b62e [julia] Set optimisations on by default (#4713)
Fix #4712.

CC: @vchuravy @gbaraldi
2023-02-10 07:10:34 -06:00
Valentin Churavy ceee0d15f5 Add JuliaParser (#4674)
If I understand this right this should populate the list of options for the "compiler options" drop-down
2023-02-10 07:09:18 -06:00
Valentin Churavy 0461bf9717 [Julia] pass optimize to typed (#4673) 2023-02-02 10:18:36 -06:00
Alex 24a2425730 Add Julia (#4595) 2023-01-14 15:44:14 +01:00