platform/upstream/llvm.git
10 years agofix RST reference in Writing an LLVM Pass
Benjamin Kramer [Wed, 30 Oct 2013 17:09:32 +0000 (17:09 +0000)]
fix RST reference in Writing an LLVM Pass

Currently, instead of showing up as link, it is rendered as

  ...of FunctionPass <writing-an-llvm-pass-FunctionPass>. The...

PR17733. Patch by Tay Ray Chuan!

llvm-svn: 193698

10 years ago[Sanitizer] Use SpinMutex for Symbolizer initialization (per dvyukov's suggestion)
Alexey Samsonov [Wed, 30 Oct 2013 17:05:37 +0000 (17:05 +0000)]
[Sanitizer] Use SpinMutex for Symbolizer initialization (per dvyukov's suggestion)

llvm-svn: 193697

10 years agoAdd #include of raw_ostream.h to MipsSEISelLowering.cpp
Hans Wennborg [Wed, 30 Oct 2013 16:10:10 +0000 (16:10 +0000)]
Add #include of raw_ostream.h to MipsSEISelLowering.cpp

Fixing this Windows build error:

..\lib\Target\Mips\MipsSEISelLowering.cpp(997) : error C2027: use of undefined type 'llvm::raw_ostream'

llvm-svn: 193696

10 years ago[mips][msa] Correct definition of bins[lr] and CHECK-DAG-ize related tests
Daniel Sanders [Wed, 30 Oct 2013 15:45:42 +0000 (15:45 +0000)]
[mips][msa] Correct definition of bins[lr] and CHECK-DAG-ize related tests

llvm-svn: 193695

10 years agomake ConstantRange::signExtend() optimal
Nuno Lopes [Wed, 30 Oct 2013 15:36:50 +0000 (15:36 +0000)]
make ConstantRange::signExtend() optimal
the case [x, INT_MIN) was not handled optimally

llvm-svn: 193694

10 years ago[mips][msa] Added support for matching bmnz, bmnzi, bmz, and bmzi from normal IR...
Daniel Sanders [Wed, 30 Oct 2013 15:20:38 +0000 (15:20 +0000)]
[mips][msa] Added support for matching bmnz, bmnzi, bmz, and bmzi from normal IR (i.e. not intrinsics)

Also corrected the definition of the intrinsics for these instructions (the
result register is also the first operand), and added intrinsics for bsel and
bseli to clang (they already existed in the backend).

These four operations are mostly equivalent to bsel, and bseli (the difference
is which operand is tied to the result). As a result some of the tests changed
as described below.

bitwise.ll:
- bsel.v test adapted so that the mask is unknown at compile-time. This stops
  it emitting bmnzi.b instead of the intended bsel.v.
- The bseli.b test now tests the right thing. Namely the case when one of the
  values is an uimm8, rather than when the condition is a uimm8 (which is
  covered by bmnzi.b)

compare.ll:
- bsel.v tests now (correctly) emits bmnz.v instead of bsel.v because this
  is the same operation (see MSA.txt).

i8.ll
- CHECK-DAG-ized test.
- bmzi.b test now (correctly) emits equivalent bmnzi.b with swapped operands
  because this is the same operation (see MSA.txt).
- bseli.b still emits bseli.b though because the immediate makes it
  distinguishable from bmnzi.b.

vec.ll:
- CHECK-DAG-ized test.
- bmz.v tests now (correctly) emits bmnz.v with swapped operands (see
  MSA.txt).
- bsel.v tests now (correctly) emits bmnz.v with swapped operands (see
  MSA.txt).

llvm-svn: 193693

10 years ago[AArch64] Add support for NEON scalar floating-point compare instructions.
Chad Rosier [Wed, 30 Oct 2013 15:20:07 +0000 (15:20 +0000)]
[AArch64] Add support for NEON scalar floating-point compare instructions.

llvm-svn: 193692

10 years ago[AArch64] Add support for NEON scalar floating-point compare instructions.
Chad Rosier [Wed, 30 Oct 2013 15:19:37 +0000 (15:19 +0000)]
[AArch64] Add support for NEON scalar floating-point compare instructions.

llvm-svn: 193691

10 years agoRefactor the AVX512 intrinsics. Cluster the intrinsics into the appropriate vector...
Cameron McInally [Wed, 30 Oct 2013 15:19:10 +0000 (15:19 +0000)]
Refactor the AVX512 intrinsics. Cluster the intrinsics into the appropriate vector extension class within the .td file.

llvm-svn: 193690

10 years agoRehash but don't grow when full of tombstones.
Howard Hinnant [Wed, 30 Oct 2013 15:10:54 +0000 (15:10 +0000)]
Rehash but don't grow when full of tombstones.

This problem was found and fixed by José Fonseca in March 2011 for
SmallPtrSet, committed r128566.  But as far as I can tell, all other
llvm hash tables retain the same problem:  the bucket count can grow
without bound while size() remains near constant by repeated
insert/erase cycles that tend to fill the container with tombstones.
Here is a demo that has been reduced to a trivial case:

int
main()
{
   llvm::DenseSet<unsigned> d;
   for (unsigned i = 0; i < 0xFFFFFFF; ++i)
   {
       d.insert(i);
       d.erase(i);
   }
}

While the container size() never grows above 1, the bucket count grows
like this:

nb = 64
nb = 128
nb = 256
nb = 512
nb = 1024
nb = 2048
nb = 4096
nb = 8192
nb = 16384
nb = 32768
nb = 65536
nb = 131072
nb = 262144
nb = 524288
nb = 1048576
nb = 2097152
nb = 4194304
nb = 8388608
nb = 16777216
nb = 33554432
nb = 67108864
nb = 134217728
nb = 268435456

The above program currently consumes a few GB ram.  This patch brings
the memory consumption down by several orders of magnitude, and keeps
the bucket count at 64 for the above test.

llvm-svn: 193689

10 years agoAvoid diagnosing twice on non-x86 targets
Alp Toker [Wed, 30 Oct 2013 15:07:10 +0000 (15:07 +0000)]
Avoid diagnosing twice on non-x86 targets

The PowerPC and ARM native builders spotted this.

llvm-svn: 193688

10 years ago[mips][msa] Added support for matching bins[lr]i.[bhwd] from normal IR (i.e. not...
Daniel Sanders [Wed, 30 Oct 2013 14:45:14 +0000 (14:45 +0000)]
[mips][msa] Added support for matching bins[lr]i.[bhwd] from normal IR (i.e. not intrinsics)

This required correcting the definition of the bins[lr]i intrinsics because
the result is also the first operand.

It also required removing the (arbitrary) check for 32-bit immediates in
MipsSEDAGToDAGISel::selectVSplat().

Currently using binsli.d with 2 bits set in the mask doesn't select binsli.d
because the constant is legalized into a ConstantPool. Similar things can
happen with binsri.d with more than 10 bits set in the mask. The resulting
code when this happens is correct but not optimal.

llvm-svn: 193687

10 years agoFix triple / REQUIRES in test from r193685
Alp Toker [Wed, 30 Oct 2013 14:38:32 +0000 (14:38 +0000)]
Fix triple / REQUIRES in test from r193685

llvm-svn: 193686

10 years agoRecover instead of crashing on MS assembly when no target is loaded
Alp Toker [Wed, 30 Oct 2013 14:29:28 +0000 (14:29 +0000)]
Recover instead of crashing on MS assembly when no target is loaded

It's possible to embed the frontend in applications that haven't initialized
backend targets so we need to handle this condition gracefully.

llvm-svn: 193685

10 years agoclang-format: Fix indenting corner case with comment and else.
Daniel Jasper [Wed, 30 Oct 2013 14:04:10 +0000 (14:04 +0000)]
clang-format: Fix indenting corner case with comment and else.

Before:
  if (a) {
    f();
  }
      // or else ..
      else {
    g();
  }

After:
  if (a) {
    f();
  }
  // or else ..
  else {
    g();
  }

llvm-svn: 193684

10 years agoclang-format: Fix whitespaces in include directives.
Daniel Jasper [Wed, 30 Oct 2013 13:54:53 +0000 (13:54 +0000)]
clang-format: Fix whitespaces in include directives.

Before (clang-format wouldn't change):
  #include  "a.h"
  #include<a>

After:
  #include "a.h"
  #include <a>

This fixes llvm.org/PR16151.

llvm-svn: 193683

10 years ago[mips][msa] Combine binsri-like DAG of AND and OR into equivalent VSELECT
Daniel Sanders [Wed, 30 Oct 2013 13:51:01 +0000 (13:51 +0000)]
[mips][msa] Combine binsri-like DAG of AND and OR into equivalent VSELECT

(or (and $a, $mask), (and $b, $inverse_mask)) => (vselect $mask, $a, $b).
where $mask is a constant splat. This allows bitwise operations to make use
of bsel.

It's also a stepping stone towards matching bins[lr], and bins[lr]i from
normal IR.

Two sets of similar tests have been added in this commit. The bsel_* functions
test the case where binsri cannot be used. The binsr_*_i functions will
start to use the binsri instruction in the next commit.

llvm-svn: 193682

10 years ago[mips] MipsSETargetLowering now reports DAGCombiner changes when using -debug-only...
Daniel Sanders [Wed, 30 Oct 2013 13:31:27 +0000 (13:31 +0000)]
[mips] MipsSETargetLowering now reports DAGCombiner changes when using -debug-only=mips-isel

No test since -debug output is intended for developers and not end-users.

llvm-svn: 193681

10 years ago[mips][msa] Added support for matching splat.[bhw] from normal IR (i.e. not intrinsics)
Daniel Sanders [Wed, 30 Oct 2013 13:07:44 +0000 (13:07 +0000)]
[mips][msa] Added support for matching splat.[bhw] from normal IR (i.e. not intrinsics)

splat.d is implemented but this subtest is currently disabled. This is because
it is difficult to match the appropriate IR on MIPS32. There is a patch under
review that should help with this so I hope to enable the subtest soon.

llvm-svn: 193680

10 years agoMake thunk this/return adjustment ABI-specific. Also, fix the return adjustment when...
Timur Iskhodzhanov [Wed, 30 Oct 2013 11:55:43 +0000 (11:55 +0000)]
Make thunk this/return adjustment ABI-specific. Also, fix the return adjustment when using -cxx-abi microsoft

Reviewed at http://llvm-reviews.chandlerc.com/D2026

llvm-svn: 193679

10 years agoclang-format: fix for \r\r\n produced in multiline block comments
Daniel Jasper [Wed, 30 Oct 2013 07:36:40 +0000 (07:36 +0000)]
clang-format: fix for \r\r\n produced in multiline block comments

Patch by Christopher Olsen. Thank you!

llvm-svn: 193678

10 years agoRevert "SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs splitting...
Juergen Ributzka [Wed, 30 Oct 2013 06:36:19 +0000 (06:36 +0000)]
Revert "SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs splitting too."

Now Hexagon and SystemZ are not happy with it :-(

llvm-svn: 193677

10 years agoSelectionDAG: Teach the legalizer to split SETCC if VSELECT needs splitting too.
Juergen Ributzka [Wed, 30 Oct 2013 05:48:18 +0000 (05:48 +0000)]
SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs splitting too.

The Type Legalizer recognizes that VSELECT needs to be split, because the type
is to wide for the given target. The same does not always apply to SETCC,
because less space is required to encode the result of a comparison. As a result
VSELECT is split and SETCC is unrolled into scalar comparisons.

This commit fixes the issue by checking for VSELECT-SETCC patterns in the DAG
Combiner. If a matching pattern is found, then the result mask of SETCC is
promoted to the expected vector mask type for the given target. This mask has
usually the same size as the VSELECT return type (except for Intel KNL). Now the
type legalizer will split both VSELECT and SETCC.

This allows the following X86 DAG Combine code to sucessfully detect the MIN/MAX
pattern. This fixes PR16695, PR17002, and <rdar://problem/14594431>.

Reviewed by Nadav

llvm-svn: 193676

10 years agoReformat Makefile. No other changes.
Bill Wendling [Wed, 30 Oct 2013 04:03:03 +0000 (04:03 +0000)]
Reformat Makefile. No other changes.

llvm-svn: 193675

10 years ago[mips] Delete unused functions.
Akira Hatanaka [Wed, 30 Oct 2013 02:38:17 +0000 (02:38 +0000)]
[mips] Delete unused functions.

llvm-svn: 193674

10 years ago[mips] Compute stack alignment on the fly.
Akira Hatanaka [Wed, 30 Oct 2013 02:29:43 +0000 (02:29 +0000)]
[mips] Compute stack alignment on the fly.

llvm-svn: 193673

10 years agoReformat code with clang-format.
Josh Magee [Wed, 30 Oct 2013 02:25:14 +0000 (02:25 +0000)]
Reformat code with clang-format.

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

llvm-svn: 193672

10 years agoPR17731: When determining whether a tag and a non-tag were declared in the same
Richard Smith [Wed, 30 Oct 2013 01:02:04 +0000 (01:02 +0000)]
PR17731: When determining whether a tag and a non-tag were declared in the same
scope, be careful about function-scope declarations (which are not declared in
their semantic context).

llvm-svn: 193671

10 years ago[asan] Fix syscall hooks build on Android.
Evgeniy Stepanov [Wed, 30 Oct 2013 00:58:17 +0000 (00:58 +0000)]
[asan] Fix syscall hooks build on Android.

llvm-svn: 193670

10 years agoStackProtector.h: Fix trailing comments for doxygen. [-Wdocumentation]
NAKAMURA Takumi [Wed, 30 Oct 2013 00:49:39 +0000 (00:49 +0000)]
StackProtector.h: Fix trailing comments for doxygen. [-Wdocumentation]

  s!//<!///<!

llvm-svn: 193669

10 years agoTrailing whitespace in a comment line.
NAKAMURA Takumi [Wed, 30 Oct 2013 00:49:33 +0000 (00:49 +0000)]
Trailing whitespace in a comment line.

llvm-svn: 193668

10 years ago[santiizer] Disable sincos interceptor in OSX.
Evgeniy Stepanov [Wed, 30 Oct 2013 00:32:50 +0000 (00:32 +0000)]
[santiizer] Disable sincos interceptor in OSX.

llvm-svn: 193667

10 years ago<rdar://problem/15143022>
Enrico Granata [Wed, 30 Oct 2013 00:17:52 +0000 (00:17 +0000)]
<rdar://problem/15143022>

CFNumberRef is toll-free bridged to NSNumber
We can use the same summary formatter for both types

llvm-svn: 193666

10 years agoMinor efficiency refactor related to 193661. No functional change.
Warren Hunt [Wed, 30 Oct 2013 00:14:55 +0000 (00:14 +0000)]
Minor efficiency refactor related to 193661.  No functional change.

llvm-svn: 193665

10 years agoActivating latent test case for r193661.
Warren Hunt [Wed, 30 Oct 2013 00:08:34 +0000 (00:08 +0000)]
Activating latent test case for r193661.

llvm-svn: 193664

10 years ago<rdar://problem/15045059>
Enrico Granata [Wed, 30 Oct 2013 00:04:29 +0000 (00:04 +0000)]
<rdar://problem/15045059>

One of the things that dynamic typing affects is the count of children a type has
Clear out the flag that makes us blindly believe the children count when a dynamic type change is detected

llvm-svn: 193663

10 years ago[ELF] Implement minimal support for .eh_frame_hdr.
Michael J. Spencer [Wed, 30 Oct 2013 00:02:04 +0000 (00:02 +0000)]
[ELF] Implement minimal support for .eh_frame_hdr.

llvm-svn: 193662

10 years agoFixing code gen to handle microsoft layouts for which size % alignment
Warren Hunt [Tue, 29 Oct 2013 23:49:26 +0000 (23:49 +0000)]
Fixing code gen to handle microsoft layouts for which size % alignment
!= 0

llvm-svn: 193661

10 years agoDebug Info: code clean up.
Manman Ren [Tue, 29 Oct 2013 23:14:15 +0000 (23:14 +0000)]
Debug Info: code clean up.

Use EmitLabelOffsetDifference for handling on darwin platform when
non-darwin platforms use EmitLabelPlusOffset.

Also fix a bug in EmitLabelOffsetDifference where the size is hard-coded
to 4 even though Size is passed in as an argument.

llvm-svn: 193660

10 years ago<rdar://problem/15296388>
Enrico Granata [Tue, 29 Oct 2013 23:04:29 +0000 (23:04 +0000)]
<rdar://problem/15296388>

Fix a crasher that would occur if one tried to read memory as characters of some size != 1, e.g.
x -f c -s 10  buffer

This commit tries to do the right thing and uses the byte-size as the number of elements, unless both are specified and the number of elements is != 1
In this latter case (e.g. x -f c -s 10 -c 3  buffer) one could multiply the two and read 30 characters, but it seems a stretch in mind reading.

llvm-svn: 193659

10 years agoDebug Info: support for DW_FORM_ref_addr.
Manman Ren [Tue, 29 Oct 2013 22:57:10 +0000 (22:57 +0000)]
Debug Info: support for DW_FORM_ref_addr.

To support ref_addr, we calculate the section offset of a DIE (i.e. offset
of a DIE from beginning of the debug info section). The Offset field in DIE
is currently CU-relative. To calculate the section offset, we add a
DebugInfoOffset field in CompileUnit to store the offset of a CU from beginning
of the debug info section. We set the value in DwarfUnits::computeSizeAndOffset
for each CompileUnit.

A helper function DIE::getCompileUnit is added to return the CU DIE that
the input DIE belongs to. We also add a map CUDieMap in DwarfDebug to help
finding the CU for a given CU DIE.

For a cross-referenced DIE, we first find the CU DIE it belongs to with
getCompileUnit, then we use CUDieMap to get the corresponding CU for the CU DIE.
Adding the section offset of the CU with the CU-relative offset of a DIE gives
us the seciton offset of the DIE.

We correctly emit ref_addr with relocation using EmitLabelPlusOffset when
doesDwarfUseRelocationsAcrossSections is true.

This commit handles the emission of DW_FORM_ref_addr when we have an attribute
with FORM_ref_addr. A follow-on patch will start using ref_addr when adding a
DIEEntry. This commit will be tested and verified in the follow-on patch.

Reviewed off-list by Eric, Thanks.

llvm-svn: 193658

10 years agoDebug Info: instead of calling addToContextOwner which constructs the context
Manman Ren [Tue, 29 Oct 2013 22:49:29 +0000 (22:49 +0000)]
Debug Info: instead of calling addToContextOwner which constructs the context
after the DIE creation, we construct the context first.

Ensure that we create the context before we create a type so that we can add
the newly created type to the parent. Remove last use of addToContextOwner
now that it's not needed.

We use createAndAddDIE to wrap around "new DIE(". Now all shareable DIEs
should be added to their parents right after the creation.

Reviewed off-list by Eric, Thanks.

llvm-svn: 193657

10 years agoStruct byval cleanup: add helper functions to reduce code duplication.
Manman Ren [Tue, 29 Oct 2013 22:27:32 +0000 (22:27 +0000)]
Struct byval cleanup: add helper functions to reduce code duplication.

Helper functions are added:
emitPostLd: emit a post-increment load operation with given size.
emitPostSt: emit a post-increment store operation with given size.

No functionality change.

llvm-svn: 193656

10 years ago[sanitizer] Intercept drand48_r, lrand48_r.
Evgeniy Stepanov [Tue, 29 Oct 2013 22:25:27 +0000 (22:25 +0000)]
[sanitizer] Intercept drand48_r, lrand48_r.

llvm-svn: 193655

10 years ago[msandr] Remove use of std::set in msandr client to avoid reentrancy issues.
Evgeniy Stepanov [Tue, 29 Oct 2013 22:19:25 +0000 (22:19 +0000)]
[msandr] Remove use of std::set in msandr client to avoid reentrancy issues.

Patch by Qin Zhao.

llvm-svn: 193654

10 years ago[stackprotector] Update the StackProtector pass to perform datalayout analysis.
Josh Magee [Tue, 29 Oct 2013 21:16:16 +0000 (21:16 +0000)]
[stackprotector] Update the StackProtector pass to perform datalayout analysis.

This modifies the pass to classify every SSP-triggering AllocaInst according to
an SSPLayoutKind (LargeArray, SmallArray, AddrOf).  This analysis is collected
by the pass and made available for use, but no other pass uses it yet.

The next patch will make use of this analysis in PEI and StackSlot
passes.  The end goal is to support ssp-strong stack layout rules.

WIP.

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

llvm-svn: 193653

10 years agoScopInfo: Add support for AssumedContext
Tobias Grosser [Tue, 29 Oct 2013 21:05:49 +0000 (21:05 +0000)]
ScopInfo: Add support for AssumedContext

When constructing a scop sometimes the exact representation of a statement or
condition would be very complex, but there is a common case which is a lot
simpler, but which is only valid under certain assumptions. The assumed context
records the assumptions taken during the construction of this scop and that need
to be code generated as a run-time test.

At the moment, we do not yet model any assumptions, but only added the
AssumedContext as well as the isl-ast generation support. As a next step,
this needs to be hooked up with the isl code generation.

if (1) /* run-time condition */
  {  /* optimized code */ }
else
  {  /* original code */ }

llvm-svn: 193652

10 years agoUpdate comment
Matt Arsenault [Tue, 29 Oct 2013 21:04:19 +0000 (21:04 +0000)]
Update comment

llvm-svn: 193651

10 years agoWorkaround MSVC 32-bit miscompile of getCondCodeAction.
Matt Arsenault [Tue, 29 Oct 2013 20:59:29 +0000 (20:59 +0000)]
Workaround MSVC 32-bit miscompile of getCondCodeAction.

Use 32-bit types for the array instead of 64. This should
generally be better anyway.

In optimized + assert builds, I saw a failure when a
cond code / type combination that is never set was loading
a non-zero value and hitting the != Promote assert.

It turns out when loading the 64-bit value to do the shift,
the assembly loads the 2 32-bit halves from non-consecutive
addresses. The address the second half of the loaded uint64_t
doesn't include the offset of the array in the struct. Instead
of being offset + 4, it's just + 4.

I'm not entirely sure why this wasn't observed before.
setCondCodeAction isn't heavily used by the in-tree targets,
and not with the higher valued vector SimpleValueTypes. Only
PPC is using one of the > 32 valued types, and that is probably
never used by anyone on a 32-bit MSVC compiled host.

I ran into this when upgrading LLVM versions, so I guess the
value loaded from the nonsense address happened to work out
before.

No test since I'm not really sure if / how it can be reproduced
with the current in tree targets, and it's not supposed to change
anything.

llvm-svn: 193650

10 years agoRemoving a switch statement that contains only a default label. This resolves an...
Aaron Ballman [Tue, 29 Oct 2013 20:40:52 +0000 (20:40 +0000)]
Removing a switch statement that contains only a default label.  This resolves an MSVC warning.  No functional change intended.

llvm-svn: 193649

10 years agoChanged tests_typestate to test_typestate for consistency.
Chris Wailes [Tue, 29 Oct 2013 20:28:41 +0000 (20:28 +0000)]
Changed tests_typestate to test_typestate for consistency.

llvm-svn: 193648

10 years ago[asan] Maybe fix test failures on lld bots.
Evgeniy Stepanov [Tue, 29 Oct 2013 20:06:12 +0000 (20:06 +0000)]
[asan] Maybe fix test failures on lld bots.

llvm-svn: 193647

10 years ago[PECOFF] Suppress startup message of background processes.
Rui Ueyama [Tue, 29 Oct 2013 19:52:44 +0000 (19:52 +0000)]
[PECOFF] Suppress startup message of background processes.

llvm-svn: 193646

10 years ago[sanitizer] Intercept sincos, remquo, lgamma, lgamma_r.
Evgeniy Stepanov [Tue, 29 Oct 2013 19:49:35 +0000 (19:49 +0000)]
[sanitizer] Intercept sincos, remquo, lgamma, lgamma_r.

llvm-svn: 193645

10 years agoAdd -lm to sanitizer link arguments.
Evgeniy Stepanov [Tue, 29 Oct 2013 19:48:47 +0000 (19:48 +0000)]
Add -lm to sanitizer link arguments.

We'll need to intercept a few function in libm.

llvm-svn: 193644

10 years ago[msandr] Add support for standalone test.
Evgeniy Stepanov [Tue, 29 Oct 2013 19:44:47 +0000 (19:44 +0000)]
[msandr] Add support for standalone test.

Add macro MSANDR_STANDALONE_TEST for standalone test without msan executables.

Patch by Qin Zhao.

llvm-svn: 193643

10 years agoAdd support for the separate version of /FI.
Rafael Espindola [Tue, 29 Oct 2013 19:42:01 +0000 (19:42 +0000)]
Add support for the separate version of /FI.

Patch by Jeff Muizelaar.

llvm-svn: 193642

10 years ago[mips] Align the stack to 16-bytes for mfp64.
Akira Hatanaka [Tue, 29 Oct 2013 19:29:03 +0000 (19:29 +0000)]
[mips] Align the stack to 16-bytes for mfp64.

llvm-svn: 193641

10 years ago[mips] Align the stack to 16-bytes for -mfp64.
Akira Hatanaka [Tue, 29 Oct 2013 19:00:35 +0000 (19:00 +0000)]
[mips] Align the stack to 16-bytes for -mfp64.

llvm-svn: 193640

10 years ago[tsan] Fix unused variable warnings.
Evgeniy Stepanov [Tue, 29 Oct 2013 18:44:52 +0000 (18:44 +0000)]
[tsan] Fix unused variable warnings.

llvm-svn: 193639

10 years ago[mips] Use the distance between the current argument's starting address and
Akira Hatanaka [Tue, 29 Oct 2013 18:41:15 +0000 (18:41 +0000)]
[mips] Use the distance between the current argument's starting address and
the previous argument's ending address to compute the type of the padding
argument.

No intended functionality change.

llvm-svn: 193638

10 years agoRemove declared but not implemented function.
Rafael Espindola [Tue, 29 Oct 2013 18:31:14 +0000 (18:31 +0000)]
Remove declared but not implemented function.

llvm-svn: 193637

10 years ago[mips] Move setDescriptionString to base class MipsTargetInfoBase and call it
Akira Hatanaka [Tue, 29 Oct 2013 18:30:33 +0000 (18:30 +0000)]
[mips] Move setDescriptionString to base class MipsTargetInfoBase and call it
at the end of handleTargetFeatures.

No intended functionality change.

llvm-svn: 193636

10 years ago[asan] Fix build.
Evgeniy Stepanov [Tue, 29 Oct 2013 18:29:39 +0000 (18:29 +0000)]
[asan] Fix build.

llvm-svn: 193635

10 years ago[sanitizer] Fix build warnings.
Evgeniy Stepanov [Tue, 29 Oct 2013 18:24:06 +0000 (18:24 +0000)]
[sanitizer] Fix build warnings.

llvm-svn: 193634

10 years ago[sanitizer] Ptrace syscall handler.
Evgeniy Stepanov [Tue, 29 Oct 2013 17:59:45 +0000 (17:59 +0000)]
[sanitizer] Ptrace syscall handler.

llvm-svn: 193633

10 years agoFix common typos in the docs.
Benjamin Kramer [Tue, 29 Oct 2013 17:53:27 +0000 (17:53 +0000)]
Fix common typos in the docs.

llvm-svn: 193632

10 years agoFixing an issue in yesterday's dynamic type changes where we would not craft a valid...
Enrico Granata [Tue, 29 Oct 2013 17:42:02 +0000 (17:42 +0000)]
Fixing an issue in yesterday's dynamic type changes where we would not craft a valid SBType given debug information
Added a test case to help us detect regression in this realm

llvm-svn: 193631

10 years agoMove getSymbol to TargetLoweringObjectFile.
Rafael Espindola [Tue, 29 Oct 2013 17:28:26 +0000 (17:28 +0000)]
Move getSymbol to TargetLoweringObjectFile.

This allows constructing a Mangler with just a TargetMachine.

llvm-svn: 193630

10 years agoDebug Info: clean up testing case.
Manman Ren [Tue, 29 Oct 2013 17:27:14 +0000 (17:27 +0000)]
Debug Info: clean up testing case.

Add a tag before the name attribute for readability. Use CHECK-NEXT
instead of CHECK-NOT followed by a CHECK. Add new lines to separate checking
of different DIEs.

llvm-svn: 193629

10 years agoFixing TestAnonymous to build dwarf where it says it will.
Andrew Kaylor [Tue, 29 Oct 2013 17:09:59 +0000 (17:09 +0000)]
Fixing TestAnonymous to build dwarf where it says it will.

llvm-svn: 193628

10 years agoAdd a helper getSymbol to AsmPrinter.
Rafael Espindola [Tue, 29 Oct 2013 17:07:16 +0000 (17:07 +0000)]
Add a helper getSymbol to AsmPrinter.

llvm-svn: 193627

10 years agoadd test cases for frameaddr and returnaddr for aarch64
Weiming Zhao [Tue, 29 Oct 2013 17:01:29 +0000 (17:01 +0000)]
add test cases for frameaddr and returnaddr for aarch64

llvm-svn: 193626

10 years ago[AArch64] Implement FrameAddr and ReturnAddr
Weiming Zhao [Tue, 29 Oct 2013 17:00:25 +0000 (17:00 +0000)]
[AArch64] Implement FrameAddr and ReturnAddr

Fixes PR17690

llvm-svn: 193625

10 years ago[ARM] Make sure HasCRC is initialized to false in Subtarget.
Amara Emerson [Tue, 29 Oct 2013 16:54:52 +0000 (16:54 +0000)]
[ARM] Make sure HasCRC is initialized to false in Subtarget.

llvm-svn: 193624

10 years agoSupport for microMIPS jump instructions
Zoran Jovanovic [Tue, 29 Oct 2013 16:38:59 +0000 (16:38 +0000)]
Support for microMIPS jump instructions

llvm-svn: 193623

10 years agoR600: Add Sea Islands GPUs
Tom Stellard [Tue, 29 Oct 2013 16:38:29 +0000 (16:38 +0000)]
R600: Add Sea Islands GPUs

llvm-svn: 193622

10 years agoR600/SI: Add compute support for CI v2
Tom Stellard [Tue, 29 Oct 2013 16:37:28 +0000 (16:37 +0000)]
R600/SI: Add compute support for CI v2

v2:
  - Fix LDS size calculation

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 193621

10 years agoR600: Expand vector FSQRT ops
Tom Stellard [Tue, 29 Oct 2013 16:37:20 +0000 (16:37 +0000)]
R600: Expand vector FSQRT ops

llvm-svn: 193620

10 years agoDWARF parser: propery handle DW_FORM_ref_sig8 and fix Windows build.
Alexey Samsonov [Tue, 29 Oct 2013 16:32:19 +0000 (16:32 +0000)]
DWARF parser: propery handle DW_FORM_ref_sig8 and fix Windows build.

Based on D2050 by Timur Iskhodzhanov.

llvm-svn: 193619

10 years agoThe asm printer has a mangler. Use it.
Rafael Espindola [Tue, 29 Oct 2013 16:24:21 +0000 (16:24 +0000)]
The asm printer has a mangler. Use it.

llvm-svn: 193618

10 years agoThe AsmPrinter has a Mangler. Use it.
Rafael Espindola [Tue, 29 Oct 2013 16:18:15 +0000 (16:18 +0000)]
The AsmPrinter has a Mangler. Use it.

llvm-svn: 193617

10 years agoThe asm printer has a mangler. Don't keep a second pointer to it.
Rafael Espindola [Tue, 29 Oct 2013 16:11:22 +0000 (16:11 +0000)]
The asm printer has a mangler. Don't keep a second pointer to it.

llvm-svn: 193616

10 years ago[asan] increase the max malloc size from 8Gb to 64Gb
Kostya Serebryany [Tue, 29 Oct 2013 15:16:54 +0000 (15:16 +0000)]
[asan] increase the max malloc size from 8Gb to 64Gb

llvm-svn: 193615

10 years agoclang-format: Option to control spacing in template argument lists.
Daniel Jasper [Tue, 29 Oct 2013 14:52:02 +0000 (14:52 +0000)]
clang-format: Option to control spacing in template argument lists.

Same as SpacesInParentheses, this option allows adding a space inside
the '<' and '>' of a template parameter list.

Patch by Christopher Olsen.

This fixes llvm.org/PR17301.

llvm-svn: 193614

10 years agoResubmit "Refactor DynTypedMatcher into a value type class, just like Matcher<T>."
Samuel Benzaquen [Tue, 29 Oct 2013 14:37:15 +0000 (14:37 +0000)]
Resubmit "Refactor DynTypedMatcher into a value type class, just like Matcher<T>."

Summary: This resubmits r193100, plus a fix for a breakage with MSVC.

Reviewers: klimek, rnk

CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D2005

llvm-svn: 193613

10 years agoSupport names like llvm-ar-3.4 and llvm-ranlib-3.4.
Rafael Espindola [Tue, 29 Oct 2013 14:25:43 +0000 (14:25 +0000)]
Support names like llvm-ar-3.4 and llvm-ranlib-3.4.

They are used in some packages. For example:
http://packages.ubuntu.com/saucy/i386/llvm-3.4/filelist

This fixes pr17721.

llvm-svn: 193612

10 years agoTest cleanup for v8 instructions
Bernard Ogden [Tue, 29 Oct 2013 14:16:09 +0000 (14:16 +0000)]
Test cleanup for v8 instructions

Add some missing tests, factor out a test not specific to v8 into
its own file.

llvm-svn: 193611

10 years agoFix an assertion when handling a custom case of virtual inheritance; also reduce...
Timur Iskhodzhanov [Tue, 29 Oct 2013 14:13:45 +0000 (14:13 +0000)]
Fix an assertion when handling a custom case of virtual inheritance; also reduce code duplication

llvm-svn: 193610

10 years agoClarify that GlobalVariables definitions must have an initializer.
Rafael Espindola [Tue, 29 Oct 2013 13:44:11 +0000 (13:44 +0000)]
Clarify that GlobalVariables definitions must have an initializer.

llvm-svn: 193609

10 years agoAdd a missing lit-test expectation (forgotten to write initially?)
Timur Iskhodzhanov [Tue, 29 Oct 2013 13:29:32 +0000 (13:29 +0000)]
Add a missing lit-test expectation (forgotten to write initially?)

llvm-svn: 193608

10 years agoUse LLVMLibsOptions intead of LDFLAGS when setting the libclang soname. This allows...
Sylvestre Ledru [Tue, 29 Oct 2013 13:01:41 +0000 (13:01 +0000)]
Use LLVMLibsOptions intead of LDFLAGS when setting the libclang soname. This allows 'make LDFLAGS=foo' to be set correctly (and matches the way it is done with libllvm and liblldb)

llvm-svn: 193607

10 years agoARM: fix AST for __builtin_arm_strex call
Tim Northover [Tue, 29 Oct 2013 12:32:58 +0000 (12:32 +0000)]
ARM: fix AST for __builtin_arm_strex call

The AST was constructed so that this builtin returned the default BoolTy and
since I'd opted for custom SemaChecking, I should have set it properly at that
point.

This caused an assertion failure when the types didn't match up with what we
generated. This makes it return an IntTy, which is as good as anything.

llvm-svn: 193606

10 years agoclang-format: Fix overloaded operator for global-scoped conversions.
Daniel Jasper [Tue, 29 Oct 2013 12:24:23 +0000 (12:24 +0000)]
clang-format: Fix overloaded operator for global-scoped conversions.

Before:
  operator::A();

After:
  operator ::A();

llvm-svn: 193605

10 years agoQuick-fix DebugInfo build on Windows
Timur Iskhodzhanov [Tue, 29 Oct 2013 12:13:22 +0000 (12:13 +0000)]
Quick-fix DebugInfo build on Windows

MSVC can't comprehend
  template<typename T, size_t N>
  ArrayRef<T> makeArrayRef(const T (&Arr)[N]) {
    return ArrayRef<T>(Arr);
  }
if Arr is
  static const uint8_t sizes[];
declared in a templated and defined a few lines later.

I'll send a proper fix (i.e. get rid of unnecessary templates) for review soon.

llvm-svn: 193604

10 years agoFix a typo in my family name. Tobias: ;)
Sylvestre Ledru [Tue, 29 Oct 2013 11:05:18 +0000 (11:05 +0000)]
Fix a typo in my family name. Tobias: ;)

llvm-svn: 193603

10 years agotsan/asan: support pthread_setname_np to set thread names
Dmitry Vyukov [Tue, 29 Oct 2013 10:30:39 +0000 (10:30 +0000)]
tsan/asan: support pthread_setname_np to set thread names

llvm-svn: 193602

10 years agoTeach the driver to not try to use 'lib32' multilib spellings on ARM
Chandler Carruth [Tue, 29 Oct 2013 10:27:30 +0000 (10:27 +0000)]
Teach the driver to not try to use 'lib32' multilib spellings on ARM
which doesn't use that multilib. As a consequence, fix Clang's support
for cross compiling environments that were relying on this quirk to
ensure the correct library search path ordering.

This also re-instates the new test cases from Rafael's r193528 for
cross-compiling to ARM on Ubuntu 13.10 without any of the changes to the
existing test cases (they were no longer needed).

This solution was the result of a lot of IRC debugging and trying to
understand *exactly* what quirk was being relied upon. It took some time
for me to figure out that it was the use of 'lib32' is a multilib that
was throwing a wrench in the works.

In case you are thinking that its silly to use a multilib of 'lib' at
all, entertainingly, GCC does so as well (you can see it with the
.../lib/../lib/crt1.o pattern it uses), and the 2-phase sequence of
search paths (multilib followed by non-multilib) has observable (if
dubious) consequences. =/ Yuck.

llvm-svn: 193601

10 years agoARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clang
Bernard Ogden [Tue, 29 Oct 2013 09:47:51 +0000 (09:47 +0000)]
ARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clang

Allow users to disable or enable CRC subtarget feature.

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

llvm-svn: 193600

10 years agoARM: Add subtarget feature for CRC
Bernard Ogden [Tue, 29 Oct 2013 09:47:35 +0000 (09:47 +0000)]
ARM: Add subtarget feature for CRC

Adds a subtarget feature for the CRC instructions (optional in v8-A) to the ARM (32-bit) backend.

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

llvm-svn: 193599