1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

38 Commits

Author SHA1 Message Date
Evgeniy Stepanov
e8363137ea ARM MTE stack sanitizer.
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
2019-07-15 20:02:23 +00:00
Matt Arsenault
01d726ce5c IR: Add immarg attribute
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
2019-03-12 21:02:54 +00:00
Matt Arsenault
d002202938 Add fneg instruction to syntax highlighting lists
llvm-svn: 346785
2018-11-13 19:50:38 +00:00
Fangrui Song
804e3e7bc6 Add attributes and fix some keywords in llvm-mode.el
Reviewers: rafael, echristo

Reviewed By: echristo

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D44135

llvm-svn: 326978
2018-03-08 01:28:45 +00:00
Rafael Espindola
841c10c599 Fix some regular expressions in llvm-mode.el.
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
2018-01-29 22:56:41 +00:00
Rafael Espindola
95a256f279 Cleaning up LLVM IR mode for Emacs.
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
2015-09-10 13:44:28 +00:00
Ramkumar Ramachandra
e9173d98c2 [emacs] Get llvm-mode to font-lock "personality"
Differential Revision: http://reviews.llvm.org/D7494

llvm-svn: 228555
2015-02-09 00:30:03 +00:00
Rafael Espindola
afd3725ee6 Correcting keyword highlighting in llvm-mode.el.
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
2015-02-06 13:57:58 +00:00
Ramkumar Ramachandra
685ca8b1e3 [emacs] llvm-mode: fix parens, font-lock i*
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
2015-01-23 19:45:35 +00:00
Duncan P. N. Exon Smith
bc9ee9160a IR: Add 'distinct' MDNodes to bitcode and assembly
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
2015-01-08 22:38:29 +00:00
Rafael Espindola
53f1be3911 Improvements to emacs packages for llvm and tablegen mode.
* 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
2015-01-07 15:52:51 +00:00
Duncan P. N. Exon Smith
56ea569496 IR: Implement uselistorder assembly directives
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
2014-08-19 21:30:15 +00:00
Matt Arsenault
9921608896 Add addrspacecast instruction.
Patch by Michele Scandale!

llvm-svn: 194760
2013-11-15 01:34:59 +00:00
Matt Arsenault
16c5446ff3 Update emacs llvm mode.
It seems this hasn't been done in a while.

llvm-svn: 194650
2013-11-14 02:03:02 +00:00
Bill Wendling
8664bd9153 Remove 'deplibs' keyword, since it's no longer used.
llvm-svn: 169116
2012-12-03 06:34:06 +00:00
Michael Ilseman
5f2988f933 Update the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp, icmp
llvm-svn: 169064
2012-12-01 00:42:27 +00:00
Misha Brukman
b7d800dd67 Using regexp-opt for keyword regex declarations makes the word lists more
readable and easier to edit.

llvm-svn: 114308
2010-09-19 03:44:22 +00:00
Chris Lattner
2c532518c0 .llx is no more.
llvm-svn: 91784
2009-12-19 20:56:53 +00:00
Duncan Sands
5ab54d488f Introduce new linkage types linkonce_odr, weak_odr, common_odr
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
2009-03-07 15:45:40 +00:00
Anton Korobeynikov
f04f8f28fc Update this file for 2.0 syntax. Contributed by Jan Rehders
llvm-svn: 43182
2007-10-19 16:54:13 +00:00
Reid Spencer
728a2e9f62 Convert llvm.cs.uiuc.edu -> llvm.org
llvm-svn: 26748
2006-03-14 05:54:52 +00:00
Chris Lattner
3436cabb50 add support for fastcc and friends
llvm-svn: 21979
2005-05-13 20:40:52 +00:00
Chris Lattner
f68bbda9d4 Hilight tail
llvm-svn: 21726
2005-05-06 06:07:34 +00:00
Chris Lattner
51278a2460 Add support for undef and unreachable
llvm-svn: 17059
2004-10-16 18:24:35 +00:00
Misha Brukman
71196a4005 * Add `deplibs' keyword for specifying a list of dependent libraries
* Convert tabs to spaces

llvm-svn: 16558
2004-09-28 21:46:18 +00:00
Misha Brukman
9f6428ea0e Added `zeroinitializer' keyword.
llvm-svn: 13253
2004-04-28 19:36:08 +00:00
Chris Lattner
ac0217ede2 Teach emacs about the select instruction
llvm-svn: 12326
2004-03-12 05:54:48 +00:00
Chris Lattner
26b87323af Make sure to syntax hilight the 'unwind' keyword!
llvm-svn: 9524
2003-10-27 05:09:15 +00:00
Chris Lattner
bd683948e7 Syntax highlight the new operators
llvm-svn: 9328
2003-10-21 15:37:09 +00:00
Chris Lattner
991fdc030c Add support for the weak linkage specifier
llvm-svn: 9000
2003-10-10 04:56:26 +00:00
Chris Lattner
f166a70701 Syntax hilight
llvm-svn: 8396
2003-09-08 18:07:57 +00:00
Misha Brukman
dd4c8e6dda * Added (X)Emacs mode for TableGen description files
* Added README that describes how to use the mode files
* Associated files with .llx extension with llvm-mode

llvm-svn: 7738
2003-08-11 19:10:02 +00:00
Misha Brukman
bfd1482f3d Removing personal name from source code.
llvm-svn: 6558
2003-06-03 00:59:24 +00:00
Misha Brukman
1f527a4f51 Added the to' keyword as in cast <type> <data> to <type>'.
Cleaned up the header of the file (comments/description/etc).

llvm-svn: 6557
2003-06-03 00:57:41 +00:00
Chris Lattner
8fa300dc19 Add support for new va_arg instruction
llvm-svn: 6026
2003-05-08 02:41:11 +00:00
Chris Lattner
cfeea04b3b Update to add new keywords
llvm-svn: 5846
2003-04-22 19:31:55 +00:00
Chris Lattner
5461ff1809 Add missing keyword, add new linkage keywords
llvm-svn: 5785
2003-04-16 20:26:11 +00:00
Misha Brukman
690c2d0709 Added a major mode for Emacs to edit LLVM assembler code with syntax
highlighting.

llvm-svn: 4092
2002-10-09 00:30:20 +00:00