Commit Graph

165341 Commits

Author SHA1 Message Date
Rui Ueyama 4dcc4637b5 [CMake] Add llvm-mc to the list of test dependencies.
llvm-svn: 199274
2014-01-14 23:33:04 +00:00
Joerg Sonnenberger 197568a02f Declare assembler functions as symbols of type function for ELF.
Fixes dynamically linked programs on NetBSD/i386.

llvm-svn: 199273
2014-01-14 23:31:23 +00:00
Rafael Espindola 1d06f7208c Use error_code in Module::materializeAll.
llvm-svn: 199269
2014-01-14 23:02:01 +00:00
Renato Golin fd99af508d Fix Remote MCJIT on Windows
llvm-svn: 199268
2014-01-14 22:59:11 +00:00
Eric Christopher fb4a99cd0a Add testcase for r199263 forgotten in commit.
llvm-svn: 199267
2014-01-14 22:57:52 +00:00
Tim Northover 463a5f24d1 ARM: correctly determine final tBX_LR in Thumb1 functions
The changes caused by folding an sp-adjustment into a "pop" previously
disrupted the forward search for the final real instruction in a
terminating block. This switches to a backward search (skipping debug
instrs).

This fixes PR18399.

Patch by Zhaoshi.

llvm-svn: 199266
2014-01-14 22:53:28 +00:00
Tim Northover 6e219cd588 AArch64: don't try to handle [SU]MUL_LOHI nodes
We should set them to expand for now since there are no patterns
dealing with them. Actually, there are no instructions either so I
doubt they'll ever be acceptable.

llvm-svn: 199265
2014-01-14 22:53:22 +00:00
Joey Gouly ad07d08c8d Add the lld root to llvm-lit, so llvm-lit can be used
to run lld tests individually.

llvm-svn: 199264
2014-01-14 22:52:24 +00:00
Eric Christopher 39cde8cc90 Enable use of ranges for translation units in the presence of
-ffunction-sections and update comments and TODOs about other
places that we should enable this.

llvm-svn: 199263
2014-01-14 22:44:17 +00:00
Renato Golin 4086bf7156 Re-enable remote MCJIT tests on ARMv7
llvm-svn: 199262
2014-01-14 22:43:49 +00:00
Renato Golin 695895ca9f Sanitize MCJIT remote execution
MCJIT remote execution (ChildTarget+RemoteTargetExternal) protocol was in
dire need of refactoring. It was fail-prone, had no error reporting and
implemented the same message logic on every single function.

This patch rectifies it, and makes it work on ARM, where it was randomly
failing. Other architectures shall profit from this change as well, making
their buildbots and releases more reliable.

llvm-svn: 199261
2014-01-14 22:43:43 +00:00
Reid Kleckner 9e6e67c2ef Use i686 as the ISA in %microsoft_abi_triple on ARM
Long term we should make -triple arm7l-*-win32 do something sensible,
but for now it's broken and untested.

llvm-svn: 199260
2014-01-14 22:36:02 +00:00
Joey Gouly 010b37691d [MachO] Begin support for reading fat binaries.
llvm-svn: 199259
2014-01-14 22:32:38 +00:00
Fariborz Jahanian 39c17a8f30 Improve comment.
llvm-svn: 199258
2014-01-14 22:01:08 +00:00
Fariborz Jahanian 0f6eabdd05 ObjectiveC. add comment.
llvm-svn: 199257
2014-01-14 21:33:54 +00:00
Tim Northover 9778348172 Driver: clarify help string for "-###"
Someone recently wasted some time not realising that "-###" didn't
actually execute the commands it printed, and suggested a
documentation tweak.

Having made the same mistake myself on at least one occasion, I
sympathise. So here it is. Any kibitzing on an even better text
welcome.

llvm-svn: 199256
2014-01-14 20:49:19 +00:00
Fariborz Jahanian 2ea30fb9b0 ObjectiveC. produce more expressive warning when
-Wselector detects an unimplemented method used
in an @selector expression. // rdar://15781538

llvm-svn: 199255
2014-01-14 20:35:13 +00:00
Matt Arsenault 2d353d1a10 Do pointer cast simplifications on addrspacecast
llvm-svn: 199254
2014-01-14 20:00:45 +00:00
Matt Arsenault f08a44f903 Remove a check for an illegal condition.
Bitcasts can't be between address spaces anymore.

llvm-svn: 199253
2014-01-14 19:56:57 +00:00
Lang Hames 06234ec147 Add FPExt option to CCValAssign::LocInfo. When generating calling-convention
promotion code, Tablegen will now select FPExt for floating point promotions
(previously it had returned AExt, which is not valid for floating point types).

Any out-of-tree targets that were relying on AExt being returned for FP
promotions will need to update their code check for FPExt instead.

