| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
| |
(1) Restore explicit specification of
`group.*.demangler=/opt/compiler-explorer/clang-trunk/bin/llvm-cxxfilt`
for all clang compiler groups, except bpf and windows.
(2) Make the ClangCompiler` constructor adjust the path of
`llvm-cxxfilt`, so that a compiler-local version is preferred, if one
exists.
(3) Pass-by update: bump the version of llvmDisassembler from clang-14
to clang-18.1.
Hopefully this addresses all demangling issues known so far.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
dex2oat supports profile-guided compilation. In addition to taking dex
code as an input, it can take a profile as another input, to guide the
compilation. The profile determines which methods need to be compiled,
how calls can be inlined, and so on.
Because Compiler Explorer doesn't support multiple input files, the
profile is added as a comment block in the Java/Kotlin source code. A
post-processor extracts the profile from the comment block into a
separate file, in order to input it to dex2oat.
|
|
|
|
|
|
|
|
|
| |
on java <11 (#6397)
This fixes #6388.
---------
Co-authored-by: Rubén Rincón Blanco <git@rinconblanco.es>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates dex2oat to specify a valid boot image for accurate compilations.
For example, these two methods should now (correctly) compile to the
same native code:
```
static int insertAndReturn(int num) {
int[] arr = {num};
return arr[0];
}
static int justReturn(int num) {
return num;
}
```
|
|
|
|
|
| |
Adds '--copy-dex-files=always', as it is needed in newer versions of
dex2oat. This doesn't affect older versions.
|
|
|
|
|
| |
updates intermediate compiler exe input to refer to the compiler's
getInfo().exe so that paths don't need to be hardcoded in properties.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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):

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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Demangled Rust identifiers under the `legacy` name mangling scheme rely
on a hash to disambiguate items with the same name, such as different
monomorphisations of the same function or different closures’
`call_once` methods.
In the `v0` mangling scheme, this is no longer a problem. However,
configuring the demangler to show hashes in `legacy` names will include
crate-id hashes in `v0` names, which are [mostly
unneeded](https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html#appendix-a---suggested-demangling).
This PR introduces a new checkbox *Options...* → *Verbose demangling*
that lets the user select if they want to include disambiguating hashes
in demangled identifiers.
This checkbox is only shown for compilers that support verbose
demangling, and deactivated when the *Demangle identifiers* checkbox is
unchecked.
Resolves #1754.
Resolves #6255.
|
| |
|
| |
|
| |
|
|
|
|
| |
(#6277)
|
| |
|
|
|
|
|
| |
Specifically bpf uses group.bpf.demangler (gcc demangler)
This fix continues #6114.
|
|
|
| |
Just some minor homekeeping.
|
| |
|
|
|
|
|
| |
refs #6079
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Pythran is a python to c++ transpiler.
Our supports both the C++ and the full link to a share library (a python
module).
See https://pypi.org/project/pythran/ for more information.
fixes #6079
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
|
|
|
|
|
|
|
| |
This does contain a single `.default.properties` file, but it already
contained an `/opt/compiler-explorer` reference.
@partouf maybe that would solve the mangling issue for clang-17 + libc++
?
|
| |
|
| |
|
|
|
|
|
|
| |
This change adds recent D8 versions (8.1.72, 8.2.33, 8.2.42). Properties
for D8 have been reformatted to use groups in order to avoid duplication
of java/kotlin references.
|
|
|
|
|
|
|
|
|
|
| |
Since
https://github.com/llvm/llvm-project/commit/9ca1a1575a337931d0e49859f83a0d5b70916abd,
flang supports the use of `-masm` without having to use `-mllvm`. flang
converts this into `-mllvm...` so the result is the same.
The check still looks for `-mllvm`, as this is the best way to tell
flang and flang-to-external-fc apart. As `-masm` doesn't appear in the
--help output of flang.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
flang-new doesn't support `-masm=intel` (though it seems likely it
eventually will), so this uses `-mllvm ...` to achieve the same thing.
flang-to-external-fc is a wrapper script that will be removed once
flang-new becomes flang, so it is not being updated and won't support
-masm or -mllvm ever.
(and you'll get the same output by choosing a gfortran compiler, since
that's what the script uses for codegen)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for the Spice programming language.
Spice (`spicelang`) is a simple, AOT compiled, LLVM-based systems
language with focus on practicality and performance.
**Key features of Spice**
- simplicity - see what you get aproach with batteries included
- performance: As Spice uses LLVM as its primary backbone, it competes
with the performance of other LLVM-based compilers
- enhanced safety: Spice implements an enhanced safety mechanism, which
includes builtin heap type with auto-free and more
- cross-compile support: Currently x86_64, AArch64 and wasm32 are
supported cross-compilation targets, but more to come
- Pretty good C and C++ interop
**Links**
- Source code: https://github.com/spicelang/spice
- Website: https://spicelang.com
- Playground (own CE instance): https://play.spicelang.com
- Infra PR: https://github.com/compiler-explorer/infra/pull/1229
**Things this PR addresses**
- General support for Spice
- Three code examples
- Spice mode (Syntax highlighting)
- Opt pipeline support
- LLVM mca and osaca support
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hi, this PR adds a way to view the assemply code of Erlang code.
Since OTP 24 inside the Erlang VM there is a jitter that runs while we
load the code.
The standard way to dump the asm code is to pass an option during the
startup. The main issue is that this triggers the dump of all the
modules we are loading (and it is slow).
To avoid this I'm using some instrinsics of OTP 26 but at least we dump
only what we need.
(I'm planning to add it to `infra` and then to awmason
Some references:
-
https://www.erlang.org/blog/otp-26-highlights/#improvements-in-the-erlang-compiler-and-jit
-
https://github.com/erlang/otp/blob/master/erts/emulator/beam/erl_bif_info.c#L5255
---------
Co-authored-by: Matt Godbolt <matt@godbolt.org>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hi, I am adding support for the Elixir language
(https://github.com/compiler-explorer/compiler-explorer/issues/3947)
I have done this so far. It is not perfect but at least is something I
can work with.
In Elixir you can write several modules in the same file, so I show the
different compile utins as a list.
It works locally but I don't know how to add the Elixir language to
[infra](https://github.com/compiler-explorer/infra/)
Some notes:
- I think Elixir's macro system may be a potential security issue
because I can run code during compilation.
- The decompiled code contains a reference to the file path on the
system machine.

|
|
|
|
| |
- warns
- fixes the case I found
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
flang supports the -emit-llvm option but the difference from clang is
that while clang allows `-Xclang -emit-llvm`, flang does not allow
`-Xflang -emit-llvm`. Instead we need to use `-emit-llvm` alone.
This is a deliberate choice by the flang driver to make sure the user
isn't asking the compiler to do 2 things at once. In this case assemble
and emit llvm IR.
The way compiler explorer calls clang, the IR ends up not in the `-o`
file path but in a file named after the input file but with the
extension `.ll`. For flang we will get the IR in the file specified by
`-o`.
To handle this I've copied code from ISPCCompiler which does the same
thing. We could dedupe this, but I'm not sure whether it's worth it
while we have only 2 compilers doing this.
(clang supports `clang ... -emit-llvm` as well, so perhaps the flang
style could become the majority mode eventually)
Final note, flang-to-external-fc could support this with changes but
users are better off just using flang-new, the result is the same (as
flang-to-external-fc doesn't advertise -emit-llvm, it won't be
selectable anyway).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
|
|
|
|
|
|
|
| |
Instead of having several globals, set via environment variables,
explicitly set the "correct" env var if passed `--tmpDir` and then
consistently use it in the rest of the program.
See @apmorton's comments in #1707
|
|
|
|
|
|
|
| |
https://github.com/compiler-explorer/compiler-workflows/pull/22
https://github.com/compiler-explorer/infra/pull/1218
https://github.com/compiler-explorer/misc-builder/pull/76
Depends on #6027
|
|
|
| |
This PR populates types in the HandlerConfig
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All compilations run asynchronously under `await Promise.all` in
`BaseCompiler.doCompilation`:
https://github.com/compiler-explorer/compiler-explorer/blob/f3277b8aed2ca12ce961d08ef792c4061a3331ac/lib/base-compiler.ts#L2256-L2263
ASM and MIR processing is done from the main `runCompiler` and IR from
the auxiliary `generateIR`. But both compilation calls are passed the
same `options` - which include `--emit asm` for generation of `output.s`
assembly file and `--emit mir=...` for generation of MIR file. So these
2 identically-named file pairs are generated *and cleaned up* in both of
the parallel compilations, sometimes one compilation cleans up its
output before the other one tries to process its own, and mayhem ensues.
This PR makes rust's `generateIR` indeed generate *just* IR by filtering
switches.
From a design perspective: ideally CE would be more opinionated on which
outputs are generated on the main compilation and which on auxiliary
ones. I see no reason for MIR to be generated by an additional switch on
the main compilation and IR require a different compilation (there's
also something called `generateRustHir` - I don't know what it does and
am slightly afraid to ask).
I *think* most (all?) asm/IR outputs could be generated in a single main
compilation, and just post-processed for the different panes in parallel
- which could spell very good news also for servers load. But I don't
dare say anything categorical about *all* languages, compilers and
output (probably no one does). Would be happy to hear opinions.
(Anyway that's just for sake of discussion, this PR does nothing fancy
of that sort)
|
|
|
|
|
|
|
| |
Adds Dex2OatCompiler, which applies to the Android Java and Android
Kotlin languages. Dex2OatCompiler runs on .dex files output by
D8Compiler, which in turn runs on .class files output by JavaCompiler or
KotlinCompiler. A parser has been added for dex2oat optimization passes.
|