~mpu

http://c9x.me

~mpu/qbe

Last active 12 days ago
View more

Recent activity

[PATCH] new hlt block terminator 12 days ago

From Quentin Carbonneaux to ~mpu/qbe

It is handy to express when
the end of a block cannot be
reached. If a hlt terminator
is executed, it traps the
program.

We don't go the llvm way and
specify execution semantics as
undefined behavior.

---

I'm sharing this on the ML to
gather some feedback. I still
[message trimmed]

Re: Assertion failure "temporary has mapping" on arm64 15 days ago

From Quentin Carbonneaux to ~mpu/qbe

Hi Umar,

Thank you for the report. As of commit 87dc3ea290a4ba75f153c5bb8b9fb87ec548e64f
qbe should compile this example correctly. The bug was triggered because the
example generated IL with a very large number of temporaries live at some block
boundaries. It was a defect of the copy elimination pass that so many temps were
live, and I fixed it (at least for this example) in commit
0db06dad63e02b619671bfb3dd25fc92c0856319.

Thanks for reporting the bug.

[PATCH] new slot coalescing pass 16 days ago

From Quentin Carbonneaux to ~mpu/qbe

This pass limits stack usage when
many small aggregates are allocated
on the stack. A fast liveness
analysis figures out which slots
interfere and the pass then fuses
slots that do not interfere. The
pass also kills stack slots that
are only ever assigned.

On the hare stdlib test suite, this
fusion pass managed to reduce the
total eligible slot bytes count
by 84%.
[message trimmed]

Re: Any interest in SIMD types? 2 months ago

From Quentin Carbonneaux to ~mpu/qbe

On Tue, Oct 4, 2022, at 22:11, Harris Snyder wrote:
> Would there be any interest in adding SIMD types?

Hi Harris,

Thanks for your message to the list. The general trend lately
in qbe has been to "broaden" the surface, with new archs
supported (apple hardware) and new IL capabilities (thread
local variables). I would now like us to revert to improving
the core compilation algorithms. Adding SIMD types is not
really aligned with that and may well complicate things.

Additionally, I am under the impression that SIMD types are
not uniform enough across platforms to warrant a place in

Re: [PATCH qbe] Fix parsing of multiple globals in datadef 2 months ago

From Quentin Carbonneaux to ~mpu/qbe

Thanks.

To c9x:git/qbe.git
   0715a39..bdaf8d3  master -> master

[PATCH 4/4] new arm64_apple target 3 months ago

From Quentin Carbonneaux to ~mpu/qbe

Should make qbe work on apple
arm-based hardware.
---
 Makefile      |   9 +-
 arm64/abi.c   | 233 ++++++++++++++++++++++++++++++++++++++++++--------
 arm64/all.h   |   3 +
 arm64/emit.c  |  58 ++++++++-----
 arm64/targ.c  |  38 +++++---
 main.c        |   2 +
 test/dark.ssa |   2 +-
 tools/test.sh |   2 +-
 8 files changed, 274 insertions(+), 73 deletions(-)

diff --git a/Makefile b/Makefile
[message trimmed]

[PATCH 2/4] add new target-specific abi0 pass 3 months ago

From Quentin Carbonneaux to ~mpu/qbe

The general idea is to give abis a
chance to talk before we've done all
the optimizations. Currently, all
targets eliminate {par,arg,ret}{sb,ub,...}
during this pass. The forthcoming
arm64_apple will, however, insert
proper extensions during abi0.

Moving forward abis can, for example,
lower small-aggregates passing there
so that memory optimizations can
interact better with function calls.
---
 Makefile     |  4 ++--
[message trimmed]

[PATCH 3/4] refine width of parsb/ub/sh/uh ops 3 months ago

From Quentin Carbonneaux to ~mpu/qbe

---
 ssa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ssa.c b/ssa.c
index 2de02d1..126113d 100644
--- a/ssa.c
+++ b/ssa.c
@@ -77,6 +77,8 @@ filluse(Fn *fn)
			if (!req(i->to, R)) {
				assert(rtype(i->to) == RTmp);
				w = WFull;
				if (isparbh(i->op))
					w = Wsb + (i->op - Oparsb);
[message trimmed]

[PATCH 1/4] parse sb,ub,sh,uh abi types 3 months ago

From Quentin Carbonneaux to ~mpu/qbe

---
 all.h        |  7 +++--
 ops.h        |  8 +++++
 parse.c      | 83 ++++++++++++++++++++++++++++++++++++----------------
 tools/lexh.c |  7 +++--
 4 files changed, 74 insertions(+), 31 deletions(-)

diff --git a/all.h b/all.h
index 1ecea8e..d7b75b5 100644
--- a/all.h
+++ b/all.h
@@ -144,8 +144,9 @@ enum O {
enum J {
	Jxxx,
[message trimmed]

A new arm64_apple target for m1 computers 3 months ago

From Quentin Carbonneaux to ~mpu/qbe

Dear qbe hackers,

The following patches add a new arm64_apple target
that can be used on the latest Apple hardware. The
differences with the regular arm64 backend are, first,
the assembly syntax, and second, a subtly different
and loosely-documented ABI.

I would like to merge these patches in master but,
before doing so, I wanted to let you take a look and
share thoughts.

Here are couple interesting things that I would like
to highlight.