Emit a debug message if inlining fails.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Transforms/Inliner.cpp | ||
---|---|---|
438 | Did you mean to have the dump inside the LLVM_DEBUG section too? |
mlir/lib/Transforms/Inliner.cpp | ||
---|---|---|
438 | Why the **? Also you can avoid the dump and just write it like this I think: LLVM_DEBUG(llvm::dbgs() << "Failed to inline: " << call << "\n"); |
mlir/lib/Transforms/Inliner.cpp | ||
---|---|---|
438 | The "**" is there to indicate that the message is in the scope of the earlier message, so it will appear as: * Inlining call: ... ** Failed to inline: ... I am ok if we want just a single '*'. Also llvm::dbgs() << call does not work, I guess the insertion operator << has not been overloaded for CallOpInterface (or its parent). I will check what would be needed to get that working. |
mlir/lib/Transforms/Inliner.cpp | ||
---|---|---|
438 | You should be able to do LLVM_DEBUG(call.print(llvm::dbgs() << " ..."); llvm::dbgs() << '\n'); |
mlir/include/mlir/IR/OpDefinition.h | ||
---|---|---|
263 | nit: Please use complete sentences in comments. |
mlir/lib/Transforms/Inliner.cpp | ||
---|---|---|
438 | I have overloaded the << operator now, so its much cleaner. |
mlir/lib/Transforms/Inliner.cpp | ||
---|---|---|
437 | Why stream in the call here? It is already being streamed in above, this just duplicates it. |
mlir/lib/Transforms/Inliner.cpp | ||
---|---|---|
438 | Thanks, LG. |
nit: Please use complete sentences in comments.