summaryrefslogtreecommitdiffstats
path: root/llvm/utils/emacs/llvm-mode.el
Commit message (Collapse)AuthorAgeFilesLines
* ARM MTE stack sanitizer.Evgeniy Stepanov2019-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Add "memtag" sanitizer that detects and mitigates stack memory issues using armv8.5 Memory Tagging Extension. It is similar in principle to HWASan, which is a software implementation of the same idea, but there are enough differencies to warrant a new sanitizer type IMHO. It is also expected to have very different performance properties. The new sanitizer does not have a runtime library (it may grow one later, along with a "debugging" mode). Similar to SafeStack and StackProtector, the instrumentation pass (in a follow up change) will be inserted in all cases, but will only affect functions marked with the new sanitize_memtag attribute. Reviewers: pcc, hctim, vitalybuka, ostannard Subscribers: srhines, mehdi_amini, javed.absar, kristof.beyls, hiraditya, cryptoad, steven_wu, dexonsmith, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D64169 llvm-svn: 366123
* IR: Add immarg attributeMatt Arsenault2019-03-121-1/+1
| | | | | | | | | | | | | | | | | This indicates an intrinsic parameter is required to be a constant, and should not be replaced with a non-constant value. Add the attribute to all AMDGPU and generic intrinsics that comments indicate it should apply to. I scanned other target intrinsics, but I don't see any obvious comments indicating which arguments are intended to be only immediates. This breaks one questionable testcase for the autoupgrade. I'm unclear on whether the autoupgrade is supposed to really handle declarations which were never valid. The verifier fails because the attributes now refer to a parameter past the end of the argument list. llvm-svn: 355981
* Add fneg instruction to syntax highlighting listsMatt Arsenault2018-11-131-1/+1
| | | | llvm-svn: 346785
* Add attributes and fix some keywords in llvm-mode.elFangrui Song2018-03-081-5/+23
| | | | | | | | | | | | Reviewers: rafael, echristo Reviewed By: echristo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44135 llvm-svn: 326978
* Fix some regular expressions in llvm-mode.el.Rafael Espindola2018-01-291-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | In some cases it was using "\" unnecessarily. In another case it needed an additional "\" to properly indicate a numbered sub-match. Make comment-start buffer-local in llvm-mode.el llvm-mode was setting comment-start globally. However, it is better to only set it locally in the current buffer. Don't use purecopy in llvm-mode.el There's no reason to use purecopy in llvm-mode.el. purecopy is only needed for files that are dumped in emacs. Add a version header to llvm-mode.el Adding a version header to llvm-mode.el allows it to be installed by the Emacs package manager. There are not many requirements on the version number; however it is useful to users to bump it when something significant changes. Here I've chosen just to start at 1.0. Patch by Tom Tromey! llvm-svn: 323705
* Cleaning up LLVM IR mode for Emacs.Rafael Espindola2015-09-101-78/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've made a range of improvements to the Emacs mode for LLVM IR. Most importantly, it changes llvm-mode to inherit from prog-mode. This means llvm-mode will be treated as a normal programming mode in Emacs, so many Emacs features will just work. prog-mode is new to Emacs 24, so I've added an alias to ensure compatibility with Emacs 23 too. I've changed the mode definition to use define-derived-mode. This saves us needing to set up local variables ourselves, and saves us needing to define llvm-mode-map, llvm-mode-abbrev-table, llvm-mode-map. I've removed the keybindings to tab-to-tab-stop, center-line and center-paragraph. This shouldn't be llvm-mode's responsibility, and the code didn't actually work anyway (since `(not llvm-mode-map)` always evaluated to `t`, the keybindings were never executed). I've simplified the syntax-table definition, it's equivalent (e.g. `"` is treated as string delimiter by default in Emacs). I've added `.` as a symbol constituent, so functions like `llvm.memset.p0i8.i32` are recognised as a single symbol. I've also changed `%` to be a symbol constituent, so users can move between words or symbols at their choice, rather than conflating the two. I've fixed regexp for types, which incorrect used `symbol` instead of `symbols` as an argument to `regexp-opt`. This was causing incorrect highlighting on lines like `call void @foovoid`. I've removed string and comment highlighting from `llvm-font-lock-keywords`. This is already handled by the syntax-table. Finally, I've removed the reference to jasmin. That project is long abandoned and the link 404s. For reference, I've found an old copy of the project here: https://github.com/stevej/emacs/blob/master/vendor/jasmin/jasmin.el Patch by Wilfred Hughes! llvm-svn: 247281
* [emacs] Get llvm-mode to font-lock "personality"Ramkumar Ramachandra2015-02-091-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D7494 llvm-svn: 228555
* Correcting keyword highlighting in llvm-mode.el.Rafael Espindola2015-02-061-12/+12
| | | | | | | | | llvm-mode was previously confused when variable names contained keywords. This changes ensures that keywords are only highlighted when they're standalone. Patch by Wilfred Hughes! llvm-svn: 228396
* [emacs] llvm-mode: fix parens, font-lock i*Ramkumar Ramachandra2015-01-231-10/+3
| | | | | | | | | | | | | | | | In llvm-mode, with electric-pair-mode turned on, typing a literal '[' would print out '[[', and '(' would print a '(('. This was a very annoying bug caused by overzealous syntax-table entries: the parens are already part of the '(' and ')' class by default. Fix this. While at it, notice that i32, i64, i1 etc. are not font-locked despite a clear intent to do so. The issue is that regexp-opt doesn't accept regular expressions. So, spell out the common literal integers with different widths. Differential Revision: http://reviews.llvm.org/D7036 llvm-svn: 226931
* IR: Add 'distinct' MDNodes to bitcode and assemblyDuncan P. N. Exon Smith2015-01-081-0/+2
| | | | | | | | | | | | | | | | | | Propagate whether `MDNode`s are 'distinct' through the other types of IR (assembly and bitcode). This adds the `distinct` keyword to assembly. Currently, no one actually calls `MDNode::getDistinct()`, so these nodes only get created for: - self-references, which are never uniqued, and - nodes whose operands are replaced that hit a uniquing collision. The concept of distinct nodes is still not quite first-class, since distinct-ness doesn't yet survive across `MapMetadata()`. Part of PR22111. llvm-svn: 225474
* Improvements to emacs packages for llvm and tablegen mode.Rafael Espindola2015-01-071-44/+50
| | | | | | | | | | | | | * Both files have valid package headers and footers (you can verify with M-x checkdoc). * Fixed style warnings generated by checkdoc. * Fixed a byte-compiler warning in llvm-mode.el. * Ensure that the modes are autoloaded, so users do not need to (require 'llvm-mode) to use them. Patch by Wilfred Hughes. llvm-svn: 225356
* IR: Implement uselistorder assembly directivesDuncan P. N. Exon Smith2014-08-191-0/+2
| | | | | | | | | | Implement `uselistorder` and `uselistorder_bb` assembly directives, which allow the use-list order to be recovered when round-tripping to assembly. This is the bulk of PR20515. llvm-svn: 216025
* Add addrspacecast instruction.Matt Arsenault2013-11-151-1/+1
| | | | | | Patch by Michele Scandale! llvm-svn: 194760
* Update emacs llvm mode.Matt Arsenault2013-11-141-4/+11
| | | | | | It seems this hasn't been done in a while. llvm-svn: 194650
* Remove 'deplibs' keyword, since it's no longer used.Bill Wendling2012-12-031-1/+1
| | | | llvm-svn: 169116
* Update the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp, icmpMichael Ilseman2012-12-011-3/+4
| | | | llvm-svn: 169064
* Using regexp-opt for keyword regex declarations makes the word lists moreMisha Brukman2010-09-191-6/+11
| | | | | | readable and easier to edit. llvm-svn: 114308
* .llx is no more.Chris Lattner2009-12-191-1/+1
| | | | llvm-svn: 91784
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* Update this file for 2.0 syntax. Contributed by Jan RehdersAnton Korobeynikov2007-10-191-11/+12
| | | | llvm-svn: 43182
* Convert llvm.cs.uiuc.edu -> llvm.orgReid Spencer2006-03-141-1/+1
| | | | llvm-svn: 26748
* add support for fastcc and friendsChris Lattner2005-05-131-1/+1
| | | | llvm-svn: 21979
* Hilight tailChris Lattner2005-05-061-1/+1
| | | | llvm-svn: 21726
* Add support for undef and unreachableChris Lattner2004-10-161-2/+2
| | | | llvm-svn: 17059
* * Add `deplibs' keyword for specifying a list of dependent librariesMisha Brukman2004-09-281-4/+4
| | | | | | * Convert tabs to spaces llvm-svn: 16558
* Added `zeroinitializer' keyword.Misha Brukman2004-04-281-1/+1
| | | | llvm-svn: 13253
* Teach emacs about the select instructionChris Lattner2004-03-121-1/+1
| | | | llvm-svn: 12326
* Make sure to syntax hilight the 'unwind' keyword!Chris Lattner2003-10-271-1/+1
| | | | llvm-svn: 9524
* Syntax highlight the new operatorsChris Lattner2003-10-211-1/+1
| | | | llvm-svn: 9328
* Add support for the weak linkage specifierChris Lattner2003-10-101-1/+1
| | | | llvm-svn: 9000
* Syntax hilightChris Lattner2003-09-081-1/+1
| | | | llvm-svn: 8396
* * Added (X)Emacs mode for TableGen description filesMisha Brukman2003-08-111-1/+1
| | | | | | | * Added README that describes how to use the mode files * Associated files with .llx extension with llvm-mode llvm-svn: 7738
* Removing personal name from source code.Misha Brukman2003-06-031-1/+1
| | | | llvm-svn: 6558
* Added the `to' keyword as in `cast <type> <data> to <type>'.Misha Brukman2003-06-031-7/+4
| | | | | | Cleaned up the header of the file (comments/description/etc). llvm-svn: 6557
* Add support for new va_arg instructionChris Lattner2003-05-081-1/+1
| | | | llvm-svn: 6026
* Update to add new keywordsChris Lattner2003-04-221-2/+2
| | | | llvm-svn: 5846
* Add missing keyword, add new linkage keywordsChris Lattner2003-04-161-1/+1
| | | | llvm-svn: 5785
* Added a major mode for Emacs to edit LLVM assembler code with syntaxMisha Brukman2002-10-091-0/+130
highlighting. llvm-svn: 4092
OpenPOWER on IntegriCloud