mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-20 01:57:37 +00:00
[mlir][emacs] Enable loading bytecode files as text
Use auto-compression-mode to read bytecode files in human readable manner. Differential Revision: https://reviews.llvm.org/D133879
This commit is contained in:
parent
5d13b12674
commit
55e4417bb9
@ -74,6 +74,22 @@
|
||||
;;;###autoload
|
||||
(add-to-list 'auto-mode-alist (cons "\\.mlir\\'" 'mlir-mode))
|
||||
|
||||
;; Set default value of opt-tool to use as mlir-opt.
|
||||
(defcustom mlir-opt "mlir-opt"
|
||||
"Commandline MLIR opt tool to use."
|
||||
:type 'string)
|
||||
|
||||
;; Enable reading/writing .mlirbc files.
|
||||
(require 'jka-compr)
|
||||
(add-to-list 'jka-compr-compression-info-list
|
||||
(vector "\\.mlirbc\\'"
|
||||
"mlir-to-bytecode" mlir-opt (vector "--mlir-print-debuginfo" "--emit-bytecode" "-o" "-" "-")
|
||||
"mlir-bytecode-to-text" mlir-opt (vector "--mlir-print-debuginfo")
|
||||
nil nil "ML\357R"))
|
||||
(jka-compr-update)
|
||||
(auto-compression-mode t)
|
||||
(add-to-list 'auto-mode-alist (cons "\\.mlirbc\\'" 'mlir-mode))
|
||||
|
||||
(provide 'mlir-mode)
|
||||
|
||||
;;; mlir-mode.el ends here
|
||||
|
Loading…
x
Reference in New Issue
Block a user