Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (d30b014c81bd4fbc4357484e5dbdb3eab5e19a16)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (d30b014c81bd4fbc4357484e5dbdb3eab5e19a16)
  • Date: Thu, 9 Sep 2021 22:17:42 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

ChangeLog
| 4
devel/llvm/DETAILS
| 1
devel/llvm/HISTORY
| 3

devel/llvm/patches-llvm/0001--SROA--Avoid-splitting-loads-stores-with-irregular-type.patch
| 49 ++++++++++
devel/zig/CONFIGURE
| 1
devel/zig/DEPENDS
| 11 ++
devel/zig/DETAILS
| 43 ++++++++
devel/zig/HISTORY
| 2
8 files changed, 114 insertions(+)

New commits:
commit d30b014c81bd4fbc4357484e5dbdb3eab5e19a16
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

zig: new spell, programming language

commit edf760c10ec4321f4f6ced0710afda553c89768d
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

llvm: Add patch required by Zig; PATCHLEVEL++

diff --git a/ChangeLog b/ChangeLog
index 18d47d4..d175318 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2021-09-09 Ismael Luceno <ismael AT sourcemage.org>
+ * devel/zig: new spell, programming language for maintaining robust,
+ optimal, and reusable software
+
2021-09-08 Ismael Luceno <ismael AT sourcemage.org>
* audio-libs/libsoundio: new spell, cross-platform audio I/O for
real-time & consumer software
diff --git a/devel/llvm/DETAILS b/devel/llvm/DETAILS
index 521e452..1ee7468 100755
--- a/devel/llvm/DETAILS
+++ b/devel/llvm/DETAILS
@@ -1,5 +1,6 @@
SPELL=llvm
VERSION=12.0.1
+ PATCHLEVEL=1
SOURCE="${SPELL}-${VERSION}.src.tar.xz"
SOURCE2=$SOURCE.sig

GITHUB_URI="https://github.com/llvm/llvm-project/releases/download/llvmorg-$VERSION";
diff --git a/devel/llvm/HISTORY b/devel/llvm/HISTORY
index b485e8c..f9664c5 100644
--- a/devel/llvm/HISTORY
+++ b/devel/llvm/HISTORY
@@ -1,6 +1,9 @@
2021-09-09 Ismael Luceno <ismael AT sourcemage.org>
* PRE_SUB_DEPENDS, SUB_DEPENDS: added generic target subdeps
* CONFIGURE: added AVR, Lanai, RISCV & WebAssembly arch targets
+ *
patches-llvm/0001--SROA--Avoid-splitting-loads-stores-with-irregular-type.patch:
+ added patch required by Zig
+ * DETAILS: PATCHLEVEL++

2021-08-30 Ismael Luceno <ismael AT sourcemage.org>
* BUILD: removed deprecated CXX1Y and CXX1Z options
diff --git
a/devel/llvm/patches-llvm/0001--SROA--Avoid-splitting-loads-stores-with-irregular-type.patch

