Commit graph

12 commits

Author SHA1 Message Date
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00
Jakob Degen
7a1bfc0ba7 Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
Xavier Denis
86be22ebcd add crate name to mir dumps 2020-07-29 13:41:11 +02:00
Ana-Maria Mihalache
ef88769e4f --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
Matthew Jasper
da22793a35 Create fewer basic blocks in match MIR lowering 2019-06-13 21:05:21 +01:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Eduard-Mihai Burtescu
919ed409b0 tests: update to include move annotations in MIR. 2017-11-28 04:18:32 +02:00
Mikhail Modin
7a6832de99 change MIR dump filenames from nodeN to DefPath 2017-11-09 12:00:17 +03:00
Michael Woerister
7d774c4214 Update mir-opt tests. 2017-11-07 08:54:38 +01:00
Björn Steinbrink
0473a4f1d8 Avoid unnecessary copies of arguments that are simple bindings
Initially MIR differentiated between arguments and locals, which
introduced a need to add extra copies assigning the argument to a
local, even for simple bindings. This differentiation no longer exists,
but we're still creating those copies, bloating the MIR and LLVM IR we
emit.

Additionally, the current approach means that we create debug info for
both the incoming argument (marking it as an argument), and then
immediately shadow it a local that goes by the same name. This can be
confusing when using e.g. "info args" in gdb, or when e.g. a debugger
with a GUI displays the function arguments separately from the local
variables, especially when the binding is mutable, because the argument
doesn't change, while the local variable does.
2017-10-26 12:54:34 +02:00
Christopher Vittal
426183c01b Update README and tests for new infrastructure 2017-10-09 23:22:34 -04:00
Ulrik Sverdrup
fbc3f11fc1 mir: Reinstate while loop in deaggregator pass
A previous commit must have removed the `while let` loop here by
mistake; for each basic block, it should find and deaggregate multiple
statements in their index order, and the `curr` index tracks the
progress through the block.

This fixes both the case of deaggregating statements in separate
basic blocks (preserving `curr` could prevent that) as well
as multiple times in the same block (missing loop prevented that).
2016-12-09 18:16:38 +01:00