CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
73 lines
2.3 KiB
EmacsLisp
73 lines
2.3 KiB
EmacsLisp
;;; llvm-mir-mode.el --- Major mode for LLVM Machine IR -*- lexical-binding: t -*-
|
|
|
|
;; Maintainer: The LLVM team, http://llvm.org/
|
|
;; Version: 1.0
|
|
;; Homepage: http://llvm.org/
|
|
;; Package-Requires: ((emacs "24.3"))
|
|
|
|
;;; Commentary:
|
|
|
|
;; Major mode for editing LLVM MIR files.
|
|
|
|
;;; Code:
|
|
|
|
(require 'llvm-mode)
|
|
|
|
(defvar llvm-mir-mode-map
|
|
(let ((map (make-sparse-keymap)))
|
|
map)
|
|
"Keymap for `llvm-mir-mode'.")
|
|
|
|
(defvar llvm-mir-mode-syntax-table
|
|
(let ((st (make-syntax-table)))
|
|
(modify-syntax-entry ?% "_" st)
|
|
(modify-syntax-entry ?$ "_" st)
|
|
(modify-syntax-entry ?. "_" st)
|
|
(modify-syntax-entry ?# "< " st)
|
|
(modify-syntax-entry ?\; "< " st)
|
|
(modify-syntax-entry ?\n "> " st)
|
|
st)
|
|
"Syntax table for `llvm-mir-mode'.")
|
|
|
|
(defvar llvm-mir-font-lock-keywords
|
|
(append
|
|
(list
|
|
; YAML Attributes
|
|
'("^name: +\\([a-zA-Z._][-a-zA-Z._0-9]*\\)"
|
|
1 font-lock-function-name-face)
|
|
'("^body: +|" . font-lock-keyword-face)
|
|
'("^[a-zA-Z_.][-a-zA-Z._0-9]*:" . font-lock-keyword-face)
|
|
`(,(regexp-opt '("true" "false")) . font-lock-constant-face)
|
|
; YAML separators
|
|
'("^\\(---\\( |\\)?\\|\\.\\.\\.\\)$" . font-lock-comment-face)
|
|
; Registers
|
|
'("%[a-zA-Z_.][-a-zA-Z._0-9]*" . font-lock-variable-name-face)
|
|
'("%[0-9]+\\(\\.[a-zA-Z._0-9]+\\)?" . font-lock-variable-name-face)
|
|
'("$[a-zA-Z_.][-a-zA-Z._0-9]*" . font-lock-constant-face)
|
|
; Register classes
|
|
`(,(concat
|
|
"%\\([a-zA-Z_.][-a-zA-Z._0-9]*\\|[0-9]+\\(\\.[a-zA-Z._0-9]+\\)?\\)"
|
|
"\\(:[a-zA-Z_.][-a-zA-Z._0-9]*\\)")
|
|
3 font-lock-type-face)
|
|
'("class: \\([a-zA-Z_.][-a-zA-Z._0-9]*\\)" 1 font-lock-type-face)
|
|
; MO Register flags
|
|
`(,(regexp-opt '("dead" "debug-use" "def" "early-clobber" "implicit"
|
|
"implicit-def" "internal" "killed" "renamable" "undef")
|
|
'symbols)
|
|
. font-lock-keyword-face))
|
|
llvm-font-lock-keywords)
|
|
"Keyword highlighting specification for `llvm-mir-mode'.")
|
|
|
|
;;;###autoload
|
|
(define-derived-mode llvm-mir-mode prog-mode "LLVM MIR"
|
|
"A major mode for editing LLVM MIR files."
|
|
(setq-local comment-start "; ")
|
|
(setq-local font-lock-defaults `(llvm-mir-font-lock-keywords)))
|
|
|
|
;;;###autoload
|
|
(add-to-list 'auto-mode-alist (cons "\\.mir\\'" 'llvm-mir-mode))
|
|
|
|
(provide 'llvm-mir-mode)
|
|
|
|
;;; llvm-mir-mode.el ends here
|