b/devel/llvm/patches-llvm/0001--SROA--Avoid-splitting-loads-stores-with-irregular-type.patch
new file mode 100644
index 0000000..bc3e9a9
--- /dev/null
+++
b/devel/llvm/patches-llvm/0001--SROA--Avoid-splitting-loads-stores-with-irregular-type.patch
@@ -0,0 +1,49 @@
+From a2257bf717fd96796d2ec3747b2a0837dca4c9b6 Mon Sep 17 00:00:00 2001
+From: Lemon Boy <thatlemon AT gmail.com>
+Date: Mon, 23 Aug 2021 20:23:37 -0600
+Subject: [PATCH] [SROA] Avoid splitting loads/stores with irregular type
+
+Upon encountering loads/stores on types whose size is not a multiple of 8
bits the SROA pass would either trip an assertion or use logic that was not
meant to work with such irregularly-sized types.
+
+Reviewed By: aeubanks
+
+Differential Revision: https://reviews.llvm.org/D99435
+
+Marler: This fixes an error I got while building for x86_64-windows-gnu with
gcc 9.2.0 on NixOS.
+
+Origin: Zig
+Upstream-Status: Accepted
+---
+ lib/Transforms/Scalar/SROA.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/lib/Transforms/Scalar/SROA.cpp b/lib/Transforms/Scalar/SROA.cpp
+index af510f1a84..6b8368d50a 100644
+--- a/lib/Transforms/Scalar/SROA.cpp
++++ b/lib/Transforms/Scalar/SROA.cpp
+@@ -768,7 +768,8 @@ class AllocaSlices::SliceBuilder : public
PtrUseVisitor<SliceBuilder> {
+ // We allow splitting of non-volatile loads and stores where the type
is an
+ // integer type. These may be used to implement 'memcpy' or other
"transfer
+ // of bits" patterns.
+- bool IsSplittable = Ty->isIntegerTy() && !IsVolatile;
++ bool IsSplittable =
++ Ty->isIntegerTy() && !IsVolatile && DL.typeSizeEqualsStoreSize(Ty);
+
+ insertUse(I, Offset, Size, IsSplittable);
+ }
+@@ -3980,6 +3981,7 @@ bool SROA::presplitLoadsAndStores(AllocaInst &AI,
AllocaSlices &AS) {
+ SplitLoads.clear();
+
+ IntegerType *Ty = cast<IntegerType>(LI->getType());
++ assert(Ty->getBitWidth() % 8 == 0);
+ uint64_t LoadSize = Ty->getBitWidth() / 8;
+ assert(LoadSize > 0 && "Cannot have a zero-sized integer load!");
+
+@@ -4104,6 +4106,7 @@ bool SROA::presplitLoadsAndStores(AllocaInst &AI,
AllocaSlices &AS) {
+ for (StoreInst *SI : Stores) {
+ auto *LI = cast<LoadInst>(SI->getValueOperand());
+ IntegerType *Ty = cast<IntegerType>(LI->getType());
++ assert(Ty->getBitWidth() % 8 == 0);
+ uint64_t StoreSize = Ty->getBitWidth() / 8;
+ assert(StoreSize > 0 && "Cannot have a zero-sized integer store!");
+
diff --git a/devel/zig/CONFIGURE b/devel/zig/CONFIGURE
new file mode 100755
index 0000000..b1e2770
--- /dev/null
+++ b/devel/zig/CONFIGURE
@@ -0,0 +1 @@
+. "$GRIMOIRE"/CMAKE_CONFIGURE
diff --git a/devel/zig/DEPENDS b/devel/zig/DEPENDS
new file mode 100755
index 0000000..f58ca76
--- /dev/null
+++ b/devel/zig/DEPENDS
@@ -0,0 +1,11 @@
+. "$GRIMOIRE"/CMAKE_DEPENDS &&
+. "$GRIMOIRE"/VDEPENDS &&
+vdepends <<!
+ cmake >= 2.8.12
+ llvm[CLANG,LLD] >= 12.0
+ llvm[TARGET-AArch64,TARGET-AMDGPU,TARGET-ARM,TARGET-AVR,TARGET-BPF]
+ llvm[TARGET-Hexagon,TARGET-Mips,TARGET-MSP430,TARGET-NVPTX]
+ llvm[TARGET-PowerPC,TARGET-RISCV,TARGET-Sparc,TARGET-SystemZ]
+ llvm[TARGET-WebAssembly,TARGET-X86]
+ llvm[TARGET-Lanai,TARGET-XCore]
+!
diff --git a/devel/zig/DETAILS b/devel/zig/DETAILS
new file mode 100755
index 0000000..17a041f
--- /dev/null
+++ b/devel/zig/DETAILS
@@ -0,0 +1,43 @@
+. "$GRIMOIRE"/CMAKE_FUNCTIONS
+ SPELL=zig
+ VERSION=0.8.1
+ SOURCE="$SPELL-$VERSION.tar.gz"
+
SOURCE_URL[0]=https://github.com/ziglang/$SPELL/archive/refs/tags/$VERSION.tar.gz
+
SOURCE_HASH=sha512:36bea566eee3dc5c00f2713cbc6616258dbadd3ee994749339f124f8b70c691cfe7fdce6a00194f879679ea417dadb3bcc244f8b79153957a426fea2d52caaf5
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
+ WEB_SITE="https://ziglang.org/";
+ LICENSE[0]="MIT"
+ ENTERED=20210909
+ KEYWORDS=""
+ SHORT="programming language for maintaining robust, optimal, and
reusable software"
+cat << EOF
+Zig is a general-purpose programming language and toolchain for maintaining
+robust, optimal, and reusable software.
+
+* A Simple Language
+
+Focus on debugging your application rather than debugging your programming
+language knowledge.
+
+- No hidden control flow.
+- No hidden memory allocations.
+- No preprocessor, no macros.
+
+* Comptime
+
+A fresh approach to metaprogramming based on compile-time code execution
+and lazy evaluation.
+
+- Call any function at compile-time.
+- Manipulate types as values without runtime overhead.
+- Comptime emulates the target architecture.
+
+* Performance Meets Safety
+
+Write fast, clear code capable of handling all error conditions.
+
+- The language gracefully guides your error handling logic.
+- Configurable runtime checks help you strike a balance between performance
+ and safety guarantees.
+- Take advantage of vector types to express SIMD instructions portably.
+EOF
diff --git a/devel/zig/HISTORY b/devel/zig/HISTORY
new file mode 100644
index 0000000..3013ab0
--- /dev/null
+++ b/devel/zig/HISTORY
@@ -0,0 +1,2 @@
+2021-09-09 Ismael Luceno <ismael AT sourcemage.org>
+ * CONFIGURE, DEPENDS, DETAILS: spell created



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (d30b014c81bd4fbc4357484e5dbdb3eab5e19a16), Ismael Luceno, 09/09/2021

Archive powered by MHonArc 2.6.24.

Top of Page