The optimizer should only run when the code being compiled could directly access racket/unsafe/ops. This prevents unsoundness in Typed Racket from giving untrusted code access to dangerous operations.