summaryrefslogtreecommitdiff
path: root/mlir/lib/Transforms/LocationSnapshot.cpp
AgeCommit message (Collapse)Author
2025-01-07[mlir][Transforms] Make LocationSnapshotPass respect OpPrintingFlags (#119373)Michael Jungmair
The current implementation of LocationSnapshotPass takes an OpPrintingFlags argument and stores it as member, but does not use it for printing. Properly implement the printing flags, also supporting command line args. --------- Co-authored-by: Mehdi Amini <joker.eph@gmail.com>
2023-01-14[mlir] Use std::optional instead of llvm::Optional (NFC)Kazu Hirata
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to remove #include "llvm/ADT/Optional.h". This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2023-01-13[mlir] Add #include <optional> (NFC)Kazu Hirata
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>. I'll post a separate patch to actually replace llvm::Optional with std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-08-31[MLIR] Update pass declarations to new autogenerated filesMichele Scuttari
The patch introduces the required changes to update the pass declarations and definitions to use the new autogenerated files and allow dropping the old infrastructure. Reviewed By: mehdi_amini, rriddle Differential Review: https://reviews.llvm.org/D132838
2022-08-30Revert "[MLIR] Update pass declarations to new autogenerated files"Michele Scuttari
This reverts commit 2be8af8f0e0780901213b6fd3013a5268ddc3359.
2022-08-30[MLIR] Update pass declarations to new autogenerated filesMichele Scuttari
The patch introduces the required changes to update the pass declarations and definitions to use the new autogenerated files and allow dropping the old infrastructure. Reviewed By: mehdi_amini, rriddle Differential Review: https://reviews.llvm.org/D132838
2022-02-15[mlir] Expose printer flags in AsmStateSergei Grechanik
This change exposes printer flags in AsmState and AsmStateImpl. All functions receiving AsmState as a parameter now use the flags from the AsmState instead of taking an additional OpPrintingFlags parameter. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D119870
2021-12-08Adjust "end namespace" comment in MLIR to match new agree'd coding styleMehdi Amini
See D115115 and this mailing list discussion: https://lists.llvm.org/pipermail/llvm-dev/2021-December/154199.html Differential Revision: https://reviews.llvm.org/D115309
2021-11-16[mlir][NFC] Replace references to Identifier with StringAttrRiver Riddle
This is part of the replacement of Identifier with StringAttr. Differential Revision: https://reviews.llvm.org/D113953
2021-07-10[mlir] Added OpPrintingFlags to AsmState and SSANameState.Itai Zukerman
This enables checking the printing flags when formatting names in SSANameState. Depends On D105299 Reviewed By: mehdi_amini, bondhugula Differential Revision: https://reviews.llvm.org/D105300
2021-02-26[mlir] Simplify various pieces of code now that Identifier has access to the ↵River Riddle
Context/Dialect This also exposed a bug in Dialect loading where it was not correctly identifying identifiers that had the dialect namespace as a prefix. Differential Revision: https://reviews.llvm.org/D97431
2020-04-07[mlir][Pass] Update the PassGen to generate base classes instead of utilitiesRiver Riddle
Summary: This is much cleaner, and fits the same structure as many other tablegen backends. This was not done originally as the CRTP in the pass classes made it overly verbose/complex. Differential Revision: https://reviews.llvm.org/D77367
2020-04-07[mlir][Pass] Remove the use of CRTP from the Pass classesRiver Riddle
This revision removes all of the CRTP from the pass hierarchy in preparation for using the tablegen backend instead. This creates a much cleaner interface in the C++ code, and naturally fits with the rest of the infrastructure. A new utility class, PassWrapper, is added to replicate the existing behavior for passes not suitable for using the tablegen backend. Differential Revision: https://reviews.llvm.org/D77350
2020-04-01[mlir][Pass] Add support for generating pass utilities via tablegenRiver Riddle
This revision adds support for generating utilities for passes such as options/statistics/etc. that can be inferred from the tablegen definition. This removes additional boilerplate from the pass, and also makes it easier to remove the reliance on the pass registry to provide certain things(e.g. the pass argument). Differential Revision: https://reviews.llvm.org/D76659
2020-04-01[mlir][Pass] Add a tablegen backend for defining Pass informationRiver Riddle
This will greatly simplify a number of things related to passes: * Enables generation of pass registration * Enables generation of boiler plate pass utilities * Enables generation of pass documentation This revision focuses on adding the basic structure and adds support for generating the registration for passes in the Transforms/ directory. Future revisions will add more support and move more passes over. Differential Revision: https://reviews.llvm.org/D76656
2020-02-08[mlir] Add support for generating debug locations from intermediate levels ↵River Riddle
of the IR. Summary: This revision adds a utility to generate debug locations from the IR during compilation, by snapshotting to a output stream and using the locations that operations were dumped in that stream. The new locations may either; * Replace the original location of the operation. old: loc("original_source.cpp":1:1) new: loc("snapshot_source.mlir":10:10) * Fuse with the original locations as NamedLocs with a specific tag. old: loc("original_source.cpp":1:1) new: loc(fused["original_source.cpp":1:1, "snapshot"("snapshot_source.mlir":10:10)]) This feature may be used by a debugger to display the code at various different levels of the IR. It would also be able to show the different levels of IR attached to a specific source line in the original source file. This feature may also be used to generate locations for operations generated during compilation, that don't necessarily have a user source location to attach to. This requires changes in the printer to track the locations of operations emitted in the stream. Moving forward we need to properly(and efficiently) track the number of newlines emitted to the stream during printing. Differential Revision: https://reviews.llvm.org/D74019