Commit Graph

109254 Commits

Author SHA1 Message Date
Rafael Espindola
c32d7489b0 Cleanup this test a bit.
Use simpler names and remove unnecessary fields.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220498 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 19:23:42 +00:00
David Blaikie
129ab6c6c5 DebugInfo: Simplify/tidy/correct global variable decl/def emission handling.
This fixes a bug (introduced by fixing the IR emitted from Clang where
the definition of a static member would be scoped within the class,
rather than within its lexical decl context) where the definition of a
static variable would be placed inside a class.

It also improves source fidelity by scoping static class member
definitions inside the lexical decl context in which tehy are written
(eg: namespace n { class foo { static int i; } int foo::i; } - the
definition of 'i' will be within the namespace 'n' in the DWARF output
now).

Lastly, and the original goal, this reduces debug info size slightly
(and makes debug info easier to read, etc) by placing the definitions of
non-member global variables within their namespace, rather than using a
separate namespace-scoped declaration along with a definition at global
scope.

Based on patches and discussion with Frédéric.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220497 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 19:12:43 +00:00
Rafael Espindola
b11d9944d9 Make this test a bit stricter.
This now:
* Forces the linker to include the internal definition.
* Checks the full output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220495 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 18:52:46 +00:00
Rafael Espindola
74ff8164d7 Make this test a bit stricter.
This now:
* Forces the linker to include the internal definition.
* Checks the full output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220494 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 18:44:07 +00:00
Reid Kleckner
e852ac7772 Revert "Don't count inreg params when mangling fastcall functions"
This reverts commit r214981.

I'm not sure what I was thinking when I wrote this. Testing with MSVC
shows that this function is mangled to '@f@8':
  int __fastcall f(int a, int b);

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220492 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 17:50:42 +00:00
Chris Bieneman
71926e73ba Adding llvm-shlib to CMake build system with a few new bells and whistles
Summary:
This patch adds a new CMake build setting LLVM_BUILD_LLVM_DYLIB, which defaults to OFF. When set to ON, this will generate a shared library containing most of LLVM. The contents of the shared library can be overriden by specifying LLVM_DYLIB_COMPONENTS. LLVM_DYLIB_COMPONENTS can be set to a semi-colon delimited list of any LLVM components that you llvm-config can resolve.

On Windows, unless you are using Cygwin, you must specify an explicit symbol export file using LLVM_EXPORTED_SYMBOL_FILE. On Cygwin and all unix-like platforms if you do not specify LLVM_EXPORTED_SYMBOL_FILE, an export file containing only the LLVM C API will be auto-generated from the list of LLVM components specified in LLVM_DYLIB_COMPONENTS.

Reviewers: rnk

Reviewed By: rnk

Subscribers: rnk, llvm-commits

Differential Revision: http://reviews.llvm.org/D5890

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220490 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 17:22:14 +00:00
David Blaikie
3d71678283 Remove explicit (void) use of DwarfFile::DD that was accidentally left in r220452.
Caught in post-commit review by Frédéric.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220487 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 16:12:58 +00:00
Renato Golin
06b11e36e5 Do not emit intermediate register for zero FP immediate
This updates check for double precision zero floating point constant to allow
use of instruction with immediate value rather than temporary register.
Currently "a == 0.0", where "a" is of "double" type generates:

vmov.i32        d16, #0x0
vcmpe.f64       d0, d16

With this change it becomes:

vcmpe.f64        d0, #0

