Santiago Pastorino
fd5aa32c35
Remove Static from PlaceBase
2020-01-10 09:08:24 +01:00
Mazdak Farrokhzad
ebfd8673a7
Remove rustc_hir reexports in rustc::hir.
2020-01-05 12:49:22 +01:00
Mazdak Farrokhzad
66f5bf1b8b
extract rustc::middle::codegen_fn_attrs
2020-01-04 18:43:06 +01:00
Aaron Hill
e8e53b56df
Ensure that we process projections during MIR inlining
...
Fixes #67710
Previously, we were not calling `super_place`, which resulted in us
failing to update any local references that occur in
ProjectionElem::Index. This caused the post-inlining MIR to contain a
reference to a local ID from the inlined callee, leading to an ICE
due to a type mismatch.
2020-01-01 20:10:55 -05:00
Wesley Wiser
25a8b5d58e
Fix Instance::resolve()
incorrectly returning specialized instances
...
We only want to return specializations when `Reveal::All` is passed, not
when `Reveal::UserFacing` is. Resolving this fixes several issues with
the `ConstProp`, `SimplifyBranches`, and `Inline` MIR optimization
passes.
Fixes #66901
2019-12-27 13:04:32 -05:00
Mark Rousskov
a06baa56b9
Format the world
2019-12-22 17:42:47 -05:00
Wesley Wiser
bec4fc175a
[mir-opt] Fix Inline
pass to handle inlining into box
expressions
2019-12-20 20:39:47 -05:00
Mazdak Farrokhzad
56c0bea390
Rollup merge of #66991 - Nashenas88:body_cache_cleanup, r=eddyb
...
Cleanup BodyCache
After this PR:
- `BodyCache` is renamed to `BodyAndCache`
- `ReadOnlyBodyCache` is renamed to `ReadOnlyBodyAndCache`
- `ReadOnlyBodyAndCache::body` fn is removed and all calls to it are replaced by a deref (possible due to fix of its `Deref` imp in #65947 )
cc @eddyb @oli-obk
2019-12-08 03:39:45 +01:00
Adam Perry
cc574be985
#[track_caller]
suppresses MIR inlining.
2019-12-05 21:12:34 -08:00
Paul Daniel Faria
756aa1e46c
rustc: Apply clearer naming to BodyAndCache, fix Deref impl, remove unneeded Index impl, remove body fn
...
rustc_codegen_ssa: Fix BodyAndCache reborrow to Body and change instances of body() call to derefence
rustc_mir: Fix BodyAndCache reborrow to Body and change intances of body() call to derefence
2019-12-05 22:58:41 -05:00
Paul Daniel Faria
b2fe254c98
Remove HasLocalDecls impl from BodyCache's, properly reborrow to Body, rename all body_cache back to body
2019-12-02 08:40:56 -05:00
Paul Daniel Faria
595d161d36
Remove BodyCache.body and rely on Deref as much as possible for ReadOnlyBodyCache
2019-12-02 08:38:16 -05:00
Paul Daniel Faria
67b7a78231
Fix tidy errors
2019-12-02 08:38:16 -05:00
Paul Daniel Faria
4de31b26d1
Fix remaining compilation issues
2019-12-02 08:37:04 -05:00
Paul Daniel Faria
fc6b58d0a8
Simplify BodyCache impl and fix all remaining type errors in librustc_mir (lifetime errors still exist)
2019-12-02 08:35:08 -05:00
Paul Daniel Faria
52cc85f008
Address nits and remove unneeded pass
2019-12-02 08:30:30 -05:00
Paul Daniel Faria
ad734680af
Move predecessors cache invalidation back to basic_blocks_mut, add a couple more ensure_predecessors to prevent panics
2019-12-02 08:30:30 -05:00
Paul Daniel Faria
f534d9f8c4
Stop invalidating predecessors cache when accessing unique basic block, invalidate cache when accessing unique terminator
2019-12-02 08:30:30 -05:00
Eduard-Mihai Burtescu
a9976d89ed
rustc: move mir::SourceScopeLocalData to a field of SourceScopeData.
2019-11-30 01:37:42 +02:00
Eduard-Mihai Burtescu
78d85fcf52
rustc_mir: fix inliner to also copy over source_scope_local_data.
2019-11-30 01:36:51 +02:00
Eduard-Mihai Burtescu
563ed27c01
rustc: move debug info from LocalDecl and UpvarDecl into a dedicated VarDebugInfo.
2019-11-27 19:22:03 +02:00
Santiago Pastorino
180fc413fb
Move Place::elem methods and friends to TyCtxt
2019-10-22 10:33:36 -03:00
Santiago Pastorino
d32c2865d6
Intern place projection
2019-10-22 10:33:36 -03:00
Santiago Pastorino
190802cfca
Pattern match over PlaceRef rather than Place
...
This prepares the code base for when projection is interned. Place's
projection field is going to be `&List<PlaceElem<'tcx>>` so we won't be
able to pattern match against it.
2019-10-22 10:33:30 -03:00
Santiago Pastorino
48349960e6
Use Cow to handle modifications of projection in preparation for interning
2019-10-18 10:06:13 -04:00
Santiago Pastorino
d53fc9cae5
Add process_* place hooks to improve code reutilization
2019-10-17 22:06:56 -04:00
Santiago Pastorino
e3e9951673
Prepare inline MutVisitor to have projections interned
2019-10-17 22:06:55 -04:00
csmoe
64f61c7888
remove indexed_vec re-export from rustc_data_structures
2019-09-29 16:48:31 +00:00
csmoe
d20183dbbf
remove bit_set re-export from rustc_data_structures
2019-09-29 16:11:30 +00:00
varkor
e2e0f9af85
Rename sty
to kind
2019-09-25 15:50:04 +01:00
Santiago Pastorino
87420cd1bc
Make Place Boxed on Statement to reduce size from 64 bytes to 32 bytes
2019-09-11 16:28:06 -03:00
Santiago Pastorino
e9c41148c0
Convert Place's projection to a boxed slice
2019-09-09 18:16:49 -03:00
Wesley Wiser
84556502e6
Handle statics in Subst::subst()
by implementing TypeFoldable
2019-08-22 06:36:31 -04:00
Wesley Wiser
4d62545687
Move def_id out add substsref
2019-08-22 06:36:30 -04:00
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