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

97 Commits

Author SHA1 Message Date
Duncan P. N. Exon Smith
f111dd5556 AsmParser/Writer: Handle symbolic constants in DI 'flags:'
Parse (and write) symbolic constants in debug info `flags:` fields.
This prevents a readability (and CHECK-ability) regression with the new
debug info hierarchy.

Old (well, current) assembly, with pretty-printing:

    !{!"...\\0016387", ...} ; ... [public] [rvalue reference]

Flags field without this change:

   !MDDerivedType(flags: 16387, ...)

Flags field with this change:

   !MDDerivedType(flags: DIFlagPublic | DIFlagRValueReference, ...)

As discussed in the review thread, this isn't a final state.  Most of
these flags correspond to `DW_AT_` symbolic constants, and we might
eventually want to support arbitrary attributes in some form.  However,
as it stands now, some of the flags correspond to other concepts (like
`FlagStaticMember`); until things are refactored this is the simplest
way to move forward without regressing assembly.

llvm-svn: 230111
2015-02-21 01:02:18 +00:00
Duncan P. N. Exon Smith
e023c0f5eb AsmWriter/Bitcode: MDExpression
llvm-svn: 229023
2015-02-13 01:42:09 +00:00
Duncan P. N. Exon Smith
9c2655de4a AsmWriter: MDSubprogram: Recognize DW_VIRTUALITY in 'virtuality'
llvm-svn: 229015
2015-02-13 01:28:16 +00:00
Duncan P. N. Exon Smith
23fded4323 AsmWriter: MDCompositeType: Recognize DW_LANG in 'runtimeLang'
llvm-svn: 229010
2015-02-13 01:21:25 +00:00
Duncan P. N. Exon Smith
ab0350e2c0 AsmWriter: MDBasicType: Recognize DW_ATE in 'encoding'
llvm-svn: 229006
2015-02-13 01:17:35 +00:00
Duncan P. N. Exon Smith
b0edee547b AsmParser: Recognize DW_TAG_* constants
Recognize `DW_TAG_` constants in assembly, and output it by default for
`GenericDebugNode`.

llvm-svn: 228042
2015-02-03 21:56:01 +00:00
Duncan P. N. Exon Smith
85eaac222d AsmParser/Bitcode: Add support for MDLocation
This adds assembly and bitcode support for `MDLocation`.  The assembly
side is rather big, since this is the first `MDNode` subclass (that
isn't `MDTuple`).  Part of PR21433.

(If you're wondering where the mountains of testcase updates are, we
don't need them until I update `DILocation` and `DebugLoc` to actually
use this class.)

llvm-svn: 225830
2015-01-13 21:10:44 +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
Saleem Abdulrasool
840d2e74c9 utils: update vim syntax highlighting for LLVM IR
Add missing externally_initialized keyword from SVN r174340.  Also reflow the
text.

llvm-svn: 224155
2014-12-12 21:52:44 +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
Rafael Espindola
d15cd32b9f Remove the linker_private and linker_private_weak linkages.
These linkages were introduced some time ago, but it was never very
clear what exactly their semantics were or what they should be used
for. Some investigation found these uses:

* utf-16 strings in clang.
* non-unnamed_addr strings produced by the sanitizers.

It turns out they were just working around a more fundamental problem.
For some sections a MachO linker needs a symbol in order to split the
section into atoms, and llvm had no idea that was the case. I fixed
that in r201700 and it is now safe to use the private linkage. When
the object ends up in a section that requires symbols, llvm will use a
'l' prefix instead of a 'L' prefix and things just work.

With that, these linkages were already dead, but there was a potential
future user in the objc metadata information. I am still looking at
CGObjcMac.cpp, but at this point I am convinced that linker_private
and linker_private_weak are not what they need.

The objc uses are currently split in

* Regular symbols (no '\01' prefix). LLVM already directly provides
whatever semantics they need.
* Uses of a private name (start with "\01L" or "\01l") and private
linkage. We can drop the "\01L" and "\01l" prefixes as soon as llvm
agrees with clang on L being ok or not for a given section. I have two
patches in code review for this.
* Uses of private name and weak linkage.

The last case is the one that one could think would fit one of these
linkages. That is not the case. The semantics are

* the linker will merge these symbol by *name*.
* the linker will hide them in the final DSO.

Given that the merging is done by name, any of the private (or
internal) linkages would be a bad match. They allow llvm to rename the
symbols, and that is really not what we want. From the llvm point of
view, these objects should really be (linkonce|weak)(_odr)?.

For now, just keeping the "\01l" prefix is probably the best for these
symbols. If we one day want to have a more direct support in llvm,
IMHO what we should add is not a linkage, it is just a hidden_symbol
attribute. It would be applicable to multiple linkages. For example,
on weak it would produce the current behavior we have for objc
metadata. On internal, it would be equivalent to private (and we
should then remove private).

llvm-svn: 203866
2014-03-13 23:18:37 +00:00
Matt Arsenault
9921608896 Add addrspacecast instruction.
Patch by Michele Scandale!

llvm-svn: 194760
2013-11-15 01:34:59 +00:00
Rafael Espindola
af18aaf051 Remove linkonce_odr_auto_hide.
linkonce_odr_auto_hide was in incomplete attempt to implement a way
for the linker to hide symbols that are known to be available in every
TU and whose addresses are not relevant for a particular DSO.

It was redundant in that it all its uses are equivalent to
linkonce_odr+unnamed_addr. Unlike those, it has never been connected
to clang or llvm's optimizers, so it was effectively dead.

Given that nothing produces it, this patch just nukes it
(other than the llvm-c enum value).

llvm-svn: 193865
2013-11-01 17:09:14 +00:00
Andrea Di Biagio
b486212f5a Add function attribute 'optnone'.
This function attribute indicates that the function is not optimized
by any optimization or code generator passes with the 
exception of interprocedural optimization passes.

llvm-svn: 189101
2013-08-23 11:53:55 +00:00
Charles Davis
2b2075f834 Target/X86: Add explicit Win64 and System V/x86-64 calling conventions.
Summary:
This patch adds explicit calling convention types for the Win64 and
System V/x86-64 ABIs. This allows code to override the default, and use
the Win64 convention on a target that wants to use SysV (and
vice-versa). This is needed to implement the `ms_abi` and `sysv_abi` GNU
attributes.

Reviewers:

CC:

llvm-svn: 186144
2013-07-12 06:02:35 +00:00
Bill Wendling
b16f9837ef Enable syntax highlighting for reStructuredText files.
Patch by Journeyer J. Joh!

llvm-svn: 176235
2013-02-28 06:43:24 +00:00
Kostya Serebryany
f560b78692 Unify clang/llvm attributes for asan/tsan/msan (LLVM part)
These are two related changes (one in llvm, one in clang).
LLVM: 
- rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode)
- rename thread_safety => sanitize_thread
- rename no_uninitialized_checks -> sanitize_memory

