Follow-up on D117226 for createSections.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM. Can we please rebase this and fix the same in convertOmpAtomicUpdate and convertOmpAtomicCapture too?
mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp | ||
---|---|---|
74–75 | [Suggestion] We probably don't need to do this, because if a conversion does not require an alloca (for example, barrier), we will be creating a basicblock unnecessarily. So, creating this on-demand seems okay to me. |
mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp | ||
---|---|---|
74–75 | Making decision based on the current position of an IRBuilder creates heaps of problems and unpredictability. Special cases like this one here need to be tested and maintained, and still easily introduce bugs. An unconditional dedicated alloca block avoids all these problems. An extra basic block on the other side is insignificant. It will be gone as soon as simplify-cfg runs. However, this seems to be controversial, so I removed the TODO for now. |
[Suggestion] We probably don't need to do this, because if a conversion does not require an alloca (for example, barrier), we will be creating a basicblock unnecessarily. So, creating this on-demand seems okay to me.