platform/upstream/llvm.git
10 years agoImprove comments for r211040
Louis Gerbarg [Mon, 16 Jun 2014 20:31:50 +0000 (20:31 +0000)]
Improve comments for r211040

Added comment to clarify why we r211040 choose to bail out of fast isel instead
of generating a more complicated relocation, and fix mislabelled register in the
comments of the asan test case.

llvm-svn: 211052

10 years agoCheck that the directory does not exist.
Sylvestre Ledru [Mon, 16 Jun 2014 20:31:15 +0000 (20:31 +0000)]
Check that the directory does not exist.
Otherwise, it could allows local users to obtain sensitive information or
overwrite arbitrary files via a symlink attack on temporary directories with
predictable names.

Reported as CVE-2014-2893 ( https://security-tracker.debian.org/tracker/CVE-2014-2893 )
Found by Jakub Wilk

llvm-svn: 211051

10 years ago[modules] When we merge redecl chains or mark a decl used with an update
Richard Smith [Mon, 16 Jun 2014 20:26:19 +0000 (20:26 +0000)]
[modules] When we merge redecl chains or mark a decl used with an update
record, mark all subsequent decls as 'used' too, to maintain the AST invariant
that getPreviousDecl()->Used implies this->Used.

llvm-svn: 211050

10 years agoRevert "clctypes.h: Don't rely on stddef.h for size_t and ptrdiff_t"
Aaron Watry [Mon, 16 Jun 2014 20:21:19 +0000 (20:21 +0000)]
Revert "clctypes.h: Don't rely on stddef.h for size_t and ptrdiff_t"

This reverts commit 4cf021ae67b6ea8cfd42aa76ce6f5e1c329e145a.

llvm-svn: 211049

10 years agoRevert "lit: warn when passed invalid pathname" (r210597)
Hans Wennborg [Mon, 16 Jun 2014 20:18:41 +0000 (20:18 +0000)]
Revert "lit: warn when passed invalid pathname" (r210597)

It was pointed out that this breaks the "virtual test discovery"
mechanism, which allows for narming tests in the test exec root.

Reverting until I can figure out how to fix this.

llvm-svn: 211048

10 years agomath: Implement mix builtin
Aaron Watry [Mon, 16 Jun 2014 19:53:59 +0000 (19:53 +0000)]
math: Implement mix builtin

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211047

10 years agorelational: Add isequal(floatN) builtin
Aaron Watry [Mon, 16 Jun 2014 19:53:57 +0000 (19:53 +0000)]
relational: Add isequal(floatN) builtin

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211046

10 years agoAdd all(igentype) builtin
Aaron Watry [Mon, 16 Jun 2014 19:53:54 +0000 (19:53 +0000)]
Add all(igentype) builtin

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211045

10 years agoclctypes.h: Don't rely on stddef.h for size_t and ptrdiff_t
Aaron Watry [Mon, 16 Jun 2014 19:53:52 +0000 (19:53 +0000)]
clctypes.h: Don't rely on stddef.h for size_t and ptrdiff_t

llvm-svn: 211044

10 years agoDon't allow two threads to create/use the section list before it has been fully popul...
Greg Clayton [Mon, 16 Jun 2014 19:44:24 +0000 (19:44 +0000)]
Don't allow two threads to create/use the section list before it has been fully populated.

<rdar://problem/16937203>

llvm-svn: 211043

10 years agoARM: implement correct atomic operations on v7M
Tim Northover [Mon, 16 Jun 2014 18:49:36 +0000 (18:49 +0000)]
ARM: implement correct atomic operations on v7M

ARM v7M has ldrex/strex but not ldrexd/strexd. This means 32-bit
operations should work as normal, but 64-bit ones are almost certainly
doomed.

Patch by Phoebe Buckheister.

llvm-svn: 211042

10 years agoMS ABI: Implement x86_64 RTTI
David Majnemer [Mon, 16 Jun 2014 18:46:51 +0000 (18:46 +0000)]
MS ABI: Implement x86_64 RTTI

Summary:
The RTTI scheme for x86_64 is largely the same as the one for i386.

Differences are largely limited to avoiding load-time relocations by
replacing pointers to RTTI metadata with the difference of that data
relative to the load address of the module.

Interestingly, this precludes the possibility of successfully using RTTI
data from another DLL.  The ImageBase reference is always relative to
the current DLL.

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

llvm-svn: 211041

10 years agoFix illegal relocations in X86FastISel
Louis Gerbarg [Mon, 16 Jun 2014 17:35:40 +0000 (17:35 +0000)]
Fix illegal relocations in X86FastISel

On x86_86  the lea instruction can only use a 32 bit immediate value. When
the code is compiled statically the RIP register is not used, meaning the
immediate is all that can be used for the relocation, which is not sufficient
in the case of targets more than +/- 2GB away. This patch bails out of fast
isel in those cases and reverts to DAG which does the right thing.

Test case included.

llvm-svn: 211040

10 years agoObjective-C. Diagnose when property access is using declared
Fariborz Jahanian [Mon, 16 Jun 2014 17:25:41 +0000 (17:25 +0000)]
Objective-C. Diagnose when property access is using declared
property accessor methods which have become deprecated
or available. // rdar://15951801

llvm-svn: 211039

10 years agoLowerSwitch: track bounding range for the condition tree.
Jim Grosbach [Mon, 16 Jun 2014 16:55:20 +0000 (16:55 +0000)]
LowerSwitch: track bounding range for the condition tree.

When LowerSwitch transforms a switch instruction into a tree of ifs it
is actually performing a binary search into the various case ranges, to
see if the current value falls into one cases range of values.

So, if we have a program with something like this:

switch (a) {
case 0:
  do0();
  break;
case 1:
  do1();
  break;
case 2:
  do2();
  break;
default:
  break;
}

the code produced is something like this:

  if (a < 1) {
    if (a == 0) {
      do0();
    }
  } else {
    if (a < 2) {
      if (a == 1) {
        do1();
      }
    } else {
      if (a == 2) {
        do2();
      }
    }
  }

This code is inefficient because the check (a == 1) to execute do1() is
not needed.

The reason is that because we already checked that (a >= 1) initially by
checking that also  (a < 2) we basically already inferred that (a == 1)
without the need of an extra basic block spawned to check if actually (a
== 1).

The patch addresses this problem by keeping track of already
checked bounds in the LowerSwitch algorithm, so that when the time
arrives to produce a Leaf Block that checks the equality with the case
value / range the algorithm can decide if that block is really needed
depending on the already checked bounds .

For example, the above with "a = 1" would work like this:

the bounds start as LB: NONE , UB: NONE
as (a < 1) is emitted the bounds for the else path become LB: 1 UB:
NONE. This happens because by failing the test (a < 1) we know that the
value "a" cannot be smaller than 1 if we enter the else branch.
After the emitting the check (a < 2) the bounds in the if branch become
LB: 1 UB: 1. This is because by checking that "a" is smaller than 2 then
the upper bound becomes 2 - 1 = 1.

When it is time to emit the leaf block for "case 1:" we notice that 1
can be squeezed exactly in between the LB and UB, which means that if we
arrived to that block there is no need to emit a block that checks if (a
== 1).

Patch by: Marcello Maggioni <hayarms@gmail.com>

llvm-svn: 211038

10 years agoRefactor the disabling of Thumb-1 LDM/STM generation
James Molloy [Mon, 16 Jun 2014 16:42:53 +0000 (16:42 +0000)]
Refactor the disabling of Thumb-1 LDM/STM generation

Originally I switched the LD/ST optimizer off in TargetMachine as it was previously, but Eric has suggested he'd prefer that it be short-circuited in the pass itself.

No functionality change.

llvm-svn: 211037

10 years agoFix pr17056.
Rafael Espindola [Mon, 16 Jun 2014 16:41:00 +0000 (16:41 +0000)]
Fix pr17056.

This makes llvm-nm ignore members that are not sufficiently aligned for
lib/Object to handle.

These archives are invalid. GNU AR is able to handle this, but in general
just warns about broken archive members.

We should probably start warning too, but for now just make sure llvm-nm
exits with an 0.

llvm-svn: 211036

10 years agobuiltins: add it blocks for Thumb-2
Saleem Abdulrasool [Mon, 16 Jun 2014 16:36:25 +0000 (16:36 +0000)]
builtins: add it blocks for Thumb-2

Add the missing IT-blocks for Thumb-2 compilation for code paths exercised by
older ARM CPUs.  This should fix the buildbots.

llvm-svn: 211035

10 years agoUpdate for llvm api change.
Rafael Espindola [Mon, 16 Jun 2014 16:09:08 +0000 (16:09 +0000)]
Update for llvm api change.

llvm-svn: 211034

10 years agoConvert the Archive API to use ErrorOr.
Rafael Espindola [Mon, 16 Jun 2014 16:08:36 +0000 (16:08 +0000)]
Convert the Archive API to use ErrorOr.

Now that we have c++11, even things like ErrorOr<std::unique_ptr<...>> are
easy to use.

No intended functionality change.

llvm-svn: 211033

10 years agocompiler-rt: prefer thumb over ARM
Saleem Abdulrasool [Mon, 16 Jun 2014 16:05:24 +0000 (16:05 +0000)]
compiler-rt: prefer thumb over ARM

When possible, use Thumb or Thumb-2 over ARM instructions.  This is particularly
important for pure-Thumb environments (e.g. Windows on ARM).  Although, it is
possible to conditionalise this for that target specifically, this is available
on most newer ARM CPUs, and the code remains compatible with older CPUs with no
adverse effects.  It therefore feels better to always prefer Thumb when
possible.

llvm-svn: 211032

10 years ago[C++1z] Implement N4051: 'typename' is permitted instead of 'class' when declaring...
Richard Smith [Mon, 16 Jun 2014 15:51:22 +0000 (15:51 +0000)]
[C++1z] Implement N4051: 'typename' is permitted instead of 'class' when declaring a template template parameter.

llvm-svn: 211031

10 years agoAdd -std=c++1z flag for C++17 features.
Richard Smith [Mon, 16 Jun 2014 15:16:56 +0000 (15:16 +0000)]
Add -std=c++1z flag for C++17 features.

llvm-svn: 211030

10 years ago[AArch64] Remove dead code.
Tilmann Scheller [Mon, 16 Jun 2014 15:15:41 +0000 (15:15 +0000)]
[AArch64] Remove dead code.

Both function declarations lack a callee and an implementation.

llvm-svn: 211029

10 years ago[cmake] Switch python install to use an 'install(DIRECTORY...)' cmake
Chandler Carruth [Mon, 16 Jun 2014 15:02:21 +0000 (15:02 +0000)]
[cmake] Switch python install to use an 'install(DIRECTORY...)' cmake
command instead of a script.

In addition to cleaning things up, this allows more easy access to the
variables. In the old version, it tried to pass variables as -D flags to
cmake, but this didn't actually work. CMake drops all of those arguments
on the floor (try passing garbage through them) and just picks up the
limited subset of pre-defined macros. So, for example, this fixes the
build with LLVM_LIBDIR_SUFFIX=64 which is how I ended up here. =]

