]>
git.proxmox.com Git - rustc.git/blob - tests/run-make-fulldeps/pgo-use/main.rs
eb9192c87e6f05b213bb62781d253119190e6d6a
2 pub fn cold_function(c
: u8) {
3 println
!("cold {}", c
);
7 pub fn hot_function(c
: u8) {
8 std
::env
::set_var(format
!("var{}", c
), format
!("hot {}", c
));
12 let arg
= std
::env
::args().skip(1).next().unwrap();
14 for i
in 0 .. 1000_000 {
15 let some_value
= arg
.as_bytes()[i
% arg
.len()];
16 if some_value
== b'
!'
{
17 // This branch is never taken at runtime
18 cold_function(some_value
);
20 hot_function(some_value
);