Skip to content

[WIP] Inline farcall #669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 850 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
850 commits
Select commit Hold shift + click to select a range
f8d03c5
[EraVM] Enable jump tables
vladimirradosavljevic Feb 21, 2024
f674c01
[EraVM] Implement isPredicated in EraVMInstrInfo
vladimirradosavljevic Mar 4, 2024
7125b1d
[EraVM] Add Flags reg if needed during instruction predication
vladimirradosavljevic Feb 27, 2024
8832dc9
[EraVM] Remove setRequiresStructuredCFG
vladimirradosavljevic Mar 14, 2024
6f9befb
[EraVM] Set that rotate instructions are natively supported
vladimirradosavljevic Mar 25, 2024
4dad103
[EraVM] Don't traverse over subloop BBs in EraVMIndexedMemOpsPrepare
vladimirradosavljevic Mar 29, 2024
35c1f68
[EraVM] Pre-commit test for PHI node elimination fatptr tag fix
vladimirradosavljevic Mar 29, 2024
edab065
[EraVM] Tag fatptr copies in PHI node elimination pass
vladimirradosavljevic Mar 28, 2024
e77d3fe
[EraVM] Add pre-commit test for xor optimization bug
vladimirradosavljevic Mar 20, 2024
a3e631c
[EraVM] Fix xor optimization bug
vladimirradosavljevic Mar 20, 2024
b244010
[EraVM] Update memory attributes in runtime libs
akiramenai Apr 3, 2024
861014d
[EraVM][Pipeline] Enable profitable optimization passes
akiramenai Apr 4, 2024
25d9607
fixup! Support indexed load and store lowering and selection
vladimirradosavljevic Apr 2, 2024
ad364c2
[EraVM] Pre-commit test for LDInc increment offset regclass fix
vladimirradosavljevic Mar 29, 2024
e610626
[EraVM] Fix LDInc increment offset regclass
vladimirradosavljevic Mar 28, 2024
cac3f90
[EraVM] Add pre-commit test for LOADCONST ifcvt optimization
vladimirradosavljevic Apr 2, 2024
96824c9
[EraVM] Move ExpandPseudo before IfConverter
vladimirradosavljevic Apr 2, 2024
3f5ec0c
ci: remove private secrets
antonbaliasnikov Apr 4, 2024
ed659ae
ci: enable regression tests running for all PR commits individually
antonbaliasnikov Apr 10, 2024
d82c6a6
[EraVM] Skip running tests that can be trapped in the infinite loop
vladimirradosavljevic Apr 11, 2024
0c54842
ci: add initial workflow dispatch trigger for regression tests
antonbaliasnikov Apr 11, 2024
4d23497
[Optimizer] Add mergebb pass that merges identical BBs
akiramenai Mar 26, 2024
60878df
[EraVM] Add NewGVN and GVNHoist passes to EraVM backend
vladimirradosavljevic Apr 15, 2024
8c06286
[CVP] Disable urem to sub + cmp + select for EraVM
vladimirradosavljevic Apr 15, 2024
de083b3
[InstCombine] Don't transform zext to xor for EraVM
vladimirradosavljevic Apr 16, 2024
a139cac
[SimplifyCFG] Adjust BranchFoldThreshold for EraVM
vladimirradosavljevic Apr 16, 2024
d8d7f07
ci: support workflow dispatch for llvm regression tests
antonbaliasnikov Apr 12, 2024
ab4a262
[EraVM][EVM] Fix analyses invalidation in runtime linking passes
akiramenai Apr 19, 2024
714cc6a
[EraVM] Fix branch probability calculation in probabilityIsProfitable
vladimirradosavljevic Apr 19, 2024
44a924c
fixup! Disable AssertAlign for intrinsics in DAG builder
akiramenai Apr 19, 2024
f5cf0cb
fixup! [EraVM][Pipeline] Enable profitable optimization passes
akiramenai Apr 22, 2024
b5ccf6d
ci: Fix opt and llc options used with `check-llvm`
akiramenai Apr 19, 2024
45955e8
ci: update docker to llvm 17
antonbaliasnikov Apr 24, 2024
7c64702
ci: Disable include cleaner `clang-tidy` checker
akiramenai Apr 24, 2024
281a48b
[NFC] Drop invalid unused instruction encoding pieces so they will no…
atrosinenko Apr 18, 2024
8683c24
[EraVM][AsmParser] Prevent shadowing Parser field of MCTargetAsmParser
atrosinenko Feb 20, 2024
c30bfba
[EraVM][AsmParser] Parse .cell asm directives
atrosinenko Mar 1, 2024
9de0dce
[EraVM][AsmParser] Ignore .note.GNU-stack directive
atrosinenko Mar 20, 2024
f383631
[EraVM] Ensure all instructions are predicated.
asl Mar 6, 2024
8da3b17
[EraVM][AsmParser] First cut of instruction parsing
atrosinenko Mar 2, 2024
56edf88
[EraVM][AsmParser] Accept "noncomm.s reg, reg, ..." for uniformity
atrosinenko Mar 11, 2024
d43c782
[EraVM] Remove unused stuff. Some cleanup while there
asl Mar 12, 2024
10ecf52
[EraVM] Define JC* instructions to be used for J_s expansion
atrosinenko Apr 12, 2024
23f326d
[EraVM] Ensure all pseudos are expanded prior to asmprinting.
asl Mar 12, 2024
c441e9c
[EraVM] Simplify asmstring for flag setting / swap
asl Mar 13, 2024
dd67150
[EraVM][AsmParser] Emit diagnostics on unsupported immediate operands
atrosinenko Mar 13, 2024
22ca826
[EraVM][AsmParser] Add test on missing 4-th operand
atrosinenko Mar 13, 2024
80b6513
[EraVM][AsmParser] Parse jump and near_call instructions
atrosinenko Mar 13, 2024
5a79258
[EraVM] Split stackop Operand into stackin and stackout
atrosinenko Mar 13, 2024
fe40217
[EraVM] Get rid of redundand pseudos
asl Mar 14, 2024
7a0a354
[EraVM][AsmParser] Improve support for stack references
atrosinenko Mar 14, 2024
bdc403f
[EraVM] Support the remaining heap manipulation instructions
atrosinenko Mar 15, 2024
6a5dd3a
[EraVM][AsmParser] Fix parsing of pointer modification instructions
atrosinenko Mar 15, 2024
5286258
[EraVM] Refactor instruction tables to correctly represent what is go…
asl Mar 16, 2024
49cb736
[EraVM] Factor out common code into instruction classes
asl Mar 16, 2024
0953732
[EraVM] Infer impdefs automagically
asl Mar 16, 2024
6108ef6
[EraVM] Infer mayLoad / mayStore
asl Mar 16, 2024
91258d6
[EraVM] Implement opcode - mnemonics table. Use it to encode base opc…
asl Mar 16, 2024
0e2ab8b
[EraVM] Template for instruction decoding
asl Mar 16, 2024
268fae6
[EraVM][AsmParser] Parse ret, revert, panic
atrosinenko Mar 16, 2024
c3d0703
[EraVM][AsmParser] Parse far call instructions
atrosinenko Mar 16, 2024
bf170c0
[EraVM][AsmParser] Parse SP-modifying operands
atrosinenko Mar 16, 2024
4e02f44
[EraVM] Encode predicate operand. Rename classes a bit to represent w…
asl Mar 17, 2024
6470be2
[EraVM] Fix indentation
atrosinenko Apr 12, 2024
68e45d2
[EraVM] Add rudimentary encoding scaffolding
asl Mar 17, 2024
ddd7984
[EraVM] Fold trivial patterns into corresponding instructions (NFC)
asl Mar 17, 2024
0722e69
[EraVM] Split few opcodes to make deconding / encoding easier
asl Mar 17, 2024
336eca2
[EraVM] Make opcode table to be a single source of truth of mnemonics…
asl Mar 17, 2024
ac96115
[EraVM] Define encoding patterns
asl Mar 17, 2024
60aedbc
[EraVM] Hook-up Src / DstMode
asl Mar 18, 2024
d73ed42
[EraVM] Simplify far calls encoding
asl Mar 18, 2024
9cb85e4
[EraVM] Cleanup near call encoding
asl Mar 18, 2024
d373e13
[EraVM] Normalize returns
asl Mar 18, 2024
2377e04
[EraVM] Implement few asm-parser-only pseudos
asl Mar 18, 2024
ef45211
[EraVM] Split context instructions. Simplify code here and there
asl Mar 18, 2024
f0391c7
[EraVM] Scaffolding for jump encoding
asl Mar 19, 2024
fb213ea
[EraVM] Properly encode heap instructions
asl Mar 19, 2024
0da0451
[EraVM] Encode log instructions
atrosinenko Apr 11, 2024
c8640d3
[EraVM] Factor out opcodes tables
asl Mar 19, 2024
41170e8
[EraVM] Remove unsupported stuff
asl Mar 19, 2024
832c390
[EraVM][AsmParser] Support global symbols in code and stack operands
atrosinenko Mar 19, 2024
3001b86
[EraVM] Add opcodes for instructions from 1.5 ISA spec
asl Mar 19, 2024
c2f39d2
[EraVM] Make NOPSP and NOPSPr pseudos
atrosinenko Mar 20, 2024
1538af3
[EraVM] Use EraVMCC::COND_NONE instead of 0, where appropriate
atrosinenko Apr 11, 2024
192d365
[EraVM][AsmParser] Add more test cases
atrosinenko Apr 11, 2024
45867d2
[NFC] Resolve FIXMEs
asl Apr 13, 2024
3330e1f
fixup! [EraVM] Split context instructions. Simplify code here and there
akiramenai Apr 25, 2024
fd0475e
[EraVM] Add pre-commit test for Improve alias analysis for base with …
vladimirradosavljevic Apr 10, 2024
aed6461
[EraVM] Improve alias analysis for base with offset
vladimirradosavljevic Apr 8, 2024
116a7a7
[EraVM] Add pre-commit test for Allow rematerialization of the move 1…
vladimirradosavljevic Apr 3, 2024
b6fb75e
[EraVM] Allow rematerialization of the move 16-bit immediates
vladimirradosavljevic Apr 3, 2024
9a1375d
[EraVM] Add pre-commit test for Fold 16-bit immediates move with its …
vladimirradosavljevic Apr 12, 2024
8b439d1
[EraVM] Fold 16-bit immediates move with its uses
vladimirradosavljevic Apr 4, 2024
368dce6
[EraVM] NFC: Regenerate indexed-memops.ll with update_llc_test_checks.py
vladimirradosavljevic Apr 22, 2024
aafcbc5
[EraVM] Add pre-commit test for Remove restriction for generic addrsp…
vladimirradosavljevic Apr 12, 2024
6c7cd79
[EraVM] Remove restriction for generic addrspace in EraVMIndexedMemOp…
vladimirradosavljevic Apr 12, 2024
39526d4
[EraVM][AsmPrinter] Drop unused printFirstOperand() function
atrosinenko Apr 4, 2024
f7f1a08
[EraVM][AsmParser] Remove obsolete aliases of predicate names
atrosinenko Apr 26, 2024
7ff52c9
[EraVM] Add pre-commit test for Update expansion of memcpy with unkno…
vladimirradosavljevic Apr 12, 2024
31eb00e
[EraVM] Update expansion of memcpy with unknown size
vladimirradosavljevic Apr 1, 2024
b8677f6
[EraVM] Add pre-commit test for Allow rematerialization of some of th…
vladimirradosavljevic Apr 29, 2024
94a7c14
[EraVM] Allow rematerialization of some of the context instructions
vladimirradosavljevic Apr 29, 2024
d6d445e
ci: split formatting and regression tests to separate jobs
antonbaliasnikov May 1, 2024
4a1c9e9
ci: update to new llvm builder
antonbaliasnikov May 1, 2024
95cb0e9
[EraVM] Renumber COND_* constants and move their definitions to *.td
atrosinenko Apr 29, 2024
94f1d43
[EraVM][MC] Implement basic support for code emission
atrosinenko Mar 20, 2024
384ae6e
[EraVM] Make ELF support code know about EraVM target
atrosinenko Apr 26, 2024
cd0537c
ci: Disable array to pointer decay checks in `clang-tidy`
akiramenai May 3, 2024
4c3fc33
[EraVM] Rework EraVMTargetStreamer class
atrosinenko May 3, 2024
b7c395b
[EraVM][Disassembler] Implement basic support for instruction decoding
atrosinenko Mar 25, 2024
4df4f08
ci: move clang-tidy to the last step of testing pipeline
antonbaliasnikov May 6, 2024
c81d1b1
[EraVM][CodeEmitter] Emit arithmetics and pointer arithmetics
atrosinenko Apr 19, 2024
e70248d
[EraVM][Disassembler] Decode arithmetics and pointer arithmetics
atrosinenko Mar 25, 2024
f90390f
[EraVM][MC] Support encoding symbol references
atrosinenko Apr 25, 2024
59890d1
fixup! [EraVM] Refactor EraVMBytesToCells pass
akiramenai May 6, 2024
8035b35
[EraVM] Add pre-commit test for Optimize signed compares with immediate
vladimirradosavljevic Apr 23, 2024
4bc1e2f
[EraVM] Optimize signed compares with immediate
vladimirradosavljevic Apr 18, 2024
e948393
fixup! [EraVM] Improve instruction info for EraVM
akiramenai May 7, 2024
c7b333f
[EraVM] Remove i8 alignment from data layout in tests
akiramenai May 7, 2024
fe69510
ci: fix git safe dir issue on self hosted runners
antonbaliasnikov May 7, 2024
2e1149e
[EraVM][LLD] Basic support for resolution of relocations
atrosinenko Apr 23, 2024
863b279
ci: pin version of the llvm builder
antonbaliasnikov May 8, 2024
aebe7db
docs: update setup and build instructions
antonbaliasnikov May 8, 2024
5cf3983
ci: update llvm builder to 1.0.25
antonbaliasnikov May 9, 2024
05f1cb5
[EraVM] NFC: Refactor EraVMTieSelectOperands pass
vladimirradosavljevic Apr 30, 2024
9462e54
[EraVM] Skip instructions with already tied output register in EraVMT…
vladimirradosavljevic May 7, 2024
3771f35
[EraVM] NFC: Regenerate selectcc.ll with update_llc_test_checks.py
vladimirradosavljevic Apr 30, 2024
0604f9f
[EraVM] Add pre-commit test for Add patterns to select selectcc with …
vladimirradosavljevic Apr 30, 2024
7311da6
[EraVM] Add patterns to select selectcc with large immediates
vladimirradosavljevic Apr 30, 2024
49c62fe
[EraVM][ELF] Handle emission of NULL pointer explicitly
atrosinenko May 7, 2024
e25eaa0
[EraVM] Add pre-commit tests for Add support for select instructions …
vladimirradosavljevic May 12, 2024
e91f94b
[EraVM] Add support for select instructions in EraVMBytesToCells
vladimirradosavljevic May 12, 2024
ea1483c
[EraVM][ELF] Fix emission of jump tables
atrosinenko May 7, 2024
5cf6a93
ci: Add `--verify-each` option for opt tests
akiramenai May 14, 2024
d5eb4e3
[EraVM][TableGen] Define .static.shard versions of far calls
atrosinenko May 14, 2024
8a18ce7
[EraVM][TableGen] Split regular and .inc variants of heap load/store
atrosinenko May 14, 2024
20920f8
fixup! [EraVM] Introduce 'MVT::fatptr' datatype for generic AS pointe…
akiramenai May 15, 2024
cd34acf
fixup! [EraVM] Don't generate memmove in MemCpy dependence optimization
akiramenai May 15, 2024
11559e4
Add spelling and grammar checker to PULL_REQUEST_TEMPLATE.md
FlashSheridan May 14, 2024
de876f2
mv check from Doc to Readability PULL_REQUEST_TEMPLATE.md
FlashSheridan May 15, 2024
022609c
Mv license to end of PULL_REQUEST_TEMPLATE.md
FlashSheridan May 15, 2024
cf136ca
[EraVM] Refactor enum definitions in EraVM.h (NFC)
atrosinenko May 16, 2024
e1d6098
[EraVM][AsmParser] ret, revert, panic: cleanup legacy
atrosinenko May 17, 2024
3c37326
[EraVM][MC] Define jump variants with ret_addr output operand
atrosinenko May 18, 2024
e1feba0
fixup! [EraVM][AsmParser] Parse SP-modifying operands
akiramenai May 20, 2024
c8d0b59
fixup! Add EraVM v1.0 target to LLVM
akiramenai May 20, 2024
1aa7840
ci: unify workflows with common era-compiler-ci repository
antonbaliasnikov May 20, 2024
fd07009
[EraVM] Implement __system_request_slice_fallback
vladimirradosavljevic May 21, 2024
8830c80
[GVN/NewGVN] Add pre-commit tests for Don't combine calls to __system…
vladimirradosavljevic May 21, 2024
d8bc877
[GVN/NewGVN] Don't combine calls to __system_request, __system_reques…
vladimirradosavljevic May 21, 2024
cf85cf2
[EraVM] Run EraVMCSE one more time later in the pipeline
vladimirradosavljevic May 22, 2024
1a4c7f2
[EraVM] Support .gtlt predicate (COND_GTOrLT)
atrosinenko May 21, 2024
f93ea96
fixup! [EraVM] Fold add to select
vladimirradosavljevic May 23, 2024
a0e4ef5
[EraVM][AsmParser] Cleanup outdated mnemonic aliases
atrosinenko May 22, 2024
47a9985
[EraVM][TableGen] Split `EraVMOpcode`s for to_l1 and event (NFC)
atrosinenko May 23, 2024
248d83e
[EraVM][MC] Add tests for new instructions: tload, tstore, log.decommit
atrosinenko May 22, 2024
46643c2
[EraVM][MC] Define static read/write instructions
atrosinenko May 16, 2024
f595916
[EraVM][AsmParser] Support .{st,sh} modifier of far calls
atrosinenko May 15, 2024
5e05559
[GVN] lazily update dominator tree when merge unconditional branches …
Enna1 Apr 14, 2024
6b107d9
[EraVM][MC] Refine the definitions of ret-like instructions
atrosinenko May 23, 2024
eb170fc
[EraVM][TableGen] Split `EraVMOpcode`s for ret-like instructions (NFC)
atrosinenko May 23, 2024
80a9664
[EraVM][MC] Misc test fixes
atrosinenko May 14, 2024
5237ccc
[EraVM] Add pre-commit tests for Fold select with overflow intrinsics
TerryGuo May 27, 2024
21eaf8c
[EraVM] Fold overflow intrinsics with select instructions
TerryGuo May 28, 2024
3e90ed7
[EraVM][MC] Add missing variants of NOP instruction
atrosinenko May 24, 2024
38f2e85
[EraVM][AsmParser] Change `.{st,sh}` far call modifier to `.st.sh`
atrosinenko May 29, 2024
3653fc3
[EraVM] Make `@fat.ptr.call` test case check for ptr.add instruction
atrosinenko May 27, 2024
9593d53
[EraVM][LLD] Add test on misaligned relocations
atrosinenko May 31, 2024
cf36aac
[EraVM][TableGen] Cleanup the description of ret/revert/panic
atrosinenko May 28, 2024
34628ac
[EraVM][AsmPrinter] Reuse EraVM::analyzeMCOperandsCode/Stack functions.
atrosinenko Apr 5, 2024
aeeec90
ci: fix issues with forks and add build binaries workflow
antonbaliasnikov Jun 4, 2024
7542703
[EraVM][MC] Clarify usage of MemOperandKind and EncodedOperandMode enums
atrosinenko Jun 4, 2024
3322c22
[EraVM][MC] Reuse analyzeMCOperandsStack for adjusting opcode on enco…
atrosinenko Jun 3, 2024
295ccb9
[EraVM][TableGen] Rename instruction defs according to new syntax
atrosinenko Jun 5, 2024
b307d5b
[EraVM] Remove NOPSP and NOPSPr pseudos
atrosinenko May 30, 2024
10a60db
ci: disable build job completely if required is false
antonbaliasnikov Jun 7, 2024
c06812c
ci: use per-commit difference for formatting and clang-tidy
antonbaliasnikov Jun 7, 2024
094f9f5
[LSR][TTI][RISCV] Enable terminator folding for RISC-V
preames Nov 29, 2023
c83ec5b
[EraVM] Enable main induction variable removal in LSR
akiramenai Jun 5, 2024
b4606e5
[EraVM] Refactor mapping between different input operand kinds
atrosinenko Jun 6, 2024
2d06889
[EraVM][MC] Remove dead code here and there
atrosinenko Jun 7, 2024
a5289f2
[EraVM] Remove `Value` field from `OpcodeEncoding`
atrosinenko Jun 6, 2024
ad59863
[EraVM] Remove unused `OpcodeEncoding`s from `EraVMOpcodes.td`
atrosinenko Jun 7, 2024
f31171e
[EraVM] Refactor the three other `InstrMapping`s
atrosinenko Jun 6, 2024
628e115
[EraVM] Prepare for removing repeated operand definitions in *.td files
atrosinenko Jun 11, 2024
d7124ce
[EraVM] Remove RETURN and REVERT pseudos
atrosinenko May 30, 2024
153efb8
[EraVM] Add pre-commit test for optimizing branch with overflow
TerryGuo May 28, 2024
4655edd
[EraVM] Optimize overflow intrinsic which has a branching use
TerryGuo May 29, 2024
bce4b59
[EraVM] Add negative tests for overflow folding optimizations
TerryGuo Jun 3, 2024
9bc8c47
fixup! [EraVM] Enable main induction variable removal in LSR
akiramenai Jun 14, 2024
3f9c78f
[EraVM] Drop repeated instruction operands definitions from *.td files
atrosinenko Jun 6, 2024
6e0cef5
[llvm][llvm-reduce] Disable use list order test on AArch64/arm64
DavidSpickett Jul 27, 2023
b939bbe
[llvm][llvm-reduce] Disable uselistorder test everywhere
DavidSpickett Jul 27, 2023
d378903
[EraVM] Add pre-commit test for Optimize towards branch on zero in Er…
vladimirradosavljevic Jun 13, 2024
72ae8fe
[EraVM] Optimize towards branch on zero in EraVMPostCodegenPrepare
vladimirradosavljevic Jun 12, 2024
ab45399
[EraVM] NFC: Regenerate sdiv.ll with update_llc_test_checks.py
vladimirradosavljevic May 22, 2024
1c2dd3c
[EraVM] Add pre-commit tests for Fix two non-commutative arith patterns
vladimirradosavljevic Jun 6, 2024
0019628
[EraVM] Fix two non-commutative arith patterns
vladimirradosavljevic Jun 6, 2024
9f3d109
[EraVM] NFC: Regenerate memintrinsics.ll with update_llc_test_checks.py
vladimirradosavljevic Jun 7, 2024
862a31e
[EraVM] Add pre-commit test for Add memref to instructions with const…
vladimirradosavljevic Jun 6, 2024
4491df2
[EraVM] Add memref to instructions with constant pool operand
vladimirradosavljevic Jun 6, 2024
f774aaf
[EraVM] NFC: Regenerate select_fold.ll with update_llc_test_checks.py
vladimirradosavljevic Jun 6, 2024
9877225
[EraVM] Add pre-commit tests for Fold arithmetic and bitwise instruct…
vladimirradosavljevic Jun 7, 2024
0f08c51
[EraVM] Fold arithmetic and bitwise instructions to select
vladimirradosavljevic Jun 6, 2024
17c0d5a
[EraVM] Add pre-commit test for Enable CSE between sub and cmp
vladimirradosavljevic Jun 7, 2024
1e7bf66
[EraVM] Enable CSE between sub and cmp
vladimirradosavljevic May 21, 2024
089c35e
[EraVM] Add a pass to rewrite dead defs to R0
vladimirradosavljevic Apr 23, 2024
ec6d24c
docs: fix documentation links after update
antonbaliasnikov Jun 25, 2024
582f27e
[LoopUnroll] Add test for #80289 (NFC)
nikic Feb 1, 2024
f73463c
[LoopUnroll] Fix missing sign extension
nikic Feb 1, 2024
280f38e
Assert correct values in APInt constructor
nikic Feb 1, 2024
96a4619
[EraVM] Update and add more tests for memcpy/memmove lowering
vladimirradosavljevic Jun 26, 2024
352f150
[EraVM] Change lowering of memcpy
vladimirradosavljevic Jun 24, 2024
a13ecba
[EraVM] Change lowering of memmove
vladimirradosavljevic Jun 25, 2024
1be969b
ci: use era-compiler-llvm-test tag in integration tests if exists
antonbaliasnikov Jul 1, 2024
e639be2
ci: fix compiler tester param names
antonbaliasnikov Jul 1, 2024
d97396e
[LLD] Fix instruction mnemonics according to the new syntax.
PavelKopyl Jun 19, 2024
a1e23a9
ci: enable check-lld in regression tests
antonbaliasnikov Jun 19, 2024
9e90092
llvm: [NFC] Robustify testcase (#71120)
urnathan Nov 6, 2023
3491af6
[EraVM] NFC: Regenerate fold-similar-instructions.ll with update_llc_…
vladimirradosavljevic Jul 4, 2024
8c3b02e
[EraVM] Add pre-commit test for Adjust CMP to expose CSE opportunitie…
vladimirradosavljevic Jul 8, 2024
19c877f
[EraVM] Adjust CMP to expose CSE opportunities with SUB
vladimirradosavljevic Jul 4, 2024
007d489
[SelectionDAG] Use LAST_INTEGER_VALUETYPE instead of i64 (#98299)
akiramenai Jul 10, 2024
40b694e
[BranchFolding] Reenable OptimizeBlock
vladimirradosavljevic Jul 12, 2024
83b5d53
[LLD] Adding support of in/out memory buffers to LLD.
PavelKopyl Mar 1, 2024
d52b347
[EraVM] Adding EraVM specific LLD C-API.
PavelKopyl Mar 7, 2024
c2678e8
[llvm-config] Add lld configuration to llvm-config.
PavelKopyl Apr 22, 2024
6b0fc9b
[EraVM][MC] Adjust relocation type when the symbol points to an instr…
PavelKopyl Jul 1, 2024
262ecba
[EraVM] Support SEL with stack as output operand
TerryGuo Jun 17, 2024
82fb83e
[EraVM][LLD] Adding unittests for LLD C-API.
PavelKopyl Jul 25, 2024
1031642
ci: use docker image from github registry
antonbaliasnikov Jul 29, 2024
8fa6554
ci: support target-specific regression and integration tests
antonbaliasnikov Aug 1, 2024
cab0be3
[EraVM] Add skipFunction() to the backend optimization passes.
PavelKopyl Aug 2, 2024
4e4c2ba
ci: add sanitizers support for regression tests
antonbaliasnikov Aug 7, 2024
78d8b21
ci: update docker image
antonbaliasnikov Aug 9, 2024
826dca7
[EraVM] Disable generation of .note.GNU-stack
vladimirradosavljevic Aug 7, 2024
f4cbe90
[EraVM][AsmParser] Support basic block names in .cell directives.
PavelKopyl Jul 24, 2024
442a94c
Disable multi-threading for a Windows based OS.
PavelKopyl Aug 8, 2024
8ab2e7c
[EraVM] Add EraVM C-API for MC assembler.
PavelKopyl Jun 28, 2024
f34d303
[EraVM] Fix EraVMIndexedMemOpsPrepare pass dependencies
vladimirradosavljevic Aug 12, 2024
73fbf4c
[EraVM] Refactor EraVMIndexedMemOpsPrepare::isValidGEPAndIncByOneCell
vladimirradosavljevic Aug 12, 2024
de6f45e
[EraVM] Only generate GEPs that dominate latch BB in EraVMIndexedMemO…
vladimirradosavljevic Aug 5, 2024
32d817b
[EraVM][AsmPrinter] Emit initialization code for global variables.
PavelKopyl Jun 19, 2024
8bf1e55
[EraVM] Split assembler syntax for direct/indirect code references.
PavelKopyl Jul 26, 2024
3c4bdc6
[EraVM][AsmParser] Migrate to new asm syntax
atrosinenko May 14, 2024
f11869a
[EraVM] Adding unittests for MC Assembler C-API.
PavelKopyl Jul 23, 2024
33e8274
[WIP] cheap moveimm
akiramenai Aug 17, 2024
9b85ff2
[WIP] Inline farcall
akiramenai Aug 1, 2024
15b2767
Disable lp type check temporarily
akiramenai Aug 2, 2024
8df0887
-alwaysinline
akiramenai Aug 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
138 changes: 138 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Code Review Checklist



## Purpose


## Ticket Number


## Requirements
- [ ] Have the requirements been met?
- [ ] Have stakeholder(s) approved the change?

## Implementation
- [ ] Does this code change accomplish what it is supposed to do?
- [ ] Can this solution be simplified?
- [ ] Does this change add unwanted compile-time or run-time dependencies?
- [ ] Could an additional framework, API, library, or service improve the solution?
- [ ] Could we reuse part of LLVM instead of implementing the patch or a part of it?
- [ ] Is the code at the right abstraction level?
- [ ] Is the code modular enough?
- [ ] Can a better solution be found in terms of maintainability, readability, performance, or security?
- [ ] Does similar functionality already exist in the codebase? If yes, why isn’t it reused?
- [ ] Are there any best practices, design patterns or language-specific patterns that could substantially improve this code?

## Logic Errors and Bugs
- [ ] Can you think of any use case in which the
code does not behave as intended?
- [ ] Can you think of any inputs or external events
that could break the code?

## Error Handling and Logging
- [ ] Is error handling done the correct way?
- [ ] Should any logging or debugging information
be added or removed?
- [ ] Are error messages user-friendly?
- [ ] Are there enough log events and are they
written in a way that allows for easy
debugging?

## Maintainability
- [ ] Is the code easy to read?
- [ ] Is the code not repeated (DRY Principle)?
- [ ] Is the code method/class not too long?

## Dependencies
- [ ] Were updates to documentation, configuration, or readme files made as required by this change?
- [ ] Are there any potential impacts on other parts of the system or backward compatibility?

## Security
- [ ] Does the code introduce any security vulnerabilities?

## Performance
- [ ] Do you think this code change decreases
system performance?
- [ ] Do you see any potential to improve the
performance of the code significantly?

## Testing and Testability
- [ ] Is the code testable?
- [ ] Have automated tests been added, or have related ones been updated to cover the change?
- [ ] For changes to mutable state
- [ ] Do tests reasonably cover the code change (unit/integration/system tests)?
- [ ] Line Coverage
- [ ] Region Coverage
- [ ] Branch Coverage
- [ ] Are there some test cases, input or edge cases
that should be tested in addition?

## Readability
- [ ] Is the code easy to understand?
- [ ] Which parts were confusing to you and why?
- [ ] Can the readability of the code be improved by
smaller methods?
- [ ] Can the readability of the code be improved by
different function, method or variable names?
- [ ] Is the code located in the right
file/folder/package?
- [ ] Do you think certain methods should be
restructured to have a more intuitive control
flow?
- [ ] Is the data flow understandable?
- [ ] Are there redundant or outdated comments?
- [ ] Could some comments convey the message
better?
- [ ] Would more comments make the code more
understandable?
- [ ] Could some comments be removed by making the code itself more readable?
- [ ] Is there any commented-out code?
- [ ] Have you run a spelling and grammar checker?

## Documentation
- [ ] Is there sufficient documentation?
- [ ] Is the ReadMe.md file up to date?

## Best Practices
- [ ] Follow Single Responsibility principle?
- [ ] Are different errors handled correctly?
- [ ] Are errors and warnings logged?
- [ ] Magic values avoided?
- [ ] No unnecessary comments?
- [ ] Minimal nesting used?

## Experts' Opinion
- [ ] Do you think a specific expert, like a security
expert or a usability expert, should look over
the code before it can be accepted?
- [ ] Will this code change impact different teams, and should they review the change as well?

<!--
MIT License

Copyright (c) 2020 Michaela Greiler
from https://github.com/mgreiler/code-review-checklist/
Modified 2023– by Matter Labs,
some extracts from https://www.codereviewchecklist.com added,
Copyright (c) 2020 Lee Englestone
also MIT License.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
1 change: 0 additions & 1 deletion .github/workflows/README.md

This file was deleted.

144 changes: 144 additions & 0 deletions .github/workflows/benchmarks-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: Integration tests and benchmarks

on:
pull_request:
workflow_dispatch:
inputs:
llvm_build_type:
description: "LLVM build type: debug | release"
required: true
default: "release"
compiler_tester_reference_rev:
description: "compiler-tester revision to use as a benchmark reference"
required: true
default: "main"
compiler_tester_candidate_rev:
description: "compiler-tester revision to use as a benchmark candidate. Defaults to `main` branch if the `era-compiler-llvm-test` tag doesn't exist"
required: true
default: "era-compiler-llvm-test"
compiler_llvm_reference_branch:
description: "compiler-llvm branch to use as a benchmark reference"
required: true
default: "main"
compiler_llvm_candidate_branch:
description: "compiler-llvm branch to use as a benchmark candidate"
required: true
default: "main"
compiler_llvm_benchmark_mode:
description: "Mode filter for compiler-llvm benchmarks"
required: false
default: "^M^B3"
compiler_llvm_benchmark_path:
description: "Path filter for compiler-llvm benchmarks"
required: false
default: ""

concurrency:
group: ${{ github.repository_id }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:

# Check for secrets leak in the repository
secrets-scanner:
uses: matter-labs/era-compiler-ci/.github/workflows/secrets-scanner.yaml@v1
secrets: inherit

compiler-tester-ref:
runs-on: ubuntu-latest
outputs:
reference-ref: ${{ steps.compiler_tester_ref.outputs.reference-ref }}
candidate-ref: ${{ steps.compiler_tester_ref.outputs.candidate-ref }}
env:
ERA_COMPILER_LLVM_TEST_TAG: era-compiler-llvm-test
ERA_COMPILER_LLVM_REF_DEFAULT: main
steps:

- name: Checkout
uses: actions/checkout@v4
with:
repository: matter-labs/era-compiler-tester

- name: Define compiler tester ref
id: compiler_tester_ref
shell: bash
run: |
REFERENCE_REF=${{ inputs.compiler_tester_reference_rev || env.ERA_COMPILER_LLVM_REF_DEFAULT }}
if [ -n "$(git ls-remote --tags --heads --refs origin ${REFERENCE_REF})" ]; then
echo "reference-ref=${REFERENCE_REF}" | tee -a "${GITHUB_OUTPUT}"
else
echo "reference-ref=${{ env.ERA_COMPILER_LLVM_REF_DEFAULT }}" | tee -a "${GITHUB_OUTPUT}"
fi
CANDIDATE_REF=${{ inputs.compiler_tester_candidate_rev || env.ERA_COMPILER_LLVM_TEST_TAG }}
if [ -n "$(git ls-remote --tags --heads --refs origin ${CANDIDATE_REF})" ]; then
echo "candidate-ref=${CANDIDATE_REF}" | tee -a "${GITHUB_OUTPUT}"
else
echo "candidate-ref=${{ env.ERA_COMPILER_LLVM_REF_DEFAULT }}" | tee -a "${GITHUB_OUTPUT}"
fi

target-machine:
runs-on: ubuntu-latest
outputs:
evm: ${{ steps.evm.outputs.machine }}
eravm: ${{ steps.eravm.outputs.machine }}
default: ${{ steps.default.outputs.machine }}
steps:

- name: Check for EraVM target
id: eravm
if: contains(github.event.pull_request.title, '[EraVM]')
run: echo "machine=EraVM" | tee -a "${GITHUB_OUTPUT}"

- name: Check for EVM target
id: evm
if: contains(github.event.pull_request.title, '[EVM]')
run: echo "machine=EVM" | tee -a "${GITHUB_OUTPUT}"

- name: Check for default target
id: default
shell: bash -ex {0}
run: |
if [[ "${{ join(steps.*.outputs.*) }}" == "" ]]; then
echo "machine=default" | tee -a "${GITHUB_OUTPUT}"
fi

# Benchmarks workflow call from the era-compiler-ci repository
# This is a common part of the benchmarks workflow for all repositories
# If you would like to make a change to the benchmarks workflow, please do it in the era-compiler-ci repository
benchmarks:
needs: [compiler-tester-ref, target-machine]
uses: matter-labs/era-compiler-ci/.github/workflows/benchmarks.yml@v1
secrets: inherit
strategy:
fail-fast: false
matrix:
target: ${{ needs.target-machine.outputs.* }}
with:
llvm_build_type: ${{ github.event.inputs.llvm_build_type }}
compiler_tester_reference_branch: ${{ needs.compiler-tester-ref.outputs.reference-ref }}
compiler_tester_candidate_branch: ${{ needs.compiler-tester-ref.outputs.candidate-ref }}
compiler_llvm_reference_branch: ${{ github.event.inputs.compiler_llvm_reference_branch || github.event.repository.default_branch }}
compiler_llvm_candidate_branch: ${{ github.event.inputs.compiler_llvm_candidate_branch || github.head_ref }}
compiler_llvm_benchmark_mode: ${{ github.event.inputs.compiler_llvm_benchmark_mode || '^M^B3' }}
compiler_llvm_benchmark_path: ${{ github.event.inputs.compiler_llvm_benchmark_path || '' }}
ccache-key-type: 'static' # rotate ccache key every month
compiler-llvm-repo: ${{ github.event.pull_request.head.repo.full_name }} # required to properly test forks
target-machine: ${{ matrix.target }}

# Integration tests workflow call from the era-compiler-ci repository
# This is a common part of the integration tests workflow for all repositories
# If you would like to make a change to the integration tests workflow, please do it in the era-compiler-ci repository
integration-tests:
needs: [compiler-tester-ref, target-machine]
uses: matter-labs/era-compiler-ci/.github/workflows/integration-tests.yaml@v1
secrets: inherit
strategy:
fail-fast: false
matrix:
target: ${{ needs.target-machine.outputs.* }}
with:
compiler-tester-ref: ${{ needs.compiler-tester-ref.outputs.candidate-ref }}
llvm-ref: ${{ github.event.inputs.compiler_llvm_candidate_branch || github.head_ref || github.event.repository.default_branch }}
ccache-key-type: 'static' # rotate ccache key every month
compiler-llvm-repo: ${{ github.event.pull_request.head.repo.full_name }} # required to properly test forks
target-machine: ${{ matrix.target }}
103 changes: 103 additions & 0 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Build LLVM binaries

on:
schedule:
- cron: '0 0 1 * *' # every month to regenerate ccache
workflow_dispatch:
inputs:
ref:
description: "Git REF to use for the build"
required: false
type: string
build_macos_amd64:
description: "Build for MacOS amd64?"
required: false
type: boolean
default: true
build_macos_arm64:
description: "Build for MacOS arm64?"
required: false
type: boolean
default: true
build_linux_amd64:
description: "Build for Linux amd64?"
required: false
type: boolean
default: true
build_linux_arm64:
description: "Build for Linux arm64?"
required: false
type: boolean
default: true
build_windows_amd64:
description: "Build for Windows amd64?"
required: false
type: boolean
default: true


jobs:

prepare-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.prepare-matrix.outputs.matrix }}
steps:
- name: Prepare matrix
id: prepare-matrix
run: |
# Define general matrix parameters
WINDOWS='{"name":"Windows","runner":"windows-2022-github-hosted-64core"}'
MACOS_AMD64='{"name":"MacOS-x86","runner":"macos-12-large"}'
MACOS_ARM64='{"name":"MacOS-arm64","runner":["self-hosted","macOS","ARM64"]}'
LINUX_AMD64='{"name":"Linux-AMD64","runner":"matterlabs-ci-runner","image":"ghcr.io/matter-labs/zksync-llvm-runner:latest"}'
LINUX_ARM64='{"name":"Linux-ARM64","runner":"matterlabs-ci-runner-arm","image":"ghcr.io/matter-labs/zksync-llvm-runner:latest"}'
# Disable platforms for non-tag builds if user requested
if [ ${GITHUB_EVENT_NAME} = workflow_dispatch ]; then
[ ${{ github.event.inputs.build_windows_amd64 }} != true ] && WINDOWS=
[ ${{ github.event.inputs.build_macos_amd64 }} != true ] && MACOS_AMD64=
[ ${{ github.event.inputs.build_macos_arm64 }} != true ] && MACOS_ARM64=
[ ${{ github.event.inputs.build_linux_amd64 }} != true ] && LINUX_AMD64=
[ ${{ github.event.inputs.build_linux_arm64 }} != true ] && LINUX_ARM64=
fi
PLATFORMS=(${WINDOWS} ${MACOS_AMD64} ${MACOS_ARM64} ${LINUX_AMD64} ${LINUX_ARM64})
echo "matrix={ \"include\": [ $(IFS=, ; echo "${PLATFORMS[*]}") ] }" | tee -a "${GITHUB_OUTPUT}"

build:
needs: prepare-matrix
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.prepare-matrix.outputs.matrix) }}
runs-on: ${{ matrix.runner }}
container:
image: ${{ matrix.image || '' }} # Special workaround to allow matrix builds with optional container
name: ${{ matrix.name }}
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
path: "llvm"

- name: Prepare Windows env
if: runner.os == 'Windows'
uses: matter-labs/era-compiler-ci/.github/actions/prepare-msys@v1

- name: Build LLVM
uses: matter-labs/era-compiler-ci/.github/actions/build-llvm@v1
with:
enable-tests: true
enable-assertions: true
clone-llvm: false
ccache-key-type: 'static'
save-ccache: ${{ matrix.name == 'Linux x86' }}

# Required to keep executable permissions for binaries
- name: Prepare tarball
run: tar -czf ${{ runner.os }}-${{ runner.arch }}-target-final.tar.gz ./target-llvm/target-final

- name: Upload LLVM binaries
uses: actions/upload-artifact@v4
with:
name: llvm-bins-${{ runner.os }}-${{ runner.arch }}
path: ./${{ runner.os }}-${{ runner.arch }}-target-final.tar.gz
Loading
Loading