llvm-svn: 211028

10 years agoSwap getdtablesize() for sysconf(_SC_OPEN_MAX).
Dan Albert [Mon, 16 Jun 2014 14:51:11 +0000 (14:51 +0000)]
Swap getdtablesize() for sysconf(_SC_OPEN_MAX).

Bionic is no removing this as it was removed from POSIX 2004.

llvm-svn: 211027

10 years agoMove x86-specific struct user code for Linux ProcessMonitor behind #define guards.
Todd Fiala [Mon, 16 Jun 2014 14:49:28 +0000 (14:49 +0000)]
Move x86-specific struct user code for Linux ProcessMonitor behind #define guards.

See http://reviews.llvm.org/D4092 for details.

Change by Paul Osmialowski.  (Minor tweaks to the comment by Todd.)

llvm-svn: 211026

10 years agoFix typos
Alp Toker [Mon, 16 Jun 2014 14:23:44 +0000 (14:23 +0000)]
Fix typos

llvm-svn: 211025

10 years agoHook up vector int_ctlz for AVX512.
Cameron McInally [Mon, 16 Jun 2014 14:12:28 +0000 (14:12 +0000)]
Hook up vector int_ctlz for AVX512.

llvm-svn: 211024

10 years agoUse the ShowInSystemHeader bit consistently for all diagnostics
Alp Toker [Mon, 16 Jun 2014 13:56:47 +0000 (13:56 +0000)]
Use the ShowInSystemHeader bit consistently for all diagnostics

