GlobalOpt does not treat externally_initialized globals correctly
authorOliver Stannard <oliver.stannard@arm.com>
Mon, 12 Oct 2015 13:20:52 +0000 (13:20 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Mon, 12 Oct 2015 13:20:52 +0000 (13:20 +0000)
commit30430397eaa5d5baf1cc8126b5cd52229ccd62ac
treeb93400c6532170f60f58ea7c5e5d1f18af386348
parent85125fcdd66f8745b5388a8405f9a5dba6f03c96
GlobalOpt does not treat externally_initialized globals correctly

GlobalOpt currently merges stores into the initialisers of internal,
externally_initialized globals, but should not do so as the value of the global
may change between the initialiser and any code in the module being run.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250035 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/GlobalOpt.cpp
lib/Transforms/Utils/GlobalStatus.cpp
test/Transforms/GlobalOpt/externally-initialized.ll [new file with mode: 0644]