| Age | Commit message (Collapse) | Author |
|
|
|
Quotes are used on Apple target
variants to flag that we must
not add the _ symbol prefix.
|
|
This significantly improves parsing performance for massive functions
with a huge number of temporaries. Parsing the 86MiB IL produced
by cproc during zig bootstrap drops from 17m15s to 2.5s (over 400x
speedup).
The speedup is much smaller for IL produced from normal non-autogenerated
C code. Parsing the sqlite3 amalgamation drops from 0.40s to 0.33s.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The algorithm to generate matchers
took a long time to be discovered
and refined to its present version.
The rest of mgen is mostly boring
engineering.
Extensive fuzzing ensures that the
two core components of mgen (tables
and matchers generation) are correct
on specific problem instances.
|
|
The initial plan was to have one
matcher per ac-variant, but that
leads to way too much generated
code. Instead, we can fuse ac
variants of the rules and have
a smarter matching algorithm to
recover bound variables.
|
|
|
|
|
|
|
|
It is semantically the same but
does not rely on implementation-
defined behavior.
|
|
Credit goes to Roland Paterson-Jones
for spotting this bug.
|
|
The parsing code for these constants
conflicts with the Tplus token.
|
|
I noticed that my compiler was generating redundant blits, and after
looking through the QBE debug output I believe that I found some low
hanging fruit to help clean them up.
I'm new to this codebase, so please treat this patch with a lot of
skepticism. Happy to make any changes.
Thanks for reviewing, and thank you for QBE!
|
|
Otherwise, the alignment gets truncated to fit in char, so
`align 256` is handled as no alignment requirement.
|
|
This is incompatible with binutils gas older than 2.26.
|
|
In C, if a floating point cannot be represented exactly as an integer,
conversion from the former to the latter is implementation-defined.
Therefore, it can be flaky to test this against QBE-defined behavior.
This was discovered from (unsigned int) 4294967295.0f being an UB,
because (uint64_t) 4294967295.0f is 4294967296 > UINT_MAX
on amd64 when compiled by either gcc or clang.
|
|
References: 12f9d16c7b000 ("create cfg.c for cfg-related functions")
|
|
|
|
References: 4e93eeaa3b63b ("add rv64 backend")
|
|
The handling of phi was incorrect
and we would sometimes miss escapes.
We now handle phis at the very end
of the pass to make sure the defs
for their arguments have all been
processed.
|
|
|
|
|
|
dbgloc line [col]
This is implemented in a backwards-compatible manner.
|
|
See previous discussion here[1]. It's unclear to me how to preview HTML page
generated from the .txt file, though.
[1]: https://lists.sr.ht/~mpu/qbe/%3C87cz1jq26k.fsf%40greenfork.me%3E
|
|
Causes errors with stock toolchain
on OpenBSD.
|
|
|
|
this fixes the build on FreeBSD, where the value of $(CC) recently
changed from "cc" (13.2) to "c99" (14).
Signed-off-by: Lorenz (xha) <[email protected]>
|
|
|
|
|
|
signed int can't represent all the values of unsigned int, so we
need to do the conversion to signed long, and use the lower 32 bits
as the result.
|
|
|
|
|
|
|
|
Support "file" and "loc" directives. "file" takes a string (a file name)
assigns it a number, sets the current file to that number and records
the string for later. "loc" takes a single number and outputs location
information with a reference to the current file.
|
|
|
|
|
|
|
|
We now treat thread-local
symbols in Mems properly.
|
|
|
|
Non-store/load instructions were
not lowered correctly for thread-
local symbols. This is an attempt
at a fix (cannot test for now).
|
|
|
|
|
|
Thanks to Lassi Pulkkinen for
flagging the issue and pointing
me to Ulrich Drepper's extensive
doc [1].
[1] https://people.redhat.com/drepper/tls.pdf
|
|
This is consistent with newtmp()
and newcon().
|
|
|