Ralf Jung
fc918a395a
rename InterpretCx -> InterpCx
...
That's more consistent with InterpResult and InterpError.
2019-06-27 13:23:34 +02:00
bors
166c49d7a1
Auto merge of #62012 - wesleywiser:const_prop_use_ecx, r=oli-obk
...
Use ecx for const-prop local storage
r? @oli-obk
2019-06-24 07:48:29 +00:00
Wesley Wiser
c686130a38
Fix nits
2019-06-21 07:46:27 -04:00
Wesley Wiser
164ed087ab
[const-prop] Move local storage into a Frame
on InterpCx
...
This moves us closer to just using `InterpCx` for interpretation.
2019-06-20 21:12:10 -04:00
Wesley Wiser
573b61ae26
[const-prop] Introduce getter/setter functions
2019-06-20 21:12:10 -04:00
ljedrz
73cb9ab526
rename hir::map::get_by_hir_id to get
2019-06-20 12:50:06 +02:00
Oliver Scherer
d6fa4070be
Fix rebase fallout
2019-06-19 09:52:35 +02:00
Oliver Scherer
4b6f3868b3
Make interning explicitly care about types and the mutability of memory
2019-06-19 09:52:35 +02: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
Eduard-Mihai Burtescu
fff08cb043
Run rustfmt --file-lines ...
for changes from previous commits.
2019-06-12 13:38:28 +03:00
Eduard-Mihai Burtescu
21ac960334
rustc: remove some unnecessary lifetimes in -> TyCtxt methods.
2019-06-12 13:38:27 +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
Ralf Jung
8f05ff3e33
rename EvalResult -> InterpResult and EvalError -> InterpErrorInfo
2019-06-08 11:39:48 +02:00
Wesley Wiser
dee05ab2cc
[const-prop] Handle Rvalue::Len
2019-06-06 08:31:54 -04:00
Wesley Wiser
1e50e01bb7
[const-prop] Handle ProjectionElem::Deref
2019-06-06 08:31:54 -04:00
Wesley Wiser
9f4d94b908
[const-prop] Handle Rvalue::Ref
2019-06-06 08:31:54 -04:00
Wesley Wiser
529b94ea6a
[const-prop] Fix ICE when casting function pointers
...
This fixes an ICE when building libcore with `-Z mir-opt-level=3`.
2019-06-06 08:31:28 -04:00
Wesley Wiser
b2536781af
Whitespace fixes
2019-06-04 06:30:36 -04:00
Christian Poveda
31ab573052
Add const-eval support for indirects
2019-06-03 23:53:46 -05:00
Mazdak Farrokhzad
ee08261c8c
Rollup merge of #60928 - TheSirC:fix/60229, r=eddyb
...
Changes the type `mir::Mir` into `mir::Body`
Fixes part 1 of #60229 (previously attempted in #60242 ).
I stumbled upon the issue and it seems that the previous attempt at solving it was not merged. This is a second try more up-to-date.
The commit should have changed comments as well.
At the time of writting, it passes the tidy and check tool.
2019-05-29 00:19:55 +02: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
Mazdak Farrokhzad
16ef483b79
Rollup merge of #61164 - RalfJung:scalar, r=oli-obk
...
rename Scalar::Bits to Scalar::Raw and bits field to data
Also use this opportunity to seal some abstraction leaks (other modules constructing `Scalar::Bits` directly instead of using a constructor).
r? @oli-obk
2019-05-28 18:15:39 +02:00
Mazdak Farrokhzad
1dc9bbbffe
Rollup merge of #61247 - spastorino:eval-place-iterate, r=wesleywiser
...
Make eval_place iterate instead of recurse
r? @oli-obk
2019-05-28 11:49:08 +02:00
Santiago Pastorino
c3e71f210e
Make eval_place iterate instead of recurse
2019-05-27 22:52:03 +02:00
Andrew Xu
46b9ed4fa1
Rename "Associated*" to "Assoc*"
...
We are going to uniform the terminology of all associated items.
Methods that may or may not have `self` are called "associated
functions". Because `AssociatedFn` is a bit long, we rename `Associated`
to `Assoc`.
2019-05-26 17:49:02 +08:00
Ralf Jung
082da0c698
rename Scalar::Bits to Scalar::Raw and bits field to data
2019-05-26 11:08:03 +02:00
Mazdak Farrokhzad
d8b828beea
Rollup merge of #61184 - wesleywiser:const_prop_tracing, r=oli-obk
...
Add additional trace statements to the const propagator
This makes it easier to figure out when const propagation fails.
2019-05-26 02:13:32 +02:00
Wesley Wiser
9bfbbd2a78
Add additional trace statements to the const propagator
...
This makes it easier to figure out when const propagation fails.
2019-05-25 11:02:59 -04:00
varkor
e694807650
Fix missing tcx
2019-05-25 10:07:02 +02:00
Oliver Scherer
e694b63cd1
Don't use ty::Const
without immediately interning
2019-05-25 10:07:01 +02:00
Wesley Wiser
ec853ba026
[const-prop] Don't const-prop into terminators unless mir-opt-level >= 2
2019-05-19 16:47:03 -04:00
Wesley Wiser
2baab0eaaa
[const-prop] Remove catch all match and add FIXME
2019-05-19 16:47:03 -04:00
Wesley Wiser
3f5c743b53
[const-prop] Support propagating into SwitchInt's discr
Operand
2019-05-19 16:46:51 -04:00
Wesley Wiser
8e99c76089
[const-prop] Support propagating into Assert's cond
Operand
2019-05-19 16:13:08 -04:00
Wesley Wiser
45214edf9e
Run const propagation at O2
2019-05-15 06:07:06 -04:00
Wesley Wiser
317daf77de
Do some simple constant propagation in the ConstProp pass
2019-05-15 06:07:06 -04:00
Eduard-Mihai Burtescu
b92b1a76e1
rustc: use DefKind instead of Def, where possible.
2019-05-03 22:50:09 +03:00
Eduard-Mihai Burtescu
a3fcab36d2
rustc: factor most DefId-containing variants out of Def and into DefKind.
2019-05-03 22:48:27 +03:00
Wesley Wiser
16fe8ccce9
Remove the self.mir
field from ConstPropagator
2019-05-02 07:02:34 -04:00
Mazdak Farrokhzad
12bf981552
Rollup merge of #60428 - wesleywiser:refactor_const_eval, r=oli-obk
...
Refactor `eval_body_using_ecx` so that it doesn't need to query for MIR
This is the first step toward removing the `mir` field of `ConstPropagator` which will eventually allow us to actually const propagate in MIR.
r? @oli-obk
2019-05-02 01:09:28 +02:00
Wesley Wiser
eadf48e796
Refactor eval_body_using_ecx
so that it doesn't need to query for MIR
2019-05-01 08:27:06 -04: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
flip1995
e1da67e69c
Fix lint findings in librustc_mir
2019-04-28 21:19:27 +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
Ralf Jung
dec24471be
add Miri error variant for process exit
2019-04-19 18:48:02 +02:00