mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-10-21 03:06:17 +00:00
Apply LLVM patches for deterministic operand order and correct peephole optimization for minsize (#500)
## Description Applies LLVM patches that have not been backported to the major version used in our submodule: * [LLVM PR #163679](https://github.com/llvm/llvm-project/pull/163679) * *"[RISCV] Allow large div peephole optimization for minsize"* * Fixes peephole optimization of large integers when `minsize` function attribute is set. * (Our revive codebase used a workaround that can be removed once this 500 PR is merged and we publish a new LLVM release.) * [LLVM PR #190219](https://github.com/llvm/llvm-project/pull/190219) * *"[TargetLowering] Speculative fix for a non-determinism issue between different compilers"* * Operand ordering of `mul i256` were different depending on the target ABI when building LLVM, producing different RISC-V and PVM bytecode for our Windows vs macOS/linux builds. * The bytecode divergence (yet functionally equivalent) affected Solidity contracts containing a value [multiplied by itself](https://github.com/llvm/llvm-project/issues/190148) (e.g. via explicit squaring or exponentiation), manifesting primarily when using optimization level `-O0`.
This commit is contained in:
9 files changed
+99
-11
No files matched your search
@@ -8,7 +8,7 @@ inputs:
|
||||
target:
|
||||
required: true
|
||||
version:
|
||||
description: "LLVM release version (e.g., 'llvm-18.1.8'). If not specified, uses the latest LLVM release."
|
||||
description: "LLVM release version (e.g., 'llvm-18.1.8'). If not specified, uses the latest published LLVM release. To test a specific draft release, use the full name (e.g. 'llvm-21.1.8-revive.0f80912')."
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
@@ -114,7 +114,9 @@ runs:
|
||||
core.setFailed(`Artifact for '${target}' not found in release ${llvmRelease.tag_name} (${llvmRelease.html_url})`);
|
||||
process.exit();
|
||||
}
|
||||
return asset.browser_download_url;
|
||||
// Use the API URL (rather than `browser_download_url`) so that
|
||||
// the authorization header is respected for draft releases.
|
||||
return asset.url;
|
||||
}
|
||||
|
||||
if (versionPrefix) {
|
||||
@@ -127,7 +129,8 @@ runs:
|
||||
- name: download
|
||||
shell: bash
|
||||
run: |
|
||||
curl -sSLo llvm.tar.gz ${{ steps.find.outputs.result }}
|
||||
# Pass the authorization token to allow downloading draft release assets.
|
||||
curl -sSLo llvm.tar.gz -H "Authorization: Bearer ${{ github.token }}" -H "Accept: application/octet-stream" ${{ steps.find.outputs.result }}
|
||||
|
||||
- name: unpack
|
||||
shell: bash
|
||||
|
||||
Reference in new issue
Block a user