Fix loop detection heuristic based on self-out-of-fuel.
This commit is contained in:
parent
7ddd99cf52
commit
61b83045fc
|
@ -143,7 +143,6 @@
|
||||||
(define (post-process-inline-log log)
|
(define (post-process-inline-log log)
|
||||||
(define-values (inliner-logs tr-logs)
|
(define-values (inliner-logs tr-logs)
|
||||||
(partition inliner-log-entry? log))
|
(partition inliner-log-entry? log))
|
||||||
(define any-self-o-o-f? (ormap self-out-of-fuel? inliner-logs))
|
|
||||||
(define grouped-events
|
(define grouped-events
|
||||||
(group-by equal? #:key log-entry-pos ; right file, so that's enough
|
(group-by equal? #:key log-entry-pos ; right file, so that's enough
|
||||||
inliner-logs))
|
inliner-logs))
|
||||||
|
@ -174,8 +173,8 @@
|
||||||
;; body (as opposed to `g') may make unboxing possible.
|
;; body (as opposed to `g') may make unboxing possible.
|
||||||
;; Of course, we lose precision if `g' has multiple call sites to `f'.
|
;; Of course, we lose precision if `g' has multiple call sites to `f'.
|
||||||
(define n-unrollings (length (filter unrolling? group)))
|
(define n-unrollings (length (filter unrolling? group)))
|
||||||
;; TODO any-self-o-o-f? add too many false positives
|
(define any-self-o-o-f? (ormap self-out-of-fuel? group))
|
||||||
(define is-a-loop? (or #;any-self-o-o-f? (> n-unrollings 0)))
|
(define is-a-loop? (or any-self-o-o-f? (> n-unrollings 0)))
|
||||||
(define inlining-sites
|
(define inlining-sites
|
||||||
(group-by equal? #:key (lambda (x)
|
(group-by equal? #:key (lambda (x)
|
||||||
(inlining-event-where-loc
|
(inlining-event-where-loc
|
||||||
|
|
Loading…
Reference in New Issue
Block a user