CLANG: 
- add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis))
- add __attribute__((no_sanitize_thread))
- add __attribute__((no_sanitize_memory))

for S in address thread memory
If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not
set llvm attribute sanitize_S

llvm-svn: 176075
2013-02-26 06:58:09 +00:00
Kostya Serebryany
8e2f1fbfb7 [tsan/msan] adding thread_safety and uninitialized_checks attributes
llvm-svn: 174864
2013-02-11 08:13:54 +00:00
Bill Wendling
9e0064d80b Add the IR attribute 'sspstrong'.
SSPStrong applies a heuristic to insert stack protectors in these situations:

* A Protector is required for functions which contain an array, regardless of
  type or length.

* A Protector is required for functions which contain a structure/union which
  contains an array, regardless of type or length.  Note, there is no limit to
  the depth of nesting.

* A protector is required when the address of a local variable (i.e., stack
  based variable) is exposed. (E.g., such as through a local whose address is
  taken as part of the RHS of an assignment or a local whose address is taken as
  part of a function argument.)

This patch implements the SSPString attribute to be equivalent to
SSPRequired. This will change in a subsequent patch.

llvm-svn: 173230
2013-01-23 06:41:41 +00:00
Benjamin Kramer
4e6d511382 Bring vim keyword lists up to date.
llvm-svn: 169110
2012-12-02 16:40:38 +00:00
Michael Ilseman
7b3d46a0b9 Vim mode updated to recognize fast-math flags
llvm-svn: 169055
2012-11-30 23:18:21 +00:00
Daniel Dunbar
48d2376b89 lit: Remove support for XTARGET.
- The XTARGET feature (inherited from old DG tests) was just confusing (and
   barely ever used). The same effect can now be achieved with a combination of
   the more useful REQUIRES and XFAIL.

llvm-svn: 166305
2012-10-19 20:29:27 +00:00
Owen Anderson
7f337201dd Add the half type to the LLVM IR vim syntax highlighting.
llvm-svn: 156080
2012-05-03 17:24:12 +00:00
David Greene
7cabd2e787 Add Foreach Loop
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
2012-02-22 16:09:41 +00:00
David Greene
ae3329d597 Remove Multidefs
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
2011-10-07 18:25:05 +00:00
David Greene
479bee70de Vim Support for Multidefs
Add vim highlighting support for multidefs.

