mrkajetanp wrote: > Is there a reason why we are preferring to generate constructs and then > removing non-simd ones, as opposed to simply generating only simd?
I think both approaches have benefits and drawbacks, as usual. The current one keeps all the logic closer together as opposed to having a couple lines for handling this flag in the code for lowering every individual op, it makes it easier to maintain in some ways (the pass will emit an error if it sees any unhandled OpenMP ops, whereas otherwise an unhandled op would get silently left in and there would be nothing to check for it). It also guarantees that the simd construct and its associated ops have been generated correctly, whereas if we were selectively disabling the lowering for some ops there might be some more edge cases there to handle. It's a pretty niche feature in the grand scheme of things, hence I thought it would be better to keep the code for it in its own file rather than all over the core lowering logic. Wasted CPU cycles are the thing being traded off here, but given that it is a niche feature (probably mainly used for testing and experiments of some kinds) then I don't think it's prohibitive? https://github.com/llvm/llvm-project/pull/150269 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits