about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <bsteinbr@gmail.com>2015-02-02 19:25:44 +0100
committerBjörn Steinbrink <bsteinbr@gmail.com>2015-02-18 14:04:46 +0100
commit7412d1b2eff1c77241c54fa39508e7049d71ec7e (patch)
tree28ada1feea39cb5f455b30ab44d0438600020909 /src/rustllvm/ExecutionEngineWrapper.cpp
parent52b5150cfd3dfcdf518675e9073f03e061a63a53 (diff)
downloadrust-7412d1b2eff1c77241c54fa39508e7049d71ec7e.tar.gz
rust-7412d1b2eff1c77241c54fa39508e7049d71ec7e.zip
Eliminate excessive null-checks from slice iterators
The data pointer used in the slice is never null, using assume() to tell
LLVM about it gets rid of various unneeded null checks when iterating
over the slice.

Since the snapshot compiler is still using an older LLVM version, omit
the call in stage0, because compile times explode otherwise.

Benchmarks from #18193
````
running 5 tests
test _range    ... bench:     33329 ns/iter (+/- 417)
test assembly  ... bench:     33299 ns/iter (+/- 58)
test enumerate ... bench:     33318 ns/iter (+/- 83)
test iter      ... bench:     33311 ns/iter (+/- 130)
test position  ... bench:     33300 ns/iter (+/- 47)

test result: ok. 0 passed; 0 failed; 0 ignored; 5 measured
````

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