llvm-svn: 141238
2011-10-05 22:42:52 +00:00
Bruno Cardoso Lopes
e6f1f6158f Update uwtable vim color!
llvm-svn: 137806
2011-08-17 02:29:07 +00:00
Dan Gohman
3200547546 Enable clang autocompletion by default.
llvm-svn: 117415
2010-10-26 23:24:54 +00:00
Che-Liang Chiou
0eaf890a31 Add ret instruction to PTX backend
llvm-svn: 114788
2010-09-25 07:46:17 +00:00
Dan Gohman
a936c04eeb Remove a TODO comment; this is now filed in bugzilla (PR8005).
llvm-svn: 112982
2010-09-03 18:06:11 +00:00
Dan Gohman
d499f5cbb9 Remove obsolete keywords which are no longer relevant.
llvm-svn: 112382
2010-08-28 20:14:05 +00:00
Dan Gohman
d8226c08e0 Remove unions from the vim syntax highlighting.
llvm-svn: 112381
2010-08-28 20:11:28 +00:00
Dan Gohman
f6ecd7a378 Clarify a comment.
llvm-svn: 112266
2010-08-27 15:16:40 +00:00
Dan Gohman
c285419f99 Parse " (Hidden)" and cope with it.
llvm-svn: 112265
2010-08-27 15:16:09 +00:00
Dan Gohman
d6ec79c6e8 Default to looking for clang++ in the PATH, rather than trying to
guess a path that will work.

llvm-svn: 112264
2010-08-27 15:15:31 +00:00
Dan Gohman
478e9347be Experimental clang-based code-completion support for vim. This currently
depends on some clang patches which are not yet upstream.

llvm-svn: 112204
2010-08-26 18:12:22 +00:00
Owen Anderson
b751d2944b Make un-named values legible in certain vim configurations.
llvm-svn: 109772
2010-07-29 17:57:57 +00:00
Dan Gohman
1ff9041de3 Fix grammaro in a comment.
llvm-svn: 97273
2010-02-26 21:45:37 +00:00
Dan Gohman
b11358e410 Add Revision keywords to these files, as it's common for them to be
copied out of the source tree.

llvm-svn: 97270
2010-02-26 21:38:04 +00:00
Dan Gohman
dd31f278cd Improve the vim code for highlighting trailing whitespace and lines
longer than 80 columns. This replaces the heavy-handed "textwidth"
mechanism, and makes the trailing-whitespace highlighting lazy so
that it isn't constantly jumping on the user during typing.

llvm-svn: 97267
2010-02-26 21:24:46 +00:00
Dan Gohman
e0b54b7692 Add the alignstack keyword.
llvm-svn: 97264
2010-02-26 21:16:17 +00:00
Dan Gohman
adbee18064 Remove bogus Updated line.
llvm-svn: 97263
2010-02-26 21:15:49 +00:00
Dan Gohman
ab316457bb Add the union keyword.
llvm-svn: 97155
2010-02-25 18:17:58 +00:00
Jakob Stoklund Olesen
83ebc265b3 Reintroduce the InlineHint function attribute.
This time it's for real! I am going to hook this up in the frontends as well.

The inliner has some experimental heuristics for dealing with the inline hint.
When given a -respect-inlinehint option, functions marked with the inline
keyword are given a threshold just above the default for -O3.

We need some experiments to determine if that is the right thing to do.

llvm-svn: 95466
2010-02-06 01:16:28 +00:00
Eric Christopher
3c5d9dc0e3 Remove the InlineHint attribute. There are no current or planned
users.

llvm-svn: 93558
2010-01-15 21:36:30 +00:00
Dan Gohman
123aee69c0 Tighten up the vim LLVM IR syntax highlighting regex for labels, and add a
highlighting rule for identifiers.

llvm-svn: 93056
2010-01-09 17:22:48 +00:00
Dan Gohman
03fedbe06b Set the vim auto-indent setting for open braces after case statements to
follow LLVM source convention.

Before:
  case X: {
            stuff;
          }

After:
  case X: {
    stuff;
  }

llvm-svn: 93055
2010-01-09 17:15:21 +00:00
Dan Gohman
3f9f33080a Add indirectbr and blockaddress to the vim syntax highlighting file.
llvm-svn: 85451
2009-10-29 00:14:44 +00:00
Dale Johannesen
f90fc6544b Add an 'inline hint' attribute to represent source
code hints that it would be a good idea to inline
a function ("inline" keyword).  No functional change
yet; FEs do not emit this and inliner does not use it.

llvm-svn: 80063
2009-08-26 01:08:21 +00:00
Dan Gohman
35653dafe5 Add new function attribute keywords to the vim syntax.
llvm-svn: 78205
2009-08-05 16:38:48 +00:00