rust/src/librustc_trans
bors 2fd060815f Auto merge of #36181 - seanmonstar:likely, r=nikomatsakis
core: add likely and unlikely intrinsics

I'm no good at reading assembly, but I have tried a stage1 compiler with this patch, and it does cause different asm output. Additionally, testing this compiler on my httparse crate with some `likely` usage added in to the branches does affect benchmarks. However, I'm sure a codegen test should be included, if anyone knows what it should look like.

There isn't an entry in `librustc_trans/context.rs` in this diff, because it already exists (`llvm.expect.i1` is used for array indices).

----

Even though this does affect httparse benchmarks, it doesn't seem to affect it the same way GCC's `__builtin_expect` affects picohttpparser. I was confused that the deviation on the benchmarks grew hugely when testing this, especially since I'm absolutely certain that the branchs where I added `likely` were always `true`. I chalk that up to GCC and LLVM handle branch prediction differently.

cc #26179
2016-09-13 10:54:55 -07:00
..
back Auto merge of #36025 - michaelwoerister:incr-comp-hash-spans, r=nikomatsakis 2016-09-06 13:22:35 -07:00
debuginfo Refactor TyStruct/TyEnum/TyUnion into TyAdt 2016-09-08 22:17:53 +03:00
mir use adt::trans_const when translating constant closures and tuples 2016-09-12 01:53:43 +03:00
abi.rs Add s390x support 2016-09-09 22:28:19 +01:00
adt.rs Refactor TyStruct/TyEnum/TyUnion into TyAdt 2016-09-08 22:17:53 +03:00
asm.rs
assert_module_sources.rs
attributes.rs
base.rs Refactor TyStruct/TyEnum/TyUnion into TyAdt 2016-09-08 22:17:53 +03:00
basic_block.rs
build.rs
builder.rs
cabi_aarch64.rs
cabi_arm.rs
cabi_asmjs.rs
cabi_mips64.rs
cabi_mips.rs
cabi_powerpc64.rs
cabi_powerpc.rs
cabi_s390x.rs Add s390x support 2016-09-09 22:28:19 +01:00
cabi_x86_64.rs Replace _, _ with .. 2016-09-04 12:30:33 +03:00
cabi_x86_win64.rs
cabi_x86.rs
callee.rs Auto merge of #36200 - mattico:fix-llvm-linkage, r=arielb1 2016-09-05 08:13:32 -07:00
Cargo.toml
cleanup.rs
closure.rs Fix incorrect LLVM Linkage enum 2016-09-04 16:12:01 -05:00
collector.rs Refactor TyStruct/TyEnum/TyUnion into TyAdt 2016-09-08 22:17:53 +03:00
common.rs Refactor TyStruct/TyEnum/TyUnion into TyAdt 2016-09-08 22:17:53 +03:00
consts.rs Fix incorrect LLVM Linkage enum 2016-09-04 16:12:01 -05:00
context.rs Refactor TyStruct/TyEnum/TyUnion into TyAdt 2016-09-08 22:17:53 +03:00
declare.rs Fix incorrect LLVM Linkage enum 2016-09-04 16:12:01 -05:00
diagnostics.rs
disr.rs
glue.rs Auto merge of #36351 - pnkfelix:fix-36278-size-miscalc, r=eddyb 2016-09-10 13:10:29 -07:00
intrinsic.rs Auto merge of #36181 - seanmonstar:likely, r=nikomatsakis 2016-09-13 10:54:55 -07:00
lib.rs Add s390x support 2016-09-09 22:28:19 +01:00
machine.rs
macros.rs
meth.rs clean up get_vtable's doc comment 2016-09-08 12:58:05 +02:00
monomorphize.rs
partitioning.rs
README.txt
symbol_map.rs
symbol_names_test.rs
trans_item.rs Refactor TyStruct/TyEnum/TyUnion into TyAdt 2016-09-08 22:17:53 +03:00
tvec.rs
type_.rs
type_of.rs Refactor TyStruct/TyEnum/TyUnion into TyAdt 2016-09-08 22:17:53 +03:00
value.rs

See the README.md in ../librustc.