Commit Graph

144 Commits

Author SHA1 Message Date
Wesley Wiser
73814654b2 Move promoted out of mir::Body 2019-08-22 06:36:30 -04:00
Wesley Wiser
666180c324 Move 'tcx lifetime on MirPass 2019-08-22 06:36:30 -04:00
Eduard-Mihai Burtescu
b565ece5d8 Remove redundant ty fields from mir::Constant and hair::pattern::PatternRange. 2019-08-16 15:20:27 +03:00
Mazdak Farrokhzad
632ce7402f
Rollup merge of #62801 - bjorn3:remove_lower_128bit_ops, r=alexcrichton
Remove support for -Zlower-128bit-ops

It is broken and unused

cc https://github.com/rust-lang/rust/issues/58969

blocked https://github.com/rust-lang-nursery/compiler-builtins/pull/302 (removes definitions of the lang items removed in this PR)

r? @alexcrichton
2019-07-26 18:56:43 +02:00
Santiago Pastorino
d0accade3e Migrate from Place enum to Place struct 2019-07-20 05:08:38 +02:00
bjorn3
3427a14bdf Remove support for -Zlower-128bit-ops
It is broken and unused
2019-07-19 14:21:06 +02:00
Samy Kacimi
7a2a17af09
normalize use of backticks/lowercase in compiler messages for librustc_mir
https://github.com/rust-lang/rust/issues/60532

r? @alexreg
2019-07-06 20:40:40 +02:00
Santiago Pastorino
099f9e4e8a Implement From<Local> for Place and PlaceBase 2019-06-25 15:46:23 +02:00
Eduard-Mihai Burtescu
b25b466a88 rustc: remove 'x: 'y bounds (except from comments/strings). 2019-06-18 18:10:21 +03:00
ljedrz
d996c4d5a3 remove _by_hir_id if there is no NodeId counterpart 2019-06-17 18:57:21 +02:00
bors
68655029d4 Auto merge of #60730 - matthewjasper:optimize-false-edges, r=pnkfelix
Optimize matches

Attempt to fix or improve #60571

This is breaking some diagnostics because the MIR for match arms isn't in source order any more.

cc @centril
2019-06-16 09:30:34 +00:00
Eduard-Mihai Burtescu
afc39bbf24 Run rustfmt --file-lines ... for changes from previous commits. 2019-06-14 18:58:32 +03:00
Eduard-Mihai Burtescu
f3f9d6dfd9 Unify all uses of 'gcx and 'tcx. 2019-06-14 18:58:23 +03:00
Matthew Jasper
33bc396ff7 Make FalseEdges always have two targets
We never have more than one imaginary target, so we have no reason for
a `Vec`
2019-06-12 22:41:58 +01:00
Eduard-Mihai Burtescu
fff08cb043 Run rustfmt --file-lines ... for changes from previous commits. 2019-06-12 13:38:28 +03:00
Eduard-Mihai Burtescu
17cdd356da rustc: replace TyCtxt<'tcx, 'gcx, 'tcx> with TyCtxt<'gcx, 'tcx>. 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu
2441253508 Fix fallout from deny(unused_lifetimes). 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu
37799a5552 rustc: replace TyCtxt<'a, 'gcx, 'tcx> with TyCtxt<'tcx, 'gcx, 'tcx>. 2019-06-12 13:38:27 +03:00
Jad Ghalayini
80ff07f30d Changed usages of mir in librustc::mir and librustc_mir to body 2019-06-09 16:05:05 -04:00
Claude-Alban RANÉLY-VERGÉ-DÉPRÉ
6e5e0daff2 Changes the type mir::Mir into mir::Body
The commit should have changed comments as well.
At the time of writting, it passes the tidy and check tool.

Revisions asked by eddyb :
- Renamed of all the occurences of {visit/super}_mir
- Renamed test structures `CachedMir` to `Cached`

Fixing the missing import on `AggregateKind`
2019-05-28 19:17:51 +02:00
Santiago Pastorino
b922e8a97d Make dest_needs_borrow iterate instead of recurse 2019-05-27 22:16:39 +02:00
bors
47e0803d5c Auto merge of #60195 - varkor:commontypes-to-common, r=eddyb
Split `CommonTypes` into `CommonTypes` and `CommonLifetimes`

