oota-llvm.git
10 years agoAllow using .cfi_startproc without a leading symbol.
Rafael Espindola [Mon, 23 Jun 2014 15:34:32 +0000 (15:34 +0000)]
Allow using .cfi_startproc without a leading symbol.

This is possible now that we don't produce .eh symbols. This fixes pr19430.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211502 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format initializer to reduce noise in another patch.
Rafael Espindola [Mon, 23 Jun 2014 15:17:34 +0000 (15:17 +0000)]
clang-format initializer to reduce noise in another patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211501 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoStop producing func.eh symbols on Darwin.
Rafael Espindola [Mon, 23 Jun 2014 15:13:23 +0000 (15:13 +0000)]
Stop producing func.eh symbols on Darwin.

According Nick Kledzik (http://llvm.org/bugs/show_bug.cgi?id=19430#c2):
"... mach-o no longer needs names in the __eh_frame section (and has not for
years)."

Iain Sandoe confirms it is also unnecessary for their old darwin support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211500 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove a temporary hack.
Rafael Espindola [Mon, 23 Jun 2014 14:22:55 +0000 (14:22 +0000)]
Remove a temporary hack.

Amusingly this survived a lot longer than the CFI transition. We don't even
support non-cfi assemblers any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211498 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[PowerPC] Refactor getMinCallFrameSize / getMinCallArgumentsSize
Ulrich Weigand [Mon, 23 Jun 2014 14:15:53 +0000 (14:15 +0000)]
[PowerPC] Refactor getMinCallFrameSize / getMinCallArgumentsSize

As of r211495, the only remaining users of getMinCallFrameSize are in
core ABI code (LowerFormalParameter / LowerCall).  This is actually a
good thing, since the details of the parameter save area are ABI specific.

With the new ELFv2 ABI in particular, the rules defining the size of the
save area will become significantly more complex, so it wouldn't make
sense to implement those outside ABI code that has all required
information.

In preparation, this patch eliminates the getMinCallFrameSize (and
associated getMinCallArgumentsSize) routines, and inlines them into all
callers.  Note that since nearly all call arguments are constant, this
allows simplifying the inlined copies to a single line everywhere.

No change in generate code expected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211497 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[PowerPC] Allow stack frames without parameter save area
Ulrich Weigand [Mon, 23 Jun 2014 13:47:52 +0000 (13:47 +0000)]
[PowerPC] Allow stack frames without parameter save area

The PPCFrameLowering::determineFrameLayout routine currently ensures
that every function that allocates a stack frame provides space for the
parameter save area (via PPCFrameLowering::getMinCallFrameSize).

This is actually not necessary.  There may be functions that never call
another routine but still allocate a frame; those do not require the
parameter save area.  In the future, with the ELFv2 ABI, even some
routines that do call other functions do not need to allocate the
parameter save area.

While it is not a bug to allocate the parameter area when it is not
needed, it is better to avoid it to save stack space.

Note that when any particular function call requires the parameter save
area, this space will already have been included by ABI code in the size
the CALLSEQ_START insn is annotated with, and therefore included in the
size returned by MFI->getMaxCallFrameSize().

This means that determineFrameLayout simply does not need to care about
the parameter save area.  (It still needs to ensure that every frame
provides the linkage area.)  This is implemented by this patch.

Note that this exposed a bug in the new fast-isel code where the parameter
area was *not* included in the CALLSEQ_START size; this is also fixed.

A couple of test cases needed to be adapted for the new (smaller) stack
frame size those tests now see.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211495 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[PowerPC] Fix IsDarwin arg in PPCFrameLowering:: calls
Ulrich Weigand [Mon, 23 Jun 2014 13:21:43 +0000 (13:21 +0000)]
[PowerPC] Fix IsDarwin arg in PPCFrameLowering:: calls

As remarked in the commit message to r211493, in several places
throughout the 64-bit SVR4 ABI code there are calls to
PPCFrameLowering::getLinkageSize and getMinCallFrameSize
using an incorrect IsDarwin argument of "true".

(Some of those were made explicit by the above refactoring patch, others
have been there all along.)

This patch fixes those places to pass "false" for IsDarwin.

No change in generated code expected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211494 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[PowerPC] Refactor setMinReservedArea and CalculateParameterAndLinkageAreaSize
Ulrich Weigand [Mon, 23 Jun 2014 13:08:27 +0000 (13:08 +0000)]
[PowerPC] Refactor setMinReservedArea and CalculateParameterAndLinkageAreaSize

The PPCISelLowering.cpp routines PPCTargetLowering::setMinReservedArea and
CalculateParameterAndLinkageAreaSize are currently used as subroutines
from both 64-bit SVR4 and Darwin ABI code.

