mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 07:04:04 -05:00
Language support for LLVM Machine IR (#4763)
Resolves #4762 --------- Co-authored-by: Yashwant <yassingh@amd-blr-comp-03f7.amd.com>
This commit is contained in:
65
etc/config/llvm_mir.amazon.properties
Normal file
65
etc/config/llvm_mir.amazon.properties
Normal file
@@ -0,0 +1,65 @@
|
||||
compilers=&mirllc
|
||||
defaultCompiler=mirllctrunk
|
||||
|
||||
demangler=/opt/compiler-explorer/gcc-11.1.0/bin/c++filt
|
||||
objdumper=/opt/compiler-explorer/gcc-11.1.0/bin/objdump
|
||||
|
||||
licenseName=LLVM Apache 2
|
||||
licenseLink=https://github.com/llvm/llvm-project/blob/main/LICENSE.TXT
|
||||
licensePreamble=The LLVM Project is under the Apache License v2.0 with LLVM Exceptions
|
||||
|
||||
group.mirllc.compilers=mirllc32:mirllc33:mirllc391:mirllc400:mirllc401:mirllc500:mirllc600:mirllc700:mirllc800:mirllc900:mirllc1000:mirllc1001:mirllc1100:mirllc1101:mirllc1200:mirllc1201:mirllc1300:mirllc1400:mirllc1500:mirllctrunk:mirllc-assertions-trunk
|
||||
group.mirllc.compilerType=llc
|
||||
group.mirllc.supportsExecute=false
|
||||
group.mirllc.intelAsm=-masm=intel
|
||||
group.mirllc.groupName=LLVM Static Compiler
|
||||
group.mirllc.versionRe=LLVM version .*
|
||||
group.mirllc.isSemVer=true
|
||||
group.mirllc.baseName=llc
|
||||
|
||||
compiler.mirllc32.exe=/opt/compiler-explorer/clang-3.2/bin/llc
|
||||
compiler.mirllc32.semver=3.2
|
||||
compiler.mirllc33.exe=/opt/compiler-explorer/clang-3.3/bin/llc
|
||||
compiler.mirllc33.semver=3.3
|
||||
compiler.mirllc391.exe=/opt/compiler-explorer/clang-3.9.1/bin/llc
|
||||
compiler.mirllc391.semver=3.9.1
|
||||
compiler.mirllc400.exe=/opt/compiler-explorer/clang-4.0.0/bin/llc
|
||||
compiler.mirllc400.semver=4.0.0
|
||||
compiler.mirllc401.exe=/opt/compiler-explorer/clang-4.0.1/bin/llc
|
||||
compiler.mirllc401.semver=4.0.1
|
||||
compiler.mirllc500.exe=/opt/compiler-explorer/clang-5.0.0/bin/llc
|
||||
compiler.mirllc500.semver=5.0.0
|
||||
compiler.mirllc600.exe=/opt/compiler-explorer/clang-6.0.0/bin/llc
|
||||
compiler.mirllc600.semver=6.0.0
|
||||
compiler.mirllc700.exe=/opt/compiler-explorer/clang-7.0.0/bin/llc
|
||||
compiler.mirllc700.semver=7.0.0
|
||||
compiler.mirllc800.exe=/opt/compiler-explorer/clang-8.0.0/bin/llc
|
||||
compiler.mirllc800.semver=8.0.0
|
||||
compiler.mirllc900.exe=/opt/compiler-explorer/clang-9.0.0/bin/llc
|
||||
compiler.mirllc900.semver=9.0.0
|
||||
compiler.mirllc1000.exe=/opt/compiler-explorer/clang-10.0.0/bin/llc
|
||||
compiler.mirllc1000.semver=10.0.0
|
||||
compiler.mirllc1001.exe=/opt/compiler-explorer/clang-10.0.1/bin/llc
|
||||
compiler.mirllc1001.semver=10.0.1
|
||||
compiler.mirllc1100.exe=/opt/compiler-explorer/clang-11.0.0/bin/llc
|
||||
compiler.mirllc1100.semver=11.0.0
|
||||
compiler.mirllc1101.exe=/opt/compiler-explorer/clang-11.0.1/bin/llc
|
||||
compiler.mirllc1101.semver=11.0.1
|
||||
compiler.mirllc1200.exe=/opt/compiler-explorer/clang-12.0.0/bin/llc
|
||||
compiler.mirllc1200.semver=12.0.0
|
||||
compiler.mirllc1201.exe=/opt/compiler-explorer/clang-12.0.1/bin/llc
|
||||
compiler.mirllc1201.semver=12.0.1
|
||||
compiler.mirllc1300.exe=/opt/compiler-explorer/clang-13.0.0/bin/llc
|
||||
compiler.mirllc1300.semver=13.0.0
|
||||
compiler.mirllc1400.exe=/opt/compiler-explorer/clang-14.0.0/bin/llc
|
||||
compiler.mirllc1400.semver=14.0.0
|
||||
compiler.mirllc1500.exe=/opt/compiler-explorer/clang-15.0.0/bin/llc
|
||||
compiler.mirllc1500.semver=15.0.0
|
||||
compiler.mirllctrunk.exe=/opt/compiler-explorer/clang-trunk/bin/llc
|
||||
compiler.mirllctrunk.demangler=/opt/compiler-explorer/gcc-snapshot/bin/c++filt
|
||||
compiler.mirllctrunk.objdumper=/opt/compiler-explorer/gcc-snapshot/bin/objdump
|
||||
compiler.mirllctrunk.semver=(trunk)
|
||||
compiler.mirllc-assertions-trunk.exe=/opt/compiler-explorer/clang-assertions-trunk/bin/llc
|
||||
compiler.mirllc-assertions-trunk.demangler=/opt/compiler-explorer/gcc-snapshot/bin/c++filt
|
||||
compiler.mirllc-assertions-trunk.objdumper=/opt/compiler-explorer/gcc-snapshot/bin/objdump
|
||||
compiler.mirllc-assertions-trunk.semver=(assertions trunk)
|
||||
14
etc/config/llvm_mir.defaults.properties
Normal file
14
etc/config/llvm_mir.defaults.properties
Normal file
@@ -0,0 +1,14 @@
|
||||
binaryHideFuncRe=^(__.*|_(init|start|fini)|(de)?register_tm_clones|call_gmon_start|frame_dummy|(_GLOBAL__sub_I_|\.plt).*|.*@plt(-0x[0-9a-f]+)?)$
|
||||
objdumper=objdump
|
||||
demangler=c++filt
|
||||
|
||||
compilers=mirllc
|
||||
defaultCompiler=mirllc
|
||||
|
||||
compiler.mirllc.compilerType=llc
|
||||
compiler.mirllc.supportsExecute=false
|
||||
compiler.mirllc.intelAsm=-masm=intel
|
||||
compiler.mirllc.groupName=LLVM Static Compiler
|
||||
compiler.mirllc.versionRe=LLVM version .*
|
||||
compiler.mirllc.exe=/usr/bin/llc
|
||||
compiler.mirllc.name=llc
|
||||
13
examples/llvm_mir/default.mir
Normal file
13
examples/llvm_mir/default.mir
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
name: square
|
||||
tracksRegLiveness: true
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $edi
|
||||
|
||||
%0:gr32 = COPY $edi
|
||||
%1:gr32 = nsw IMUL32rr %0, %0, implicit-def dead $eflags
|
||||
$eax = COPY %1
|
||||
RET 0, $eax
|
||||
|
||||
...
|
||||
@@ -418,6 +418,17 @@ const definitions: Record<LanguageKey, LanguageDefinition> = {
|
||||
previewFilter: null,
|
||||
monacoDisassembly: null,
|
||||
},
|
||||
llvm_mir: {
|
||||
name: 'LLVM MIR',
|
||||
monaco: 'llvm-ir',
|
||||
extensions: ['.mir'],
|
||||
alias: [],
|
||||
logoUrl: 'llvm.png',
|
||||
logoUrlDark: null,
|
||||
formatter: null,
|
||||
previewFilter: null,
|
||||
monacoDisassembly: null,
|
||||
},
|
||||
modula2: {
|
||||
name: 'modula2',
|
||||
monaco: 'modula2',
|
||||
|
||||
@@ -56,6 +56,7 @@ export type LanguageKey =
|
||||
| 'julia'
|
||||
| 'kotlin'
|
||||
| 'llvm'
|
||||
| 'llvm_mir'
|
||||
| 'mlir'
|
||||
| 'modula2'
|
||||
| 'nim'
|
||||
|
||||
Reference in New Issue
Block a user