• 2 Posts
  • 811 Comments
Joined 2 years ago
cake
Cake day: June 16th, 2023

help-circle







  • for example, simply optimize it away

    Yeah, that example makes it reasonable. But the optimizer can do ridiculous stuff when it proves the loop never terminates and also assume it terminates.

    The most famous example of UB bullshit is when some compilers run code that is impossible to reach just because there’s an infinite loop on the file (not even in the same function).












  • In a high-level, you don’t design them anymore. You write them, in code. The compiler turns your code into the chip masks, and has an optimizer that will mangle the hell out of the relatively simple stuff you wrote.

    In a lower level, that compilation is not really done automatically, and people will intervene in lots of places, and AFAIK, how people divide it and interact with it are well guarded secrets from the chip makers.