OSDN Git Service

Subzero: Fix emission of global initializers.
authorJim Stichnoth <stichnot@chromium.org>
Wed, 8 Oct 2014 18:24:51 +0000 (11:24 -0700)
committerJim Stichnoth <stichnot@chromium.org>
Wed, 8 Oct 2014 18:24:51 +0000 (11:24 -0700)
commit2a063e2b8e38b49cc5ee4aa33841ce39378de567
tree507a5e52f62cead5cbafc1558b01179944be5822
parent645aa1a9a21d41f523575afad356e76062e9d696
Subzero: Fix emission of global initializers.

Also changes the szbuild.py script to add -fdata-sections, and entirely removes the -disable-globals option.

The global initializer emission basically copies what llc does, based on 3 properties of the global: constant vs non-constant, internal vs external, and full zero-initializer vs non-trivial initializer.

BUG= none
R=jvoung@chromium.org, kschimpf@google.com

Review URL: https://codereview.chromium.org/631383003
pydir/szbuild.py
src/IceClFlags.h
src/IceConverter.cpp
src/IceTargetLoweringX8632.cpp
src/PNaClTranslator.cpp
src/llvm2ice.cpp
tests_lit/llvm2ice_tests/globalinit.pnacl.ll
tests_lit/reader_tests/globalinit.pnacl.ll