llvm-svn: 199252
2014-01-14 19:56:36 +00:00
Jim Ingham 4746a90d66 Change the name of the test class for this test (was copy/paste value...)
llvm-svn: 199251
2014-01-14 19:48:23 +00:00
Hans Wennborg c9bd88e681 Remove the -cxx-abi command-line flag.
This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples,
Itanium otherwise. It's no longer possible to do weird combinations.

To be able to run a test with a specific ABI without constraining it to a
specific triple, new substitutions are added to lit: %itanium_abi_triple and
%ms_abi_triple can be used to get the current target triple adjusted to the
desired ABI. For example, if the test suite is running with the i686-pc-win32
target, %itanium_abi_triple will expand to i686-pc-mingw32.

Differential Revision: http://llvm-reviews.chandlerc.com/D2545

llvm-svn: 199250
2014-01-14 19:35:09 +00:00
Tim Northover 8799445065 Darwin: add __sinpi (etc) and __exp10 libbuiltins
These functions have the same constness properties of the normal libm
functions, which allows LLVM to optimise code better in general. There
are also a couple of specific optimisations that only trigger when
these are properly marked.

rdar://problem/13729466

llvm-svn: 199249
2014-01-14 19:26:03 +00:00
Rafael Espindola 08ff298d51 Revert "[AArch64] Added vselect patterns with float and double types"
This reverts commit r199242.

It is causing CodeGen/AArch64/neon-bsl.ll to fail.

llvm-svn: 199248
2014-01-14 19:24:08 +00:00
Alp Toker fe71d6a384 Clarify driver/frontend -fms-compatibility help text
Better describe the flag that enables drop-in MSVC compatibility, including
ability to parse MS standard headers. This is intended to distinguish it from
-fms-extensions, the more established and 'gentler' flag also supported by GCC.

The new wording matches up with the internal description introduced in r198936.
Still room for improvement (e.g. C++ is part of the product name, yet the flag
also applies to C) but it's a step forward from "Microsoft mode".

llvm-svn: 199247
2014-01-14 19:13:00 +00:00
Matt Arsenault e55a2c2e6b Make nocapture analysis work with addrspacecast
llvm-svn: 199246
2014-01-14 19:11:52 +00:00
Rafael Espindola 6633d57ae4 Fix a low hanging use of hasRawTextSupport.
This also fixes the placement of the function label comment. It was being
placed next to the mips16 directive instead of next to the label.

llvm-svn: 199245
2014-01-14 18:57:12 +00:00
Duncan P. N. Exon Smith 93be7c4fb3 Reapply "LTO: add API to set strategy for -internalize"
Reapply r199191, reverted in r199197 because it carelessly broke
Other/link-opts.ll.  The problem was that calling
createInternalizePass("main") would select
createInternalizePass(bool("main")) instead of
createInternalizePass(ArrayRef<const char *>("main")).  This commit
fixes the bug.

The original commit message follows.

Add API to LTOCodeGenerator to specify a strategy for the -internalize
pass.

This is a new attempt at Bill's change in r185882, which he reverted in
r188029 due to problems with the gold linker.  This puts the onus on the
linker to decide whether (and what) to internalize.

In particular, running internalize before outputting an object file may
change a 'weak' symbol into an internal one, even though that symbol
could be needed by an external object file --- e.g., with arclite.

This patch enables three strategies:

- LTO_INTERNALIZE_FULL: the default (and the old behaviour).
- LTO_INTERNALIZE_NONE: skip -internalize.
- LTO_INTERNALIZE_HIDDEN: only -internalize symbols with hidden
  visibility.

LTO_INTERNALIZE_FULL should be used when linking an executable.

Outputting an object file (e.g., via ld -r) is more complicated, and
depends on whether hidden symbols should be internalized.  E.g., for
ld -r, LTO_INTERNALIZE_NONE can be used when -keep_private_externs, and
LTO_INTERNALIZE_HIDDEN can be used otherwise.  However,
LTO_INTERNALIZE_FULL is inappropriate, since the output object file will
eventually need to link with others.

lto_codegen_set_internalize_strategy() sets the strategy for subsequent
calls to lto_codegen_write_merged_modules() and lto_codegen_compile*().

<rdar://problem/14334895>

llvm-svn: 199244
2014-01-14 18:52:17 +00:00
Jim Ingham 0f7e294d65 Remove a compilation warning in the test case main.c file.
llvm-svn: 199243
2014-01-14 18:46:15 +00:00
Ana Pazos 787f540daa [AArch64] Added vselect patterns with float and double types
llvm-svn: 199242
2014-01-14 18:45:48 +00:00
Simon Atanasyan 13c5ce53dc [Mips] Do not forget to initialize a class field.
llvm-svn: 199241
2014-01-14 18:20:07 +00:00
Simon Atanasyan e46e2dfe01 [Mips] Calculate gp value only once.
llvm-svn: 199240
2014-01-14 18:20:00 +00:00
Simon Atanasyan db2e1f35d8 [Mips] Create and initialize _gp symbol.
llvm-svn: 199239
2014-01-14 18:19:52 +00:00
Simon Atanasyan 3b1a761374 [Mips] Check initialization of _gp_disp and _GLOBAL_OFFSET_TABLE_
symbols in case of executable file linking.

