summaryrefslogtreecommitdiffstats
path: root/llvm/utils/emacs
Commit message (Collapse)AuthorAgeFilesLines
* [TableGen] Update editor modes for new keywords.Simon Tatham2020-01-141-1/+2
| | | | | | | | | | | | | | | | | | | | Summary: D71407 and D71474 added new keywords to the Tablegen language: `defvar`, `if`, `then` and `else`. This commit updates the various editor modes to highlight them appropriately. Some of the modes also didn't include `defset`, so I've added that too while I was there. Reviewers: MaskRay, lebedev.ri, plotfi Reviewed By: lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72693
* [NFC][emacs] remove out-of-date comment from tablegen-mode.elBob Haarman2019-09-261-2/+0
| | | | | | | | | | | | | | | | | | | | Summary: The syntax table was originally based on and attributed to jasmin.el, but was rewritten in r45192, so the comment that says the code comes from jasmin.el is no longer accurate. This change removes the comment, shortening the code a bit. Reviewers: MaskRay, lattner Reviewed By: MaskRay Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68042 llvm-svn: 373008
* [emacs] simplify and improve keyword highlighting in tablegen-mode.elBob Haarman2019-09-251-3/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: The keyword and type keyword matchers in tablegen-mode.el checked for space, newline, tab, or open paren after the regular expression that matches keywords (or type keywords, respectively). This is unnecessary, because those regular expressions already include word boundaries. This change removes the extra check. This also causes "def" in "def:" to be highlighted as a keyword, which was missed before. Reviewers: lattner, MaskRay Reviewed By: MaskRay Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68002 llvm-svn: 372904
* 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
* [emacs] Indent statement continuation to match clang-formatAndrew Savonichev2018-08-021-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Was: int LongVariableName = veryLongFunctionNameThatExceeds80ColumnsRule(SomeParameter); int ShortVar = veryLongFunctionNameThatStillFitsIntoOneLine(SomeParameter) .nowThisDoesntFit() .andThis() Now: int LongVariableName = veryLongFunctionNameThatExceeds80ColumnsRule(SomeParameter); int ShortVar = veryLongFunctionNameThatStillFitsIntoOneLine(SomeParameter) .nowThisDoesntFit() .andThis() Reviewers: espindola, MaskRay Reviewed By: MaskRay Subscribers: greened, llvm-commits Differential Revision: https://reviews.llvm.org/D49726 llvm-svn: 338686
* 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
* Rename all references to old mailing lists to new lists.llvm.org address.Tanya Lattner2015-08-051-1/+1
| | | | llvm-svn: 243999
* [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
* [emacs] Use c-mode-common-hook, derive from "gnu"Ramkumar Ramachandra2015-01-221-18/+6
| | | | | | | | | Make it clear that the "llvm.org" style is deriving from "gnu" style, and use the c-mode-common-hook instead of c-mode-hook and c++-mode-hook. Differential Revision: http://reviews.llvm.org/D7035 llvm-svn: 226861
* 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-072-50/+64
| | | | | | | | | | | | | * 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
* Improve emacs coding styleWill Newton2014-12-091-13/+8
| | | | | | | | | | | | | Remove setting of default style, this way is not recommended and means that all the settings have to be duplicated to demonstrate the c-add-style method which is a much better way of doing it. Remove the modified date as it is better stored in SVN. Tweak a few style parameters to make them conform to the actual LLVM style. llvm-svn: 223765
* 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
* [Emacs] Use spaces rather than tabs for indentation in tablegen-modeAdam Nemet2014-06-241-0/+1
| | | | llvm-svn: 211564
* 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
* Remove bad comma from .el file.Bill Wendling2012-02-221-1/+1
| | | | llvm-svn: 151189
* Add Foreach LoopDavid Greene2012-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some data structures to represent for loops. These will be referenced during object processing to do any needed iteration and instantiation. Add foreach keyword support to the lexer. Add a mode to indicate that we're parsing a foreach loop. This allows the value parser to early-out when processing the foreach value list. Add a routine to parse foreach iteration declarations. This is separate from ParseDeclaration because the type of the named value (the iterator) doesn't match the type of the initializer value (the value list). It also needs to add two values to the foreach record: the iterator and the value list. Add parsing support for foreach. Add the code to process foreach loops and create defs based on iterator values. Allow foreach loops to be matched at the top level. When parsing an IDValue check if it is a foreach loop iterator for one of the active loops. If so, return a VarInit for it. Add Emacs keyword support for foreach. Add VIM keyword support for foreach. Add tests to check foreach operation. Add TableGen documentation for foreach. Support foreach with multiple objects. Support non-braced foreach body with one object. Do not require types for the foreach declaration. Assume the iterator type from the iteration list element type. llvm-svn: 151164
* Remove MultidefsDavid Greene2011-10-071-1/+1
| | | | | | | | | | | | | | | | | | | Multidefs are a bit unwieldy and incomplete. Remove them in favor of another mechanism, probably for loops. Revert "Make Test More Thorough" Revert "Fix a typo." Revert "Vim Support for Multidefs" Revert "Emacs Support for Multidefs" Revert "Document Multidefs" Revert "Add a Multidef Test" Revert "Update Test for Multidefs" Revert "Process Multidefs" Revert "Parser Multidef Support" Revert "Lexer Support for Multidefs" Revert "Add Multidef Data Structures" llvm-svn: 141378
* Emacs Support for MultidefsDavid Greene2011-10-051-1/+1
| | | | | | Add Emacs font-lock keyword support for multidefs. llvm-svn: 141237
* Using regexp-opt for keyword regex declarations makes the word lists moreMisha Brukman2010-09-192-14/+17
| | | | | | readable and easier to edit. llvm-svn: 114308
* .llx is no more.Chris Lattner2009-12-191-1/+1
| | | | llvm-svn: 91784
* Set comment string, patch by Johnny Chen!Chris Lattner2009-10-211-0/+2
| | | | llvm-svn: 84743
* Tweak LLVM emacs style to make default namespace indentation closer to styleDaniel Dunbar2009-07-281-2/+5
| | | | | | guide. llvm-svn: 77331
* 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
* .emacs file bits for automatically setting the llvm.org coding style. ↵Mike Stump2009-03-041-0/+24
| | | | | | Thanks Anton. llvm-svn: 66032
* 'Previously, the emacs tablegen mode would highlight constants even if Chris Lattner2008-07-231-4/+4
| | | | | | | | | | they appear in words. This would cause things like the "128" in "VR128" to be highlighted. This patch fixes the highlighting by only recognizing constants when they have word breaks around them.' Patch by Stefanus Du Toit! llvm-svn: 53944
* Modified to support comments better.Bill Wendling2007-12-191-53/+42
| | | | llvm-svn: 45192
* Reverting 44702. It wasn't correct to rename them.Bill Wendling2007-12-081-19/+19
| | | | llvm-svn: 44727
* Update this file for 2.0 syntax. Contributed by Jan RehdersAnton Korobeynikov2007-10-191-11/+12
| | | | llvm-svn: 43182
* Add better support for keywords.Bill Wendling2007-03-271-21/+40
| | | | llvm-svn: 35386
* Change llvm.cs.uiuc.edu -> llvm.orgReid Spencer2006-03-141-1/+1
| | | | llvm-svn: 26750
* Convert llvm.cs.uiuc.edu -> llvm.orgReid Spencer2006-03-142-2/+2
| | | | 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
* elisp code to help with LLVM code standards complianceMisha Brukman2005-04-241-0/+12
| | | | llvm-svn: 21497
* 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
OpenPOWER on IntegriCloud