Commit Graph

165398 Commits

Author SHA1 Message Date
Weiming Zhao fe26fd27b4 PR 18466: Fix ARM Pseudo Expansion
When expanding neon pseudo stores, it may miss the implicit uses of sub
regs, which may cause post RA scheduler reorder instructions that
breakes anti dependency.

For example:
  VST1d64QPseudo %R0<kill>, 16, %Q9_Q10, pred:14, pred:%noreg
  will be expanded to
    VST1d64Q %R0<kill>, 16, %D18, pred:14, pred:%noreg;

An instruction that defines %D20 may be scheduled before the store by
mistake.

This patches adds implicit uses for such case. For the example above, it
emits:
  VST1d64Q %R0<kill>, 8, %D18, pred:14, pred:%noreg, %Q9_Q10<imp-use>

llvm-svn: 199282
2014-01-15 01:32:12 +00:00
Hans Wennborg 1e76cbaebb lit.cfg: Don't expand %ms_abi_triple to non-X86 triples
This is a follow-up to r199260. On ARM hosts, we were attempting to run
tests with triples such as armv7l-unknown-win32. This expands that fix to
cover all non-x86 targets since we only support MS ABI on x86.

llvm-svn: 199280
2014-01-15 01:08:42 +00:00
Rafael Espindola 8f31e213e4 Make parseBitcodeFile return an ErrorOr<Module *>.
llvm-svn: 199279
2014-01-15 01:08:23 +00:00
Fariborz Jahanian bae1bcb6bf ObjectiveC. Improve on diagnostics per Jordan's feedback.
llvm-svn: 199278
2014-01-15 00:59:25 +00:00
Ted Kremenek 0f83390540 Teach DeadStoresChecker about attribute objc_precise_lifetime.
llvm-svn: 199277
2014-01-15 00:59:23 +00:00
Eric Christopher 1ad8457570 Make sure we emit a relocation to the debug_ranges section in the
presence of CU ranges.

llvm-svn: 199276
2014-01-15 00:04:29 +00:00
Rafael Espindola e9fab9b077 Return an error_code from materializeAllPermanently.
llvm-svn: 199275
2014-01-14 23:51:27 +00:00
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