aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/NaCl/PromoteIntegers.cpp
AgeCommit message (Collapse)Author
2014-03-06Implement integer promotion for urem, udiv, srem, and sdivDan Gohman
The optimizer sometimes thinks it's beneficial to truncate all manner of i64 operators to narrower types, even when still wider than the platform's widest legal type.
2014-02-25Support GEP and ConstantExprs directly in the JSBackend.Dan Gohman
This patch also lays the groundwork for the single-use instruction trick to reduce the number of temporary variables.
2014-02-14Preserve alignment information when promoting integer loads and stores.Dan Gohman
2014-02-13Emscripten doesn't need to legalize pointers.Dan Gohman
2014-02-12Generalize PromoteIntegers to handle arbitrary bit widths.Dan Gohman
2014-01-30assume worst-case alignment in PromoteIntegers, as we actually break on ↵Alon Zakai
unaligned operations
2013-11-15Make integer promotion pass preserve debug infoDerek Schuff
Just copy the debug info from the original instructions to newly-created instructions. R=mseaborn@chromium.org BUG=none Review URL: https://codereview.chromium.org/60353015
2013-11-15Switch PromoteIntegers pass from clearing upper bits after converted operationsDerek Schuff
that may affect them, to clearing before operations that may be affected This is just a cleanup that doesn't have any significant performance or functionality impact, but I thought it might make fixing bug 3714 a bit simpler. R=mseaborn@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=3714 Review URL: https://codereview.chromium.org/59533011
2013-09-20Support mul binary operator in integer promotion passDerek Schuff
Its handling is the same as add (may overflow, may set upper bits) R=jvoung@chromium.org, mseaborn@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=3599 Review URL: https://codereview.chromium.org/24244008
2013-05-30Enable integer promotion pass and add ABI check for integer typesDerek Schuff
This is a reapply of dc58e24a with one cleanup of a commented-out line in PromoteIntegers.cpp R=mseaborn@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=3360 Review URL: https://codereview.chromium.org/16015003
2013-05-30Add switch support to integer promotion passDerek Schuff
Odd-sized switch statements can appear in the sandboxed translator build. R=mseaborn@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=3360 Review URL: https://codereview.chromium.org/15894006
2013-05-29Revert "Enable integer promotion pass and enable ABI check for integer types."Mark Seaborn
This reverts commit dc58e24a36836fc19c534bdcbef5152717a3c3fc. That change broke the build of the sandboxed PNaCl translator. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3360 TEST=PNaCl toolchain trybots TBR=dschuff@chromium.org Review URL: https://codereview.chromium.org/15845009
2013-05-29Fix PromoteIntegers pass to handle undef constantsDerek Schuff
ConvertConstant now returns an undef constant of the appropriate type. This fixes the translator build failure caused by enabling the pass. R=mseaborn@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=3360 Review URL: https://codereview.chromium.org/16086005
2013-05-29Enable integer promotion pass and enable ABI check for integer types.Derek Schuff
R=mseaborn@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=3360 Review URL: https://codereview.chromium.org/15950006
2013-05-28Fix integer promotion pass to handle casts to struct pointer types.Derek Schuff
Also fix the diagnostic asserts in getPromotedType. R=mseaborn@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=3360 Review URL: https://codereview.chromium.org/16004003
2013-05-14Fix some build warnings in Nacl-specific codeEli Bendersky
BUG=None R=dschuff@chromium.org Review URL: https://codereview.chromium.org/14840018
2013-05-10PNaCl ABI: Promote illegal integer typesDerek Schuff
This pass (mostly) legalizes integer types by promoting them. It has some limitations (e.g. it can't change function types) but it is more than sufficient for what clang and SROA generate. A more significant limitation of promotion is that packed bitfields of size > 64 bits are still not handled. There are none in our tests (other than callingconv_case_by_case which doesn't require a stable pexe) but we will want to either handle them by correctly expanding them, or find a better way to error out. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3360 R=eliben@chromium.org, jvoung@chromium.org Review URL: https://codereview.chromium.org/14569012