However, the two ABIs are already quite different w.r.t. AltiVec
conventions, and they will become more different when the ELFv2 ABI is
supported.  Also, in general it seems better to disentangle ABI support
routines for different ABIs to avoid accidentally affecting one ABI when
intending to change only the other.

(Actually, the current code strictly speaking already contains a bug:
these routines call PPCFrameLowering::getMinCallFrameSize and
PPCFrameLowering::getLinkageSize with the IsDarwin parameter set to
"true" even on 64-bit SVR4.  This bug currently has no adverse effect
since those routines always return the same for 64-bit SVR4 and 64-bit
Darwin, but it still seems wrong ...  I'll fix this in a follow-up
commit shortly.)

To remove this code sharing, I'm simply inlining both routines into all
call sites (there are just two each, one for 64-bit SVR4 and one for
Darwin), and simplifying due to constant parameters where possible.

A small piece of code that *does* make sense to share is refactored into
the new routine EnsureStackAlignment, now also called from 32-bit SVR4
ABI code.

No change in generated code is expected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211493 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[PowerPC] Fix on-stack AltiVec arguments with 64-bit SVR4
Ulrich Weigand [Mon, 23 Jun 2014 12:36:34 +0000 (12:36 +0000)]
[PowerPC] Fix on-stack AltiVec arguments with 64-bit SVR4

Current 64-bit SVR4 code seems to have some remnants of Darwin code
in AltiVec argument handing.  This had the effect that AltiVec arguments
(or subsequent arguments) were not correctly placed in the parameter area
in some cases.

The correct behaviour with the 64-bit SVR4 ABI is:
- All AltiVec arguments take up space in the parameter area, just like
  any other arguments, whether vararg or not.
- They are always 16-byte aligned, skipping a parameter area doubleword
  (and the associated GPR, if any), if necessary.

