Commit Graph

33 Commits

Author SHA1 Message Date
Matthew Jasper
da22793a35 Create fewer basic blocks in match MIR lowering 2019-06-13 21:05:21 +01:00
Matthew Jasper
abab9efbdb Schedule storage-dead of temporaries sooner
This ensures that we will correctly generate a storage-dead if the
initializing expression diverges.
2019-05-21 19:37:38 +01:00
Matthew Jasper
f506aea1fa Give match arms a drop/region scope
Also give arms the correct lint scope in MIR.
2019-05-21 19:37:38 +01:00
Matthew Jasper
16ee042100 Fixes for shallow borrows
* Don't promote these borrows if we're going to remove them before
  codegen
* Correctly mark unreachable code
2019-03-31 15:14:50 +01:00
bors
20958fc81f Auto merge of #58902 - matthewjasper:generator-cleanup-blocks, r=davidtwco
Fixes for the generator transform

* Moves cleanup annotations in pretty printed MIR so that they can be tested
* Correctly determines which drops are in cleanup blocks when elaborating generator drops
* Use the correct state for poisoning a generator

Closes #58892
2019-03-21 02:18:27 +00:00
Eduard-Mihai Burtescu
2386168139 rustc: explicitly pass the namespace to PrintCx::parameterized. 2019-03-15 09:26:13 +02:00
Matthew Jasper
2131b153b3 Check which blocks are cleanup in mir-opt tests 2019-03-03 20:34:26 +00:00
Matthew Jasper
5ffc919726 Move the exit block of the match to the end 2019-02-21 19:03:34 +00:00
Matthew Jasper
2c840ae18d Use normal mutable borrows in MIR match lowering 2019-02-21 19:03:34 +00:00
Matthew Jasper
d51b5cdd82 Clean up MIR match lowering
* Adjust fake borrows to only be live over guards.
* Remove unused `slice_len_checked` field.
* Split the methods on builder into those for matches and those for all
  kinds of pattern bindings.
2019-02-21 19:03:34 +00:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Matthew Jasper
531e98a0d8 Update mir opt tests 2018-09-24 23:33:13 +01:00
Rémy Rakic
e90c942477 Update mir-opt test suite 2018-09-18 14:36:37 +02:00
Oliver Schneider
cbd42749ef Update mir-opt to promoted changes 2018-07-23 09:51:31 +02:00
Felix S. Klock II
5eebd36c93 Test update: Fallout from ReadForMatch statements + changes to codegen under NLL. 2018-05-29 23:02:40 +02:00
Eduard-Mihai Burtescu
d1f117df0f rustc_mir: allow promotion of promotable temps indexed at runtime. 2018-05-16 15:40:54 +03:00
Felix S. Klock II
930e76e2af Update mir-opt test to reflect change to MIR code-generation. 2018-05-04 13:17:13 +02:00
Oliver Schneider
d98a2b90b2
Rebase fallout 2018-03-08 08:34:17 +01:00
Oliver Schneider
918b6d7633
Produce instead of pointers 2018-03-08 08:08:14 +01:00
Eduard-Mihai Burtescu
8af134e031 rustc_mir: insert a dummy access to places being matched on, when building MIR. 2018-02-09 23:25:10 +02:00
Ariel Ben-Yehuda
ff0b84df58 fix tests in wasm 2017-12-03 14:50:47 +02:00
Ariel Ben-Yehuda
9dc396747b funnel all unwind paths through a single Resume block
This simplifies analysis and borrow-checking because liveness at the
resume point can always be simply propagated.

Later on, the "dead" Resumes are removed.
2017-12-03 02:47:44 +02:00
Eduard-Mihai Burtescu
919ed409b0 tests: update to include move annotations in MIR. 2017-11-28 04:18:32 +02:00
est31
755fa9c23e Update tests for -Zborrowck-mir -> -Zborrowck=mode migration 2017-11-26 16:39:15 +01:00
Djzin
829b70330e always add an unreachable branch on matches to give more info to llvm about which values are possible 2017-11-14 06:33:39 +00:00
Mikhail Modin
7a6832de99 change MIR dump filenames from nodeN to DefPath 2017-11-09 12:00:17 +03:00
Michael Woerister
8fcf3e33e4 Fix some rebasing fallout. 2017-11-07 08:54:38 +01:00
Mikhail Modin
7d87054347 replace Add by tuple 2017-11-02 20:25:38 +03:00
Mikhail Modin
d9e64ebaaa change mir stage in test 2017-11-02 10:21:36 +03:00
Mikhail Modin
59d3184624 add one more sample 2017-11-02 09:43:36 +03:00
Mikhail Modin
cb2867da88 fix pre binding false edges 2017-11-02 09:43:36 +03:00
Mikhail Modin
a954dcc72e fix opt-mir test and remove false edge if no guard 2017-11-02 09:43:36 +03:00
Mikhail Modin
2d71c5f10c add TerminatorKind::FalseEdges and use it in matches 2017-11-02 09:43:36 +03:00