Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
64afc5e
Make BitVec::contains panic-less
nagisa Aug 2, 2016
5fdc839
Expand BitVec functionality slightly
nagisa Aug 2, 2016
34d0545
[MIR] Utility to retrieve base variable of Lvalue
nagisa Aug 2, 2016
ccdc81a
Add a MIR dataflow framework (again)
nagisa Aug 5, 2016
8b8ccf0
[MIR] Constant propagation
nagisa Aug 6, 2016
ba6a8fb
Count time taken by MIR passes
nagisa Aug 6, 2016
2cc114c
Count and report time taken by MIR passes
nagisa Aug 7, 2016
d203b9c
Comments, todos and small improvements
nagisa Aug 7, 2016
18f65dd
Add Rvalue::is_pure
nagisa Aug 7, 2016
97bfde3
Fix compilation
nagisa Aug 9, 2016
61a58f1
Fix join function for CsLattice
nagisa Aug 11, 2016
efbea54
Rename dead code removal pass to a proper-er name
nagisa Aug 11, 2016
b15bb6d
Add some constant propagation tests
nagisa Aug 11, 2016
f78274c
Clean-up the ConstLattice; Propagate global state
nagisa Aug 15, 2016
61871d4
Re-add a way to specify initial state
nagisa Aug 15, 2016
1b3e945
Rebase fallout
nagisa Aug 15, 2016
935dc8d
Make SwitchInt switch on Operand
nagisa Aug 15, 2016
3e2e8b9
Disallow to optimise out constants in OOB tests
nagisa Aug 15, 2016
e00862b
A way to remove otherwise unused locals from MIR
nagisa Aug 16, 2016
c352ae2
Do not run the DA+ConstProp before DropElab
nagisa Aug 16, 2016
708487b
Rebase fallout
nagisa Aug 16, 2016
0791d56
Do not be overly aggressive optimising MIR with -g
nagisa Aug 18, 2016
9b227dd
More bitvec tests
nagisa Aug 18, 2016
ec8e500
Fix aliasing in const-propagate
nagisa Aug 19, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Disallow to optimise out constants in OOB tests
Apparently our constant errors are only reported if there’s a use in MIR for that constant. This
means that in these tests `let _ = B` is seen as a no-op use and thus is optimised out. Explicitly
drop() the B to make sure it is not optimised (yet, until the inliner happens).

NB: the `let _ = B` statement discussed here has no side effects (such as Drop implementation).
  • Loading branch information
nagisa committed Aug 18, 2016
commit 3e2e8b9cd7dbe4779578d6b956f4762bc0ece913
2 changes: 1 addition & 1 deletion src/test/compile-fail/array_const_index-0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ const B: i32 = (&A)[1];
//~| index out of bounds: the len is 0 but the index is 1

fn main() {
let _ = B;
drop(B);
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/array_const_index-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ const B: i32 = A[1];
//~| index out of bounds: the len is 0 but the index is 1

fn main() {
let _ = B;
drop(B);
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/const-array-oob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ const BLUB: [u32; FOO[4]] = [5, 6];
//~| index out of bounds: the len is 3 but the index is 4

fn main() {
let _ = BAR;
drop(BAR);
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/const-slice-oob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ const BAR: u32 = FOO[5];
//~| index out of bounds: the len is 3 but the index is 5

fn main() {
let _ = BAR;
drop(BAR);
}