This patch implements the correct behaviour and adds a test case.
(Verified against GCC behaviour via the ABI compat test suite.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211492 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: mark UBFX as not allowing PC.
Tim Northover [Mon, 23 Jun 2014 09:20:02 +0000 (09:20 +0000)]
ARM: mark UBFX as not allowing PC.

Strictly, it's unpredictable. But we don't quite model that yet and an error is
better than ignoring the issue. This one somehow got left out before though.

rdar://problem/15997748

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211490 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMC: Cleanup parseMSInlineAsm
David Majnemer [Mon, 23 Jun 2014 02:17:16 +0000 (02:17 +0000)]
MC: Cleanup parseMSInlineAsm

Utilize range based for-loops to simplify some code.
Use insert() instead of a loop for simplicity/efficiency.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211486 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMC: adjust text section flags for WoA
Saleem Abdulrasool [Sun, 22 Jun 2014 22:25:01 +0000 (22:25 +0000)]
MC: adjust text section flags for WoA

Correct the section flags for code built for Windows on ARM with
`-ffunction-sections`.  Windows on ARM uses solely Thumb-2 instructions, and
indicates that the function is thumb by placing it in a text section that has
IMAGE_SCN_MEM_16BIT flag set.

When we encounter a .section directive, a new section is constructed.  This may
be a text segment.  In order to identify that we need the additional flag,
expose the target triple through the ObjectFileInfo as this information is lost
otherwise.

Since any modern ARM targeting environment on Windows would be Thumb-2 (Windows
ARM NT or Windows Embedded Compact), introducing a new flag to indicate the
section attribute seems to be a bit overkill.  Simply depend on the target
triple.  Since there is one location that this information is currently needed,
creating a target specific assembly parser and delegating the parsing of section
switches also feels a bit heavy handed.  If it turns out that this information
ends up changing additional behaviour, then it may be worth considering that
alternative.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211481 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert r211399, "Generate native unwind info on Win64"
NAKAMURA Takumi [Sun, 22 Jun 2014 22:00:56 +0000 (22:00 +0000)]
Revert r211399, "Generate native unwind info on Win64"

It broke Legacy JIT Tests on x86_64-{mingw32|msvc}, aka Windows x64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211480 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Use LowerSDIVREM for i64 node replace
Jan Vesely [Sun, 22 Jun 2014 21:43:01 +0000 (21:43 +0000)]
R600: Use LowerSDIVREM for i64 node replace

v2: move div/rem node replacement to R600ISelLowering
    make lowerSDIVREM protected

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211478 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Implement custom SDIVREM.
Jan Vesely [Sun, 22 Jun 2014 21:43:00 +0000 (21:43 +0000)]
R600: Implement custom SDIVREM.

Instead of separate SDIV/SREM. SDIV used UDIV which in turn used UDIVREM anyway.
SREM used SDIV(UDIV->UDIVREM)+MUL+SUB, using UDIVREM directly is more efficient.

v2: Don't use all caps names

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211477 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Add udivrem test
Jan Vesely [Sun, 22 Jun 2014 21:42:58 +0000 (21:42 +0000)]
R600: Add udivrem test

v2: move < %s to the end of the line
    space after ;
    add v4i32 test

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211476 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix PR20087 by using the source index when changing the vector load
Filipe Cabecinhas [Sun, 22 Jun 2014 17:21:37 +0000 (17:21 +0000)]
Fix PR20087 by using the source index when changing the vector load

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211472 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoIntroduce a Lit feature "debug_frame" and apply it to llvm/test/MC/ELF/cfi-version.ll.
NAKAMURA Takumi [Sun, 22 Jun 2014 12:35:39 +0000 (12:35 +0000)]
Introduce a Lit feature "debug_frame" and apply it to llvm/test/MC/ELF/cfi-version.ll.

.debug_frame is not emitted for targeting Windows x64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211466 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a description to the test from r211433 explaining why it's written that way.
Benjamin Kramer [Sun, 22 Jun 2014 12:22:04 +0000 (12:22 +0000)]
Add a description to the test from r211433 explaining why it's written that way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211465 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoLoopVectorizer: Fix a dominance issue
Arnold Schwaighofer [Sun, 22 Jun 2014 03:38:59 +0000 (03:38 +0000)]
LoopVectorizer: Fix a dominance issue

The induction variables start value needs to be defined before we branch
(overflow check) to the scalar preheader where we used it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211460 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMergeFunctions Pass, removed DenseMap helpers.
Stepan Dyatkovskiy [Sun, 22 Jun 2014 01:53:30 +0000 (01:53 +0000)]
MergeFunctions Pass, removed DenseMap helpers.

Patch removes rest part of code related to old implementation.

This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

This one was the final patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211457 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMergeFunctions Pass, updated header comments.
Stepan Dyatkovskiy [Sun, 22 Jun 2014 00:57:09 +0000 (00:57 +0000)]
MergeFunctions Pass, updated header comments.

Added short description for new comparison algorithm, that introduces
total ordering among functions set.

This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211456 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoReport error for non-zero data in .bss
Weiming Zhao [Sun, 22 Jun 2014 00:33:44 +0000 (00:33 +0000)]
Report error for non-zero data in .bss

User may initialize a var with non-zero value and specify .bss section.
E.g. : int a __attribute__((section(".bss"))) = 2;

This patch converts an assertion to error report for better user
experience.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211455 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMergeFunctions Pass, FnSet has been replaced with FnTree.
Stepan Dyatkovskiy [Sat, 21 Jun 2014 20:54:36 +0000 (20:54 +0000)]
MergeFunctions Pass, FnSet has been replaced with FnTree.

Patch activates new implementation.
So from now, merging process should take time O(N*log(N)).
Where N size of module (we are free to measure it in
functions or in instructions). Internally FnTree represents
binary tree. So every lookup operation takes O(log(N)) time.

It is still not the last patch in series, we also have to
clean-up pass from old code, and update pass comments.

This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211445 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMergeFunctions Pass, removed unused methods from old implementation.
Stepan Dyatkovskiy [Sat, 21 Jun 2014 20:13:24 +0000 (20:13 +0000)]
MergeFunctions Pass, removed unused methods from old implementation.

Patch removed next old FunctionComparator methods:
    * enumerate
    * isEquivalentOperation
    * isEquivalentGEP
    * isEquivalentType

This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211444 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMergeFunctions, doSanityCheck: fixed body comments.
Stepan Dyatkovskiy [Sat, 21 Jun 2014 19:07:51 +0000 (19:07 +0000)]
MergeFunctions, doSanityCheck: fixed body comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211443 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMergeFunctions Pass, introduced sanity check, that checks order relation,
Stepan Dyatkovskiy [Sat, 21 Jun 2014 18:58:11 +0000 (18:58 +0000)]
MergeFunctions Pass, introduced sanity check, that checks order relation,
introduced among functions set.

This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211442 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMergeFunctions Pass, introduced total ordering among top-level comparison
Stepan Dyatkovskiy [Sat, 21 Jun 2014 17:55:51 +0000 (17:55 +0000)]
MergeFunctions Pass, introduced total ordering among top-level comparison
methods.

Patch changes return type of FunctionComparator::compare() and
FunctionComparator::compare(const BasicBlock*, const BasicBlock*)
methods from bool (equal or not) to {-1, 0, 1} (less, equal, great).

This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211437 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoLoopUnrollRuntime: Check for overflow in the trip count calculation.
Benjamin Kramer [Sat, 21 Jun 2014 13:46:25 +0000 (13:46 +0000)]
LoopUnrollRuntime: Check for overflow in the trip count calculation.

Fixes PR19823.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211436 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoLegalizer: Add support for splitting insert_subvectors.
Benjamin Kramer [Sat, 21 Jun 2014 12:56:42 +0000 (12:56 +0000)]
Legalizer: Add support for splitting insert_subvectors.

We handle this by spilling the whole thing to the stack and doing the
insertion as a store.

PR19492. This happens in real code because the vectorizer creates v2i128 when AVX is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211435 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSCEVExpander: Fold constant PHIs harder. The logic below only understands proper...
Benjamin Kramer [Sat, 21 Jun 2014 11:47:18 +0000 (11:47 +0000)]
SCEVExpander: Fold constant PHIs harder. The logic below only understands proper IVs.

PR20093.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211433 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd back functionality removed in r210497.
Richard Trieu [Sat, 21 Jun 2014 02:43:02 +0000 (02:43 +0000)]
Add back functionality removed in r210497.

Instead of asserting, output a message stating that a null pointer was found.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211430 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[X86] Add ISel patterns to select SSE3/AVX ADDSUB instructions.
Andrea Di Biagio [Sat, 21 Jun 2014 01:31:15 +0000 (01:31 +0000)]
[X86] Add ISel patterns to select SSE3/AVX ADDSUB instructions.

This patch adds ISel patterns to select SSE3/AVX ADDSUB instructions
from a sequence of "vadd + vsub + blend".

Example:

///
typedef float float4 __attribute__((ext_vector_type(4)));

float4 foo(float4 A, float4 B) {
  float4 X = A - B;
  float4 Y = A + B;
  return (float4){X[0], Y[1], X[2], Y[3]};
}
///

Before this patch, (with flag -mcpu=corei7) llc produced the following
assembly sequence:
  movaps  %xmm0, %xmm2
  addps   %xmm1, %xmm2
  subps   %xmm1, %xmm0
  blendps $10, %xmm2, %xmm0

With this patch, we now get a single
  addsubps  %xmm1, %xmm0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211427 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix the MinGW builder. Apparently std::call_once and
Zachary Turner [Sat, 21 Jun 2014 00:24:51 +0000 (00:24 +0000)]
Fix the MinGW builder.  Apparently std::call_once and
std::recursive_mutex are not available on MinGW and breaks the
builder.  Revert to using a function local static and sys::Mutex
just to get the tree green until we figure out a better solution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211424 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAlways use a temp symbol for CIE.
Rafael Espindola [Fri, 20 Jun 2014 23:54:32 +0000 (23:54 +0000)]
Always use a temp symbol for CIE.

Fixes pr19185.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211423 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse compact unwind for the iOS simulator.
Rafael Espindola [Fri, 20 Jun 2014 22:40:55 +0000 (22:40 +0000)]
Use compact unwind for the iOS simulator.

Another step in fixing pr19185.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211416 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse a helper function and clang-format.
Rafael Espindola [Fri, 20 Jun 2014 22:37:01 +0000 (22:37 +0000)]
Use a helper function and clang-format.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211415 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSupport: ScaledNumber: Fix inconsistent test names
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 22:36:09 +0000 (22:36 +0000)]
Support: ScaledNumber: Fix inconsistent test names

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211414 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSupport: Write ScaledNumbers::getLg{,Floor,Ceiling}()
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 22:33:40 +0000 (22:33 +0000)]
Support: Write ScaledNumbers::getLg{,Floor,Ceiling}()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211413 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDelete dead code.
Rafael Espindola [Fri, 20 Jun 2014 22:30:31 +0000 (22:30 +0000)]
Delete dead code.

The compact unwind info is only used by code that knows it is supported.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211412 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSupport: Write ScaledNumber::getQuotient() and getProduct()
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 21:47:47 +0000 (21:47 +0000)]
Support: Write ScaledNumber::getQuotient() and getProduct()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211409 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSupport: Cleanup ScaledNumber::getAdjusted() doc
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 21:44:36 +0000 (21:44 +0000)]
Support: Cleanup ScaledNumber::getAdjusted() doc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211407 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSupport: Mark end of namespaces
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 21:43:20 +0000 (21:43 +0000)]
Support: Mark end of namespaces

This convinces clang-format to leave a newline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211406 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix some double printing of filenames for archives in llvm-nm when
Kevin Enderby [Fri, 20 Jun 2014 21:29:27 +0000 (21:29 +0000)]
Fix some double printing of filenames for archives in llvm-nm when
the tool is given multiple files.  Also fix the same issue with Mach-O
universal files. And fix the newline spacing to separate the output
in these cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211405 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDon't produce eh_frame relocations when targeting the IOS simulator.
Rafael Espindola [Fri, 20 Jun 2014 21:15:27 +0000 (21:15 +0000)]
Don't produce eh_frame relocations when targeting the IOS simulator.

First step for fixing pr19185.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211404 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert "Replace Execution Engine's mutex with std::recursive_mutex."
Zachary Turner [Fri, 20 Jun 2014 21:07:14 +0000 (21:07 +0000)]
Revert "Replace Execution Engine's mutex with std::recursive_mutex."

