Global variables with strong definitions cannot be freed
authorPhilip Reames <listmail@philipreames.com>
Wed, 14 Jul 2021 20:19:48 +0000 (13:19 -0700)
committerPhilip Reames <listmail@philipreames.com>
Wed, 14 Jul 2021 20:26:18 +0000 (13:26 -0700)
commitb86ddfdb9a80f2343510e07209ceda59d72972e3
treec43802b2e4519cdedb4f04f4ae2bd010b5442505
parentd37689e9ababe4badbc0132950425d8f3434a5b8
Global variables with strong definitions cannot be freed

With the current deref semantics, this is redundant - since we assume that anything which is dereferenceable (ever) can't be freed - but it becomes neccessary for the deref-at-point semantics.

Testing wise, this is covered by test/CodeGen/X86/hoist-invariant-load.ll when -use-dereferenceable-at-point-semantics is active.  I didn't bother duplicating the command line since a) it's an in-development mode, and b) the change is pretty obvious.
llvm/lib/IR/Value.cpp