Commit Graph

55 Commits

Author SHA1 Message Date
Rafael Espindola 2fb5bc33a3 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 b03bd4d96b Add addrspacecast instruction.
Patch by Michele Scandale!

llvm-svn: 194760
2013-11-15 01:34:59 +00:00
Rafael Espindola 716e7405d3 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 377496bbad 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 e8f297ca94 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
Kostya Serebryany cf880b9443 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 d688bab563 [tsan/msan] adding thread_safety and uninitialized_checks attributes
llvm-svn: 174864
2013-02-11 08:13:54 +00:00
Bill Wendling d154e283f2 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 65e7c6626a Bring vim keyword lists up to date.
llvm-svn: 169110
2012-12-02 16:40:38 +00:00
Michael Ilseman 9d8da7b11b Vim mode updated to recognize fast-math flags
llvm-svn: 169055
2012-11-30 23:18:21 +00:00
Daniel Dunbar a3514551a1 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 fe346cd24f Add the half type to the LLVM IR vim syntax highlighting.
llvm-svn: 156080
2012-05-03 17:24:12 +00:00
Bruno Cardoso Lopes 54cd240d0f Update uwtable vim color!
llvm-svn: 137806
2011-08-17 02:29:07 +00:00
Che-Liang Chiou 299479020a Add ret instruction to PTX backend
llvm-svn: 114788
2010-09-25 07:46:17 +00:00
Dan Gohman d13b1a3581 Remove obsolete keywords which are no longer relevant.
llvm-svn: 112382
2010-08-28 20:14:05 +00:00
Dan Gohman 5458b9ddc6 Remove unions from the vim syntax highlighting.
llvm-svn: 112381
2010-08-28 20:11:28 +00:00
Owen Anderson b2c657c618 Make un-named values legible in certain vim configurations.
llvm-svn: 109772
2010-07-29 17:57:57 +00:00
Dan Gohman 1b9dd248e4 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 91f97f094f Add the alignstack keyword.
llvm-svn: 97264
2010-02-26 21:16:17 +00:00
Dan Gohman ae53e2c1f0 Remove bogus Updated line.
llvm-svn: 97263
2010-02-26 21:15:49 +00:00
Dan Gohman 22d11ee6bb Add the union keyword.
llvm-svn: 97155
2010-02-25 18:17:58 +00:00
Jakob Stoklund Olesen 74bb06c0f0 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 8444d7536c Remove the InlineHint attribute. There are no current or planned
users.

llvm-svn: 93558
2010-01-15 21:36:30 +00:00
Dan Gohman 62f05b262b 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 d7db2dedaa Add indirectbr and blockaddress to the vim syntax highlighting file.
llvm-svn: 85451
2009-10-29 00:14:44 +00:00
Dale Johannesen 2aaf539564 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 a97540f396 Add new function attribute keywords to the vim syntax.
llvm-svn: 78205
2009-08-05 16:38:48 +00:00
Dan Gohman e7e8f5d762 vim syntax highlighting for inbounds keyword.
llvm-svn: 77260
2009-07-27 21:54:51 +00:00
Dan Gohman cc1cd6f484 Add new keywords to the vim syntax highlighting.
llvm-svn: 76812
2009-07-22 22:45:50 +00:00
Dan Gohman 32c5428590 Add the private keyword to the VIM syntax highlighting.
llvm-svn: 76134
2009-07-17 01:06:53 +00:00
Dan Gohman a5b9645c4b Split the Add, Sub, and Mul instruction opcodes into separate
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.

For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.

This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt

llvm-svn: 72897
2009-06-04 22:49:04 +00:00
Duncan Sands 4581bebf2a It makes no sense to have a ODR version of common
linkage, so remove it.

llvm-svn: 66690
2009-03-11 20:14:15 +00:00
Duncan Sands e2881053c9 Remove the one-definition-rule version of extern_weak
linkage: this linkage type only applies to declarations,
but ODR is only relevant to globals with definitions.

llvm-svn: 66650
2009-03-11 08:08:06 +00:00
Duncan Sands 12da8ce3d2 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
Dan Gohman 30517ecfdc Add the keyword 'default'.
llvm-svn: 61710
2009-01-05 17:44:11 +00:00
Dan Gohman 2c4353d04b gc is not an obsolete keyword.
llvm-svn: 61670
2009-01-05 03:22:02 +00:00
Dan Gohman 29ad9bf5c3 Update VIM LLVM IR syntax highlighting.
- Add several new keywords
 - Clean up some obsolete keywords
 - Improve the patterns for constants.
 - Add syntax-highlighting for dejagnu test command comments

llvm-svn: 61646
2009-01-04 23:09:38 +00:00
Misha Brukman ac7b456c93 vimrc
* Fixed cursors in terminal by setting nocompatible (sorry, vi users)
* Enable syntax highlighting so that this file can stand on its own
* Highlight trailing whitespace
* Fixed commands to delete trailing whitespaces and convert tabs to spaces

llvm.vim and tablegen.vim
* Removed trailing whitespace, as it's now very visible

llvm-svn: 61582
2009-01-02 16:26:14 +00:00
Dan Gohman d63d9feadd Update this file for 2.0 syntax.
llvm-svn: 46512
2008-01-29 12:35:50 +00:00
Reid Spencer c67a060a51 Convert llvm.cs.uiuc.edu -> llvm.org
llvm-svn: 26748
2006-03-14 05:54:52 +00:00
Chris Lattner e4df5e4681 add support for fastcc and friends
llvm-svn: 21979
2005-05-13 20:40:52 +00:00
Chris Lattner abb5bd78ca Hilight tail
llvm-svn: 21726
2005-05-06 06:07:34 +00:00
Chris Lattner 5a02a3e963 Add support for undef and unreachable
llvm-svn: 17059
2004-10-16 18:24:35 +00:00
Misha Brukman 04f0b5b7cd Add `deplibs' keyword for specifying a list of dependent libraries
llvm-svn: 16557
2004-09-28 21:45:54 +00:00
Misha Brukman 40b4f6eca8 Added `zeroinitializer' keyword.
llvm-svn: 13253
2004-04-28 19:36:08 +00:00
Chris Lattner 8988f92470 Teach vim about the select instruction. Allow it to forget about the long-dead
not instruction.

llvm-svn: 12327
2004-03-12 05:55:07 +00:00
Chris Lattner 9b3c460a1e Make sure to syntax hilight the 'unwind' keyword!
llvm-svn: 9524
2003-10-27 05:09:15 +00:00
Chris Lattner 6ffa75a1ac Syntax highlight the new operators
llvm-svn: 9328
2003-10-21 15:37:09 +00:00
Chris Lattner 9865db1fcb Add support for the weak linkage specifier
llvm-svn: 9000
2003-10-10 04:56:26 +00:00
Chris Lattner ff610c47be syntax highlightify
llvm-svn: 8397
2003-09-08 18:08:11 +00:00