[move-only] Disable move-only devirtualization.

It is not needed for correctness and hides most of the deinit related
optimizer bugs.
This commit is contained in:
Andrew Trick
2023-06-02 17:09:13 -07:00
parent 0bbd92a446
commit 62b0899500
3 changed files with 8 additions and 5 deletions

View File

@@ -15,6 +15,13 @@
/// This pass runs after move only checking has occurred and transforms last
/// destroy_value of move only types into a call to the move only types deinit.
///
/// TODO: This pass is disabled because it hides bugs in the common case in
/// which optimization passes incorrectly remove the deinit, for example, by
/// destructuring the aggregate rather than destroying it as a whole. Consider
/// reeabling this pass later in the pipeline, after all other OSSA function
/// passes have run. Also consider removing bailouts from this pass. If it's
/// possible to devirtualize, then it should do it.
///
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "sil-move-only-checker"