From: Ralf Jung Date: Wed, 7 Jun 2017 04:17:09 +0000 (-0700) Subject: fix some typos X-Git-Url: https://git.ralfj.de/web.git/commitdiff_plain/3c9b573950d4bf783f06094f785167fd95c976e6?ds=inline;hp=aee9ae44caeab516d361c144e0252d023ca3d586 fix some typos --- diff --git a/ralf/_posts/2017-06-06-MIR-semantics.md b/ralf/_posts/2017-06-06-MIR-semantics.md index 13f51db..6ddc745 100644 --- a/ralf/_posts/2017-06-06-MIR-semantics.md +++ b/ralf/_posts/2017-06-06-MIR-semantics.md @@ -20,8 +20,8 @@ This post is about what I found, and it also serves as a nice demonstration of h ## Live and Let Die -The first miri task that I took on was for miri to do something sensible with MIR's [`StroageLive` and `StroageDead` statements](https://github.com/solson/miri/issues/49). -If you haven't seen these before, that's because they do not come up in Rust code; instead, `StroageLive` and `StroageDead` are inserted by the compiler. +The first miri task that I took on was for miri to do something sensible with MIR's [`StorageLive` and `StorageDead` statements](https://github.com/solson/miri/issues/49). +If you haven't seen these before, that's because they do not come up in Rust code; instead, `StorageLive` and `StorageDead` are inserted by the compiler. For example, the following Rust code {% highlight rust %} fn main() { @@ -62,7 +62,7 @@ For example, the compiler marks `_4` as dead right after the multiplication. Liveness information is important because it is forwarded to LLVM, which then uses this information to allocate variables into stack slots. If two variables are never live at the same time, the compiler can assign both of them the *same* slot, which is great because it makes the stack frame smaller. -To this end, rustc will translate `StorageLive` to [`llvm.lifetime.start`](http://llvm.org/docs/LangRef.html#llvm-lifetime-start-intrinsic) and `StroageDead` to [`llvm.lifetime.end`](http://llvm.org/docs/LangRef.html#llvm-lifetime-end-intrinsic). +To this end, rustc will translate `StorageLive` to [`llvm.lifetime.start`](http://llvm.org/docs/LangRef.html#llvm-lifetime-start-intrinsic) and `StorageDead` to [`llvm.lifetime.end`](http://llvm.org/docs/LangRef.html#llvm-lifetime-end-intrinsic). These are intrinsics that LLVM understands and takes into account when computing the layout of the stack frame. ## Giving It Semantics