By describing system header suppressions directly in tablegen we eliminate
special cases in getDiagnosticSeverity().

Dropping the reliance on builtin diagnostic classes when mapping also gets us
closer to the goal of reusing the diagnostic machinery for custom diagnostics.

No change in functionality.

llvm-svn: 211023

10 years ago[sanitizer] Support PTRACE_GETEVENTMSG in the ptrace() interceptor.
Sergey Matveev [Mon, 16 Jun 2014 13:49:13 +0000 (13:49 +0000)]
[sanitizer] Support PTRACE_GETEVENTMSG in the ptrace() interceptor.

llvm-svn: 211022

10 years ago[mips][mips64r6] ssnop is deprecated on MIPS32r6/MIPS64r6
Daniel Sanders [Mon, 16 Jun 2014 13:25:35 +0000 (13:25 +0000)]
[mips][mips64r6] ssnop is deprecated on MIPS32r6/MIPS64r6

Summary: Depends on D4120

Reviewers: jkolek, zoran.jovanovic, vmedic

Reviewed By: zoran.jovanovic, vmedic

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

llvm-svn: 211021

10 years ago[mips][mips64r6] cl[oz], and dcl[oz] are re-encoded in MIPS32r6/MIPS64r6
Daniel Sanders [Mon, 16 Jun 2014 13:18:59 +0000 (13:18 +0000)]
[mips][mips64r6] cl[oz], and dcl[oz] are re-encoded in MIPS32r6/MIPS64r6

Summary:
There is no change to the restrictions, just the result register is stored
once in the encoding rather than twice. The rt field is zero in
MIPS32r6/MIPS64r6.

Depends on D4119

Reviewers: zoran.jovanovic, jkolek, vmedic

Reviewed By: vmedic

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

llvm-svn: 211019

10 years ago[mips][mips64r6] ll, sc, lld, and scd are re-encoded on MIPS32r6/MIPS64r6.
Daniel Sanders [Mon, 16 Jun 2014 13:13:03 +0000 (13:13 +0000)]
[mips][mips64r6] ll, sc, lld, and scd are re-encoded on MIPS32r6/MIPS64r6.

