This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvm] Improve error message when translating `llvm.call_intrinsic`
ClosedPublic

Authored by Mogball on Jul 27 2023, 12:05 PM.

Diff Detail

Event Timeline

Mogball created this revision.Jul 27 2023, 12:05 PM
Herald added a project: Restricted Project. · View Herald Transcript
Mogball requested review of this revision.Jul 27 2023, 12:05 PM
Mogball updated this revision to Diff 544884.Jul 27 2023, 12:19 PM

add newline

lattner accepted this revision.Jul 27 2023, 1:29 PM
lattner added a subscriber: lattner.

Nice, thank you!

This revision is now accepted and ready to land.Jul 27 2023, 1:29 PM
rriddle added inline comments.Jul 27 2023, 2:20 PM
mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
62

Can you use mlir::debugString for this?

Mogball marked an inline comment as done.Jul 27 2023, 2:23 PM
Mogball added inline comments.
mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
62

It works on LLVM types?

rriddle added inline comments.Jul 27 2023, 2:28 PM
mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
62

IIRC it's a generally thing, would need to double check though (on mobile right now)

Mogball marked 2 inline comments as done.Jul 28 2023, 12:01 AM
Mogball added inline comments.
mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
62

I looked around yet could not find one. Seems LLVM typically uses the stream operator but it's only overloaded for raw_ostream.

Mogball updated this revision to Diff 545031.Jul 28 2023, 12:17 AM
Mogball marked an inline comment as done.

rebase

This revision was landed with ongoing or failed builds.Jul 28 2023, 12:17 AM
This revision was automatically updated to reflect the committed changes.

Sorry had to revert because seems like it broke the build: https://lab.llvm.org/buildbot/#/builders/61/builds/46712

mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
1817

Why did you need to move it? The only change I spot is the asm format. By the way why changing the format here?

mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
2830

I'm confused: where is this coming from? I can't relate to the rest of the changes

Mogball marked an inline comment as done.Jul 28 2023, 10:00 AM
Mogball added inline comments.
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
1817

The op was printing its attributes twice (since LLVMOpAttrs printer doesn't know to omit $intrin). Also, this operation is more of a generic op rather than an intrinsic op.

mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
2830

Aargh I rebased incorrectly