Patch by Sergey Dmitrouk.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220486 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 15:31:50 +00:00
Rafael Espindola
8b8e2b2f81 clang-format two code snippets to make the next patch easy to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220484 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 15:20:05 +00:00
Rafael Espindola
08aeb166fd Add unittest for extreme alignments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220483 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 14:45:19 +00:00
NAKAMURA Takumi
a766cd3b87 Hexagon/Disassembler/LLVMBuild.txt: Update libdeps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220482 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 11:32:16 +00:00
NAKAMURA Takumi
e9619fd74f Hexagon/LLVMBuild.txt: Prune CRLF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220481 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 11:32:03 +00:00
NAKAMURA Takumi
78582d480a [CMake] Prune CRLF in CMakeLists.txt(s).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220480 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 11:31:50 +00:00
NAKAMURA Takumi
f3379e7bdd [CMake] Prune trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220479 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 11:31:33 +00:00
NAKAMURA Takumi
effe629b3d Revert r220427, "[Hexagon] Adding encoding bits for add opcode."
It brought cyclic dependecy between HexagonAsmPrinter and HexagonDesc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220478 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 11:31:22 +00:00
Zoran Jovanovic
71832e7ed9 [mips][microMIPS] Implement ADDIUR1SP instruction
Differential Revision: http://reviews.llvm.org/D5153


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220477 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 11:13:59 +00:00
Zoran Jovanovic
fd515137bc ps][microMIPS] Implement ADDIUR2 instruction
Differential Revision: http://reviews.llvm.org/D5151


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220476 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 11:06:34 +00:00
Zoran Jovanovic
f58c95aac0 ps][microMIPS] Implement LI16 instruction
Differential Revision: http://reviews.llvm.org/D5149


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220475 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 10:59:24 +00:00
Zoran Jovanovic
558236adf0 [mips][microMIPS] Implement CodeGen support for SLL16 and SRL16 instructions
Differential Revision: http://reviews.llvm.org/D5774


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220474 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 10:42:01 +00:00
Oliver Stannard
9982879c4e [Thumb2] Improve disassembly of memory hints
Currently, the ARM disassembler will disassemble the Thumb2 memory hint
instructions (PLD, PLDW and PLI), even for targets which do not have
these instructions. This patch adds the required checks to the
disassmebler.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220472 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 08:52:58 +00:00
Akira Hatanaka
be9668675a [ARM, stack protector] If supported, use armv7 instructions.
This commit enables using movt/movw to load the stack guard address:

movw r0, :lower16:(L_g3$non_lazy_ptr-(LPC0_0+8))
movt r0, :upper16:(L_g3$non_lazy_ptr-(LPC0_0+8))
ldr r0, [pc, r0]

Previously a pc-relative load was emitted:

ldr r0, LCPI0_0
ldr r0, [pc, r0]

rdar://problem/18740489


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220470 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 04:17:05 +00:00
Frederic Riss
648728d4e4 Assert that ValueHandleBase::ValueIsRAUWd doesn't change the tracked Value type.
This invariant is enforced in Value::replaceAllUsesWith, thus it seems
logical to apply it also to ValueHandles. This commit fixes InstCombine
to not trigger the assertion during the removal of constant bitcasts in
call instructions.

Differential Revision: http://reviews.llvm.org/D5828

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220468 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 04:08:42 +00:00
Frederic Riss
54d6b1b71e Modernize doxygen comments in Support/Dwarf.h
In post-commit review of r219442, Rafael pointed out that the comment style
of the newly introduced helper didn't follow LLVM's coding standard.
Modernize the whole file to the new standards.

Differential Revision: http://reviews.llvm.org/D5918

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220467 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 04:08:38 +00:00
Frederic Riss
9970b0fcaa [dwarfdump] Dump DW_AT_ranges values inline in the debug_info dump.
The output looks like that:
                      DW_AT_ranges [FORM_data4]    (0x00000000
                         [0x00000001000024a0 - 0x00000001000024c2)
                         [0x0000000100002505 - 0x000000010000268b))

Differential Revision: http://reviews.llvm.org/D5712

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220466 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 04:08:34 +00:00
Peter Collingbourne
bdc3a5b99a Add llvm-go tool.
This tool lets us build LLVM components within the tree by setting up a
$GOPATH that resembles a tree fetched in the normal way with "go get".