This reverts commit 1f502bd9d7d2c1f98ad93a09ffe435e11a95aedd, due to
GCC / MinGW's lack of support for C++11 threading.

It's possible this will go back in after we come up with a
reasonable solution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211401 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoGenerate native unwind info on Win64
Reid Kleckner [Fri, 20 Jun 2014 20:35:47 +0000 (20:35 +0000)]
Generate native unwind info on Win64

This patch enables LLVM to emit Win64-native unwind info rather than
DWARF CFI.  It handles all corner cases (I hope), including stack
realignment.

Because the unwind info is not flexible enough to describe stack frames
with a gap of unknown size in the middle, such as the one caused by
stack realignment, I modified register spilling code to place all spills
into the fixed frame slots, so that they can be accessed relative to the
frame pointer.

Patch by Vadim Chugunov!

Reviewed By: rnk

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211399 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix some -Wsign-compare fallout from changing container count member functions to...
David Blaikie [Fri, 20 Jun 2014 19:54:13 +0000 (19:54 +0000)]
Fix some -Wsign-compare fallout from changing container count member functions to return unsigned instead of bool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211393 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCommited patch from Björn Steinbrink:
Stepan Dyatkovskiy [Fri, 20 Jun 2014 19:11:56 +0000 (19:11 +0000)]
Commited patch from Björn Steinbrink:
Summary:
Different range metadata can lead to different optimizations in later
passes, possibly breaking the semantics of the merged function. So range
metadata must be taken into consideration when comparing Load
instructions.

Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211391 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Make] Fix dependencies for td.expanded
Adam Nemet [Fri, 20 Jun 2014 19:00:41 +0000 (19:00 +0000)]
[Make] Fix dependencies for td.expanded

Depend on all the .td files not just the main one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211390 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[RuntimeDyld] Fix ppc64 stub relocations on little-endian
Ulrich Weigand [Fri, 20 Jun 2014 18:17:56 +0000 (18:17 +0000)]
[RuntimeDyld] Fix ppc64 stub relocations on little-endian

When RuntimeDyldELF creates stub functions, it needs to install
relocations that will resolve to the final address of the target
routine. Since those are 16-bit relocs, they need to be applied to the
least-significant halfword of the instruction.  On big-endian ppc64,
this means that addresses have to be adjusted by 2, which is what the
code currently does.

However, on a little-endian system, the address must *not* be adjusted;
the least-significant halfword is the first one.  This patch updates the
RuntimeDyldELF code to take the target byte order into account.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211384 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix a warning about the use of const being ignored with a cast.
Kevin Enderby [Fri, 20 Jun 2014 18:07:34 +0000 (18:07 +0000)]
Fix a warning about the use of const being ignored with a cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211383 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[RuntimeDyld] Support more PPC64 relocations
Ulrich Weigand [Fri, 20 Jun 2014 17:51:47 +0000 (17:51 +0000)]
[RuntimeDyld] Support more PPC64 relocations

This adds support for several missing PPC64 relocations in the
straight-forward manner to RuntimeDyldELF.cpp.

Note that this actually fixes a failure of a large-model test case on
PowerPC, allowing the XFAIL to be removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211382 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600/SI: Add patterns for ctpop inside a branch
Tom Stellard [Fri, 20 Jun 2014 17:06:11 +0000 (17:06 +0000)]
R600/SI: Add patterns for ctpop inside a branch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211378 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600/SI: Add a pattern for f32 ftrunc
Tom Stellard [Fri, 20 Jun 2014 17:06:09 +0000 (17:06 +0000)]
R600/SI: Add a pattern for f32 ftrunc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211377 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Expand vector flog2
Tom Stellard [Fri, 20 Jun 2014 17:06:07 +0000 (17:06 +0000)]
R600: Expand vector flog2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211376 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Expand vector fexp2
Tom Stellard [Fri, 20 Jun 2014 17:06:05 +0000 (17:06 +0000)]
R600: Expand vector fexp2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211375 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600/SI: SI Control Flow Annotation bug fixed
Tom Stellard [Fri, 20 Jun 2014 17:06:02 +0000 (17:06 +0000)]
R600/SI: SI Control Flow Annotation bug fixed

Mixing of AddAvailableValue and GetValueAtEndOfBlock methods of SSAUpdater
leaded to the endless loop generation when the nested loops annotated.

This fixes a bug in the OCL_ML/KNN OpenCV test.  The test case is too
complex for FileCheck and would be very fragile.