llvm-svn: 199238
2014-01-14 18:19:42 +00:00
Simon Atanasyan 6cac582de5 [Mips] Do not store a pointer to the AtomLayout related to the
_GLOBAL_OFFSET_TABLE_ symbol. We do not use this ponter anywhere after
assigning of virtual address.

llvm-svn: 199237
2014-01-14 18:19:35 +00:00
Simon Atanasyan 0b4dd91582 [Mips] Factor out constant represents gp value offset to the
MipsTargetLayout class method.

llvm-svn: 199236
2014-01-14 18:19:26 +00:00
Simon Atanasyan acb301fab1 [Mips] Set default executable entry symbol name for MIPS targets. On
MIPS the entry symbol name is '__start' instead of '_start'.

llvm-svn: 199235
2014-01-14 18:19:19 +00:00
Simon Atanasyan 663aa62863 [Mips] Set default base address for MIPS executables to 0x400000. Assign
the lowest segment address to the MIPS_BASE_ADDRESS dynamic tag.

llvm-svn: 199234
2014-01-14 18:19:12 +00:00
Simon Atanasyan a565c778b3 [ELF] Fix type of the DefaultLayout::segments() return value. This
method returns the DefaultLayout::_segments field. The type of this field is
a vector of Segment<ELFT>* pointers. This type cannot be implicitly casted to
the range<ChunkIter>.

llvm-svn: 199233
2014-01-14 18:19:02 +00:00
Simon Atanasyan a0f5caac26 [Mips] Add test case to check R_MIPS_HI16 / R_MIPS_LO16 relocations
agains _gp_disp symbol.

llvm-svn: 199232
2014-01-14 18:18:56 +00:00
Simon Atanasyan 2a1ae098b3 [Mips] Move got16.test assembler source code to the test file and use
llvm-mc for an object file generation.

llvm-svn: 199231
2014-01-14 18:18:49 +00:00
Reid Kleckner 3a4c638900 Remove unused function to fix clang -Werror build
llvm-svn: 199230
2014-01-14 18:10:42 +00:00
Aaron Ballman 2689133805 Simplifying the OpenCL image attribute. It does not need a semantic integer parameter because the required information is encoded in the spelling. Added an appropriate subject to the attribute, and simplified the semantic checking (which will likely be expanded upon in a future patch). Also, removed the GNU spelling since it was unsupported in the first place.
llvm-svn: 199229
2014-01-14 17:41:53 +00:00
Jason Molenda 303eb178a9 Fix typeo on memory read command example.
llvm-svn: 199228
2014-01-14 17:41:13 +00:00
Jordan Rose 6f5f719806 CFG: use Visit instead of VisitStmt to look through parens.
PR18472

llvm-svn: 199227
2014-01-14 17:29:12 +00:00
Jordan Rose a3f2781259 [analyzer] Use synthesized ASTs for property getters when available.
This allows the analyzer to handle properties with C++ class type,
finishing up the FIXME from r198953.

llvm-svn: 199226
2014-01-14 17:29:06 +00:00
Jordan Rose 31c05a117a Use a proper lvalue-to-rvalue conversion in Objective-C++ property accessors.
Previously, the synthesized AST contained an rvalue DeclRefExpr for 'self'.
Now, it has an lvalue DeclRefExpr wrapped in an lvalue-to-rvalue
ImplicitCastExpr, which is what's generated when an ivar access is written
in the source.

No (intended) functionality change.

llvm-svn: 199225
2014-01-14 17:29:00 +00:00
Marshall Clow b183f8594f Whoops! Set the default in the last commit to c++1y instead of c++11
llvm-svn: 199224
2014-01-14 17:04:06 +00:00
Rafael Espindola ed90030ffe Handle UIDs and GIDs that don't fit in 6 decimal places.
Newer unix systems have 32 bit uid and gid types, but the archive format was
not updated. Fortunately, these fields are not normally used. Just truncate
the data to fit in 6 chars.

llvm-svn: 199223
2014-01-14 17:02:09 +00:00
Marshall Clow 4cdc6feb4f Update lib/buildit and test/testit to both pay attention to an env flag CXX_LANG, which people can set to 'c++03', 'c++11' or 'c++1y' to build/test using that language variant. If you don't set this env variable, you get c++11, just like today. Drive-by fix; remove duplicate -nostdinc++.
llvm-svn: 199222
2014-01-14 17:00:40 +00:00