aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers
Commit message (Collapse)AuthorAge
...
* Fix #5630: filter out `--emit mir=..` in RustCompiler.buildExecutable (#5991)gh-10155Ofek2024-01-13
| | | With a small added ts'ification in base-compiler.
* Since ES6 there's no reason to use `underscore`s map and filter (#5989)gh-10149Ofek2024-01-13
| | | | | | | | | | | | Mindless replacements of the form `_.filter(options, option =>...` --> `options.filter(option =>...`. One not *entirely* mindless replacement at the bottom of compiler-dropin-tool.ts : ``` - return _.filter(pathFilteredFlags) as string[]; + return pathFilteredFlags.filter(Boolean) as string[]; ``` 6 files can now stop importing underscore.
* Fix a leftover case of bad file-extension replacement in rust (#5981)gh-10142Ofek2024-01-12
| | | | | Seems I missed this one when doing PR #5700. This caused *some* of the grief mentioned in the discussion of issue #5667, but certainly not all of it.
* Stop forcing debug builds in `pony` (#5979)gh-10138Ofek2024-01-12
| | | | | Following the discussion in #3864. @RossSmyth FYI
* Fix3864: `pony` created an `.ll` file that processIrOutput didn't expect (#5977)gh-10136Ofek2024-01-12
|
* Fix #5941: mark mrustc compilation result with languageId='c' (#5944)gh-10062Ofek2024-01-05
| | | | | | | | | | | | | | <!-- 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! -->
* Compilers for exectuable Cerberus CHERI C and ISO C semantics (#5864)gh-10002Vadim Zaliva2023-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Cerberus [Cerberus](https://www.cl.cam.ac.uk/~pes20/cerberus/) offers executable semantics for a substantial fragment of C and CHERI-C languages. It is implemented via an elaboration into a simpler Core language, which is displayed as the compiler output in the Compiler Explorer. Evaluation of C programs (execution) is also supported. ## Prerequisites The easiest way to install both the Cerberus and Cerberus-CHERI compilers is by using Docker: `docker pull vzaliva/cerberus-cheri` Then, for example, you can print the _Core_ elaboration for `test.c` using ISO C semantics: `docker run -v $HOME/tmp:/mnt -it vzaliva/cerberus-cheri cerberus --pp=core --exec /mnt/test.c` ## Configuration The file `etc/config/c.defaults.properties` defines a group of two compilers: 'cerberus' for ISO C and 'cerberus-cheri' for CHERI-C. It assumes that the corresponding executables are in the path. ## Limitations and Future Improvement Presently, only simple Core output is shown. It is not syntactically highlighted nor linked to C source code locations. Some potential future improvements include: 1. Error location handling in warning and error messages 2. Specifying execution flags 3. Core syntax highlighting 4. Display of AST 5. Display of other intermediate languages (Cabs, Ail) 6. Tooltips/links to the ISO C document from Core annotations ## See also: - [Cerberus (project page)](https://www.cl.cam.ac.uk/~pes20/cerberus/) - [Cerberus (GitHub repository)](https://github.com/rems-project/cerberus) - ["Formal Mechanised Semantics of CHERI C: Capabilities, Undefined Behaviour, and Provenance" (paper, preprint)](https://zaliva.org/cheric-asplos24.pdf) - ["CHERI C semantics as an extension of the ISO C17 standard" (tech report)](https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-988.html)
* Limit exec streams to max string length (#5898)gh-10000J. Ryan Stinnett2023-12-23
| | | | | | | | Some operations set `exec`'s `maxOutput` to a value larger than the max string length. This change ensures we always cap output to the engine's string limit (currently 512 MB in recent Node versions). This also tweaks handling when reaching the string limit to ensure adding the "truncated" message itself does not send us beyond the limit.
* Customise opt pipeline language by compiler (#5880)gh-9944J. Ryan Stinnett2023-12-12
| | | | This allows each compiler to override the default Monaco language used by the opt pipeline view.
* Prettier the files, and ensure the checks check that next timegh-9932Matt Godbolt2023-12-11
|
* Add Racket optimisation pipeline (#5836)gh-9905J. Ryan Stinnett2023-12-11
| | | | | | | | | | | | | | | | | | | | | This adds a Racket optimisation pipeline view by reusing the existing LLVM-focused optimisation pipeline UI. A Racket-specific pass parser translates its output into passes for the UI to present. This new Racket optimisation pipeline view is currently only enabled for Racket nightly, as it depends on [recent changes](https://github.com/racket/racket/pull/4842) to Racket's compiler output to function. This also extends the opt pipeline view to allow customising the function selector label as well as the options and filters for each compiler where needed. ![image](https://github.com/compiler-explorer/compiler-explorer/assets/279572/f540b41e-fd55-4375-bb2d-a0bb977530b3) --------- Co-authored-by: Matt Godbolt <matt@godbolt.org>
* oneapi 2024.0.0 release (#5867)gh-9884Robert Cohn2023-12-10
| | | | | | | * directory structure has changed * no more releases of icc Depends on deployment of https://github.com/compiler-explorer/infra/pull/1188
* Add the HandlerConfig type to the global handler config (#5858)gh-9880kevinjeon-g2023-12-10
|
* lang: add cmakescript language (#5815)gh-9858Vicente Bolea2023-12-04
| | | | | | | | | | | | Fixes #5502 In this PR I make an early attempt to add the CMakeScript as a language in compiler-explorer. I will be fantastic having this since CMake is one of the most used build system. Having an cmake interpreter in the web would probe truly useful for teams and individuals, it will be a fantastic way to share snippets of cmakescript and show how they are executed with different cmake versions. Co-authored-by: Matt Godbolt <matt@godbolt.org>
* Add support for Android D8 (8.1.56) (#5756)gh-9853kevinjeon-g2023-12-04
| | | | | | | | | | Adds D8Compiler, which applies to the Android Java and Android Kotlin languages. D8Compiler instantiates a JavaCompiler or KotlinCompiler using the java/kotlin dependencies' paths for D8 in the infra repo. compiler-finder.ts has been updated to allow for duplicate compiler IDs for 'android-java' and 'android-kotlin', as it is expected that the compilers used for these languages is the same.
* Add GIMPLE (#5817)gh-9795Jeremy Rifkin2023-12-03
| | | | | | | | | This PR adds GIMPLE as a language ![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/42d2b423-0d87-4a41-b762-3d8b4e7cedd2) --------- Co-authored-by: Marc Poulhiès <dkm@kataplop.net>
* Rename opt pipeline without LLVM prefix (#5828)gh-9794J. Ryan Stinnett2023-12-03
| | | | | | | | | | | This prepares for future work that will reuse the opt pipeline view outside of the LLVM ecosystem by renaming related components to remove the LLVM prefix. The pass dumper keep its LLVM prefix, as it is assumed this part is likely to be customised for each compiler ecosystem. The historical component name has been preserved in the component list as an alias to keep old links working.
* Merge branch 'main' of ↵gh-9782partouf2023-11-30
|\ | | | | | | https://github.com/compiler-explorer/compiler-explorer into main
| * fix ldc llvmir (#5827)gh-9781Patrick Quist2023-11-30
| |
* | fix formattingpartouf2023-11-30
|/
* Fix #5660 (#5794)gh-9716abhishekkaushik222023-11-27
| | | Closes #5660
* New C3 compiler added (#5789)gh-9654aliaegik2023-11-22
| | | c3c compiler version 0.5 (alpha) added.
* Changed exec to exe for snowball (#5788)gh-9651Mauro Baladés2023-11-22
|
* Changes to support CMake for Windows (#5769)gh-9647Patrick Quist2023-11-22
|
* Added support for intel and new examples (#5754)gh-9646Mauro Baladés2023-11-21
|
* Bump remaining deps (#5781)gh-9637Matt Godbolt2023-11-20
| | | And reformat everything.
* Fixed CLI args for snowball (#5753)gh-9575Mauro Baladés2023-11-14
|
* Fix #4654 (#5749)gh-9567Ofek2023-11-13
| | | | | | | Apparently AST for ldc is an abuse of terminology, as it doesn't produces anything resembling a syntax tree: https://github.com/dlang/dmd/pull/6556#issuecomment-282353400 . It is potentially meaningful only to ldc developers. Anyway the `generateAST` result type is fixed, along with some other small stuff around.
* Disable diffable asm for dotnet 8.0+ by default (#5739)gh-9566Steve2023-11-13
| | | | Since .NET 8.0, the JIT disasm no longer prints encoded bytes of instructions by default, so we can disable diffable asm by default.
* Execution with heaptrack (#5644)gh-9459Patrick Quist2023-11-07
|
* LLVM TableGen: Improve docstring for Actions Override and add example (#5711)gh-9422David Spickett2023-11-07
| | | | | | | | | | | | | | | | | | | | | | | | A majority of the actions/backends expect to find certain classes and definitions in the source code. There's no canonical reference for this so it's a combination of incomplete docs and the actual uses in llvm-project. (most of the time I expect people will come from llvm-project to experiment, rather than the other way around) I've added an example that uses the Searchable Tables backend. <!-- 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! -->
* Support the opt pipeline view in dxc for HLSL (#5704)gh-9393Justin Bogner2023-11-04
|
* LLVM TableGen: Add actions to Overrides menu (#5699)gh-9391David Spickett2023-11-04
|
* Fix #5255 (#5700)gh-9387Ofek2023-11-04
|
* store exec+sandbox types (#5696)gh-9351Patrick Quist2023-11-01
| | | prep for #5533 and #5644
* LLVM TableGen: Add trunk compiler and default include path (#5652)gh-9322David Spickett2023-10-30
| | | | | | | | | Since trunk will be a moving target, I've left the default compiler as 17.01. The standard include path will allow for examples that include files like `include "llvm/TableGen/SearchableTable.td"`, without extra options. This is useful if you want to create a minimal example of the records that an existing backend expects to see.
* Always get version string for dotnet (#5648)gh-9305Steve2023-10-30
|
* Fix crossgen2 compilation (#5661)gh-9304Steve2023-10-30
|
* add typesgh-9218partouf2023-10-24
|
* Add the LLVM TableGen language (#5629)gh-9205David Spickett2023-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LLVM TableGen is used to generate complex output files in the llvm project. A generic description of classes and definitions produces "records" that can then be walked by a TableGen backend to produce things like C++ code, configuration files, etc. The biggest examples are LLVM's assembler and disassembler where all the targets' instructions are defined in TableGen. https://llvm.org/docs/TableGen/ProgRef.html An example: ``` class Register<int _size, string _alias=""> { int size = _size; string alias = _alias; } def X0: Register<8> {} def X29: Register<8, "frame pointer"> {} ``` ``` ------------- Classes ----------------- class Register<int Register:_size = ?, string Register:_alias = ""> { int size = Register:_size; string alias = Register:_alias; } ------------- Defs ----------------- def X0 { // Register int size = 8; string alias = ""; } def X29 { // Register int size = 8; string alias = "frame pointer"; } ``` It's often a pain point for people new to LLVM so having a quick way to experiment would be a great benefit for the community (we have a Jupyter kernel which is good but not as simple as Compiler Explorer). The compiler for TableGen is `llvm-tblgen`. This comes with most release builds of LLVM in /bin along with clang and the others. Its default is to output a text dump of the records defined so that's what I've used here. This is not executable code so I've disabled the features related to that. A user could pass options to `llvm-tblgen` to produce text in a format other than this, C++ code or JSON for example. However this text dump is the main use case. I've re-used an existing clang install, since that includes `llvm-tblgen` in `bin/`. I just added the 17.01 version for this first change. Syntax highlighting is a mix of the Fortran and Ada configuration, following the language spec I linked above. Though I am very new to that so it is likely incomplete.
* Allow disabling diffable asm manually (#5585)gh-9185Steve2023-10-23
| | | | When we see JitDisasmDiffable being set manually, we can stop automatically emitting JitDisasmDiffable.
* Add AST viewer support for HLSL/DXC (#5627)gh-9164Cassandra Beckley2023-10-22
| | | | | | | | | | | | | | | | <!-- 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! --> Since DXC is a fork of Clang from LLVM 3.7, the AST can be generated and parsed in a manner similar to the Clang AST.
* Final fixups to get Hylo execution and binary workinggh-9126Matt Godbolt2023-10-18
|
* merge mainnickpdemarco2023-10-18
|\
| * Add Hylo support (#5622)gh-9117Nick DeMarco2023-10-18
| | | | | | | | | | | | | | This PR adds front end support for the [Hylo](https://www.hylo-lang.org/) programming language. Back end support has already been added with https://github.com/compiler-explorer/misc-builder/pull/71 and https://github.com/compiler-explorer/misc-builder/pull/72.
| * Fix Crystal assembly and LLVM IR output on 1.9+ (#5610)gh-9106Quinton Miller2023-10-17
| | | | | | | | | | | | Crystal 1.9+ has made the `.s` and `.ll` files follow the base name of the output rather than the input (I think this is due to crystal-lang/crystal#13370), this PR matches the Crystal compiler's behavior
* | Get execution working by setting library paths to [], be more precise about ↵nickpdemarco2023-10-18
| | | | | | | | when we emit intel
* | Remove old svg, commentnickpdemarco2023-10-18
| |
* | Add note to add LLVM IR view laternickpdemarco2023-10-11
| |
* | rename val to hylonickpdemarco2023-10-11
| |