Summary:
The linked-load, store-conditional operations have been re-encoded such
that have a 9-bit offset instead of the 16-bit offset they have prior to
MIPS32r6/MIPS64r6.

While implementing this, I noticed that the atomic load/store pseudos always
emit a sign extension using sll and sra. I have improved this to use seb/seh
when they are available (MIPS32r2/MIPS64r2 and above).

Depends on D4118

Reviewers: jkolek, zoran.jovanovic, vmedic

Reviewed By: vmedic

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

llvm-svn: 211018

10 years ago[Mips] Make hilo16-5.test test case independent from external input files.
Simon Atanasyan [Mon, 16 Jun 2014 11:54:42 +0000 (11:54 +0000)]
[Mips] Make hilo16-5.test test case independent from external input files.

llvm-svn: 211017

10 years agoSupport/ConvertUTF: restore compatibility with MSVC, which only implements C89
Dmitri Gribenko [Mon, 16 Jun 2014 11:22:33 +0000 (11:22 +0000)]
Support/ConvertUTF: restore compatibility with MSVC, which only implements C89

llvm-svn: 211016

10 years agoSupport/ConvertUTF: implement U+FFFD insertion according to the recommendation
Dmitri Gribenko [Mon, 16 Jun 2014 11:09:46 +0000 (11:09 +0000)]
Support/ConvertUTF: implement U+FFFD insertion according to the recommendation
given in the Unicode spec

That is, replace every maximal subpart of an ill-formed subsequence with one
U+FFFD.

llvm-svn: 211015

10 years ago[AArch64] Fix a fencepost error in lowering for llvm.aarch64.neon.uqshl.
James Molloy [Mon, 16 Jun 2014 10:39:21 +0000 (10:39 +0000)]
[AArch64] Fix a fencepost error in lowering for llvm.aarch64.neon.uqshl.

Patch by Jiangning Liu!

llvm-svn: 211014

10 years ago[mips] Merge most of the big/little endian checks in atomic.ll
Daniel Sanders [Mon, 16 Jun 2014 10:25:17 +0000 (10:25 +0000)]
[mips] Merge most of the big/little endian checks in atomic.ll

Summary:
There is very little difference between the big and little endian cases in
test/CodeGen/Mips/atomic.ll. Merge them together using multiple
FileCheck prefixes.

Depends on D4117

Reviewers: jkolek, zoran.jovanovic, vmedic

Reviewed By: vmedic

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

llvm-svn: 211013

10 years ago[mips][mips64r6] [ls][wd]c2 were re-encoded with 11-bit signed immediates rather...
Daniel Sanders [Mon, 16 Jun 2014 10:00:45 +0000 (10:00 +0000)]
[mips][mips64r6] [ls][wd]c2 were re-encoded with 11-bit signed immediates rather than 16-bit in MIPS32r6/MIPS64r6

Summary:
The error message for the invalid.s cases isn't very helpful. It happens because
there is an instruction with a wider immediate that would have matched if the
NotMips32r6 predicate were true. I have some WIP to improve the message but it
affects most error messages for removed/re-encoded instructions on
MIPS32r6/MIPS64r6 and should therefore be a separate commit.

Depens on D4115

Reviewers: zoran.jovanovic, jkolek, vmedic

Reviewed By: vmedic

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

llvm-svn: 211012

10 years agoclang/AST/OpenMPClause.h: Update \param VL. [-Wdocumentation]
NAKAMURA Takumi [Mon, 16 Jun 2014 09:33:34 +0000 (09:33 +0000)]
clang/AST/OpenMPClause.h: Update \param VL. [-Wdocumentation]

llvm-svn: 211011

10 years agoARMEB: Fix trunc store for vector types
Christian Pirker [Mon, 16 Jun 2014 09:17:30 +0000 (09:17 +0000)]
ARMEB: Fix trunc store for vector types

Reviewed at http://reviews.llvm.org/D4135

llvm-svn: 211010

10 years agoAdd Guan-Hong Liu.
Joerg Sonnenberger [Mon, 16 Jun 2014 08:38:19 +0000 (08:38 +0000)]
Add Guan-Hong Liu.

llvm-svn: 211009

10 years ago[asan] initialze varaibles to avoid a (false positive) report from gcc's -Wmaybe...
Kostya Serebryany [Mon, 16 Jun 2014 08:32:02 +0000 (08:32 +0000)]
[asan] initialze varaibles to avoid a (false positive) report from gcc's -Wmaybe-uninitialized

llvm-svn: 211008

10 years ago[OPENMP] Initial support of 'reduction' clause
Alexey Bataev [Mon, 16 Jun 2014 07:08:35 +0000 (07:08 +0000)]
[OPENMP] Initial support of 'reduction' clause

llvm-svn: 211007

