File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
branches/try/src/librustc/middle/trans Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: c081ffbd1e845687202a975ea2e698b623e5722f
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
5
- refs/heads/try: ca8e99fd78ab9b56c5bdc61027b032ad52c2ec8b
5
+ refs/heads/try: 0b0ca597bf25d13e4493c72843389cc9e47425b6
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change @@ -409,6 +409,15 @@ pub fn trans_expr_fn(bcx: block,
409
409
~"expr_fn") ;
410
410
let llfn = decl_internal_cdecl_fn ( ccx. llmod , s, llfnty) ;
411
411
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
+
412
421
let Result { bcx : bcx, val : closure} = match sigil {
413
422
ast:: BorrowedSigil | ast:: ManagedSigil | ast:: OwnedSigil => {
414
423
let cap_vars = * ccx. maps . capture_map . get ( & user_id) ;
You can’t perform that action at this time.
0 commit comments