[llvm] [SandboxVec][Legality] Query the scheduler for legality (PR #114616)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 14:46:22 PST 2024


================
@@ -167,7 +172,9 @@ class LegalityAnalysis {
   }
   /// Checks if it's legal to vectorize the instructions in \p Bndl.
   /// \Returns a LegalityResult object owned by LegalityAnalysis.
-  const LegalityResult &canVectorize(ArrayRef<Value *> Bndl);
+  /// p SkipScheduling skips the scheduler check and is only meant for testing.
----------------
vporpo wrote:

We could split it into two separate functions, one that checks everything but the schedule, and a separate one for scheduling. But I would not like to make two functions available to the user, because legality should always do both. So using this flag seems to be the less bad thing to do API wise. We could also drop the flag completely once things become stable enough, or we could modify the tests such that they always pass the scheduling test.

https://github.com/llvm/llvm-project/pull/114616


More information about the llvm-commits mailing list