about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <bsteinbr@gmail.com>2014-07-05 21:47:14 +0200
committerBjörn Steinbrink <bsteinbr@gmail.com>2014-07-06 22:12:10 +0200
commitdd4112bf7924767a6074b54ffe297c877f8b042d (patch)
tree1ee8151258b14b8549e74eec275bf88bab446ae7 /src/rustllvm/ExecutionEngineWrapper.cpp
parentd2a22f520c73d26730f9159e1ce1b6058c2287dd (diff)
downloadrust-dd4112bf7924767a6074b54ffe297c877f8b042d.tar.gz
rust-dd4112bf7924767a6074b54ffe297c877f8b042d.zip
Store booleans as i8 in memory to improve optimizations by LLVM
LLVM doesn't really like types with a bit-width that isn't a multiple of
8 and disable various optimizations if it encounters such types used
with loads/stores. OTOH, booleans must be represented as i1 when used as
SSA values. To get the best results, we must use i1 for SSA values, and
i8 when storing the value to memory.

By using range asserts on loads, LLVM can eliminate the required
zero-extend and truncate operations.

Fixes #15203
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions