Add support for translating from llvm::Select, llvm::FNeg, and llvm::Unreachable. This patch also cleans up (NFC) the opcode map for simple instructions and adds // clang-format off/on comments to prevent those lines from being churned by clang-format between commits.
Details
Diff Detail
Event Timeline
mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp | ||
---|---|---|
588 | Not part of this patch? |
Nit: could you please update the commit message to specify the translation _from LLVM IR_. Otherwise, it may trick a casual reader into thinking that we haven't supported translating simple instructions _to LLVM IR_ until this point.
mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp | ||
---|---|---|
594 | Nit: I'd consider wrapping this block into // clang-format off + // clang-format on and manually formatting it to have one instruction per line. This would reformatting-caused churn on every change and make it easy to find relevant instructions (which can be ordered alphabetically or follow their order in LLVM's LangRef). |
Cleanup the opcode map for simple instructions and add // clang-format off/on comments on those lines (NFC).
Just a FYI: the simple opcode map is sorted by instruction ordering listed in LangRef.
mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp | ||
---|---|---|
588 | llvm::Invoke had already been implemented previously. I would like to do some NFC clean up on this block of code as part of the // clang-format off/on Alex suggested below. | |
594 | yes, sounds like a good idea, personally I also prefer one instruction per line. |
Not part of this patch?