From a04f48e202859fa45c7bc908b7913858381963b3 Mon Sep 17 00:00:00 2001 From: Joe Savona Date: Wed, 12 Jun 2024 15:48:34 -0700 Subject: [PATCH] Update base for Update on "[compiler] Instruction reordering" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a pass just after DCE to reorder safely reorderable instructions (jsx, primitives, globals) closer to where they are used, to allow other optimization passes to be more effective. Notably, the reordering allows scope merging to be more effective, since that pass relies on two scopes not having intervening instructions — in many cases we can now reorder such instructions out of the way and unlock merging, as demonstrated in the changed fixtures. The algorithm itself is described in the docblock. note: This is a cleaned up version of #29579 that is ready for review. [ghstack-poisoned]