10 years agoMinor gdb-remote test QListThreadsInStopReply changes from llgs branch.
Todd Fiala [Sun, 15 Jun 2014 23:33:09 +0000 (23:33 +0000)]
Minor gdb-remote test QListThreadsInStopReply changes from llgs branch.

llvm-svn: 211006

10 years agoHide the concept of diagnostic levels from lex, parse and sema
Alp Toker [Sun, 15 Jun 2014 23:30:39 +0000 (23:30 +0000)]
Hide the concept of diagnostic levels from lex, parse and sema

The compilation pipeline doesn't actually need to know about the high-level
concept of diagnostic mappings, and hiding the final computed level presents
several simplifications and other potential benefits.

The only exceptions are opportunistic checks to see whether expensive code
paths can be avoided for diagnostics that are guaranteed to be ignored at a
certain SourceLocation.

This commit formalizes that invariant by introducing and using
DiagnosticsEngine::isIgnored() in place of individual level checks throughout
lex, parse and sema.

llvm-svn: 211005

10 years agoCanonicalize addrspacecast ConstExpr between different pointer types
Jingyue Wu [Sun, 15 Jun 2014 21:40:57 +0000 (21:40 +0000)]
Canonicalize addrspacecast ConstExpr between different pointer types

As a follow-up to r210375 which canonicalizes addrspacecast
instructions, this patch canonicalizes addrspacecast constant
expressions.

Given clang uses ConstantExpr::getAddrSpaceCast to emit addrspacecast
cosntant expressions, this patch is also a step towards having the
frontend emit canonicalized addrspacecasts.

Piggyback a minor refactor in InstCombineCasts.cpp

Update three affected tests in addrspacecast-alias.ll,
access-non-generic.ll and constant-fold-gep.ll and added one new test in
constant-fold-address-space-pointer.ll

llvm-svn: 211004

10 years agoFix copy paste error
Matt Arsenault [Sun, 15 Jun 2014 21:22:52 +0000 (21:22 +0000)]
Fix copy paste error

llvm-svn: 211003

10 years agoR600: Add a rotr testcase I forgot to add
Matt Arsenault [Sun, 15 Jun 2014 21:09:00 +0000 (21:09 +0000)]
R600: Add a rotr testcase I forgot to add

llvm-svn: 211002

10 years agoR600: Remove a few more things from AMDILISelLowering
Matt Arsenault [Sun, 15 Jun 2014 21:08:58 +0000 (21:08 +0000)]
R600: Remove a few more things from AMDILISelLowering

Try to keep all the setOperationActions for integer ops
together.

llvm-svn: 211001

10 years agoR600: Fix assert on vector sdiv
Matt Arsenault [Sun, 15 Jun 2014 21:08:54 +0000 (21:08 +0000)]
R600: Fix assert on vector sdiv

llvm-svn: 211000

10 years agoR600: Move / cleanup more leftover AMDIL stuff.
Matt Arsenault [Sun, 15 Jun 2014 20:23:38 +0000 (20:23 +0000)]
R600: Move / cleanup more leftover AMDIL stuff.

llvm-svn: 210998

10 years agoR600: Move division custom lowering out of AMDILISelLowering
Matt Arsenault [Sun, 15 Jun 2014 20:08:02 +0000 (20:08 +0000)]
R600: Move division custom lowering out of AMDILISelLowering

llvm-svn: 210997

10 years agoTemporarily revert r210953 in an attempt to bring the ARM buildbots
Eric Christopher [Sun, 15 Jun 2014 19:55:14 +0000 (19:55 +0000)]
Temporarily revert r210953 in an attempt to bring the ARM buildbots
back.

llvm-svn: 210996

10 years agoR600: Report that integer division is expensive.
Matt Arsenault [Sun, 15 Jun 2014 19:48:16 +0000 (19:48 +0000)]
R600: Report that integer division is expensive.

Divides by weird constants now emit much better code.

llvm-svn: 210995

10 years agoR600: Remove dead code
Matt Arsenault [Sun, 15 Jun 2014 19:48:13 +0000 (19:48 +0000)]
R600: Remove dead code

llvm-svn: 210994

10 years agoPR20038: DebugInfo missing DIEs for some concrete variables.
David Blaikie [Sun, 15 Jun 2014 19:34:26 +0000 (19:34 +0000)]
PR20038: DebugInfo missing DIEs for some concrete variables.

I haven't nailed this down entirely, but this is about as small of a
test case as I can seem to construct and adequately demonstrates the
crasher. I'll continue investigating the root cause/fix(es).

llvm-svn: 210993

10 years agotest: add missed file in previous commit
Saleem Abdulrasool [Sun, 15 Jun 2014 18:48:41 +0000 (18:48 +0000)]
test: add missed file in previous commit

llvm-svn: 210992

