From a33e3ac1ebec1c5b1d6c1a5a17408ba82bc7e133 Mon Sep 17 00:00:00 2001 From: Aliia Khasanova <40315403+khasanovaa@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:51:03 +0200 Subject: [PATCH 1/5] [BACKEND] Update LLVM version to https://github.com/llvm/llvm-project/commit/82f5acfbec65e1a645d902f746253eeaf0bd2d70 (#4877) --- cmake/llvm-hash.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/llvm-hash.txt b/cmake/llvm-hash.txt index 454a94e1f4cb..af939238d5e0 100644 --- a/cmake/llvm-hash.txt +++ b/cmake/llvm-hash.txt @@ -1 +1 @@ -61f8a7f618901797ee8663389a29722f29216a96 +82f5acfbec65e1a645d902f746253eeaf0bd2d70 From d659c2e9f3d6c30c8f4627cd96b79e3e77b02b04 Mon Sep 17 00:00:00 2001 From: ravil-mobile Date: Wed, 16 Oct 2024 18:11:00 +0200 Subject: [PATCH 2/5] [BACKEND] Update LLVM to llvm/llvm-project@1d40fefb08e9b11 (#4923) Upgrading LLVM repo, because we need a feature that has been recently submitted in llvm/llvm-project@d741435d7 --- cmake/llvm-hash.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/llvm-hash.txt b/cmake/llvm-hash.txt index af939238d5e0..bd19ce3108a3 100644 --- a/cmake/llvm-hash.txt +++ b/cmake/llvm-hash.txt @@ -1 +1 @@ -82f5acfbec65e1a645d902f746253eeaf0bd2d70 +1d40fefb08e9b11b72bf40274aa7839ae9f7fe07 From 29499718b7ca581a569d535e503bdb65bb6b29c6 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 16 Oct 2024 10:09:53 -0700 Subject: [PATCH 3/5] Update GCC aarch64 toolchain to 14.2.0-1 (#4928) 14.1.0-2 was gone from the debian ftp server. --- .github/workflows/llvm-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/llvm-build.yml b/.github/workflows/llvm-build.yml index 4e944acbeb4a..8e601735df09 100644 --- a/.github/workflows/llvm-build.yml +++ b/.github/workflows/llvm-build.yml @@ -159,8 +159,8 @@ jobs: cp -r /usr/aarch64-linux-gnu/lib ./arm-sysroot cp -r /usr/aarch64-linux-gnu/include ./arm-sysroot LINKER=$(pwd)/arm-sysroot/lib/ld-linux-aarch64.so.1 - wget http://ftp.de.debian.org/debian/pool/main/g/gcc-defaults/gcc-aarch64-linux-gnu_14.1.0-2_amd64.deb - dpkg-deb -x gcc-aarch64-linux-gnu_14.1.0-2_amd64.deb ./arm-sysroot + wget http://ftp.de.debian.org/debian/pool/main/g/gcc-defaults/gcc-aarch64-linux-gnu_14.2.0-1_amd64.deb + dpkg-deb -x gcc-aarch64-linux-gnu_14.2.0-1_amd64.deb ./arm-sysroot export LD_LIBRARY_PATH=$(pwd)/arm-sysroot/lib:$LD_LIBRARY_PATH sudo ln -s $LINKER /lib/ld-linux-aarch64.so.1 SYSROOT="$(pwd)/arm-sysroot" From 31fe7008b67890da401ae8745e88279ea7d47077 Mon Sep 17 00:00:00 2001 From: ravil-mobile Date: Wed, 16 Oct 2024 19:57:42 +0200 Subject: [PATCH 4/5] [backend] Update to llvm/llvm-project@b5cc222d7429 (#4930) Update LLVM to llvm/llvm-project@b5cc222d7429fe6 Re-triggering LLVM build due to PR#4928 --- cmake/llvm-hash.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/llvm-hash.txt b/cmake/llvm-hash.txt index bd19ce3108a3..b000a3129912 100644 --- a/cmake/llvm-hash.txt +++ b/cmake/llvm-hash.txt @@ -1 +1 @@ -1d40fefb08e9b11b72bf40274aa7839ae9f7fe07 +b5cc222d7429fe6f18c787f633d5262fac2e676f From 322cf39f7d5e0bd4517b586f9de2ca3993fde56a Mon Sep 17 00:00:00 2001 From: ravil-mobile Date: Wed, 16 Oct 2024 16:03:05 +0000 Subject: [PATCH 5/5] [BACKEND] Update LLVM to llvm/llvm-project@b5cc222d7429fe6f1 Upgrading LLVM repo, because we need a feature that has been recently submitted in llvm/llvm-project#d741435d7 Changes made: - changed the signature of `visit` method in `ConstantAnalysis` - i.e., accepts an instance of the `ProgramPoint`. - updated calls to `getLatticeElementFor` -i.e., accepts an instance of the `ProgramPoint`. - added the required last parameter to `LLVM::DISubprogramAttr::get` - i.e., an empty `annotations`. --- cmake/llvm-hash.txt | 2 +- lib/Analysis/AxisInfo.cpp | 5 +++-- lib/Analysis/Utility.cpp | 7 ++++--- lib/Target/LLVMIR/LLVMDIScope.cpp | 3 ++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/cmake/llvm-hash.txt b/cmake/llvm-hash.txt index 454a94e1f4cb..b000a3129912 100644 --- a/cmake/llvm-hash.txt +++ b/cmake/llvm-hash.txt @@ -1 +1 @@ -61f8a7f618901797ee8663389a29722f29216a96 +b5cc222d7429fe6f18c787f633d5262fac2e676f diff --git a/lib/Analysis/AxisInfo.cpp b/lib/Analysis/AxisInfo.cpp index d95d436725e1..eb29b0c63307 100644 --- a/lib/Analysis/AxisInfo.cpp +++ b/lib/Analysis/AxisInfo.cpp @@ -1084,8 +1084,9 @@ LogicalResult AxisInfoAnalysis::visitOperation( void AxisInfoAnalysis::visitForOpInductionVar( scf::ForOp op, ArrayRef *> argLattices) { - auto lb = getLatticeElementFor(op, op.getLowerBound())->getValue(); - auto step = getLatticeElementFor(op, op.getStep())->getValue(); + ProgramPoint programPoint(op); + auto lb = getLatticeElementFor(&programPoint, op.getLowerBound())->getValue(); + auto step = getLatticeElementFor(&programPoint, op.getStep())->getValue(); AxisInfo::DimVectorT knownContiguity(1, 1); AxisInfo::DimVectorT knownDivisibility(1, 1); diff --git a/lib/Analysis/Utility.cpp b/lib/Analysis/Utility.cpp index 030dd6710fe5..7b2f7a4f6d05 100644 --- a/lib/Analysis/Utility.cpp +++ b/lib/Analysis/Utility.cpp @@ -896,15 +896,16 @@ class ConstantAnalysis : public DataFlowAnalysis { LogicalResult initialize(Operation *top) override { WalkResult result = top->walk([&](Operation *op) { - if (failed(visit(op))) + ProgramPoint programPoint(op); + if (failed(visit(&programPoint))) return WalkResult::interrupt(); return WalkResult::advance(); }); return success(!result.wasInterrupted()); } - LogicalResult visit(ProgramPoint point) override { - Operation *op = point.get(); + LogicalResult visit(ProgramPoint *point) override { + Operation *op = point->getOperation(); Attribute value; if (matchPattern(op, m_Constant(&value))) { auto *constant = getOrCreate>( diff --git a/lib/Target/LLVMIR/LLVMDIScope.cpp b/lib/Target/LLVMIR/LLVMDIScope.cpp index 536b41126935..4aa9828cd5fc 100644 --- a/lib/Target/LLVMIR/LLVMDIScope.cpp +++ b/lib/Target/LLVMIR/LLVMDIScope.cpp @@ -104,7 +104,8 @@ struct LLVMDIScopePass : public LLVMDIScopeBase { auto subprogramAttr = LLVM::DISubprogramAttr::get( context, distinctId, compileUnitAttr, fileAttr, funcNameAttr, funcNameAttr, fileAttr, /*line=*/line, /*scopeline=*/line, - subprogramFlags, subroutineTypeAttr, /*retainNodes=*/{}); + subprogramFlags, subroutineTypeAttr, /*retainNodes=*/{}, + /*annotations=*/{}); funcOp->setLoc(FusedLoc::get(context, {loc}, subprogramAttr)); }