[llvm] [SandboxVectorizer] Add MemSeed bundle types (PR #111584)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 14:06:20 PDT 2024
================
@@ -123,5 +123,35 @@ class SeedBundle {
}
#endif // NDEBUG
};
+
+template <typename LoadOrStoreT> class MemSeedBundle : public SeedBundle {
+public:
+ explicit MemSeedBundle(SmallVector<Instruction *> &&SV, ScalarEvolution &SE)
+ : SeedBundle(std::move(SV)) {
+ assert(all_of(Seeds, [](auto *S) { return isa<LoadOrStoreT>(S); }) &&
----------------
vporpo wrote:
Perhaps a static assert?
```
static_assert(std::is_same<LoadOrStoreT, LoadInst>::value || std::is_same<LoadOrStoreT, StoreInst>::value, "Expected LoadInst or StoreInst!");
```
https://github.com/llvm/llvm-project/pull/111584
More information about the llvm-commits
mailing list