The so-called "`CommonTypes`" contains more than just types.

r? @eddyb
2019-05-01 09:32:58 +00:00
Mazdak Farrokhzad
ada68c9d19
Rollup merge of #60276 - matthewjasper:cleanup-mir-visitor, r=estebank
Cleanup the MIR visitor

* Remove useless `BasicBlock` parameters on methods with `Location`s.
* Prefer `visit_terminator_kind` to `visit_terminator`.
* Remove `Region` from PlaceContexts. `visit_rvalue` should be used when the region is important.
* Remove unused visitor methods.
2019-04-30 03:28:38 +02:00
Matthew Jasper
22226fa7fb Remove region from borrow place contexts 2019-04-26 21:35:10 +01:00
Matthew Jasper
0eeab6b9a6 Remove BasicBlock parameter from mir visitor methods 2019-04-26 21:35:10 +01:00
varkor
a3470c6189 Update handling of Tuple 2019-04-26 21:09:32 +01:00
varkor
7261bd88ac Update existing usages 2019-04-25 22:05:04 +01:00
Eduard-Mihai Burtescu
1525dc2146 rustc: dissuade compiler developers from misusing upvar debuginfo. 2019-04-23 23:35:21 +03:00
Tyler Mandry
4122d2221e Remove adt_def from PlaceTy and make it a struct 2019-04-02 12:02:17 -07:00
Saleem Jaffer
752544b284 adding mir::StaticKind enum for static and promoted 2019-03-23 20:18:52 +05:30
Saleem Jaffer
cf2f1bb072 review fixes 2019-03-21 22:13:09 +05:30
Saleem Jaffer
23c87a1f53 fixed all compilation errors 2019-03-18 15:03:30 +05:30
Saleem Jaffer
7fb1c22da1 promoted is still left in 2 places 2019-03-18 15:03:29 +05:30
ljedrz
cd06038b54 HirIdification: replace NodeId method calls 2019-03-07 09:22:43 +01:00
varkor
8e56729b4d Handle new ConstValue variants in mir
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05 22:19:26 +00:00
Santiago Pastorino
0f993d5a7a Put Local, Static and Promoted as one Base variant of Place 2019-03-01 05:02:00 +01:00
csmoe
ccfa5d6df8 replace &'tcx Substs with SubstsRef 2019-02-26 19:30:57 +08:00
John Kåre Alsaker
82ec72391f Always emit an error for a query cycle 2019-02-15 03:51:47 +01:00
Ralf Jung
2708946787 pass full InstanceDef to run_passes 2019-02-09 12:11:12 +01:00
Taiki Endo
725af30809 librustc_mir => 2018 2019-02-08 06:28:15 +09:00
Oliver Scherer
64afc6b517 Differentiate between closure and function bodies 2019-01-21 10:12:17 +01:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Ralf Jung
c1160a8f86 treat ref-to-raw cast like a reborrow: do a special kind of retag 2018-12-18 09:56:31 +01:00
Alexander Regueiro
ee89c088b0 Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
John Kåre Alsaker
a70babed03 Use a function to access the Hir map to be able to turn it into a query later 2018-12-06 17:24:36 +01:00
Ralf Jung
d2c19e0bcc Retag needs to know whether this is a 2-phase-reborrow 2018-12-03 13:02:02 +01:00
Wesley Wiser
3cce5c7977 Don't inline virtual calls (take 2)
When I fixed the previous mis-optimizations, I didn't realize there were
actually two different places where we mutate `callsites` and both of
them should have the same behavior.

As a result, if a function was inlined and that function contained
virtual function calls, they were incorrectly being inlined. I also
added a test case which covers this.
2018-11-09 22:11:40 -05:00
Wesley Wiser
e72afa9573 Consume optimization fuel from the MIR inliner
This makes it easier to debug mis-optimizations that occur during
inlining. Thanks to @nikomatsakis for the suggestion!
2018-11-07 08:17:21 -05:00
Ralf Jung
8a61d492a9 make inliner remove the fn_entry flag on Retag statements 2018-10-29 09:16:25 +01:00
Wesley Wiser
69eaa11633 [mir-inlining] Don't inline virtual calls
Prior to this change, the test case would output `1` instead of `2` like
it should.
2018-10-14 13:45:46 -04:00