Closed mppf closed 5 years ago
These are all valid points. I've made some changes in that direction now:
rv::addRVPasses(PM)
.rv::LoopVectorizer
will no longer attempt to vectorize a loop that has no unique preheader.rv::addRVPasses
as the only option for now.Can we close this?
Sure
In trying to integrate RV with the Chapel compiler I ran into a core dump inside RV.
If I apply the following patch, I get an assertion " can only clone single exit loops" instead.
The root cause for the Chapel integration issue was that the frontend needed to call rv::addPreparatoryPasses in addition to rv::addOuterLoopVectorizer. I've fixed that now, but it would be nice if there were a clearer error here (say, one that mentioned the need to call addPreparatoryPasses). Additionally it would be nice if https://github.com/cdl-saarland/rv/wiki/How-to-use-RV%27s-outer-loop-vectorizer-in-your-LLVM-frontend included the need for rv::addPreparatoryPasses (and probably rv::addWholeFunctionVectorizer, rv::addOuterLoopVectorizer, rv::addCleanupPasses(PM); ).
It would also work just fine for me if RV provided registerRVPasses (or something like it) as an exported function. I'm just as happy to call addPreparatoryPasses etc.