10 years agoPreprocessor: improve ACLE 6.4.1, 6.4.2 support
Saleem Abdulrasool [Sun, 15 Jun 2014 18:35:07 +0000 (18:35 +0000)]
Preprocessor: improve ACLE 6.4.1, 6.4.2 support

This improves conformance with ACLE 6.4.1.  Define additional macros that
indicate support for the ARM and Thumb instruction set architecture.  This
includes the following set of macros:

  __ARM_ARCH
  __ARM_ARCH_ISA_ARM
  __ARM_ARCH_ISA_THUMB
  __ARM_32BIT_STATE

These help identify the environment that the code is intended to execute on.

Adjust the handling for ACLE 6.4.2 to be more correct.  We would define the
profile as a free-standing token rather than a quoted single character.

llvm-svn: 210991

10 years agoAdd specialization of FoldingSetTrait for std::pair.
Manuel Klimek [Sun, 15 Jun 2014 14:42:25 +0000 (14:42 +0000)]
Add specialization of FoldingSetTrait for std::pair.

llvm-svn: 210990

10 years agoFix building InstrProfilingFile.c on FreeBSD
Viktor Kutuzov [Sun, 15 Jun 2014 14:01:18 +0000 (14:01 +0000)]
Fix building InstrProfilingFile.c on FreeBSD

llvm-svn: 210989

10 years agoFix getting IP, BP and SP for address sanitizer's needs on FreeBSD in 32-bit mode
Viktor Kutuzov [Sun, 15 Jun 2014 13:56:28 +0000 (13:56 +0000)]
Fix getting IP, BP and SP for address sanitizer's needs on FreeBSD in 32-bit mode

llvm-svn: 210988

10 years ago[Mips] Make gp-sym-2.test test case independent from external input files.
Simon Atanasyan [Sun, 15 Jun 2014 12:04:40 +0000 (12:04 +0000)]
[Mips] Make gp-sym-2.test test case independent from external input files.

llvm-svn: 210987

10 years agoLegalizeDAG: make sure cast is unsigned before using FP_TO_UINT.
Tim Northover [Sun, 15 Jun 2014 09:27:20 +0000 (09:27 +0000)]
LegalizeDAG: make sure cast is unsigned before using FP_TO_UINT.

It's valid to use FP_TO_SINT when asking for a smaller type (e.g. all
"unsigned int16" values fit into a "signed int32"), but the reverse
isn't true.

Unfortunately, I'm not actually aware of any architecture with
asymmetric FP_TO_SINT and FP_TO_UINT handling and the logic happens to
work in the symmetric case, so I can't actually write a test for this.

llvm-svn: 210986

10 years agoAArch64: improve handling & modelling of FP_TO_XINT nodes.
Tim Northover [Sun, 15 Jun 2014 09:27:15 +0000 (09:27 +0000)]
AArch64: improve handling & modelling of FP_TO_XINT nodes.

There's probably no acatual change in behaviour here, just updating
the LowerFP_TO_INT function to be more similar to the reverse
implementation and updating costs to current CodeGen.

llvm-svn: 210985

10 years agoAArch64: improve vector [su]itofp handling.
Tim Northover [Sun, 15 Jun 2014 09:27:06 +0000 (09:27 +0000)]
AArch64: improve vector [su]itofp handling.

This somehow got missed in the AArch64 merge, so should fix a
performance regression since 3.4.

llvm-svn: 210984

10 years agoDon't expect tests always crashing. Add "REQUIRES:asserts".
NAKAMURA Takumi [Sun, 15 Jun 2014 01:01:11 +0000 (01:01 +0000)]
Don't expect tests always crashing. Add "REQUIRES:asserts".

llvm-svn: 210983

10 years agoAdded several gdb-remote tests around QListThreadsInStopReply.
Todd Fiala [Sat, 14 Jun 2014 22:00:36 +0000 (22:00 +0000)]
Added several gdb-remote tests around QListThreadsInStopReply.

llvm-svn: 210982

10 years ago[Mips] Make gp-sym-1.test test case independent from external input files.
Simon Atanasyan [Sat, 14 Jun 2014 21:18:50 +0000 (21:18 +0000)]
[Mips] Make gp-sym-1.test test case independent from external input files.

llvm-svn: 210981

10 years agoReplacing the private implementations of SwapValue with calls to sys::swapByteOrder()
Artyom Skrobov [Sat, 14 Jun 2014 13:49:57 +0000 (13:49 +0000)]
Replacing the private implementations of SwapValue with calls to sys::swapByteOrder()

llvm-svn: 210980

10 years agoUsing llvm::sys::swapByteOrder() for the common case of byte-swapping a value in...
Artyom Skrobov [Sat, 14 Jun 2014 13:26:14 +0000 (13:26 +0000)]
Using llvm::sys::swapByteOrder() for the common case of byte-swapping a value in place

llvm-svn: 210979

10 years agoUsing llvm::sys::swapByteOrder() for the common case of byte-swapping a value in...
Artyom Skrobov [Sat, 14 Jun 2014 13:18:07 +0000 (13:18 +0000)]
Using llvm::sys::swapByteOrder() for the common case of byte-swapping a value in place

