diff options
author | Mark Seaborn <mseaborn@chromium.org> | 2013-06-24 16:50:07 -0700 |
---|---|---|
committer | Mark Seaborn <mseaborn@chromium.org> | 2013-06-24 16:50:07 -0700 |
commit | 9a2a4d5471baa159bfd4ed793962ec5d0841631b (patch) | |
tree | 7605618b39c12540ff266a53a05cd6c9ab08dfab /lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | c6ab023ee092501613e452bb850aa73ba7427857 (diff) |
PNaCl ABI: Disallow built-in multiplication in "alloca" instructions
Simplify the set of "alloca" instructions the ABI verifier allows.
Before this change, we used i8 arrays, such as:
alloca [8 x i8]
After this change, we will just use i8 with an explicit size value, so
that becomes:
alloca i8, i32 8
Allocation of variable-length arrays will require an explicit multiply
instruction. This means that the code generator no longer has to
handle an implicit multiplication in "alloca", reducing the burden on
fast-and-simple code generators a little. This means the PNaCl ABI
doesn't need to specify whether alloca's implicit multiplication
checks for overflow.
This doesn't affect what the backend generates. See
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp, which handles
constant-size AllocaInsts (by filling out StaticAllocaMap) and which
is uses for both -O2 (SelectionDAG) and -O0 (FastISel) translation.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/17631004
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions