Commit Graph

211124 Commits

Author SHA1 Message Date
Rafael Espindola 4ea00210f2 Make InputSection able to relocate itself.
This matches the organization used in COFF.

llvm-svn: 248215
2015-09-21 22:01:00 +00:00
Rafael Espindola 5805c4f509 Move OutputSectionBase and derived classes out of Writer.cpp.
The file was getting a bit too big and OutputSection is a central enough
concept in ELF linking to justify its own file.

llvm-svn: 248214
2015-09-21 21:38:08 +00:00
Mehdi Amini 24e20583d1 Fix UB: can't bind a reference to nullptr (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 248213
2015-09-21 21:29:43 +00:00
David Blaikie 9ebdc69214 auto and range-for-ify some things to make changing container types a bit easier in the (possibly near) future
llvm-svn: 248212
2015-09-21 21:07:50 +00:00
Jonathan Peyton 614c7ef81c OpenMP Initial testsuite change to purely llvm-lit based testing
This change introduces a check-libomp target which is based upon llvm's lit
test infrastructure. Each test (generated from the University of Houston's
OpenMP testsuite) is compiled and then run. For each test, an exit status of 0
indicates success and non-zero indicates failure. This way, FileCheck is not
needed. I've added a bit of logic to generate symlinks (libiomp5 and libgomp)
in the build tree so that gcc can be tested as well.  When building out-of-
tree builds, the user will have to provide llvm-lit either by specifying
-DLIBOMP_LLVM_LIT_EXECUTABLE or having llvm-lit in their PATH.

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

llvm-svn: 248211
2015-09-21 20:41:31 +00:00
Simon Pilgrim 4003ed2da3 [DAGCombiner] Improve FMA support for interpolation patterns
This patch adds support for combining patterns such as (FMUL(FADD(1.0, x), y)) and (FMUL(FSUB(x, 1.0), y)) to their FMA equivalents.

This is useful in particular for linear interpolation cases such as (FADD(FMUL(x, t), FMUL(y, FSUB(1.0, t))))

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

llvm-svn: 248210
2015-09-21 20:32:48 +00:00
Joerg Sonnenberger 7649cd4389 Use sysconf for the number of cores on FreeBSD too.
llvm-svn: 248209
2015-09-21 20:29:12 +00:00
Jeroen Ketema 41681a5329 [ARM] Do not scale vext with a factor
The vext pseudo-instruction takes the number of elements that need to be
extracted, not the number of bytes. Hence, use the number of elements
directly instead of scaling them with a factor.

Reviewers: Silviu Baranga, James Molloy
(not reflected in the differential revision)

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

llvm-svn: 248208
2015-09-21 20:28:04 +00:00
Joerg Sonnenberger 8abf7c87cd Complex division requires libm on NetBSD, add it.
llvm-svn: 248207
2015-09-21 20:21:02 +00:00
Simon Pilgrim e8e5a17a12 [DAGCombiner] Tidy up FMA combine helpers. NFCI.
Based on feedback for D13003.

llvm-svn: 248206
2015-09-21 20:15:03 +00:00
Nico Weber d1a9125cdd clang-format: Remove ChromiumStyle.MacroBlockBegin.
We prefer setting these in our .clang-format file as the macros change over
time.  (Also, the code was setting MacroBlockBegin twice and didn't set
MacroBlockEnd, so it wasn't doing what it tried to do anyways.)

llvm-svn: 248205
2015-09-21 20:06:42 +00:00
Joerg Sonnenberger 1564f3c4ec Add basic NetBSD support.
llvm-svn: 248204
2015-09-21 20:02:45 +00:00
Joerg Sonnenberger 40252cecb0 Teach the Perl modules about NetBSD.
llvm-svn: 248203
2015-09-21 19:42:05 +00:00
Rui Ueyama 97d92736f5 COFF: Improve section hash value.
std::distance(C->Relocs.end(), C->Relocs.begin()) is the same as NumRelocs
which is already added to the hash value. What we are missing here is the
section size.

llvm-svn: 248202
2015-09-21 19:41:38 +00:00
James Molloy 50a4c27f97 [LoopUtils,LV] Propagate fast-math flags on generated FCmp instructions
We're currently losing any fast-math flags when synthesizing fcmps for
min/max reductions. In LV, make sure we copy over the scalar inst's
flags. In LoopUtils, we know we only ever match patterns with
hasUnsafeAlgebra, so apply that to any synthesized ops.

llvm-svn: 248201
2015-09-21 19:41:19 +00:00
Joerg Sonnenberger f16f649e0d libomp on NetBSD needs libc, libpthread and libm.
llvm-svn: 248200
2015-09-21 19:40:59 +00:00
Joerg Sonnenberger 64be2d271d Assume that all Unix-like systems will want to handle signals and
simplify conditional.

llvm-svn: 248199
2015-09-21 19:38:56 +00:00
Joerg Sonnenberger d742184e0b Darwin is the exception when it comes to accessing environ, all other
Unix-like systems can follow the same code path.

llvm-svn: 248198
2015-09-21 19:37:05 +00:00
Rui Ueyama 3cb1f5c860 COFF: Rename A.replaceWith(B) -> B.replace(A). NFC.
llvm-svn: 248197
2015-09-21 19:36:51 +00:00
Davide Italiano 8ca741d51d [ELF2] Support relocs for local symbols
Differential Revision:	 http://reviews.llvm.org/D12978

llvm-svn: 248196
2015-09-21 19:30:11 +00:00
Stephen Canon b12db0e42c Remove roundingMode argument in APFloat::mod
Because mod is always exact, this function should have never taken a rounding mode argument.  The actual implementation still has issues, which I'll look at resolving in a subsequent patch.

llvm-svn: 248195
2015-09-21 19:29:25 +00:00
Rafael Espindola 8055ed0c12 Avoid SEGFAULT if a requested symbol section is absent.
Patch by Igor Kudrin!

llvm-svn: 248194
2015-09-21 19:17:18 +00:00
Rui Ueyama 98a98cffb6 COFF: Do not call std::async with std::launch::async if multithreading is disabled.
llvm-svn: 248193
2015-09-21 19:12:36 +00:00
Johannes Doerfert e526de5a47 Make MIN_LOOP_TRIP_COUNT a static constant
llvm-svn: 248192
2015-09-21 19:10:11 +00:00
Akira Hatanaka 510d7c71e2 Remove attributes minsize and optsize, which conflict with optnone.
This commit fixes an assert that is triggered when optnone is being
added to an IR function that is already marked with minsize and optsize.

rdar://problem/22723716

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

llvm-svn: 248191
2015-09-21 18:52:24 +00:00
Matt Arsenault 8fb9b94f7f Fix accidentally committed debug printing
llvm-svn: 248190
2015-09-21 18:21:10 +00:00
Jonathan Peyton b68a85d1f6 [OMPT] Simplify control variable logic for OMPT
Prior to this change, OMPT had a status flag ompt_status, which could take
several values. This was due to an earlier OMPT design that had several levels
of enablement (ready, disabled, tracking state, tracking callbacks). The
current OMPT design has OMPT support either on or off.
This revision replaces ompt_status with a boolean flag ompt_enabled, which 
simplifies the runtime logic for OMPT.

Patch by John Mellor-Crummey

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

llvm-svn: 248189
2015-09-21 18:11:22 +00:00
Chandler Carruth be58ff8232 [ADT] Remove a couple of the always inline attributes I added.
Based on conversations with Justin and a few others, these constructors
are really useful to have in the executable so that you can call them
from the debugger. After some measurements, these *particular* calls
aren't so problematic as to make them a good tradeoff for always inline.

Please let me know if there are other functions really needed for
debugging. The always inline attribute is a hack that we should only
really employ when it doesn't hurt.

llvm-svn: 248188
2015-09-21 18:02:24 +00:00
Jonathan Peyton 82a13bf36c [OMPT] Overhaul OMPT initialization interface
The OMPT specification has changed. This revision brings the LLVM OpenMP
implementation up to date.

Technical overview of changes:
Previously, a public weak symbol ompt_initialize was called after the OpenMP
runtime is initialized. The new interface calls a global weak symbol ompt_tool
prior to initialization. If a tool is present, ompt_tool returns a pointer to
a function that matches the signature for ompt_initialize. After OpenMP is 
initialized the function pointer is called to initialize a tool.
Knowing that OMPT will be enabled before initialization allows OMPT support to
be initialized as part of initialization instead of back patching
initialization of OMPT support after the fact.
Post OpenMP initialization support has been generalized moves from
ompt-specific.c into ompt-general.c, since the OMPT initialization logic is no
longer implementation specific.

Patch by John Mellor-Crummey

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

llvm-svn: 248187
2015-09-21 18:01:02 +00:00
Marcello Maggioni ab58c74d98 [DivergenceAnalysis] Separated definition of class into header.
The definition of the DivergenceAnalysis pass was in a CPP
file and wasn't accessible to users of the analysis to get it
through "getAnalysis<>()".
This patch extracts the definition into a separate header that
can be used by users of the analysis to fetch the results.

Patch by Volkan Keles (vkeles@apple.com)

llvm-svn: 248186
2015-09-21 17:58:14 +00:00
Adrian Prantl 68448fe00c Add a belated testcase for the skeleton CU behavior in r248062.
llvm-svn: 248185
2015-09-21 17:48:42 +00:00
Adrian Prantl 85d938aadb Debug Info: When building a module, emit skeleton CUs for imported modules.
llvm-svn: 248184
2015-09-21 17:48:37 +00:00
Rafael Espindola 53d5cea648 Rename SectionChunk to InputSection.
This is more consistent with OutputSection. This is also part of removing
the "Chunk" term from the ELF linker, since we just have input/output sections
and program headers.

llvm-svn: 248183
2015-09-21 17:47:00 +00:00
Matthias Braun b9fe44ddb0 SelectionDAG: Use InsertNode for EntryNode
This fixes problems where two nodes have persistent debug id 0 assigned.

llvm-svn: 248182
2015-09-21 17:41:05 +00:00
Chandler Carruth 7542d37688 [FunctionAttrs] Extract a helper function for the core logic used to
evaluate whether 'readonly' or 'readnone' apply to a given function.
This both reduces indentation and will make it easy to share the logic
with a new pass manager implementation.

llvm-svn: 248181
2015-09-21 17:39:41 +00:00
Ulrich Weigand 126caeb043 [SystemZ] Fix expansion of ISD::FPOW and ISD::FSINCOS
The ISD::FPOW and ISD::FSINCOS opcodes default to Legal, but there
is no legal instruction for those on SystemZ.  This could cause
LLVM internal errors.  Fixed by setting the operation action to
Expand for those opcodes.

Also added test cases for all other LLVM IR intrinsics that should
generate a library call.  (Those already work correctly since the
default operation action is fine.)

llvm-svn: 248180
2015-09-21 17:35:45 +00:00
Greg Clayton b0d148e9f3 Fixed up the curses test results formatter to:
- rename "Failures" window to "Completed Tests"
- Remove the extra lock that I incorrectly added to the ResultsFormatter as it already had one
- Init the curses GUI with the right number of jobs when handling the "intialize" event
- tear down the curses GUI when tests complete

llvm-svn: 248179
2015-09-21 17:25:01 +00:00
Jonathan Peyton 441f33769e Fix the OpenMP 3.0 build
This change adds guards to the code in places where they are missing to enable
the OpenMP 3.0 build.

Patch by Diego Caballero and Johnny Peyton

Mailing List: http://lists.llvm.org/pipermail/openmp-dev/2015-September/000935.html

llvm-svn: 248178
2015-09-21 17:24:46 +00:00
Daniel Sanders 7d8e7bd7b5 [lldb-server] No need to add pthread twice.
Summary:
Following on from r247991:
pthread is in LLDB_SYSTEM_LIBS so there's no need to explicitly add it to the link.

Reviewers: labath

Subscribers: lldb-commits, labath, krytarowski

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

llvm-svn: 248177
2015-09-21 17:23:22 +00:00
Bruce Mitchener 937e3964e2 Further reduction of Clang-related header inclusion.
Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 248176
2015-09-21 16:56:08 +00:00
Bruce Mitchener 4ad833400f Rename GetChildClangTypeAtIndex to GetChildCompilerTypeAtIndex
Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 248175
2015-09-21 16:48:48 +00:00
James Molloy e46da3849a Revert "[ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.def"
This was committed without the code review (http://reviews.llvm.org/D12937) being approved.

This reverts commit r248152.

llvm-svn: 248174
2015-09-21 16:35:08 +00:00
James Molloy 93bd4e9979 Revert "[ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.def"
This was committed without the code review (http://reviews.llvm.org/D12938) being approved.

This reverts commit r248154.

llvm-svn: 248173
2015-09-21 16:34:58 +00:00
Matt Arsenault 85441dd724 AMDGPU: Move copy handling under switch like other instructions
llvm-svn: 248172
2015-09-21 16:27:22 +00:00
Tobias Grosser b1c39429d9 Do not model delinearized and linearized access relation for a single access
A missing return statement that previously did not have a visibly negative
effect caused after some data-structure changes in r248024 multi-dimensional
accesses to be modeled both multi-dimensional as well as linearized. This
commit adds the missing return to avoid the incorrect double modeling as
well as the compile time increases it caused.

llvm-svn: 248171
2015-09-21 16:19:25 +00:00
Sanjay Patel 55dcd40d3e add ShouldChangeType() variant that takes bitwidths
This is more efficient for cases like D12965 where we already have widths.

llvm-svn: 248170
2015-09-21 16:09:37 +00:00
Matt Arsenault b774834429 DAGCombiner: Replace store of FP constant after attemping store merges
If storing multiple FP constants, some subset of the stores
would be replaced with integers due to visit order, so
MergeConsecutiveStores would only partially merge
these.

llvm-svn: 248169
2015-09-21 15:59:46 +00:00
Matt Arsenault a30ddb6524 Factor replacement of stores of FP constants into new function
llvm-svn: 248168
2015-09-21 15:59:43 +00:00
Matt Arsenault 30ad1a3c01 Fix missing C++ mode comment
llvm-svn: 248167
2015-09-21 15:59:41 +00:00
Sanjay Patel 84dca494b1 don't repeat function names in comments; NFC
llvm-svn: 248166
2015-09-21 15:33:26 +00:00