Patch by: Elena Denisova

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211374 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600/SI: Add a VALU pattern for i64 xor
Tom Stellard [Fri, 20 Jun 2014 17:05:57 +0000 (17:05 +0000)]
R600/SI: Add a VALU pattern for i64 xor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211373 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[PowerPC] Fix small argument stack slot offset for LE
Ulrich Weigand [Fri, 20 Jun 2014 16:34:05 +0000 (16:34 +0000)]
[PowerPC] Fix small argument stack slot offset for LE

When small arguments (structures < 8 bytes or "float") are passed in a
stack slot in the ppc64 SVR4 ABI, they must reside in the least
significant part of that slot.  On BE, this means that an offset needs
to be added to the stack address of the parameter, but on LE, the least
significant part of the slot has the same address as the slot itself.

This changes the PowerPC back-end ABI code to only add the small
argument stack slot offset for BE.  It also adds test cases to verify
the correct behavior on both BE and LE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211368 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMove test so that it is skipped if the ARM target is not enabled.
Rafael Espindola [Fri, 20 Jun 2014 15:30:38 +0000 (15:30 +0000)]
Move test so that it is skipped if the ARM target is not enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211366 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAllow a target to create a null streamer.
Rafael Espindola [Fri, 20 Jun 2014 13:11:28 +0000 (13:11 +0000)]
Allow a target to create a null streamer.

Targets can assume that a target streamer is present, so they have to be able
to construct a null streamer in order to set the target streamer in it to.

Fixes a crash when using the null streamer with arm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211358 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCode in LoopStrengthReduce.cpp depends on SmallBitVector::size() being size_t
Yaron Keren [Fri, 20 Jun 2014 12:57:44 +0000 (12:57 +0000)]
Code in LoopStrengthReduce.cpp depends on SmallBitVector::size() being size_t
and not unsigned.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211356 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoReverting size_type for the containers from size_type to unsigned.
Yaron Keren [Fri, 20 Jun 2014 12:20:56 +0000 (12:20 +0000)]
Reverting size_type for the containers from size_type to unsigned.
Various places in LLVM assume that container size and count are unsigned
and do not use the container size_type. Therefore they break compilation
(or possibly executation) for LP64 systems where size_t is 64 bit while
unsigned is still 32 bit.

If we'll ever that many items in the container size_type could be made
size_t for a specific containers after reviweing its other uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211353 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAttempting to fix the 64 bit bots.
Yaron Keren [Fri, 20 Jun 2014 10:52:57 +0000 (10:52 +0000)]
Attempting to fix the 64 bit bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211351 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThe count() function for STL datatypes returns unsigned, even where it's
Yaron Keren [Fri, 20 Jun 2014 10:26:56 +0000 (10:26 +0000)]
The count() function for STL datatypes returns unsigned, even where it's
only 1/0 result like std::set. Some of the LLVM ADT already return unsigned
count(), while others still return bool count().

In continuation to r197879, this patch modifies DenseMap, DenseSet,
ScopedHashTable, ValueMap:: count() to return size_type instead of bool,
1 instead of true and 0 instead of false.

size_type is typedef-ed locally within each class to size_t.

http://reviews.llvm.org/D4018

Reviewed by dblaikie.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211350 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoEmit the ARM build attributes ABI_PCS_wchar_t and ABI_enum_size.
Oliver Stannard [Fri, 20 Jun 2014 10:08:11 +0000 (10:08 +0000)]
Emit the ARM build attributes ABI_PCS_wchar_t and ABI_enum_size.

Emit the ARM build attributes ABI_PCS_wchar_t and ABI_enum_size based on
module flags metadata.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211349 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agops][mips64r6] Added LSA/DLSA instructions
Zoran Jovanovic [Fri, 20 Jun 2014 09:28:09 +0000 (09:28 +0000)]
ps][mips64r6] Added LSA/DLSA instructions
Differential Revision: http://reviews.llvm.org/D3897

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211346 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Trivial subtarget feature cleanups.
Matt Arsenault [Fri, 20 Jun 2014 06:50:05 +0000 (06:50 +0000)]
R600: Trivial subtarget feature cleanups.

Remove an unused AMDIL leftover, correct extra periods
appearing in the help menu.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211341 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoArgList: use MakeArgList overloads in subclasses and clean up some calls.
Justin Bogner [Fri, 20 Jun 2014 04:36:29 +0000 (04:36 +0000)]
ArgList: use MakeArgList overloads in subclasses and clean up some calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211340 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd Support to Recognize and Vectorize NON SIMD instructions in SLPVectorizer.
Karthik Bhat [Fri, 20 Jun 2014 04:32:48 +0000 (04:32 +0000)]
Add Support to Recognize and Vectorize NON SIMD instructions in SLPVectorizer.

