[llvm] [LV] Vectorize histogram operations (PR #99851)

Graham Hunter via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 06:17:52 PDT 2024


================
@@ -30,6 +31,7 @@
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
 #include "llvm/Transforms/Utils/LoopUtils.h"
 #include "llvm/Transforms/Utils/ScalarEvolutionExpander.h"
+#include "llvm/Transforms/Vectorize/LoopVectorizationLegality.h"
----------------
huntergr-arm wrote:

Sadly, that's not quite possible at the moment. LoopVectorizationLegality.h needs the definition of HistogramInfo since it creates a SmallVector of them, and accesses the fields. I can't include VPlan.h in the other header, since VPlan.h is under the lib/ subtree instead of the include/ subtree. I could perhaps try to fudge it by always including VPlan.h first in any .cpp file, but that feels fragile (and clang-format doesn't like it anyway).

I suspect a shared header under include/ would be best. Or have I missed something?

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


More information about the llvm-commits mailing list