It is intended that components such as the Go frontend will be built in-tree
using this tool.

Differential Revision: http://reviews.llvm.org/D5902

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220462 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 02:33:23 +00:00
Evgeniy Stepanov
32136ac573 [msan] Emit checks for constant shadow values under an experimental flag.
Does not change the default behavior.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220457 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 01:05:46 +00:00
David Blaikie
87e9d8c051 [DebugInfo] Sink DwarfDebug::addCurrentFnArgument down into DwarfFile.
Variable handling will be sunk into DwarfFile so that abstract variables
and the like can be shared across multiple CUs (to handle cross-CU
inlining, for example).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220453 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 00:16:05 +00:00
David Blaikie
22a01da9de [DebugInfo] Add DwarfDebug& to DwarfFile.
Use the DwarfDebug in one function that previously took it as a
parameter, and lay the foundation for use this for other operations
coming soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220452 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 00:16:03 +00:00
David Blaikie
ee129ed18d [DebugInfo] Remove LexicalScopes::isCurrentFunctionScope and CSE a use of LexicalScopes::getCurrentFunctionScope
Now that we're sure the only root (non-abstract) scope is the current
function scope, there's no need for isCurrentFunctionScope, the property
can be tested directly instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220451 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 00:06:27 +00:00
Derek Schuff
5385df6bba Fix Mips nacl-mask test for new bundle-aligned label behavior
After r220439 the behavior of labels in bundle-align mode changed,
and I neglected to update this test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220447 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 23:32:00 +00:00
Lang Hames
950c6482c6 [MCJIT] Make repeat calls to MCJIT::getPointerToFunction for declarations safe.
MCJIT::getPointerForFunction adds the resulting address to the global mapping.
This should be done via updateGlobalMapping rather than addGlobalMapping, since
the latter asserts if a mapping already exists.

MCJIT::getPointerToFunction is actually deprecated - hopefully we can remove it
(or more likely re-task it) entirely soon. In the mean time it should at least
work as advertised.

<rdar://problem/18727946>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220444 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 23:18:42 +00:00
David Majnemer
ae3811c355 Attempt to fix the build after r220439
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220440 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 22:46:05 +00:00
Derek Schuff
cdb105b62f [MC] Attach labels to existing fragments instead of using a separate fragment
Summary:
Currently when emitting a label, a new data fragment is created for it if the
current fragment isn't a data fragment.
This change instead enqueues the label and attaches it to the next fragment
(e.g. created for the next instruction) if possible.

When bundle alignment is not enabled, this has no functionality change (it
just results in fewer extra fragments being created). For bundle alignment,
previously labels would point to the beginning of the bundle padding instead
of the beginning of the emitted instruction. This was not only less efficient
(e.g. jumping to the nops instead of past them) but also led to miscalculation
of the address of the GOT (since MC uses a label difference rather than
emitting a "." symbol).

Fixes https://code.google.com/p/nativeclient/issues/detail?id=3982

Test Plan: regression test attached

Reviewers: jvoung, eliben

Subscribers: jfb, llvm-commits

Differential Revision: http://reviews.llvm.org/D5915

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220439 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 22:38:06 +00:00
Colin LeMahieu
545127f54d [Hexagon] Adding encoding bits for add opcode.
Adding llvm-mc tests.
Removing unit tests.

http://reviews.llvm.org/D5624

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220427 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 20:58:35 +00:00
Chad Rosier
fa16693864 [AArch64] Add support for the .inst directive.
This has been implement using the MCTargetStreamer interface as is done in the
ARM, Mips and PPC backends.

