Revert unintended CompileError API change; track follow-up in issue#58
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds/expands Doxygen documentation across the Picceler compiler and runtime, aligning with issue #51’s goal of improving in-source docs for key compiler components (passes, MLIR generation helpers, and public headers).
Changes:
- Added Doxygen blocks for multiple MLIR lowering passes and the pass manager implementation.
- Documented MLIRGen helpers (notably
coerceValueToInt64) and several public headers (compiler.h,pass_manager.h,passes.h,dialect.h,types.h, etc.). - Added initial documentation for the runtime image API (
lib/include/image.h).
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/picceler_to_llvm_ir_pass.cpp |
Adds a Doxygen brief for the LLVM IR lowering pass. |
src/picceler_to_affine_pass.cpp |
Adds detailed Doxygen describing Picceler→Affine lowering. |
src/picceler_ops_to_func_calls_pass.cpp |
Adds Doxygen brief for lowering runtime-like ops to function calls. |
src/picceler_kernel_to_memref_pass.cpp |
Documents the KernelConstOp→MemRef lowering pass. |
src/picceler_filters_to_conv_pass.cpp |
Documents filter→convolution lowering pass. |
src/pass_manager.cpp |
Adds a file-level @file / @brief block for pass manager implementation. |
src/mlir_gen.cpp |
Documents coerceValueToInt64 and MLIRGen::generate. |
lib/include/image.h |
Adds docs for Image, loadImage, saveImage, showImage. |
include/types.h |
Adds file header documentation for generated type includes. |
include/passes.h |
Adds a Doxygen group for pass factory functions. |
include/pass_manager.h |
Adds Doxygen for PassLogger and pass pipeline phase helpers. |
include/ops.h |
Documents createFloatConstant and adds namespace closing comment. |
include/image_access_helper.h |
Adds parameter/return docs for struct layout and accessors. |
include/error.h |
Adds docs but also changes CompileError API/behavior (see comments). |
include/dialect.h |
Adds file header documentation for generated dialect includes. |
include/compiler.h |
Adds docs for CLI options and internal compiler steps (registry/object/link). |
Comments suppressed due to low confidence (1)
src/mlir_gen.cpp:33
coerceValueToInt64was previously scoped to an anonymous namespace (internal linkage) but is now a non-static function innamespace picceler, giving it external linkage from this translation unit. Since it’s a local helper not declared in a header, consider moving it back into an unnamed namespace or marking itstaticto avoid exporting an unnecessary symbol and reduce risk of name collisions.
namespace picceler {
/**
* @brief Coerces a given MLIR value to a 64-bit integer if possible, with special handling for constants.
* @param builder The MLIR OpBuilder to use for creating new operations if coercion is needed.
* @param loc The location to use for any new operations created during coercion.
* @param value The MLIR value to coerce.
* @param opName The name of the operation for error reporting purposes.
* @param argName The name of the argument for error reporting purposes.
* @return The coerced MLIR value as a 64-bit integer.
* @throws std::runtime_error if the value cannot be coerced to a 64-bit integer, or if a floating-point constant is not
* a whole number or is out of range.
*/
mlir::Value coerceValueToInt64(mlir::OpBuilder &builder, mlir::Location loc, mlir::Value value, llvm::StringRef opName,
llvm::StringRef argName) {
if (value.getType().isSignlessInteger(64)) {
return value;
}
29d868b to
863ad2f
Compare
This reverts commit 80fc21c.
Copilot
AI
changed the title
More documentation
Revert unintended May 28, 2026
CompileError API change; track follow-up in issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the PR scope to match the request: no functional/compiler behavior changes in this PR, only documentation.
The previously added
CompileErroraccessor/formatter change was reverted, and the broader error-location cleanup was moved to a dedicated issue.Scope correction
include/error.h(CompileError::message()/format()behavior), so this PR no longer carries runtime/compiler API changes.Follow-up tracking
CompileErrorconstruction sites and enforce structured line/column propagation across parser/lexer/compiler paths.Reverted code (illustrative)