diff options
Diffstat (limited to 'src/lj_opt_fold.c')
-rw-r--r-- | src/lj_opt_fold.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c index 1d37a7fd..84c5dc00 100644 --- a/src/lj_opt_fold.c +++ b/src/lj_opt_fold.c | |||
@@ -2285,6 +2285,17 @@ LJFOLDF(barrier_tnew_tdup) | |||
2285 | return DROPFOLD; | 2285 | return DROPFOLD; |
2286 | } | 2286 | } |
2287 | 2287 | ||
2288 | /* -- Profiling ----------------------------------------------------------- */ | ||
2289 | |||
2290 | LJFOLD(PROF any any) | ||
2291 | LJFOLDF(prof) | ||
2292 | { | ||
2293 | IRRef ref = J->chain[IR_PROF]; | ||
2294 | if (ref+1 == J->cur.nins) /* Drop neighbouring IR_PROF. */ | ||
2295 | return ref; | ||
2296 | return EMITFOLD; | ||
2297 | } | ||
2298 | |||
2288 | /* -- Stores and allocations ---------------------------------------------- */ | 2299 | /* -- Stores and allocations ---------------------------------------------- */ |
2289 | 2300 | ||
2290 | /* Stores and allocations cannot be folded or passed on to CSE in general. | 2301 | /* Stores and allocations cannot be folded or passed on to CSE in general. |