[all-commits] [llvm/llvm-project] c1d5cc: [LangRef] Try to formalize the definition of "odr"...

Eli Friedman via All-commits all-commits at lists.llvm.org
Mon May 20 13:03:53 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c1d5cc99c6ba8e897ea145dbb2221a155b5e3e5a
      https://github.com/llvm/llvm-project/commit/c1d5cc99c6ba8e897ea145dbb2221a155b5e3e5a
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2024-05-20 (Mon, 20 May 2024)

  Changed paths:
    M llvm/docs/LangRef.rst

  Log Message:
  -----------
  [LangRef] Try to formalize the definition of "odr" in LLVM IR. (#92619)

The current definition is a bit fuzzy... replace it with something
that's somewhat rigorous.

For functions, the definition is pretty narrow; as a consequence of
language-level non-determinism, it's impossible to tell whether two
functions are equivalent, so just embrace the non-determinism. For
constants, we're pretty strict; otherwise you end up concluding
constants can actually change value, which is bad for alias analysis. I
think C++ standard don't allow any non-deterministic operations in
constants, so we should be okay there? Poison is per-byte to allow some
ambiguity in the way padding is defined.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list