# Formal specs and optimizations in general

**URL:** <https://internals.rust-lang.org/t/formal-specs-and-optimizations-in-general/13635>\
**Category:** language design\
**Created:** [December 15, 2020, 2:54pm UTC](https://internals.rust-lang.org/t/formal-specs-and-optimizations-in-general/13635 "2020-12-15T14:54:57Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![steffahn](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/steffahn/32/13288_2.png) [@steffahn](https://internals.rust-lang.org/u/steffahn)\
**Post date:** [December 17, 2020, 12:21am UTC](https://internals.rust-lang.org/t/formal-specs-and-optimizations-in-general/13635/6 "2020-12-17T00:21:32Z")

</div>

> [@Pointers Are Complicated II, or: We need better language specs](https://internals.rust-lang.org/t/pointers-are-complicated-ii-or-we-need-better-language-specs/13562/29):
>
> Basically you are saying there are two LLVM IRs, IR1 and IR2, with the same syntax but different semantics: IR1 has provenance and IR2 doesn't. The given optimization can only be correct in IR2, so at some point in the optimization pipeline there needs to be a clear transition from working with IR1 to working with IR2.

Yep, that was what I meant.

> [@Pointers Are Complicated II, or: We need better language specs](https://internals.rust-lang.org/t/pointers-are-complicated-ii-or-we-need-better-language-specs/13562/29):
>
> Who wants to create a bugreport?

> [@Pointers Are Complicated II, or: We need better language specs](https://internals.rust-lang.org/t/pointers-are-complicated-ii-or-we-need-better-language-specs/13562/29):
>
> Looks like we need to clarify the docs.

This would be two bug reports then, I guess..  
I can do those tomorrow.

---

_[View the full topic](https://internals.rust-lang.org/t/formal-specs-and-optimizations-in-general/13635)._
