113c32105c7492d89d48496bdb73caaa86d0054c...6c78399f016dca322d47f64c49c3493981c5cf0c: Some refactorings and other small / self-contained changes
01accdc713bbee47b52c1a05e9d1f8d3e32d4050...04fb24bbf3225b817b3c65543f499a3cf8824cde: Rewriting pass to remove "HIR-only casts". These are casts like &x as *const T that don't get lowered to an actual MIR Rvalue::Cast assignment
68a815c38bfff2d6917a7a30fe662f524eca3d50...4488b95a778d8be407961ac00f2f642bb36e5560: Fixes for several "unlower_map has no origin" errors in algo_md5
8757538f9f29b23c42d28d6c0f505a71d57fce50...40cc2e1f0655f44ff51a9b22a5af0708304d9486: Implements rewrites to remove casts that don't change the pointee type
bc8a981d58f7222dbb42b6d30e5cb825e128a30c: dataflow changes for memcpy/memset. Specifically, this detects whether the memcpy/memset is affecting exactly one item (byte count == mem::size_of::<T>(), where T is the pointee type) or possibly more than one item. Multi-item memcpy/memset requires the OFFSET permission on the input pointers. The check for mem::size_of::<T>() uses the new recent_writes analysis to find the instruction that was used to compute the byte length argument.
251dd56ca96fe531227802b1fddf3dde2d445832...b2745847e63d6326d78f5fa55251ff7190047a9d: Reworks rewrite::expr::convert to fold certain rewrites together. Specifically, when applying a MIR rewrite and there is already a HIR rewrite on the current node, in some cases it will edit the current rewrite instead of wrapping it. For example, mir_op::RewriteKind::MutToImm applied to Rewrite::Ref(rw, Mutability::Mut) (&mut _) will produce Rewrite::Ref(rw, Mutability::Not) (&_) rather than Ref(Deref(Ref(rw, Mut)), Not) (&*(&mut _)). This fixes an issue with the removal of array .as_mut_ptr() calls in cases where we're rewriting the resulting pointer type to a non-mut slice.
4592288a2090ea916c17aad50642032a4a2ec3c1...de532ab4da063664f0aea418ae4758d1eece2cef: Use pointee types when rewriting type annotations. This is the part that actually changes input: *mut c_void to input: &[u8] in certain algo_md5 function signatures.
f13ee41798026394b4f2c1f3ff97fbe52a4f5a65: Removes the CVoidCasts machinery, which is now superseded by pointee analysis and cast removal.
6b2e4910e2f4bae07e602b8e19a49c92e1e1a5ab...caf059b8173d4702593c8ab2181ad33b060ef6b2: Implements rewriting of memcpy and memset to safe operations.
c09b2d61ddcf69e6fd309afd2ff5c29fb062bad9: Fixes some remaining rustc warnings.
&x as *const T
that don't get lowered to an actual MIRRvalue::Cast
assignmentunlower_map
has no origin" errors in algo_md5dataflow
changes for memcpy/memset. Specifically, this detects whether the memcpy/memset is affecting exactly one item (byte count ==mem::size_of::<T>()
, whereT
is the pointee type) or possibly more than one item. Multi-item memcpy/memset requires the OFFSET permission on the input pointers. The check formem::size_of::<T>()
uses the newrecent_writes
analysis to find the instruction that was used to compute the byte length argument.rewrite::expr::convert
to fold certain rewrites together. Specifically, when applying a MIR rewrite and there is already a HIR rewrite on the current node, in some cases it will edit the current rewrite instead of wrapping it. For example,mir_op::RewriteKind::MutToImm
applied toRewrite::Ref(rw, Mutability::Mut)
(&mut _
) will produceRewrite::Ref(rw, Mutability::Not)
(&_
) rather thanRef(Deref(Ref(rw, Mut)), Not)
(&*(&mut _)
). This fixes an issue with the removal of array.as_mut_ptr()
calls in cases where we're rewriting the resulting pointer type to a non-mut slice.input: *mut c_void
toinput: &[u8]
in certain algo_md5 function signatures.CVoidCasts
machinery, which is now superseded by pointee analysis and cast removal.