aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-06-24 16:50:07 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-06-24 16:50:07 -0700
commit9a2a4d5471baa159bfd4ed793962ec5d0841631b (patch)
tree7605618b39c12540ff266a53a05cd6c9ab08dfab /lib/Bitcode/Reader/BitcodeReader.cpp
parentc6ab023ee092501613e452bb850aa73ba7427857 (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