This patch adds support to recognize patterns such as fadd,fsub,fadd,fsub.../add,sub,add,sub... and
vectorizes them as vector shuffles if they are profitable.
These patterns of vector shuffle can later be converted to instructions such as addsubpd etc on X86.
Thanks to Arnold and Hal for the reviews. http://reviews.llvm.org/D4015

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211339 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSupport: Clean up getRounded() tests
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 02:31:07 +0000 (02:31 +0000)]
Support: Clean up getRounded() tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211337 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSupport: Write ScaledNumbers::getAdjusted()
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 02:31:03 +0000 (02:31 +0000)]
Support: Write ScaledNumbers::getAdjusted()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211336 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSmall clanups:
Rafael Espindola [Fri, 20 Jun 2014 01:37:35 +0000 (01:37 +0000)]
Small clanups:

Use static instead of anonymous namespace.
Delete write only variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211335 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix .cpp files claiming to be header files
Hans Wennborg [Fri, 20 Jun 2014 01:36:00 +0000 (01:36 +0000)]
Fix .cpp files claiming to be header files

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211334 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSupport: Write ScaledNumbers::getRounded()
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 01:30:43 +0000 (01:30 +0000)]
Support: Write ScaledNumbers::getRounded()

Start extracting helper functions out of -block-freq's `UnsignedFloat`
into `Support/ScaledNumber.h` with the eventual goal of moving and
renaming the class to `ScaledNumber`.

The bike shed about names is still being painted, but I'm going with
this for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211333 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[x86] Make the x86 PACKSSWB, PACKSSDW, PACKUSWB, and PACKUSDW
Chandler Carruth [Fri, 20 Jun 2014 01:05:28 +0000 (01:05 +0000)]
[x86] Make the x86 PACKSSWB, PACKSSDW, PACKUSWB, and PACKUSDW
instructions available as synthetic SDNodes PACKSS and PACKUS that will
select to the correct instruction variants based on the return type.
This allows us to use these rather important instructions when lowering
vector shuffles.

Also moves the relevant instruction definitions to be split out from
the fully generic multiclasses to allow them to match these new SDNodes
in the same way that the UNPCK instructions do.

No functionality should actually be changed here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211332 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDon't build switch lookup tables for dllimport or TLS variables
Hans Wennborg [Fri, 20 Jun 2014 00:38:12 +0000 (00:38 +0000)]
Don't build switch lookup tables for dllimport or TLS variables

We would previously put dllimport variables in switch lookup tables, which
doesn't work because the address cannot be used in a constant initializer.
This is basically the same problem that we have in PR19955.

Putting TLS variables in switch tables also desn't work, because the
address of such a variable is not constant.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211331 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert "Add StringMap::insert(pair) consistent with the standard associative containe...
Rafael Espindola [Fri, 20 Jun 2014 00:23:03 +0000 (00:23 +0000)]
Revert "Add StringMap::insert(pair) consistent with the standard associative container concept."

This reverts commit r211309.

It looks like it broke some bots:

http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/15563/steps/compile/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211328 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdded the -m option as an alias for -format=darwin to llvm-nm and llvm-size
Kevin Enderby [Fri, 20 Jun 2014 00:04:16 +0000 (00:04 +0000)]
Added the -m option as an alias for -format=darwin to llvm-nm and llvm-size
which is what the darwin tools use for the Mach-O format output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211326 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThe gold plugin doesn't need disassemblers.
Rafael Espindola [Thu, 19 Jun 2014 23:06:53 +0000 (23:06 +0000)]
The gold plugin doesn't need disassemblers.

Back in r128440 tools/LTO started exporting the disassembler interface. It
was never clear why, but whatever the reason I am pretty sure it doesn't hold
for tools/gold.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211325 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSet gold plugin options in a sane order.
Rafael Espindola [Thu, 19 Jun 2014 22:54:47 +0000 (22:54 +0000)]
Set gold plugin options in a sane order.

This fixes the  processing of --plugin-opt=-jump-table-type=arity.

Nice properties:
 * We call InitTargetOptionsFromCodeGenFlags once.
 * We call parseCodeGenDebugOptions once.
 * It works :-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211322 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix the output of llvm-nm for Mach-O files to use the characters ‘d’ and ‘b’ for
Kevin Enderby [Thu, 19 Jun 2014 22:49:21 +0000 (22:49 +0000)]
Fix the output of llvm-nm for Mach-O files to use the characters ‘d’ and ‘b’ for
data and bss symbols instead of the generic ’s’ for a symbol in a section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211321 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSimplify. No functionality change.
Rafael Espindola [Thu, 19 Jun 2014 22:33:23 +0000 (22:33 +0000)]
Simplify. No functionality change.

