People often ask me "How did you learn how to hack?" The answer: by reading. This page is a collection of the blog posts and other articles that I have accumulated over the years of my journey. Enjoy!
--via-ir makes the compiler turn Solidity into an intermediate language below the bytecode called Yul. The optimizer rewrites the Solidity to Yul to make it cheaper, before running the normal bytecode optimizing. This flag makes the code much faster in terms of gas. write happens to this storage slot, then a future load needs to read from the storage slot, and NOT the in-memory variable. KnowledgeBase of the compiler with various other constraints. For instance, k = i + 2. If k is always 2 more than i, they can never be the same slot. If i changes, then the note has to be erased. unknown. If a future loop ALSO seats the local in-memory value to unknown, then this becomes a problem: unknown == unknown! So, a note is created (since the value didn't change), even though it's incorrect. I suppose this is why JavaScript has undefined != anything.