Phabricator: http://reviews.llvm.org/D5891
PR20964

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220422 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 20:35:57 +00:00
Peter Collingbourne
596e63d001 Go: add binding for LLVMSetUnnamedAddr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220416 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 20:20:27 +00:00
Benjamin Kramer
9552fcab70 Strength reduce constant-sized vectors into arrays. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220412 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 19:55:26 +00:00
Peter Collingbourne
1496d41753 Do not add -gsplit-dwarf to LLVM_DEFINITIONS.
This would cause the flag to appear in the output of "llvm-config --cppflags",
which should contain only preprocessor flags. The -gsplit-dwarf flag in
particular can cause problems with certain downstream users such as cgo.

Differential Revision: http://reviews.llvm.org/D5895

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220410 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 19:49:19 +00:00
Benjamin Kramer
1afcd6b4ff LoopVectorize: Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220405 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 19:13:54 +00:00
Diego Novillo
0b70f777bb Shorten auto iterators for function basic blocks.
Use consistent naming for basic block instances.

No functional changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220404 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 18:39:50 +00:00
Matt Arsenault
e54627bf95 Fix number of operands in documentation for minnum / maxnum
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220402 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 18:25:02 +00:00
Justin Bogner
6a369dbdd6 test: Make this test runnable in directories with @ in their names
Jenkins likes to use directories with names involving the '@'
character, which breaks the sed expression in this test. Switch to use
'|' on the assumption that it's less likely to show up in a path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220401 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 18:18:54 +00:00
Hans Wennborg
72536bca1e Fix VS2012 build; C++11 type aliases are not supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220399 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 17:47:49 +00:00
Colin LeMahieu
6683239469 Ammending 220393 - Removing unused decoding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220397 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 17:23:01 +00:00
Colin LeMahieu
6162d4299c Ammending 220393 - Removing unused functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220396 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 17:03:19 +00:00
Bill Schmidt
55321cd8a7 [PATCH] Support select-cc for VSFRC when VSX is enabled
A previous patch enabled SELECT_VSRC and SELECT_CC_VSRC for VSX to
handle <2 x double> cases.  This patch adds SELECT_VSFRC and
SELECT_CC_VSFRC to allow use of all 64 vector-scalar registers for the
f64 type when VSX is enabled.  The changes are analogous to those in
the previous patch.  I've added a new variant to vsx.ll to test the
code generation.

(I also cleaned up a little formatting in PPCInstrVSX.td from the
previous patch.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220395 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 16:58:20 +00:00
Diego Novillo
e64e141886 Use auto iteration in lib/Transforms/Scalar/SampleProfile.cpp. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220394 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 16:51:50 +00:00
Colin LeMahieu
324cd41b60 [Hexagon] Adding basic disassembler.
Marking all instructions as CodeGenOnly since encoding bits are not set yet.
http://reviews.llvm.org/D5829?vs=on&id=15023&whitespace=ignore-all#toc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220393 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 16:49:14 +00:00
Philip Reames
1b8af6a8f0 Preserving 'nonnull' metadata in SimplifyCFG
When we hoist two loads above an if, we can preserve the nonnull metadata.  We could also do the same for sinking them, but we appear to not handle metadata at all in that case.

Thanks to Hal for the review.

Differential Revision: http://reviews.llvm.org/D5910



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220392 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 16:37:13 +00:00
Sanjay Patel
dc18ebc4b1 Shrinkify libcalls: use float versions of double libm functions with fast-math (bug 17850)
When a call to a double-precision libm function has fast-math semantics 
(via function attribute for now because there is no IR-level FMF on calls), 
we can avoid fpext/fptrunc operations and use the float version of the call
if the input and output are both float.

We already do this optimization using a command-line option; this patch just
adds the ability for fast-math to use the existing functionality.

I moved the cl::opt from InstructionCombining into SimplifyLibCalls because
it's only ever used internally to that class.

Modified the existing test cases to use the unsafe-fp-math attribute rather
than repeating all tests.

This patch should solve: http://llvm.org/bugs/show_bug.cgi?id=17850

Differential Revision: http://reviews.llvm.org/D5893



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220390 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 15:29:23 +00:00