Thanks to Alp Toker for noticing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211320 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse the assignment operator.
Rafael Espindola [Thu, 19 Jun 2014 22:27:46 +0000 (22:27 +0000)]
Use the assignment operator.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211319 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoReduce indentation. No functionality change.
Rafael Espindola [Thu, 19 Jun 2014 22:20:07 +0000 (22:20 +0000)]
Reduce indentation. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211318 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSet missing options in LTOCodeGenerator::setTargetOptions.
Rafael Espindola [Thu, 19 Jun 2014 22:14:12 +0000 (22:14 +0000)]
Set missing options in LTOCodeGenerator::setTargetOptions.

Patch by Tom Roeder, I just added the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211317 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoChange the output of llvm-nm and llvm-size for Mach-O universal files (aka
Kevin Enderby [Thu, 19 Jun 2014 22:03:18 +0000 (22:03 +0000)]
Change the output of llvm-nm and llvm-size for Mach-O universal files (aka
fat files) to print “ (for architecture XYZ)” for fat files with more than
one architecture to be like what the darwin tools do for fat files.

Also clean up the Mach-O printing of archive membernames in llvm-nm to use
the darwin form of "libx.a(foo.o)".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211316 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse lib/LTO directly in the gold plugin.
Rafael Espindola [Thu, 19 Jun 2014 21:14:13 +0000 (21:14 +0000)]
Use lib/LTO directly in the gold plugin.

The tools/lto API is not the best choice for implementing a gold plugin. Among
other issues:

* It is an stable ABI. Old errors stay and we have to be really careful
  before adding new features.
* It has to support two fairly different linkers: gold and ld64.
* We end up with a plugin that depends on a shared lib, something quiet
  unusual in LLVM land.
* It hides LLVM. For some features in the gold plugin it would be really
  nice to be able to just get a Module or a GlobalValue.

This change is intended to be a very direct translation from the C API. It
will just enable other fixes and cleanups.

Tested with a LTO bootstrap on linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211315 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a new subtarget hook for whether or not we'd like to enable
Eric Christopher [Thu, 19 Jun 2014 21:03:04 +0000 (21:03 +0000)]
Add a new subtarget hook for whether or not we'd like to enable
the atomic load linked expander pass to run for a particular
subtarget. This requires a check of the subtarget and so save
the TargetMachine rather than only TargetLoweringInfo and update
all callers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211314 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoInclude Threading.h instead of forward declaring a function.
Zachary Turner [Thu, 19 Jun 2014 20:20:03 +0000 (20:20 +0000)]
Include Threading.h instead of forward declaring a function.

Previously this led to a circular header dependency, but a recent
change has since removed this dependency, so the correct fix is
to simply include the header rather than forward declare.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211311 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd StringMap::insert(pair) consistent with the standard associative container concept.
David Blaikie [Thu, 19 Jun 2014 20:08:56 +0000 (20:08 +0000)]
Add StringMap::insert(pair) consistent with the standard associative container concept.

Patch by Agustín Bergé.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211309 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSince we're using DW_AT_string rather than DW_AT_strp for debug_info
Eric Christopher [Thu, 19 Jun 2014 20:00:13 +0000 (20:00 +0000)]
Since we're using DW_AT_string rather than DW_AT_strp for debug_info
for assembly files we can't depend on the offset within the section
after a string since it could be different between producers etc.
Relax these tests accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211308 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix up a few formatting issues.
Eric Christopher [Thu, 19 Jun 2014 20:00:09 +0000 (20:00 +0000)]
Fix up a few formatting issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211307 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove an incorrect fixme.
Rafael Espindola [Thu, 19 Jun 2014 19:45:25 +0000 (19:45 +0000)]
Remove an incorrect fixme.

dynamic-no-pic is just another output type. If gnu ld gets support for MachO,
it should also add something like LDPO_DYN_NO_PIC to the plugin interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211305 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix typos
Alp Toker [Thu, 19 Jun 2014 19:41:26 +0000 (19:41 +0000)]
Fix typos

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211304 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSupport: Add llvm::sys::fs::copy_file
Justin Bogner [Thu, 19 Jun 2014 19:35:39 +0000 (19:35 +0000)]
Support: Add llvm::sys::fs::copy_file

A function to copy one file's contents to another.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211302 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove bogus configure check
David Greene [Thu, 19 Jun 2014 19:31:11 +0000 (19:31 +0000)]
Remove bogus configure check

Configure creates makefiles, so it doesn't make sense to check for
them to see if we can configure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211301 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd option to keep flavor out of the install directory
David Greene [Thu, 19 Jun 2014 19:31:09 +0000 (19:31 +0000)]
Add option to keep flavor out of the install directory

Sometimes we want to install things in "standard" locations and the
flavor directories interfere with that.  Add an option to keep them
out of the install path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211300 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTurn of -Werror by default
David Greene [Thu, 19 Jun 2014 19:31:05 +0000 (19:31 +0000)]
Turn of -Werror by default

Don't build with -Werror unless asked to.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211299 91177308-0d34-0410-b5e6-96231b3b80d8