Skip to content

Commit 0edc7fe

Browse files
committed
---
yaml --- r: 56269 b: refs/heads/auto c: 0b0ca59 h: refs/heads/master i: 56267: b76fc42 v: v3
1 parent 6bb025f commit 0edc7fe

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: ca8e99fd78ab9b56c5bdc61027b032ad52c2ec8b
17+
refs/heads/auto: 0b0ca597bf25d13e4493c72843389cc9e47425b6
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/librustc/middle/trans/closure.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,15 @@ pub fn trans_expr_fn(bcx: block,
409409
~"expr_fn");
410410
let llfn = decl_internal_cdecl_fn(ccx.llmod, s, llfnty);
411411

412+
// Always mark inline if this is a loop body. This is important for
413+
// performance on many programs with tight loops.
414+
if is_loop_body.is_some() {
415+
set_always_inline(llfn);
416+
} else {
417+
// Can't hurt.
418+
set_inline_hint(llfn);
419+
}
420+
412421
let Result {bcx: bcx, val: closure} = match sigil {
413422
ast::BorrowedSigil | ast::ManagedSigil | ast::OwnedSigil => {
414423
let cap_vars = *ccx.maps.capture_map.get(&user_id);

0 commit comments

Comments
 (0)