aboutsummaryrefslogtreecommitdiff
path: root/libclc/spirv
diff options
context:
space:
mode:
authorJacques Pienaar <jpienaar@google.com>2024-10-12 15:10:34 -0700
committerGitHub <noreply@github.com>2024-10-12 15:10:34 -0700
commit4c25a538d3677866f6e3757ad3beecc50c56e589 (patch)
tree848613ea07de637789df0d85724f9172587f7e4c /libclc/spirv
parentc2750807ba2a419425ee90dadda09ad5121517fe (diff)
downloadllvm-main.zip
llvm-main.tar.gz
llvm-main.tar.bz2
[mlir] Start rewrite tool (#77668)HEADmain
Initial commit of a tool to help in textual rewrites of .mlir files. This tool builds of of AsmParserState and is rather simple. Took some inspiration from when I used clang's AST rewrites where I'd often treat it as a "localizing" regex applicator in fallback cases, and started with that as functionality. There though, one does have access to the lower level info than here, but still a step up over sed over entire file. This aims to be helpful (e.g., rewrite syntax including best effort inside comments) rather than bulletproof tool. It may even be better suited under utils than tools. And most of the rewrites would be rather short lived and might never make it upstream (while the helpers of those rewrites may for future rewrites). The layering at the moment is not ideal as it is reusing the RewriteBuffer class from clang's rewrite engine. So only optionally enabling where clang is also enable. There doesn't seem to be anything clang specific there (the dep does pull in more dependencies than ideal, but leaving both refactorings). Additionally started it as a single file to prototype more easily, planning to refactor later to include and libs for out of file usage.
Diffstat (limited to 'libclc/spirv')
0 files changed, 0 insertions, 0 deletions