llvm-svn: 210978

10 years ago[Mips] Make exe-got.test test case independent from external input files.
Simon Atanasyan [Sat, 14 Jun 2014 12:55:03 +0000 (12:55 +0000)]
[Mips] Make exe-got.test test case independent from external input files.

llvm-svn: 210977

10 years agoAdding llvm::sys::swapByteOrder() for the common use-case of byte-swapping a value...
Artyom Skrobov [Sat, 14 Jun 2014 12:52:55 +0000 (12:52 +0000)]
Adding llvm::sys::swapByteOrder() for the common use-case of byte-swapping a value in place

llvm-svn: 210976

10 years agoLeft two files out of the previous commit
Artyom Skrobov [Sat, 14 Jun 2014 12:40:04 +0000 (12:40 +0000)]
Left two files out of the previous commit

llvm-svn: 210975

10 years agollvm::sys::SwapByteOrder() renamed to llvm::sys::getSwappedBytes()
Artyom Skrobov [Sat, 14 Jun 2014 12:14:25 +0000 (12:14 +0000)]
llvm::sys::SwapByteOrder() renamed to llvm::sys::getSwappedBytes()

Further to this, llvm::sys::swapByteOrder() will be added, acting in-place

llvm-svn: 210974

10 years agoRenaming SwapByteOrder() to getSwappedBytes()
Artyom Skrobov [Sat, 14 Jun 2014 11:36:01 +0000 (11:36 +0000)]
Renaming SwapByteOrder() to getSwappedBytes()

The next commit will add swapByteOrder(), acting in-place

llvm-svn: 210973

10 years agoOne of our buildbot for FreeBSD does not support std::to_string.
Sylvestre Ledru [Sat, 14 Jun 2014 09:28:27 +0000 (09:28 +0000)]
One of our buildbot for FreeBSD does not support std::to_string.
Use stringstream instead to convert int to string

llvm-svn: 210972

10 years agoList the function/method name in the index page of scan-build
Sylvestre Ledru [Sat, 14 Jun 2014 08:49:40 +0000 (08:49 +0000)]
List the function/method name in the index page of scan-build

llvm-svn: 210971

10 years agoWith the option '-analyzer-config stable-report-filename=true',
Sylvestre Ledru [Sat, 14 Jun 2014 08:45:32 +0000 (08:45 +0000)]
With the option '-analyzer-config stable-report-filename=true',
instead of report-XXXXXX.html, scan-build/clang analyzer generate
report-<filename>-<function, method name>-<function position>-<id>.html.
(id = i++ for several issues found in the same function/method)

llvm-svn: 210970

10 years agoR600: Add failing testcases.
Matt Arsenault [Sat, 14 Jun 2014 04:26:09 +0000 (04:26 +0000)]
R600: Add failing testcases.

These are reduced from assert in the
OpenCV CvtColor8u.BGR5652GRAY test.

llvm-svn: 210969

10 years agoFix typo
Matt Arsenault [Sat, 14 Jun 2014 04:26:07 +0000 (04:26 +0000)]
Fix typo

llvm-svn: 210968

10 years agoR600: Fix asserts related to constant initializers
Matt Arsenault [Sat, 14 Jun 2014 04:26:05 +0000 (04:26 +0000)]
R600: Fix asserts related to constant initializers

This would assert if a constant address space was extern
and therefore didn't have an initializer. If the initializer
was undef, it would hit the unreachable unhandled initializer case.

An extern global should never really occur since we don't have
machine linking, but bugpoint likes to remove initializers.

llvm-svn: 210967

10 years agoR600: Use address space enum instead of value
Matt Arsenault [Sat, 14 Jun 2014 04:26:01 +0000 (04:26 +0000)]
R600: Use address space enum instead of value

llvm-svn: 210966

10 years agoRemove extra whitespace in function declaration. No functionality change.
Nick Lewycky [Sat, 14 Jun 2014 03:48:29 +0000 (03:48 +0000)]
Remove extra whitespace in function declaration. No functionality change.

llvm-svn: 210965

10 years agoProperly terminated POSIX register sets with LLDB_INVALID_REGNUM.
Todd Fiala [Sat, 14 Jun 2014 03:13:01 +0000 (03:13 +0000)]
Properly terminated POSIX register sets with LLDB_INVALID_REGNUM.

RegisterSets are assumed to be terminated by this value.  Loops over
register set values would fail without LLDB_INVALID_REGNUM terminating
the list.  This change adjusts the static check to account for the
size of the register set regnum list being one larger than the expected
valid register set count.

llvm-svn: 210964

10 years agoAdded gdb-remote expedited register dupe check.
Todd Fiala [Sat, 14 Jun 2014 03:03:23 +0000 (03:03 +0000)]
Added gdb-remote expedited register dupe check.

