Commit Graph
856 Commits
Author SHA1 Message Date
Ofek Shilon 9a6c961345 can't... stop... adding... types 2024-10-22 21:02:25 +03:00
Ofek Shilon 897e89421d More tsification 2024-10-22 21:02:25 +03:00
Ofek Shilon 0cfae3a0d5 wip 2024-10-22 21:01:15 +03:00
Ofek Shilon b4fb2ce0d7 tsification 6 wip 2024-10-22 21:01:15 +03:00
Cr0a3 43fbfcd19f Adding ylc (#6982)
Hi dear godbolt team,

> Before opening the PR, please make sure that the tests & linter pass
their checks,
 > by running `make check`.

With this pr i added support for the ylc compiler.

Infra-PR: https://github.com/compiler-explorer/infra/pull/1441
2024-10-22 06:37:40 -05:00
Steve 35cd137722 Do not cache the sdk version and compiler path (#6973)
Godbolt caches the compiler instance so that the version string won't be
recalculated if there's an update to the compiler image.
Do not cache that information, instead reevaluate them whenever we do
the compilation.
2024-10-21 08:52:37 -05:00
Steve 06068ef1e0 .NET: Stop using a response file (#6943)
Using a response file can prevent nsjail from replacing the file name in
args. Passing all args directly to the compiler instead.

Fixes
https://github.com/compiler-explorer/compiler-explorer/pull/6928#issuecomment-2398361491
2024-10-08 09:48:13 -05:00
Ofek 05dfb2034e tsify argument-parsers.ts (#6929)
470 ts violations to go.
2024-10-07 22:24:18 +03:00
Steve c2de66114b .NET: Invoke compiler directly to speed up compilation (#6928)
After this PR, compilers will be invoked directly instead of relying on
the built-in `dotnet build` command which involves restore and many
other expensive resolution operations.
This should speed up the compilation process a lot.
2024-10-02 20:56:22 -05:00
Steve 30b77d380e IL: Fixes include path for Linux (#6922) 2024-10-01 14:32:19 +02:00
David Spickett 7f2c985a7f Flang: Remove flang-to-external-fc support and "new" from names (#6908) 2024-10-01 14:09:34 +02:00
Ofek f5f00606f8 Tsifications galore (#6916)
Still mostly mindless numb work, one rename that touched many files
(`getArgumentParser` -> `getArgumentParserCls`), and a few real
improvements.
The goal is to be able to turn on `noImplicitAny` for the project, to
enforce higher code quality. 600 violations to go.
2024-10-01 12:26:46 +03:00
Spencer FrickeandMatt Godbolt 69241006aa Add preliminary GLSL support (#6883)
Part of
https://github.com/compiler-explorer/compiler-explorer/issues/2331
Inspired by
https://github.com/compiler-explorer/compiler-explorer/pull/3932

I think it is great that HLSL has support here, but the lack of GLSL
support is what stops me from using Compiler-Explorer more often. LunarG
also have shown in our [yearly ecosystem
survey](https://www.lunarg.com/wp-content/uploads/2024/04/2024-Vulkan-Ecosystem-Survey-Results-04-04-2024.pdf)
that GLSL is very widely used in the GPU space

![image](https://github.com/user-attachments/assets/ec740d61-0bf4-42b2-8e51-c204819aba11)

A while ago I started to create [my own SPIR-V
tool](https://github.com/sjfricke/SPIRV-Playground) but was given
feedback to "please just spend your free-time efforts making
compiler-explorer better for SPIR-V instead" ... to which I agree (since
seems a LOT of ground work was already laid out for me 😄 )

So here it is, a working version of GLSL using `glslang` 🚀 


![image](https://github.com/user-attachments/assets/2fc67890-1cd2-4b7e-82c2-30ca135f8590)

I guess beside reviewing my very unused Typescript skills, I know we
will need to add things to the Infra repo to get things public. For that
I am not sure what the best course of action is, we do have [rolling
releases](https://github.com/KhronosGroup/glslang/releases/tag/main-tot)
of `glslang` as well as SDK version tags

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2024-09-30 22:19:55 -05:00
Ofek 7097a240a7 Introduce opt-pipeline for ClangIr (#6917)
Thank @Lancern for the CIR flags analogous to clang's
`--print-before|after-all.`


![cir](https://github.com/user-attachments/assets/78742d83-799d-40cd-bcef-7a2e69a83c54)
2024-09-30 22:11:30 -05:00
Steve ee2dc8ab00 Update asm parser and add support for IL and IL disassembler (#6856)
Supersedes #6842 

- We now have the upstream issue of `JitDisasmAssemblies` fixed. Enable
it for net9.0+.
- Update asm-parser to support CoreCLR and NativeAOT (Fixes #6833)
- Adding support for IL language
- Adding support for IL disassembler
- Fixes #6629
2024-09-29 13:15:47 -05:00
Partouf 6c66940109 bugfix fixIncompatibleOptions 2024-09-29 15:21:37 +02:00
Ofek f715dc2932 More tsification (#6877)
About half way through. Only 708 tsification errors to go..
2024-09-28 10:32:36 +03:00
Patrick Quist 71eb1c3503 remove debug code 2024-09-12 18:56:55 +02:00
Sirui Mu a49dbc6dd7 Add ClangIR output for clangir compiler (#6798)
Currently the clangir compiler is implemented by a special clang variant
whose compilation options list gets appended with `-Xclang -fclangir
-Xclang -emit-cir`. This introduces a problem: we no longer gets access
to its LLVM IR output and assembly output because `-emit-cir` is an
exclusive option.

This patch resolves this problem by introducing a new ClangIR pane,
similar to the LLVM IR pane or Rust MIR pane. A new output kind named
`ClangIR` is added to the "Add new..." drop down menu and it toggles the
ClangIR pane. This patch then removes `-Xclang -emit-cir` from the
options list of the clangir compiler. The clangir compiler will then
output assembly code just like other clang compilers. The removed
options will be added back when compiled from the ClangIR pane.
2024-09-12 19:43:26 +03:00
Patrick Quist 1ea5d97854 Pascal parse mess (#6852) 2024-09-12 00:26:49 +02:00
Ofek fecd0fbf11 tsification + small package upgrade (semver) (#6841) 2024-09-10 17:18:48 +03:00
Ofek 9ef46fbafe Binge of (mostly) mindless tsification (#6838)
Turned on `noImplicitAny` in tsconfig, then went around fixing some
random easy stuff.
Hopefully tsification-PRs with more real content coming up.
2024-09-07 14:36:43 +03:00
Steve 81816f29ac .NET: Enhance NativeAOT compilation (#6792) 2024-09-07 10:15:07 +02:00
Chris Apple fcf60543b2 Add missing sanitizer symbolizer paths to clang ENV (#6791) 2024-08-24 19:37:29 +02:00
Steve ef323ab4ba .NET: Add mono and NativeAOT support (#6788)
Adding support for mono and NativeAOT.

As for NativeAOT, we have some upstream issues need to be resolved
before we can use `JitDisasmAssemblies` to print disasm for the
specified assembly only, where it would fail with:
```
Unhandled exception: ILCompiler.CodeGenerationFailedException: Code generation failed for method '[S.P.CoreLib]<Module>..cctor()'
 ---> System.NotImplementedException: getClassModule
   at Internal.JitInterface.CorInfoImpl.getClassModule(CORINFO_CLASS_STRUCT_*) + 0x2b
   at Internal.JitInterface.CorInfoImpl._getClassModule(IntPtr, IntPtr*, CORINFO_CLASS_STRUCT_*) + 0x39
   --- End of inner exception stack trace ---
   at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode, MethodIL) + 0x273
   at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode, MethodIL) + 0x63
   at ILCompiler.RyuJitCompilation.CompileSingleMethod(CorInfoImpl, MethodCodeNode) + 0x97
   at ILCompiler.RyuJitCompilation.CompileSingleThreaded(List`1) + 0xee
   at ILCompiler.RyuJitCompilation.ComputeDependencyNodeDependencies(List`1) + 0x173
   at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() + 0x159
   at ILCompiler.RyuJitCompilation.CompileInternal(String, ObjectDumper) + 0x26
   at ILCompiler.Compilation.ILCompiler.ICompilation.Compile(String, ObjectDumper) + 0x5d
   at ILCompiler.Program.Run() + 0x2a55
   at ILCompiler.ILCompilerRootCommand.<>c__DisplayClass240_0.<.ctor>b__0(ParseResult) + 0x321
   at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult) + 0x6f
```
For now, workaround with removing `JitDisasmAssemblies` and print disasm
for all assemblies instead. (see the second commit)

/cc: @MichalStrehovsky We need to implement `getClassModule`,
`getModuleAssembly` and `getAssemblyName` in ilc to make
`JitDisasmAssemblies` work correctly.

Closes #5668
2024-08-24 08:52:15 -05:00
Ofek 7f8d4eb84d When rust edition appears in both overrides and compiler-options, prefer the options (#6789)
Fix #5429, #6559
2024-08-24 11:06:00 +03:00
kevinjeon-g 5480ec6bb7 Enable --force-allow-oj-inlines (#6776)
This allows for inlining behavior that is more similar to the inlining
that will occur when compiling on a device.
2024-08-22 10:27:27 -05:00
Ofek 00648a7e1c Robustify SolidityCompiler (#6769)
Fix #6512
2024-08-17 14:07:13 +03:00
kevinjeon-g 389d77ecb2 Update Android templates with ProGuard keep rules (#6746)
This change adds ProGuard keep rule input for R8 in the Android
Java/Kotlin IDE templates.
2024-08-04 15:21:34 -05:00
kevinjeon-g 1a5a5c4813 Set default min API to 27 for R8/D8 (#6698) 2024-07-25 18:11:13 +02:00
Boris Verkhovskiy 07d5c3312f Set -fverbose-asm/-fno-verbose-asm from Comment filter (#6462)
~~This removes useless comments (namely repeated function/label names,
`<n>-byte Folded Spill` and others) from the generated assembly.~~

Fixes #5964
2024-07-10 20:19:32 +03:00
kevinjeon-g 1c051bd479 Add R8 for Android (#6591)
R8 is a whole-program optimizer that converts Java byte code to
optimized dex code. It can be run with the same general steps (and JAR)
as the existing D8 compiler.

This change adds R8Compiler and the R8 keep-annotation library it relies
on, makes this lib + Android API stubs default libraries for Android
Java/Kotlin, and includes a small update to allow older versions of
dex2oat (33.10) to run.

https://r8.googlesource.com/r8
2024-06-25 18:43:02 -05:00
kevinjeon-g 99617a29b2 Move dex2oat profiles from inline to template (#6621)
This change moves the dex2oat profiles for Android Java and Kotlin from
the inline comments (included as part of the default code example) to
being included as a separate file. Templates have been added for this.
2024-06-24 21:33:31 -05:00
Marc Poulhiès 6a97ce2cad Unbreak rustc_cg_gcc
Fix lib path.

refs https://github.com/compiler-explorer/compiler-explorer/issues/5342

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2024-06-22 16:34:34 +02:00
Marc Poulhiès 924bdfa363 Adjust rustc_cg_gcc compiler invocation (#6583)
Adjust a bit how we call the compiler:
- panics are handled, no need to force abort (and -Cpanic=abord doesn't
work without other tuning)
- adjust some paths

refs https://github.com/compiler-explorer/compiler-explorer/issues/5342

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2024-06-21 20:31:40 +02:00
Patrick Quist e3118f36ca add some msvc compilers (#6616) 2024-06-19 02:46:02 +02:00
Anton Baliasnikov ac57dde2d0 Add ZKsync solidity compiler 1.4.1 and 1.5.0 (#6592)
## ZKsync solidity compiler

Adds two latest releases of **ZK**sync solidity compiler (`zksolc`)
`v1.4.1` and `v1.5.0`.

Related infra change:
https://github.com/compiler-explorer/infra/pull/1324
2024-06-17 21:12:04 -05:00
SteveandPatrick Quist b8df2e3dab Refactor and adding new dotnet compilers (#6522)
Depends on https://github.com/compiler-explorer/infra/pull/1312.

I'm considering to unify all old compiler versions per dotnet minor
version as patch upgrade in dotnet doesn't change the codegen. New patch
versions come with quality updates like bug and security fixes, we only
need the latest version per minor dotnet version instead. Here a version
is consisting of `major.minor.patch`, such as `7.0.3` and `8.0.5`.

i.e.
- `dotnet6030csharp:dotnet6018csharp:dotnet6014csharp:dotnet6011csharp`
-> `dotnet60csharp`, and rename it to `.NET 6.0`, as `6.0.30`, `6.0.18`,
`6.0.14` and `6.0.11` are all `6.0`
- `dotnet6030fsharp:dotnet6018fsharp:dotnet6014fsharp:dotnet6011fsharp`
-> `dotnet60fsharp`, and rename it to `.NET 6.0`, as `6.0.30`, `6.0.18`,
`6.0.14` and `6.0.11` are all `6.0`
- `dotnet6030vb:dotnet6018vb:dotnet6014vb:dotnet6011vb` -> `dotnet60vb`,
and rename it to `.NET 6.0`, as `6.0.30`, `6.0.18`, `6.0.14` and
`6.0.11` are all `6.0`
- `dotnet7019csharp:dotnet707csharp:dotnet703csharp:dotnet701csharp` ->
`dotnet70csharp`, and rename it to `.NET 7.0`, as `7.0.19`, `7.0.7`,
`7.0.3` and `7.0.1` are all `7.0`
- `dotnet7019fsharp:dotnet707fsharp:dotnet703fsharp:dotnet701fsharp` ->
`dotnet70fsharp`, and rename it to `.NET 7.0`, as `7.0.19`, `7.0.7`,
`7.0.3` and `7.0.1` are all `7.0`
- `dotnet7019vb:dotnet707vb:dotnet703vb:dotnet701vb` -> `dotnet70vb`,
and rename it to `.NET 7.0`, as `7.0.19`, `7.0.7`, `7.0.3` and `7.0.1`
are all `7.0`

I'm keeping the minor version (ie. `.0`) in the name as there may be
updates like `.NET Core 3.1` to `.NET Core 3.0` which does change the
codegen.

The compiler structure now is:

```
group: dotnetcoreclr
.NET (main)
.NET 8
.NET 7
group: dotnetcrossgen2
.NET (main)
.NET 8
.NET 7
.NET 6
group: dotnetlegacy
existing compilers for backward compact
```

---------

Co-authored-by: Patrick Quist <partouf@gmail.com>
2024-06-11 14:09:23 -05:00
Afonso BordadoandPatrick Quist bdb5feaea3 Add webassembly language (#6429)
👋 Hey,

This PR adds support for the Webassembly Text Language (#1871).
Currently it only supports the
[wasmtime](https://github.com/bytecodealliance/wasmtime) compiler, but
it should be possible to add others (i.e. v8 / wasmer / etc...).

It looks like the monaco does not support the WAT language, so I've
added a simple mode for it, that is mostly copied from the clojure mode
with some changes. From what I've tested it seems to work reasonably
well.


![image](https://github.com/compiler-explorer/compiler-explorer/assets/1357143/9e38b28e-235c-47e5-a71e-50217e5d2056)

---------

Co-authored-by: Patrick Quist <partouf@gmail.com>
2024-06-10 21:29:03 -05:00
kevinjeon-g bf91208c97 Support Android API stubs (#6514)
Updates the d8 and dex2oat compiler implementations so that android.jar
is included in the classpath for javac/kotlinc.
2024-06-07 19:18:46 -05:00
Patrick Quist 466346c208 fix kotlin execution result when compilation fails (#6556)
Fixes https://github.com/compiler-explorer/compiler-explorer/issues/6547
2024-06-05 18:18:55 +02:00
Patrick Quist d2c7a5222e Local/Remote Execution environment (#6413) 2024-05-26 22:09:01 +02:00
Ofek 42533d8dbb Stop duplicating hasXXoutput + XXoutput (#6476)
When you need to check if `XXoutput` exists, check it directly.
+some TSification in CompilationResult
2024-05-14 20:11:09 +03:00
Ofek bcb397f56b Add noUnusedLocals to tsconfig + fix the new alerts (#6396)
<!-- 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-05-14 18:46:22 +03:00
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
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
Jeremy abe4abd3bf Fix test break introduced inadvertently in #6422 2024-05-02 23:01:33 -05:00
ramang-unity 4fbc2d496e Fix #6301 (#6422) 2024-05-03 00:12:48 +02:00