wmi added a comment.

The patch makes the reasoning about when the internal flags will take effect 
much easier.

One question is, with the change, the internal flags can only be used to 
disable loop vectorization/slp vectorization/loop interleaving, but not to 
enable them. Can we treat them in the way that the flags in 
PipelineTuningOptions contain the default values set by Opt Level, and the 
internal flags can override them, which can either enable or disable the 
vectorizations/interleaving.

To do that, we need to let SLPVectorizerPass be added into pass manager anyway 
and pass PTO.SLPVectorization as a param (now adding SLPVectorizerPass is 
guarded by PTO.SLPVectorization). Whether SLPVectorizerPass will be performed 
can be decided inside of SLPVectorizerPass.



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7618-7621
+    : InterleaveOnlyWhenForced(Opts.InterleaveOnlyWhenForced |
+                               !EnableLoopInterleaving),
+      VectorizeOnlyWhenForced(Opts.VectorizeOnlyWhenForced |
+                              !EnableLoopVectorization) {}
----------------
Use boolean operator || instead of bitwise operator?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77989/new/

https://reviews.llvm.org/D77989



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to