The llgs branch had a bug where register sets were not terminated with
LLDB_INVALID_REGNUM so the expedite register loop was issuing duplicate
registers.  This test was added to catch the problem.

Enhanced the key-val collection method to optionally (and by default)
support capturing duplicate values for a given key.  When that happens
and if permitted, it promotes a single key to a list and appends values
to it.

llvm-svn: 210963

10 years agoExclude Android from the tests for valloc/pvalloc.
Dan Albert [Sat, 14 Jun 2014 00:50:03 +0000 (00:50 +0000)]
Exclude Android from the tests for valloc/pvalloc.

These functions are being removed from Android because they were removed
from POSIX 2004.

llvm-svn: 210962

10 years agoDebugInfo: Remove some extra handling of abstract variables and instead rely solely...
David Blaikie [Fri, 13 Jun 2014 23:52:55 +0000 (23:52 +0000)]
DebugInfo: Remove some extra handling of abstract variables and instead rely solely on the delayed handling introduced in r210946

Now that we handle finding abstract variables at the end of the module,
remove the upfront handling and just ensure the abstract variable is
built when necessary.

In theory we could have a split implementation, where inlined variables
are immediately constructed referencing the abstract definition, and
concrete variables are delayed - but let's go with one solution for now
unless there's a reason not to.

llvm-svn: 210961

10 years agoFix a crash in Retain Count checker error reporting
Anna Zaks [Fri, 13 Jun 2014 23:47:38 +0000 (23:47 +0000)]
Fix a crash in Retain Count checker error reporting

Fixes a crash in Retain Count checker error reporting logic by handing
the allocation statement retrieval from a BlockEdge program point.

Also added a simple CFG dump routine for debugging.

llvm-svn: 210960

10 years ago[Sanitizer] Merge AnsiColorDecorator and SanitizerCommonDecorator, use the latter...
Alexey Samsonov [Fri, 13 Jun 2014 23:46:37 +0000 (23:46 +0000)]
[Sanitizer] Merge AnsiColorDecorator and SanitizerCommonDecorator, use the latter in UBSan

llvm-svn: 210959

10 years agoDocument Darwin-specific defaults.
Adrian Prantl [Fri, 13 Jun 2014 23:35:54 +0000 (23:35 +0000)]
Document Darwin-specific defaults.

llvm-svn: 210958

10 years agoSync accumulated minor diffs in llgs branch gdb-remote tests.
Todd Fiala [Fri, 13 Jun 2014 23:34:17 +0000 (23:34 +0000)]
Sync accumulated minor diffs in llgs branch gdb-remote tests.

I've been making some subtle changes to the gdb-remote tests as I implement
them in the llgs branch.  This check-in rectifies the set of diffs that
have accumulated in the llgs branch that were not present upstream.

llvm-svn: 210957

10 years agoRemove InstrItineraryData off of the TargetMachine - it's already
Eric Christopher [Fri, 13 Jun 2014 23:11:13 +0000 (23:11 +0000)]
Remove InstrItineraryData off of the TargetMachine - it's already
on the subtarget and just forward the accessor.

llvm-svn: 210955

10 years agoA non-trivial array-fill expression isn't necessarily a CXXConstructExpr. It
Richard Smith [Fri, 13 Jun 2014 23:04:49 +0000 (23:04 +0000)]
A non-trivial array-fill expression isn't necessarily a CXXConstructExpr. It
could be an InitListExpr that runs constructors in C++11 onwards. Fixes a
recent regression (introduced in r210091).

llvm-svn: 210954

10 years agoMove ARMJITInfo off of the TargetMachine and down onto the subtarget.
Eric Christopher [Fri, 13 Jun 2014 23:04:46 +0000 (23:04 +0000)]
Move ARMJITInfo off of the TargetMachine and down onto the subtarget.
This required untangling a mess of headers that included around.

llvm-svn: 210953

10 years agoComplete remove test/Transforms/GlobalMerge.
Jiangning Liu [Fri, 13 Jun 2014 23:00:36 +0000 (23:00 +0000)]
Complete remove test/Transforms/GlobalMerge.

llvm-svn: 210952

10 years agoMove GlobalMerge from Transform to CodeGen.
Jiangning Liu [Fri, 13 Jun 2014 22:57:59 +0000 (22:57 +0000)]
Move GlobalMerge from Transform to CodeGen.

This patch is to move GlobalMerge pass from Transform/Scalar
to CodeGen, because GlobalMerge depends on TargetMachine.
In the mean time, the macro INITIALIZE_TM_PASS is also moved
to CodeGen/Passes.h. With this fix we can avoid making
libScalarOpts depend on libCodeGen.

llvm-svn: 210951

10 years ago[UBSan] Respect runtime flag for colorizing reports
Alexey Samsonov [Fri, 13 Jun 2014 22:48:40 +0000 (22:48 +0000)]
[UBSan] Respect runtime flag for colorizing reports

llvm-svn: 210950