Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
d8aae40
[APInt] Add default-disabled assertion to APInt constructor (#106524)
nikic Sep 2, 2024
c97aade
[APInt] Fix getAllOnes() with zero width (#112227)
nikic Oct 15, 2024
b207a0b
[APInt] Fix APInt constructions where value does not fit bitwidth (NF…
nikic Oct 17, 2024
c32484d
[SCEV] Handle more adds in computeConstantDifference() (#101339)
nikic Aug 2, 2024
50fcf1e
[SCEV] Fix warning (NFC)
nikic Aug 2, 2024
f149d74
[IndVars] Add test for #102597 (NFC)
nikic Aug 12, 2024
6d01789
[SCEV] Fix incorrect extension in computeConstantDifference()
nikic Aug 12, 2024
d1cbfde
[OMPIRBuilder] Use getAllOnesValue()
nikic Aug 12, 2024
7f67e4c
[ConstantFolding] Use getSigned()
nikic Aug 12, 2024
99b6705
[CGP] Use getAllOnesValue()
nikic Aug 12, 2024
e99d343
[ExpandMemCmp] Use getAllOnesValue()
nikic Aug 12, 2024
d607f58
[ConstraintElimination] Use getAllOnesValue()
nikic Aug 12, 2024
76686ed
[MemoryBuiltins] Use getAllOnesValue()
nikic Aug 13, 2024
93c6ad1
[IndVars] Use getSigned() in FP transform
nikic Aug 13, 2024
1bc925f
[InstCombine] Use getAllOnesValue()
nikic Aug 13, 2024
4889b9e
[InstCombine] Use APInt::getSplat()
nikic Aug 13, 2024
c816f9c
[InstCombine] Add i128 test for select of lshr/ashr transform (NFC)
nikic Aug 16, 2024
9e480b0
[InstCombine] Fix incorrect zero ext in select of lshr/ashr fold
nikic Aug 16, 2024
29f2604
[InstSimplify] Add tests for f16 to i128 range (NFC)
nikic Aug 15, 2024
b233ab5
[ValueTracking] Fix f16 fptosi range for large integers
nikic Aug 15, 2024
267d86c
[SelectionDAG][X86] Add SelectionDAG::getSignedConstant and use it in…
topperc Aug 16, 2024
22b8209
[SelectionDAG] Use getSignedConstant/getAllOnesConstant.
topperc Aug 17, 2024
dad91fe
[ConstantRangeTest] Set APInt signed flags where needed (NFC)
nikic Sep 5, 2024
356dc36
[PatternMatchTest] Use APInt::getAllOnes() (NFC)
nikic Sep 5, 2024
00794e6
[LoopUnrollAnalyzer] Store SimplifiedAddress offset as APInt (NFC)
nikic Aug 27, 2024
09aa0e4
[ConstantRange] Perform increment on APInt (NFC)
nikic Sep 5, 2024
eeb1525
[ConstantHoist] Fix APInt ctor assertion
nikic Nov 4, 2024
0fd0358
[CVP] Fix APInt ctor assertion with i1 urem
nikic Nov 5, 2024
fc86a97
[IR] Add helper for comparing KnownBits with IR predicate (NFC) (#115…
nikic Nov 12, 2024
7419030
[InstCombine] Fix APInt ctor assertion
nikic Nov 19, 2024
90a1527
[InstCombine] Compute result directly on APInts
nikic Jan 7, 2025
3339f20
[LoopUnrollAnalyzer] Fix icmp simplification
nikic Aug 27, 2024
4e86045
[LoopUnrollAnalyzer] Don't simplify signed pointer comparison
nikic Aug 28, 2024
091ab03
[APInt] Enable APInt ctor assertion by default (#112670)
nikic Oct 18, 2024
6521a8f
[APInt] Replace an assertion in constructor with fatal error
akiramenai Sep 4, 2024
d109ee8
[SelectionDAG][X86] Use getAllOnesConstant. NFC (#104640)
topperc Aug 17, 2024
8bb9e8d
[UnitTests] Fix APInt signed flags (NFC)
nikic Sep 20, 2024
b19bea5
[Tablegen] Fix SubtargetEmitter for featureless targets
akiramenai Jan 25, 2024
9cf1c55
[NewGVN] Fix dangling pointer
vladimirradosavljevic Aug 3, 2023
e821541
Implementation of the Keccak-f[1600] permutation
PavelKopyl Aug 9, 2023
4a6ce30
[NewPM] Add PreInlinerOptimizations module extension point
vladimirradosavljevic Dec 21, 2023
2727d14
[InstCombine] Add pre-commit tests for simplify -X > ~X to X != 0
vladimirradosavljevic Jan 17, 2024
07987b1
[InstCombine] Simplify -X > ~X to X != 0
vladimirradosavljevic Jan 17, 2024
7bceee8
[SeparateConstOffsetFromGEP] Fix constant generation for negative Acc…
vladimirradosavljevic Feb 14, 2024
f2daab9
[ConstantFolding] Fix negative offset calculation in GEP evaluation
vladimirradosavljevic Feb 19, 2024
53d5afa
[LLVM] Suppress linter in APInt destructor
akiramenai Nov 28, 2023
d3ed102
Track commit id as part of the version
akiramenai Jan 23, 2023
f1333b5
[LIT] Disable tests that require non-root permission
akiramenai Feb 2, 2024
549306e
[LIT] Enable unexpectedly passes llvm-ar tests on darwin
akiramenai Dec 24, 2024
981f750
[cmake] Disable multi-threading for a Windows based OS.
PavelKopyl Aug 8, 2024
3c1a31d
[.gitignore] Extend the pattern for build directories
akiramenai Mar 28, 2024
96b9a35
Remove mainline's workflows and SECURITY.md
akiramenai Mar 28, 2024
b5d766b
Update md files for EraVM, add LICENSE
akiramenai Mar 28, 2024
c7c5a98
Create SECURITY.md
akiramenai Aug 28, 2024
630a8fb
Add clang-tidy checkers
akiramenai Nov 27, 2023
11baa43
[EVM] Adding EVM backend skeleton.
akiramenai Nov 11, 2022
3112088
Add build scripts and CI workflows
akiramenai Mar 28, 2024
510916d
[MemCpyOpt] LLVM Handle i256 length properly in memcpy optimizer
akiramenai Jun 19, 2023
b8b180b
[EVM] Adding intial implementation of a code stackification.
PavelKopyl Jul 5, 2023
df859e3
[EVM] Fix analyses invalidation in runtime linking passes
akiramenai Apr 19, 2024
751aae5
[EVM] General improvements and fix for code quality
lialan Jul 20, 2023
38c12ea
[Clang][LLDB] Fix handling of 256-bit types
vladimirradosavljevic Jul 31, 2023
ad8dfd7
[EVM] Add 'clone' implementation of EVMMachineFunctionInfo.
PavelKopyl Aug 21, 2024
caea83c
[EVM] Add datasize/dataoffset intrinsics
PavelKopyl Feb 1, 2024
43f45b9
[LLD] Adding support of in/out memory buffers to LLD.
PavelKopyl Mar 1, 2024
189d8b0
[LLD] Add EVM architecture to LLD
PavelKopyl Feb 8, 2024
603ff7e
[EVM][LLD][Test] Exclude COFF, MachO, wasm and MinGW tests from testing
akiramenai Mar 10, 2025
9a295a3
[EVM] Add LLVMLinkEVM C-API
PavelKopyl Sep 25, 2024
981ff32
[EVM] Do stackification of instructions in the EVMStackify pass to ha…
PavelKopyl Sep 30, 2024
6334b50
[CodeGen] Use DenseMap::operator[] (NFC) (#108489)
kazutakahirata Sep 13, 2024
6966a77
[RISCV][MCP] Remove redundant move from tail duplication (#89865)
BeMg Aug 28, 2024
3ee7ab5
[TII][RISCV] Add renamable bit to copyPhysReg (#91179)
BeMg Aug 27, 2024
68662a9
[EVM] Add renamable bit to copyPhysReg
vladimirradosavljevic Sep 10, 2024
1469f7b
[MCP] Skip invalidating constant regs during forward propagation
vladimirradosavljevic Oct 7, 2024
ada1821
[MCP] Optimize copies when src is used during backward propagation
vladimirradosavljevic Oct 7, 2024
8761490
[Optimizer] Add mergebb pass that merges identical BBs
akiramenai Mar 26, 2024
fbed86b
[EVM] Add merge identical bb pass to opt pipeline
akiramenai Oct 31, 2024
f24507a
[EVM] Use std::string instead of Twine
vladimirradosavljevic Nov 6, 2024
4b1c3fb
[EVM] NFC: fix unused variables
akiramenai Nov 12, 2024
02d8e29
[UpdateTestChecks] Add EVM support in update_llc_test_checks.py
akiramenai Oct 30, 2024
0366b1b
[EVM] Use Keccak256 hash-ed linker symbols in LLVM MC/LLD
PavelKopyl Nov 19, 2024
aec865d
[EVM] Disable memcopy expansion
PavelKopyl Nov 15, 2024
46514b8
[EVM] Add libraries support
PavelKopyl Nov 14, 2024
07b3429
[EVM][LLD] relocate: remove wrong numeric limit
PavelKopyl Jan 28, 2025
984cd17
[EVM] Add support of immutables
PavelKopyl Feb 1, 2025
648a94c
[EVM] Add backward propagation stackification
akiramenai Mar 13, 2025
2f24091
[InstCombine][EVM] Disable generation of llvm.?mul.with.overflow int…
PavelKopyl Mar 12, 2025
079792d
[EVM] SingleUseExpr: check all regs of a multi-value instruction befo…
PavelKopyl Mar 12, 2025
839caf9
[lld][EVM] Add support of 'evm-assemble' mode
PavelKopyl Mar 7, 2025
422a00e
[EVM] Add dependencies support
PavelKopyl Mar 14, 2025
74d4b28
[EVM] Support evmla pushdeployaddress instruction
PavelKopyl Feb 6, 2025
5af5526
[SDAG] Read-only intrinsics must have WillReturn and !Throws attribut…
kalxr Aug 16, 2024
7d513dc
[EVM] Add pre-commit test for Update intrinsic attributes
vladimirradosavljevic Nov 6, 2024
c8369e5
[EVM] Update intrinsic attributes
vladimirradosavljevic Oct 31, 2024
6d80fb5
Introduce VMAAResult
vladimirradosavljevic Oct 31, 2024
5a1ade3
[EVM] Add pre-commit tests for Add implementation of AliasAnalysis
vladimirradosavljevic Nov 6, 2024
8483ae4
[EVM] Add implementation of AliasAnalysis
vladimirradosavljevic Oct 31, 2024
fdf8b2e
Introduce VMSHA3ConstFolding
vladimirradosavljevic Nov 4, 2024
7e3955a
[EVM] Add pre-commit test for Add support for constant folding SHA3 c…
vladimirradosavljevic Nov 8, 2024
e255622
[EVM] Add support for constant folding SHA3 calls
vladimirradosavljevic Nov 6, 2024
b3a5d80
[EVM] Remove assert in EVMCodegenPrepare
vladimirradosavljevic Nov 6, 2024
e997f3e
[EVM] Add pre-commit test for Don't avoid transformations to shift
vladimirradosavljevic Jan 17, 2025
f4c3df0
[EVM] Don't avoid transformations to shift
vladimirradosavljevic Jan 17, 2025
3f1fb75
[EVM] Add pre-commit test for Set that jumps are expensive
vladimirradosavljevic Jan 17, 2025
7a606df
[EVM] Set that jumps are expensive
vladimirradosavljevic Jan 17, 2025
77a8a07
[EVM] Add pre-commit test for Allow rematerialization of some of the …
vladimirradosavljevic Jan 17, 2025
4cef05f
[EVM] Allow rematerialization of some of the context instructions
vladimirradosavljevic Jan 17, 2025
15151d5
[TTI][RISCV] Unconditionally break critical edges to sink ADDI (#108889)
preames Nov 26, 2024
4be9e85
[EVM] Add pre-commit test for Enable MachineSink to break critical ed…
vladimirradosavljevic Jan 20, 2025
95d44ff
[EVM] Enable MachineSink to break critical edges for cheap instructions
vladimirradosavljevic Jan 20, 2025
b4e9fe1
[EVM] Add pre-commit test for Implement reverseBranchCondition and ru…
vladimirradosavljevic Jan 28, 2025
674773f
[EVM] Implement reverseBranchCondition and run BranchFolder pass afte…
vladimirradosavljevic Jan 22, 2025
10f0507
[EVM] Remove MachineBlockPlacement run
vladimirradosavljevic Jan 28, 2025
897247c
[EVM] Swap the 'combineStack' arguments
PavelKopyl Mar 25, 2025
af7d07c
[EVM] Add custom lowering of bit manipulation intrinsics
PavelKopyl Mar 27, 2025
91e6893
[EVM] Remove 'assert(Sym.isDefined())' from evaluateTargetFixup
PavelKopyl Apr 10, 2025
5ddf801
[EVM] Add 'INVALID' instruction at the end of .text section
PavelKopyl Apr 11, 2025
0de8431
[EVM] Support arbitrary metadata
PavelKopyl Apr 11, 2025
021f066
[EVM][BPS] Fix EVMStackSolver::compressStack to not removing inaccess…
akiramenai Apr 10, 2025
fcbe695
[EVM][BPS] Make EVMStackSolver to detect stack-too-deep errors properly
akiramenai Apr 13, 2025
a19cde1
[EVM] Do not assert vector register in getRegisterBitWidth()
akiramenai Apr 29, 2025
5db6b13
[EVM] Refine memory-related attributes of intrinsics
akiramenai Apr 11, 2025
69b16f7
[EVM] Resolve a memory leak by disposing of the temporary buffer
PavelKopyl Apr 30, 2025
22a8ab0
[EVM] Remove '--evm-keep-registers' from LIT tests
PavelKopyl Apr 30, 2025
27e7e23
[EVM][MC] Emit immediate values using '0x'-prefixed hexadecimal notation
PavelKopyl Apr 30, 2025
5268d7c
[EVM] Don't add padding for instructions that consist solely of mnemo…
PavelKopyl May 1, 2025
7a4eb34
[EVM] Restore inference of the 'nounwind' function attribute
PavelKopyl May 19, 2025
1154e3b
[EVM] Rename SHA3 mnemonic to KECCAK256
akiramenai May 20, 2025
e0bbc53
[EVM] Add a C-API to retrieve linker symbol offsets from an ELF file
PavelKopyl May 8, 2025
a5e82da
[EVM] Disable tail duplication optimization
vladimirradosavljevic May 23, 2025
48e0e01
[EVM] Update live interval during ADD remat in EVMSingleUseExpression
vladimirradosavljevic Jun 10, 2025
43676c6
[EVM][BPS] Make EVMStackSolver to report stack-too-deep errors
akiramenai Jun 5, 2025
35a6616
[EVM] Add pre-commit tests for Implement constant folding of some int…
vladimirradosavljevic Jun 16, 2025
a6517ae
[EVM] Implement constant folding of some intrinsics
vladimirradosavljevic Jun 16, 2025
df14b3c
[EVM] Add support for spills and reloads (#828)
vladimirradosavljevic Jun 24, 2025
6efbf1c
[EVM] Add pre-commit test for Don't spill regs whose defs are unreach…
vladimirradosavljevic Jun 20, 2025
e53bc85
[EVM] Don't spill regs whose defs are unreachable
vladimirradosavljevic Jun 20, 2025
b2c29da
[EVM] Add tests on how spills are propagated
vladimirradosavljevic Jun 20, 2025
c2f79c3
[EVM] Add pre-commit test for Don't propagate cond reg reloads
vladimirradosavljevic Jun 23, 2025
b88fa9b
[EVM] Don't propagate cond reg reloads
vladimirradosavljevic Jun 20, 2025
b758a3d
[EVM] Add pre-commit test for Change how we propagate spilled second …
vladimirradosavljevic Jun 24, 2025
039d04c
[EVM] Change how we propagate spilled second operand of commutable inst
vladimirradosavljevic Jun 24, 2025
3109a73
[EVM] Improve description in EVMMarkRecursiveFunctions
vladimirradosavljevic Jun 24, 2025
d9b1acd
[EVM] Add mechanism for informing the front-end (FE) of the required …
PavelKopyl Jun 23, 2025
ebeeb20
[EVM] Pre-commit test for Improve code generation for conditional jumps
akiramenai May 27, 2025
60fc645
[EVM] Improve code generation for conditional jumps
akiramenai May 20, 2025
2a328de
[EVM] Use the MCContext::allocFragment() function to allocate an MCDa…
PavelKopyl Jun 30, 2025
854a964
[EVM] Implement large constants unfolding
PavelKopyl Jun 5, 2025
b3a3a6a
[EVM] Update attributes of some intrinsics
akiramenai Jul 6, 2025
1526ad8
[EVM] Add pre-commit test for Clear transformation cache in EVMConsta…
vladimirradosavljevic Jul 8, 2025
e6b518a
[EVM] Clear transformation cache in EVMConstantUnfolding
vladimirradosavljevic Jul 8, 2025
051d116
[EVM] Always inline functions with one call site
PavelKopyl Jul 7, 2025
0f03d06
[EVM][BPS] Add pre-commit test for Change how we propagate immediates…
vladimirradosavljevic Jun 26, 2025
e2ada11
[EVM][BPS] Don't rematerialize large constants in optsize
vladimirradosavljevic Jun 25, 2025
e632c5b
[EVM] Don't rematerialize large constants in opt for speed
vladimirradosavljevic Jul 9, 2025
5bc0537
[EVM] Add O3 llc pipeline test
akiramenai Jul 16, 2025
9137a49
[EVM] Don't preserve analysis in EVMSingleUseExpression
vladimirradosavljevic Jul 16, 2025
c1e5e4c
[EVM] Change scheduling preference to regpressure
vladimirradosavljevic Jul 16, 2025
879de3f
[EVM] Add pre-commit test for Don't emit JUMPDEST in entry point of b…
vladimirradosavljevic Jul 22, 2025
238cd16
[EVM] Don't emit JUMPDEST in entry point of bytecode
vladimirradosavljevic Jul 22, 2025
44712fb
[EVM][DAGCombine] Add pre-commit tests for Implement TLI hooks relate…
vladimirradosavljevic Jul 21, 2025
7e564b9
[EVM][DAGCombine] Implement TLI hooks related to select
vladimirradosavljevic Jul 21, 2025
58c60e2
[EVM] Remove EVMModuleLayout pass
vladimirradosavljevic Jul 23, 2025
575acfa
[EVM] Don't check for function name to detect entry function
vladimirradosavljevic Jul 23, 2025
ad44938
[EVM] Support data sections in the code
PavelKopyl Jul 15, 2025
c41452c
[EVM] Add pre-commit test for Prefer to emit PUSH0 over a DUP
vladimirradosavljevic Jul 28, 2025
5993bdc
[EVM] Prefer to emit PUSH0 over a DUP
vladimirradosavljevic Jul 28, 2025
3e455a6
[EVM][ISel] Improve BYTE instruction selection
PavelKopyl Jul 9, 2025
634452c
[EVM][DAGCombine] Expand SELECT to arithmetic when possible
akiramenai Jul 17, 2025
cb01d2e
[EVM] Update branch-folder-after-stackification.ll test
vladimirradosavljevic Jul 28, 2025
567203a
[EVM][DAGCombine] Add pre-commit test for Expand SELECT of constant t…
vladimirradosavljevic Jul 24, 2025
13cd878
[EVM][DAGCombine] Expand SELECT of constant to arithmetic
vladimirradosavljevic Jul 23, 2025
ee2692b
[EVM] Add pre-commit test for Select (setcc x, 0, ne) as ISZERO ISZERO
akiramenai Jul 30, 2025
e1bd77e
[EVM][ISel] Select (setcc x, 0, ne) as ISZERO ISZERO
akiramenai Jul 30, 2025
2a12b13
[EVM] Add support for calculating module size
vladimirradosavljevic Jul 11, 2025
a52f17a
[EVM] ConstantUnfolding: add fallback to size optimization mode when …
PavelKopyl Jul 14, 2025
a381428
[EVM] Refine intrinsic memory effects for improved alias analysis acc…
PavelKopyl Aug 15, 2025
36bb5a5
[EVM] Extend DSE to remove dead store at the end of a function.
PavelKopyl Aug 15, 2025
723b971
[EVM] Add pre-commit test for Fold signextend(b, signextend(b, x)) ->…
vladimirradosavljevic Aug 1, 2025
909bc48
[EVM] Fold signextend(b, signextend(b, x)) -> signextend(b, x)
vladimirradosavljevic Jul 31, 2025
f606ee1
[AA] Move Target Specific AA before BasicAA (#125965)
Chengjunp May 7, 2025
42b4430
[EVM] Place EVMAA at the start of the AAs chain
PavelKopyl Jul 29, 2025
816ea15
[EVM] Add an option to pass metadata size
PavelKopyl Aug 28, 2025
7d282db
[EVM] Raise the maximum unfold limit from 3 instructions to 4.
PavelKopyl Aug 26, 2025
d8b533c
[EVM] Add llc O0 pipeline test
akiramenai Aug 31, 2025
c6185d5
Revert "[EVM] Improve code generation for conditional jumps"
akiramenai Jul 30, 2025
383af5c
[EVM] NFC: Remove dead code from EVMLowerJumpUnless
akiramenai Aug 31, 2025
491840d
[EVM] Improve code generation for conditional jumps
akiramenai Jul 30, 2025
fa7c244
[EVM] Support OR in conditional jump optimization
akiramenai Jul 30, 2025
568f4c2
[EVM][InlineCost] Add pre-commit tests for Set threshold to a small v…
vladimirradosavljevic Sep 9, 2025
e06dab6
[EVM][InlineCost] Set threshold to a small value when BB is unreachab…
vladimirradosavljevic Jul 29, 2025
da08559
Fix more lld warnings introduced in #111434 [-Wnontrivial-memaccess]
chapuni Oct 29, 2024
e90f87f
[llvm][NFC] Remove CV-qualified base class in PassManagerInternal.h (…
mustartt Jan 24, 2025
a0ab0ca
Fix warnings introduced in #111434 [-Wnontrivial-memaccess]
chapuni Oct 29, 2024
ee78ccc
[EVM] NFC: Remove old stackifier
akiramenai Sep 13, 2025
0ebd4cc
[EVM] NFC: Reformat EVMSingleUseExpression pass
akiramenai Sep 15, 2025
43ce0cc
[EVM] Don't rematerialize CALLDATALOAD when it redefines a VR
akiramenai Sep 15, 2025
6ebf013
[EVM] Include read-only section size in module size calculation
PavelKopyl Sep 14, 2025
d6b7b65
[CGP] Add pre-commit test for Disable optimizeMemoryInst only for EraVM
vladimirradosavljevic Sep 22, 2025
1e506a0
[CGP] Disable optimizeMemoryInst only for EraVM
vladimirradosavljevic Sep 16, 2025
d66a7b3
[EVM] Set that staticcall can't change storage
vladimirradosavljevic Sep 22, 2025
61620d9
[EVM] Add pre-commit tests for Set that gas intrinsic doesn't access …
vladimirradosavljevic Sep 25, 2025
7a9f81a
[EVM] Set that gas intrinsic doesn't access storage memory
vladimirradosavljevic Sep 23, 2025
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.
-->
25 changes: 25 additions & 0 deletions .github/lnt-benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: LNT benchmarks

on:
push:
branches:
- main
workflow_dispatch:
pull_request:

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

jobs:

lnt-benchmarks:
# Run only for matter-labs pull requests, ignore for forks
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' }}
uses: matter-labs/era-compiler-ci/.github/workflows/lnt.yml@v1
secrets: inherit
with:
compiler_llvm_branch: ${{ github.head_ref }}
ccache-key: 'llvm-Linux-X64-gnu'
compiler-llvm-repo: ${{ github.event.pull_request.head.repo.full_name }}
use-dev-machine: ${{ github.event_name != 'push' }}
1 change: 0 additions & 1 deletion .github/workflows/README.md

This file was deleted.

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

on:
pull_request:
workflow_dispatch:
inputs:
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 || steps.default.outputs.evm }}
eravm: ${{ steps.eravm.outputs.machine || steps.default.outputs.eravm }}
steps:

- name: Check for EraVM target
id: eravm
if: contains(github.event.pull_request.title, '[eravm]') || 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]') || 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 "eravm=eravm" | tee -a "${GITHUB_OUTPUT}"
echo "evm=evm" | 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.* }}'
toolchain: [ 'ir-llvm' ]
with:
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 || '' }}
compiler-llvm-repo: ${{ github.event.pull_request.head.repo.full_name }} # required to properly test forks
target-machine: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
environment: ${{ matrix.target == 'eravm' && 'zk_evm' || 'EVMInterpreter' }}
ccache-key: 'llvm-Linux-X64-gnu'

# 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 }}
compiler-llvm-repo: ${{ github.event.pull_request.head.repo.full_name }} # required to properly test forks
target-machine: ${{ matrix.target }}
ccache-key: 'llvm-Linux-X64-gnu'
Loading
Loading