2373 Commits
Author SHA1 Message Date
Ofek 402c5ec890 Mark the go compiler gc as not supporting cfg (#6470)
Following #6439: mark the go compiler `gc` as not supporting cfg.
Also, don't pass argument to `isCfgCompiler` - the base-compiler
implementation uses `this.compiler.instructionSet` anyway.
2024-05-12 02:16:51 +03:00
harishch4 15bcb0ab3d Add Flang frontend driver to Fortran Compilers (#6419) 2024-05-10 20:47:29 +02:00
Mefiresu a71168c6aa Update NDK toolchain finder (#6461) 2024-05-10 20:46:28 +02:00
Ofek 0703fef51b Suggestion to update llvm-cxxfilt logic (#6451)
(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.
2024-05-08 22:49:21 +03:00
kevinjeon-g 9a20419a29 Update customCwd for profman in dex2oat (#6454) 2024-05-08 21:48:45 +02:00
Ofek c7ce3ca071 Fix exception in case of empty IR (#6450)
This fixes #6449 - I carelessly ignored the case of empty IR output.
Repro link for verification: https://godbolt.org/z/4d46dahqq
2024-05-07 20:49:27 +03:00
Ofek 0fc6a922b1 Fix #6437: Don't try and generate cfg for incomplete (truncated) IR (#6444) 2024-05-06 22:08:31 +03:00
Jeremy abe4abd3bf Fix test break introduced inadvertently in #6422 2024-05-02 23:01:33 -05:00
dzaima 3a6a7999b5 Hanfle filtering tail call void @llvm.dbg.* in LLVM IR (#6425)
Fixes #6416. Additionally escapes a dot in another copy of an
`@llvm.dbg` check.

Didn't find any existing tests for IR filtering to update where this
filter applies, but did make sure locally that it does start hiding the
instructions for clang-17 and clang-18.
2024-05-02 18:43:36 -05:00
ramang-unity 4fbc2d496e Fix #6301 (#6422) 2024-05-03 00:12:48 +02:00
Patrick Quist 20d29ae10b Update dex2oat.ts 2024-05-01 03:11:59 +02:00
Patrick Quist 1639d0a29a fix dex2oat profile issue 2024-05-01 03:09:43 +02:00
kevinjeon-g b94781ab48 Add profile support for dex2oat. (#6382)
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.
2024-04-29 20:17:24 -05:00
Patrick Quist 8d3ba37fec Fix duplicated filters in logging (#6399) 2024-04-27 16:57:31 +02:00
Filippo BarbariandRubén Rincón Blanco 9d7ad0452b Removed UseDynamicNumberOfCompilerThreads command-line argument when running on java <11 (#6397)
This fixes #6388.

---------

Co-authored-by: Rubén Rincón Blanco <git@rinconblanco.es>
2024-04-25 21:44:25 +02:00
Ofek f59bad3a7e Opt remarks: replace hover-over-sidebar display with inline text (#6393)
![inlineoptrem](https://github.com/compiler-explorer/compiler-explorer/assets/73080/6c306b3f-2256-4578-b1d3-beaa1494a083)
2024-04-25 12:37:57 +03:00
Matt Godbolt f358067cec Migrate to eslint-plugin-n; as ...-node is deprecated (#6387)
Replaces #6310
2024-04-23 06:45:55 -05:00
Matt Godbolt 1260aff6bf Major bumps (#6385)
- enhanced-ms and fix
- css-loader
- vitest
2024-04-22 21:51:06 -05:00
Matt Godbolt e63f71a1bb More structured logging of compiles (#5105) 2024-04-22 21:25:13 +02:00
partouf 9bc017cc18 fix edition 2024-04-22 20:01:30 +02:00
partouf 1390c26330 revert #6297 - fixes #6376 2024-04-22 19:28:25 +02:00
Patrick Quist adb8bd774a Dynamic instruction set for documentation (#6173) 2024-04-22 18:40:56 +02:00
Patrick Quist 904410b993 Fix #5657 2024-04-20 16:16:34 +02:00
kevinjeon-g ddefce9925 Propagate java/kotlin errors to D8 (#6374) 2024-04-20 15:24:12 +02:00
Patrick Quist b8325cf0c6 eslint root setting and fixes (#6307) 2024-04-16 21:26:53 +02:00
Patrick Quist 43323b7b6c fix part of the windows tests (#6351) 2024-04-15 03:57:24 +02:00
Ofek 1c3b775577 Add simple filters for llvm optimiziation-remarks (#6354)
![optremfilters](https://github.com/compiler-explorer/compiler-explorer/assets/73080/1116998b-de9e-400c-a045-412fd59eb8e3)
2024-04-15 01:05:58 +03:00
Mats Jun 3c15839a77 Use rustfmt from the latest rust release (#6326)
The current Rust formatter on site doesn't support modern rust syntax
like async/await. This is because the formatter in production runs using
Rust 2015. Forcing edition=2018 allows more modern rust code to be
formatted properly.

Rustfmt is also shipped directly as a Rust component now, so we don't
have to install it separately.

For what it's worth, attempting to "Ctrl Shift I" format the code in
this shortlink demonstrates the problem https://godbolt.org/z/aP4669KEW
2024-04-14 12:54:08 +02:00
Jeremy RifkinandPatrick Quist 15271c9090 Fix missed demangles (#6350)
This PR fixes missed demangle cases pointed out in #6348, namely of the
form `mov eax, OFFSET FLAT:_Z...` and `jmp qword ptr [rip + _Z...]`.

Closes #6348.

---------

Co-authored-by: Patrick Quist <partouf@gmail.com>
2024-04-13 13:54:49 -05:00
kevinjeon-g b4c7c3da1a Support compilation with boot image for Android (#6346)
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;
}
```
2024-04-13 11:40:59 -05:00
kevinjeon-g bf299d280f Update dex2oat input arguments (#6340)
Adds '--copy-dex-files=always', as it is needed in newer versions of
dex2oat. This doesn't affect older versions.
2024-04-13 10:40:28 -05:00
kevinjeon-g 137ed94704 Simplify Android compiler properties (#6334)
updates intermediate compiler exe input to refer to the compiler's
getInfo().exe so that paths don't need to be hardcoded in properties.
2024-04-13 10:35:21 -05:00
Ofek b9512ed7dd Fix Sentry Issue (#6349)
<!-- 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!
-->
2024-04-13 12:35:00 +03:00
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
narpfel f5efd390fa Optionally show disambiguating hashes in demangled Rust identifiers (#6265)
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.
2024-04-01 21:58:42 -05:00
Matt Godbolt 042e2b1c02 Handle the case where clang had no buildenvsetup. Closes #6303 (#6305) 2024-03-30 15:01:19 -05:00
Patrick Quist 02f6646a89 socket bugfix for some situations 2024-03-30 00:49:55 +01:00
Oleksandr Zarudnyi 384f5f334a Integrate zksolc (#4398) 2024-03-29 23:06:33 +01:00
partouf 2f0fbf85bc fix filter 2024-03-29 15:40:31 +01:00
Patrick Quist e96b125518 Add MadPascal (#6286) 2024-03-29 02:17:52 +01:00
Ofek 3b19d5cd94 Filter linker switches to avoid bogus warnings (#6297)
Fixes #6271
2024-03-28 21:54:54 +02:00
Ofek f664558add For clang cross-compiles with libc++, explicitly add `-I../include/x86_64… (#6277) 2024-03-25 23:31:42 +01:00
Mosè Giordano 9fe1d359ec [julia] Do not modify in-place options in runCompiler (#6281) 2024-03-25 12:02:56 +01:00
Ofek 5bcc3bf74f Refuse to run llvm-mca with "Compile to binary object" (#6276)
Fixes #5735
2024-03-23 23:00:30 +02:00
standstaff 45ef23c940 chore: remove repetitive words (#6247)
<!-- 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!
-->

Signed-off-by: standstaff <zhengxingru@yeah.net>
2024-03-16 09:22:15 +02:00
Ofek 0cdfa06d2f Allow overriding clang demangler from properties (#6228)
Specifically bpf uses group.bpf.demangler (gcc demangler)

This fix continues #6114.
2024-03-16 09:15:57 +02:00
Kait Lam 44aa5769c8 Revert "builtin.ts: treat EXAMPLES_PATH as relative to app root." (#6246)
Reverts compiler-explorer/compiler-explorer#6237.

This PR broke the recommended `make run` workflow. When using `make
run`, the dist folder does not contain the needed resources.
2024-03-14 08:05:36 -05:00
Kait Lam 51da64cefb builtin.ts: treat EXAMPLES_PATH as relative to app root. (#6237)
I feel this is the least surprising behaviour most of the time. This
will help when packaging and distributing the application.

It may also make sense to base this at rootDir, but examples/ sits
outside etc/ at the moment and I didn't want to disturb that too much.

Thanks!
2024-03-10 17:44:35 -05:00
Ofek 8dd09d1c1f Replace the deprecated substr with substring (#6236)
Just some minor homekeeping.
2024-03-10 10:04:29 +02:00
Matt Godbolt fd3dd917f5 Vitest (#6219)
Port to vitest. Port everything to typescript. Remove chai, mocha and
chai-as-promised. Adds some docs.
2024-03-08 22:25:09 -06:00