platform/upstream/llvm.git
9 years agoR600/SI: Add test for min / max with immediate
Matt Arsenault [Fri, 13 Mar 2015 16:43:48 +0000 (16:43 +0000)]
R600/SI: Add test for min / max with immediate

Make sure this isn't getting confused by canonicalizations
of comparisons with a constant.

llvm-svn: 232177

9 years agoConstantFold: Fix big shift constant folding
David Majnemer [Fri, 13 Mar 2015 16:39:46 +0000 (16:39 +0000)]
ConstantFold: Fix big shift constant folding

Constant folding for shift IR instructions ignores all bits above 32 of
second argument (shift amount).
Because of that, some undef results are not recognized and APInt can
raise an assert failure if second argument has more than 64 bits.

Patch by PaweÅ‚ Bylica!

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

llvm-svn: 232176

9 years ago[CMake] Make LLDBWrapPython.cpp depend on the .swig files.
Zachary Turner [Fri, 13 Mar 2015 16:31:58 +0000 (16:31 +0000)]
[CMake] Make LLDBWrapPython.cpp depend on the .swig files.

Previously it would only regenerate LLDBWrapPython.cpp if one of
the .i files changed, or if lldb.swig changed.  This patch also
makes it depend on the rest of the *.swig files, so that if any
of them changes it regenerates the CMake.

llvm-svn: 232175

9 years agoSema: Replace the SetVector/DenseMap/std::sort combination with a simple std::map
Benjamin Kramer [Fri, 13 Mar 2015 16:10:42 +0000 (16:10 +0000)]
Sema: Replace the SetVector/DenseMap/std::sort combination with a simple std::map

This guarantees the order and doesn't increase malloc counts a lot as there are
typically very few elements int the map. Provide a little iterator adapter to
keep the same interface as we had with the flat sorted list.

No functional change intended.

llvm-svn: 232173

9 years agoFix build break on Solaris introduced by r231940
Jonathan Roelofs [Fri, 13 Mar 2015 15:09:42 +0000 (15:09 +0000)]
Fix build break on Solaris introduced by r231940

Solaris apparently doesn't have iswblank_l.

Thanks to C Bergstrom for the report!

llvm-svn: 232172

9 years agoMake TestSBFrameFindValue compatible with remote targets
Tamas Berghammer [Fri, 13 Mar 2015 14:54:42 +0000 (14:54 +0000)]
Make TestSBFrameFindValue compatible with remote targets

llvm-svn: 232171

9 years agoForward adb port for reverse connect test cases
Tamas Berghammer [Fri, 13 Mar 2015 14:32:25 +0000 (14:32 +0000)]
Forward adb port for reverse connect test cases

The test cases in TestStubReverseConnect are using a socket connection
from python to lldb-server running on a remote target. To enable the
socket connection an adb port forwarding have to be set up when the
remote target is android.

Differential revision: http://reviews.llvm.org/D8319

llvm-svn: 232170

9 years agoSkip VectorTypesFormatting test case when using gcc
Tamas Berghammer [Fri, 13 Mar 2015 14:30:42 +0000 (14:30 +0000)]
Skip VectorTypesFormatting test case when using gcc

Gcc don't support the ext_vector_type extension used by the test

llvm-svn: 232169

9 years agoWhen building a module, all headers of submodules can be used.
Daniel Jasper [Fri, 13 Mar 2015 14:29:39 +0000 (14:29 +0000)]
When building a module, all headers of submodules can be used.

This extends r232159.

llvm-svn: 232168

9 years ago[Tsan] Fix test.h to work on FreeBSD
Viktor Kutuzov [Fri, 13 Mar 2015 14:08:55 +0000 (14:08 +0000)]
[Tsan] Fix test.h to work on FreeBSD
Differential Revision: http://reviews.llvm.org/D8303

llvm-svn: 232167

9 years agoclang-format: Don't corrupt macros with open braces.
Daniel Jasper [Fri, 13 Mar 2015 13:32:11 +0000 (13:32 +0000)]
clang-format: Don't corrupt macros with open braces.

Formatting:
  #define A { {
  #define B } }

Before:
  #define A               \
    {                     \
      { #define B }       \
    }

After:
  #define A               \
    {                     \
      {
  #define B               \
    }                     \
    }

This fixes llvm.org/PR22884.

llvm-svn: 232166

9 years agoRecommit r232027 with PR22883 fixed: Add infrastructure for support of multiple memor...
Daniel Sanders [Fri, 13 Mar 2015 12:45:09 +0000 (12:45 +0000)]
Recommit r232027 with PR22883 fixed: Add infrastructure for support of multiple memory constraints.

The operand flag word for ISD::INLINEASM nodes now contains a 15-bit
memory constraint ID when the operand kind is Kind_Mem. This constraint
ID is a numeric equivalent to the constraint code string and is converted
with a target specific hook in TargetLowering.

This patch maps all memory constraints to InlineAsm::Constraint_m so there
is no functional change at this point. It just proves that using these
previously unused bits in the encoding of the flag word doesn't break
anything.

The next patch will make each target preserve the current mapping of
everything to Constraint_m for itself while changing the target independent
implementation of the hook to return Constraint_Unknown appropriately. Each
target will then be adapted in separate patches to use appropriate
Constraint_* values.

PR22883 was caused the matching operands copying the whole of the operand flags
for the matched operand. This included the constraint id which needed to be
replaced with the operand number. This has been fixed with a conversion
function. Following on from this, matching operands also used the operand
number as the constraint id. This has been fixed by looking up the matched
operand and taking it from there.

llvm-svn: 232165

9 years ago[OPENMP] Additional sema analysis for 'omp atomic[ update]'.
Alexey Bataev [Fri, 13 Mar 2015 12:27:31 +0000 (12:27 +0000)]
[OPENMP] Additional sema analysis for 'omp atomic[ update]'.
Adds additional semantic analysis + generation of helper expressions for proper codegen.

llvm-svn: 232164

9 years agoFix expectation in TestDataFormatterSynth
Tamas Berghammer [Fri, 13 Mar 2015 11:59:58 +0000 (11:59 +0000)]
Fix expectation in TestDataFormatterSynth

The value of some_values (pointer) expeced to start by 0x0 but nothing
requires that the first digit of the address be '0'.

This CL change the expectation to check only for a value starting with 0x.

llvm-svn: 232163

9 years ago[mips] [IAS] Refactor MipsTargetStreamer::emitMipsAbiFlags(). NFC.
Toma Tabacu [Fri, 13 Mar 2015 11:40:01 +0000 (11:40 +0000)]
[mips] [IAS] Refactor MipsTargetStreamer::emitMipsAbiFlags(). NFC.

Summary: Make emitMipsAbiFlags a direct member of MipsTargetELFStreamer, as that's the only place where it's used, and remove the empty implementations from MipsTargetStreamer and MipsTargetAsmStreamer.

Reviewers: dsanders, rafael

Reviewed By: rafael

Subscribers: rafael, llvm-commits

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

llvm-svn: 232161

9 years agoCreate NativeRegisterContext for android-arm64
Tamas Berghammer [Fri, 13 Mar 2015 11:36:47 +0000 (11:36 +0000)]
Create NativeRegisterContext for android-arm64

Differential revision: http://reviews.llvm.org/D8058

llvm-svn: 232160

9 years agoMake a module "use" also count as use of all its submodules
Daniel Jasper [Fri, 13 Mar 2015 11:26:16 +0000 (11:26 +0000)]
Make a module "use" also count as use of all its submodules

llvm-svn: 232159

9 years agoFix SO entry is main executable detection on android
Tamas Berghammer [Fri, 13 Mar 2015 11:16:14 +0000 (11:16 +0000)]
Fix SO entry is main executable detection on android

* On Android (at least on platfrom-21 x86) the dynamic linker reports the
  executable with its full path
* Use the platform path of the executable when storing it into the cache
  (used to identify the SO entry for the executable) as this is the path
  what will be reported by the dynamic linker. If the platform path isn't
  set (local debugging) then it falls back to the normal file path.

Differential revision: http://reviews.llvm.org/D8296

llvm-svn: 232158

9 years agoFix missing data in GetProcessInfo on linux
Tamas Berghammer [Fri, 13 Mar 2015 11:16:12 +0000 (11:16 +0000)]
Fix missing data in GetProcessInfo on linux

Fill in the missing part of the architecture in GetProcessInfo from the
HostArchitecture (e.g. Environment).

Differential revision: http://reviews.llvm.org/D8292

llvm-svn: 232157

9 years agoAdd filepath to qModuleInfo packet
Tamas Berghammer [Fri, 13 Mar 2015 11:16:08 +0000 (11:16 +0000)]
Add filepath to qModuleInfo packet

The file path is currently required on android because the executables
only contain the name of the system libraries without their path. This
CL add an extra field to the qModuleInfo packet to return the full path
of a modul and add logic to locate a shared module on android.

Differential revision: http://reviews.llvm.org/D8221

llvm-svn: 232156

9 years agoAdd code to exit the NativeProcessLinux Monitor thread on android
Tamas Berghammer [Fri, 13 Mar 2015 11:16:03 +0000 (11:16 +0000)]
Add code to exit the NativeProcessLinux Monitor thread on android

This CL change the logic used to terminate the monitor thread of
NativeProcessLinux to use a signal instead of pthread_cancel as
pthread_cancel is not supported on android.

Differential revision: http://reviews.llvm.org/D8205

llvm-svn: 232155

9 years ago[OPENMP] Re-factor __kmpc_for_static_init_* routine generation.
Alexander Musman [Fri, 13 Mar 2015 10:38:23 +0000 (10:38 +0000)]
[OPENMP] Re-factor __kmpc_for_static_init_* routine generation.

llvm-svn: 232154

9 years agoFix fetching the architecture of the target on process launch
Tamas Berghammer [Fri, 13 Mar 2015 10:32:42 +0000 (10:32 +0000)]
Fix fetching the architecture of the target on process launch

Previously it was fetched only if the architecture isn't valid, but the
architecture can be valid without containing all information about the
current target (e.g. missing os).

Differential revision: http://reviews.llvm.org/D8057

llvm-svn: 232153

9 years agoRemove non const version of GetArchitecture from Target.h
Tamas Berghammer [Fri, 13 Mar 2015 10:32:37 +0000 (10:32 +0000)]
Remove non const version of GetArchitecture from Target.h

The architecture of a target should be updated only by the
SetArchitecture method so the target can correctly manage its modules.

llvm-svn: 232152

9 years agoRespect include_inlines when looking up functions in SymbolFileDWARF
Pavel Labath [Fri, 13 Mar 2015 10:22:00 +0000 (10:22 +0000)]
Respect include_inlines when looking up functions in SymbolFileDWARF

Summary:
SymbolFileDWARF was not respecting the include_inlines argument in function lookup in all code
paths. This resulted in an attempt to call an inlined function during expression evaluation,
which is impossible, and usually resulted in a segfault in the inferior. This patch makes sure
include_inlines is respected in all code paths.

Reviewers: clayborg

Subscribers: lldb-commits, sivachandra

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

llvm-svn: 232151

9 years agoSkip fdleak tests on android
Tamas Berghammer [Fri, 13 Mar 2015 10:12:25 +0000 (10:12 +0000)]
Skip fdleak tests on android

Android have more file descriptor opened by the shell what are inherited
to the process (different ones on device and on emulator).

Differential revision: http://reviews.llvm.org/D8299

llvm-svn: 232150

9 years ago[Modules] Teach Clang to survive ambiguous macros which come from system
Chandler Carruth [Fri, 13 Mar 2015 08:29:54 +0000 (08:29 +0000)]
[Modules] Teach Clang to survive ambiguous macros which come from system
headers even if they arrived when merging non-system modules.

The idea of this code is that we don't want to warn the user about
macros defined multiple times by their system headers with slightly
different definitions. We should have this behavior if either the
macro comes from a system module, or the definition within the module
comes from a system header. Previously, we would warn on ambiguous
macros being merged when they came from a users modules even though they
only showed up via system headers.

By surviving this we can handle common system header macro differences
like differing 'const' qualification of pointers due to some headers
predating 'const' being valid in C code, even when those systems headers
are pre-built into a system module.

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

llvm-svn: 232149

9 years ago[libclang] Fix crash when code-completing inside constructor initializer for a builti...
Argyrios Kyrtzidis [Fri, 13 Mar 2015 07:39:30 +0000 (07:39 +0000)]
[libclang] Fix crash when code-completing inside constructor initializer for a builtin type.

rdar://20149746

llvm-svn: 232145

9 years agoTeach TBAA analysis to report errors on cyclic TBAA metadata rather than hanging.
Owen Anderson [Fri, 13 Mar 2015 07:09:33 +0000 (07:09 +0000)]
Teach TBAA analysis to report errors on cyclic TBAA metadata rather than hanging.

llvm-svn: 232144

9 years agoFix an infinite recursion in the verifier caused by calling isSized on a recursive...
Owen Anderson [Fri, 13 Mar 2015 06:41:26 +0000 (06:41 +0000)]
Fix an infinite recursion in the verifier caused by calling isSized on a recursive type.

llvm-svn: 232143

9 years ago[MachineCopyPropagation] Fix a bug causing incorrect removal for the instruction...
Hao Liu [Fri, 13 Mar 2015 05:15:23 +0000 (05:15 +0000)]
[MachineCopyPropagation] Fix a bug causing incorrect removal for the instruction sequences as follows
   %Q5_Q6<def> = COPY %Q2_Q3
   %D5<def> =
   %D3<def> =
   %D3<def> = COPY %D6     // Incorrectly removed in MachineCopyPropagation
   Using of %D3 results in incorrect result ...

   Reviewed in http://reviews.llvm.org/D8242

llvm-svn: 232142

9 years ago[libclang] During member ref expression visitation, ignore base anonymous struct...
Argyrios Kyrtzidis [Fri, 13 Mar 2015 04:40:07 +0000 (04:40 +0000)]
[libclang] During member ref expression visitation, ignore base anonymous struct/union fields.

Otherwise they will shadow the real field that that we are interested in.

rdar://19783938

llvm-svn: 232141

9 years agoDeduplicate #undef directives imported from multiple modules.
Richard Smith [Fri, 13 Mar 2015 04:05:01 +0000 (04:05 +0000)]
Deduplicate #undef directives imported from multiple modules.

No functionality change, but deeply-importing module files are smaller and
faster now.

llvm-svn: 232140

9 years agoFix build break in this code. Nothing uses this header, but the modules
Richard Smith [Fri, 13 Mar 2015 03:56:27 +0000 (03:56 +0000)]
Fix build break in this code. Nothing uses this header, but the modules
buildbot builds it anyway and was angry because of this.

llvm-svn: 232139

9 years agoAdd clangBasic to libdeps according to r232051 since the interface of ASTMatchers...
NAKAMURA Takumi [Fri, 13 Mar 2015 03:47:43 +0000 (03:47 +0000)]
Add clangBasic to libdeps according to r232051 since the interface of ASTMatchers was changed.

llvm-svn: 232138

9 years agoDon't require AVX registers if the target CPU doesn't have them
Vince Harron [Fri, 13 Mar 2015 03:43:46 +0000 (03:43 +0000)]
Don't require AVX registers if the target CPU doesn't have them

TestLldbGdbServer was failing because it always assumed AVX is available on
x86_64 Linux. This patch checks the target before asserting that AVX
registers are available.

llvm-svn: 232137

9 years agoBulk of the infrastructure work to allow script commands to be backed by object insta...
Enrico Granata [Fri, 13 Mar 2015 02:20:41 +0000 (02:20 +0000)]
Bulk of the infrastructure work to allow script commands to be backed by object instances in addition to free functions
This works by creating a command backed by a class whose interface should - at least - include

def __init__(self, debugger, session_dict)
def __call__(self, args, return_obj, exe_ctx)

What works:
- adding a command via command script add --class
- calling a thusly created command

What is missing:
- support for custom help
- test cases

The missing parts will follow over the next couple of days

This is an improvement over the existing system as:
a) it provides an obvious location for commands to provide help strings (i.e. methods)
b) it allows commands to store state in an obvious fashion
c) it allows us to easily add features to script commands over time (option parsing and subcommands registration, I am looking at you :-)

llvm-svn: 232136

9 years agoUpdating GettingStarted documentation to reference CMake as the preferred way to...
Chris Bieneman [Fri, 13 Mar 2015 01:58:14 +0000 (01:58 +0000)]
Updating GettingStarted documentation to reference CMake as the preferred way to build LLVM.

Reviewers: chandlerc, samsonov, echristo

Reviewed By: samsonov

Subscribers: emaste, joker.eph, llvm-commits

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

llvm-svn: 232135

9 years agoWhen forming an addrec out of a phi don't just look at the last computation and steal...
Nick Lewycky [Fri, 13 Mar 2015 01:37:52 +0000 (01:37 +0000)]
When forming an addrec out of a phi don't just look at the last computation and steal its flags for our own, there may be other computations in the middle. Check whether the LHS of the computation is the phi itself and then we know it's safe to steal the flags. Fixes PR22795.

There's a missed optimization opportunity where we could look at the full chain of computation and take the intersection of the flags instead of only looking one instruction deep.

llvm-svn: 232134

9 years ago[llgo] update year in LICENSE.txt
Andrew Wilkins [Fri, 13 Mar 2015 01:36:02 +0000 (01:36 +0000)]
[llgo] update year in LICENSE.txt

llvm-svn: 232133

9 years agoUse the variable names from the TargetInstrInfo source when we
Eric Christopher [Fri, 13 Mar 2015 01:26:39 +0000 (01:26 +0000)]
Use the variable names from the TargetInstrInfo source when we
reference them in the generated files. A few characters aren't huge
here and CFSetupOpcode is much more readable than S0.

llvm-svn: 232132

9 years agoAdd a return after the llvm namespace code for a little extra
Eric Christopher [Fri, 13 Mar 2015 01:10:08 +0000 (01:10 +0000)]
Add a return after the llvm namespace code for a little extra
readability in generated files.

llvm-svn: 232131

9 years agoSimplify.
Joerg Sonnenberger [Fri, 13 Mar 2015 00:54:30 +0000 (00:54 +0000)]
Simplify.

llvm-svn: 232130

9 years agoUse the cached subtarget off of the machine function.
Eric Christopher [Fri, 13 Mar 2015 00:49:50 +0000 (00:49 +0000)]
Use the cached subtarget off of the machine function.

llvm-svn: 232129

9 years agoUse the cached subtarget off of the machine function.
Eric Christopher [Fri, 13 Mar 2015 00:38:19 +0000 (00:38 +0000)]
Use the cached subtarget off of the machine function.

llvm-svn: 232128

9 years agoSilence warnings here by explicit cast.
Enrico Granata [Fri, 13 Mar 2015 00:31:45 +0000 (00:31 +0000)]
Silence warnings here by explicit cast.

llvm-svn: 232126

9 years agoWe want single precision here.
Joerg Sonnenberger [Fri, 13 Mar 2015 00:18:28 +0000 (00:18 +0000)]
We want single precision here.

llvm-svn: 232125

9 years ago[CMake] Add clangBasic in ASTMatchersTests, according to r232051.
NAKAMURA Takumi [Thu, 12 Mar 2015 23:49:06 +0000 (23:49 +0000)]
[CMake] Add clangBasic in ASTMatchersTests, according to r232051.

Jan Vesely noticed it. See also r232055.

llvm-svn: 232123

9 years agoDisambiguate call for GCC.
Benjamin Kramer [Thu, 12 Mar 2015 23:46:55 +0000 (23:46 +0000)]
Disambiguate call for GCC.

llvm-svn: 232122

9 years agoCodeGen: Base the conditional cleanup machinery on variadic templates
Benjamin Kramer [Thu, 12 Mar 2015 23:41:40 +0000 (23:41 +0000)]
CodeGen: Base the conditional cleanup machinery on variadic templates

This is complicated by the fact that we can't simply use side-effecting
calls in an argument list without losing all guarantees about the order
they're emitted. To keep things deterministic we use tuples and brace
initialization, which thankfully guarantees evaluation order.

No functionality change intended.

llvm-svn: 232121

9 years ago[X86, AVX2] Replace inserti128 and extracti128 intrinsics with generic shuffles
Sanjay Patel [Thu, 12 Mar 2015 23:16:18 +0000 (23:16 +0000)]
[X86, AVX2] Replace inserti128 and extracti128 intrinsics with generic shuffles

This should complete the job started in r231794 and continued in r232045:
We want to replace as much custom x86 shuffling via intrinsics
as possible because pushing the code down the generic shuffle
optimization path allows for better codegen and less complexity
in LLVM.

AVX2 introduced proper integer variants of the hacked integer insert/extract
C intrinsics that were created for this same functionality with AVX1.

This should complete the removal of insert/extract128 intrinsics.

The Clang precursor patch for this change was checked in at r232109.

llvm-svn: 232120

9 years agoMove a variable into the assert where it's used - fixes a -Asserts
Eric Christopher [Thu, 12 Mar 2015 23:13:03 +0000 (23:13 +0000)]
Move a variable into the assert where it's used - fixes a -Asserts
build warning/error.

llvm-svn: 232119

9 years agoIn preparation for moving ARM's TargetRegisterInfo to the TargetMachine
Eric Christopher [Thu, 12 Mar 2015 22:48:50 +0000 (22:48 +0000)]
In preparation for moving ARM's TargetRegisterInfo to the TargetMachine
merge Thumb1RegisterInfo and Thumb2RegisterInfo. This will enable
us to match the TargetMachine for our TargetRegisterInfo classes.

llvm-svn: 232117

9 years agoAdd override markers
Enrico Granata [Thu, 12 Mar 2015 22:33:52 +0000 (22:33 +0000)]
Add override markers

llvm-svn: 232116

9 years agoThis fixes the build I previously broke - and actually makes the test case work just...
Enrico Granata [Thu, 12 Mar 2015 22:30:58 +0000 (22:30 +0000)]
This fixes the build I previously broke - and actually makes the test case work just like I promised

llvm-svn: 232115

9 years agoFix a bug in the data formatters where summary strings would not look into the non...
Enrico Granata [Thu, 12 Mar 2015 22:17:07 +0000 (22:17 +0000)]
Fix a bug in the data formatters where summary strings would not look into the non-synthetic value for child members if the ValueObject being formatted happened to have a synthetic value

rdar://15630776

llvm-svn: 232114

9 years agoFix an issue where values would be printed in one-line mode even if you asked to...
Enrico Granata [Thu, 12 Mar 2015 22:16:20 +0000 (22:16 +0000)]
Fix an issue where values would be printed in one-line mode even if you asked to see locations and/or asked for flat output mode

llvm-svn: 232113

9 years agoclang-format: [OBJC] Don't indent 8 spaces in method declarations.
Daniel Jasper [Thu, 12 Mar 2015 22:13:45 +0000 (22:13 +0000)]
clang-format: [OBJC] Don't indent 8 spaces in method declarations.

Before:
  - (void)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:
          (SoooooooooooooooooooooomeType *)bbbbbbbbbb;

After:
  - (void)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:
      (SoooooooooooooooooooooomeType *)bbbbbbbbbb;

llvm-svn: 232112

9 years agoLinkerScript: Add evaluation of the EXTERN command
Meador Inge [Thu, 12 Mar 2015 21:55:55 +0000 (21:55 +0000)]
LinkerScript: Add evaluation of the EXTERN command

This patch implements evaluation of the GNU ld EXTERN command.

llvm-svn: 232111

9 years agoLinkerScript: Add parsing of the EXTERN command
Meador Inge [Thu, 12 Mar 2015 21:55:50 +0000 (21:55 +0000)]
LinkerScript: Add parsing of the EXTERN command

This patch implements parsing of the GNU ld EXTERN command [1].
Evaluation will be added at a later point in time.

[1] https://sourceware.org/binutils/docs/ld/Miscellaneous-Commands.html#Miscellaneous-Commands

llvm-svn: 232110

9 years ago[X86, AVX2] Replace inserti128 and extracti128 intrinsics with generic shuffles
Sanjay Patel [Thu, 12 Mar 2015 21:54:24 +0000 (21:54 +0000)]
[X86, AVX2] Replace inserti128 and extracti128 intrinsics with generic shuffles

This is nearly identical to the v*f128_si256 parts of r231792 and r232052.

AVX2 introduced proper integer variants of the hacked integer insert/extract
C intrinsics that were created for this same functionality with AVX1.

This should complete the front end fixes for insert/extract128 intrinsics.
Corresponding LLVM patch to follow.

llvm-svn: 232109

9 years agoRemoved useless palignr test - we don't actually provide a llvm.x86.ssse3.palign...
Simon Pilgrim [Thu, 12 Mar 2015 21:42:03 +0000 (21:42 +0000)]
Removed useless palignr test - we don't actually provide a llvm.x86.ssse3.palign.r.128 intrinsic

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

llvm-svn: 232108

9 years agoUse signed int implementation for __fixint
Ed Maste [Thu, 12 Mar 2015 21:36:10 +0000 (21:36 +0000)]
Use signed int implementation for __fixint

llvm-svn: 232107

9 years agoR600/SI: Don't print scc reg in sopc assembly string
Tom Stellard [Thu, 12 Mar 2015 21:34:28 +0000 (21:34 +0000)]
R600/SI: Don't print scc reg in sopc assembly string

This is how the proprietary driver prints sopc instructions.

llvm-svn: 232106

9 years agoR600/SI: Remove _e32 and _e64 suffixes from mnemonics
Tom Stellard [Thu, 12 Mar 2015 21:34:22 +0000 (21:34 +0000)]
R600/SI: Remove _e32 and _e64 suffixes from mnemonics

Instead print them as part of the $dst operand.  The AsmMatcher
requires the 32-bit and 64-bit encodings have the same mnemonic in
order to parse them correctly.

llvm-svn: 232105

9 years agoAdding WinEHPrepare tests (currently XFAILs)
Andrew Kaylor [Thu, 12 Mar 2015 21:32:59 +0000 (21:32 +0000)]
Adding WinEHPrepare tests (currently XFAILs)

llvm-svn: 232104

9 years agoMigrate the AArch64 TargetRegisterInfo to its TargetMachine
Eric Christopher [Thu, 12 Mar 2015 21:04:46 +0000 (21:04 +0000)]
Migrate the AArch64 TargetRegisterInfo to its TargetMachine
implementation. This requires a bit of scaffolding and a few fixups
that'll go away once all of the ports have been migrated.

llvm-svn: 232103

9 years agoRemove unused headers.
Eric Christopher [Thu, 12 Mar 2015 21:04:42 +0000 (21:04 +0000)]
Remove unused headers.

llvm-svn: 232102

9 years agoSema: Make BoundTypeDiagnoser a variadic template
Benjamin Kramer [Thu, 12 Mar 2015 20:58:06 +0000 (20:58 +0000)]
Sema: Make BoundTypeDiagnoser a variadic template

llvm-svn: 232101

9 years agoAdd -polly-vectorizer=stripmine
Tobias Grosser [Thu, 12 Mar 2015 20:48:07 +0000 (20:48 +0000)]
Add -polly-vectorizer=stripmine

By strip-mining outer loops to the innermost level we can enable LLVM's loop
vectorizer to vectorize outer loops.

llvm-svn: 232100

9 years agoDrop option to prepare code for the BB vectorizer
Tobias Grosser [Thu, 12 Mar 2015 20:47:58 +0000 (20:47 +0000)]
Drop option to prepare code for the BB vectorizer

The BB vectorizer is deprecated and there is no point in generating code for it
any more. This option was introduced when there was not yet any loop vectorizer
in sight. Now being matured, Polly should target the loop vectorizer.

llvm-svn: 232099

9 years agoUnxfail passing test on Hexagon
Krzysztof Parzyszek [Thu, 12 Mar 2015 20:38:10 +0000 (20:38 +0000)]
Unxfail passing test on Hexagon

test/CodeGen/Generic/2008-02-20-MatchingMem.ll

llvm-svn: 232098

9 years agoMake the atom_iterator copy assignable
David Blaikie [Thu, 12 Mar 2015 20:18:10 +0000 (20:18 +0000)]
Make the atom_iterator copy assignable

This makes it a bit more like a 'real' iterator though I still haven't
gone through to make sure it meets the full requirements. Copy
assignability seems to be required by MSVC's std::find_if, which is its
right.

llvm-svn: 232097

9 years agoUpdate copyright year to 2015.
Renato Golin [Thu, 12 Mar 2015 20:14:35 +0000 (20:14 +0000)]
Update copyright year to 2015.

llvm-svn: 232096

9 years agoUpdate copyright year to 2015.
Renato Golin [Thu, 12 Mar 2015 20:13:54 +0000 (20:13 +0000)]
Update copyright year to 2015.

llvm-svn: 232095

9 years agoUpdate copyright year to 2015.
Renato Golin [Thu, 12 Mar 2015 20:13:11 +0000 (20:13 +0000)]
Update copyright year to 2015.

llvm-svn: 232094

9 years agoRevert "r232027 - Add infrastructure for support of multiple memory constraints"
Hal Finkel [Thu, 12 Mar 2015 20:09:39 +0000 (20:09 +0000)]
Revert "r232027 - Add infrastructure for support of multiple memory constraints"

This (r232027) has caused PR22883; so it seems those bits might be used by
something else after all. Reverting until we can figure out what else to do.

Original commit message:

The operand flag word for ISD::INLINEASM nodes now contains a 15-bit
memory constraint ID when the operand kind is Kind_Mem. This constraint
ID is a numeric equivalent to the constraint code string and is converted
with a target specific hook in TargetLowering.

This patch maps all memory constraints to InlineAsm::Constraint_m so there
is no functional change at this point. It just proves that using these
previously unused bits in the encoding of the flag word doesn't break anything.

The next patch will make each target preserve the current mapping of
everything to Constraint_m for itself while changing the target independent
implementation of the hook to return Constraint_Unknown appropriately. Each
target will then be adapted in separate patches to use appropriate Constraint_*
values.

llvm-svn: 232093

9 years agoXFAIL TestAbbreviations on Linux, improve test
Vince Harron [Thu, 12 Mar 2015 20:08:45 +0000 (20:08 +0000)]
XFAIL TestAbbreviations on Linux, improve test

It was failing on gcc 4.8, only passing accidentally on clang 3.5
This patch improves the checking to make sure if fails in all cases
and then XFAILS

llvm-svn: 232092

9 years agoTest that software breakpoints aren't visible in disassembly
Vince Harron [Thu, 12 Mar 2015 20:07:13 +0000 (20:07 +0000)]
Test that software breakpoints aren't visible in disassembly

Linux lldb-server Handle_m doesn't properly replace software breakpoints
with the original instructions. This test is added with expectedFailureLinux

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

llvm-svn: 232091

9 years ago[autoconf] Fix the build failure by quoting the strings.
Logan Chien [Thu, 12 Mar 2015 19:56:25 +0000 (19:56 +0000)]
[autoconf] Fix the build failure by quoting the strings.

llvm-svn: 232090

9 years agoUpdate copyright year to 2015.
Alexey Samsonov [Thu, 12 Mar 2015 19:53:06 +0000 (19:53 +0000)]
Update copyright year to 2015.

llvm-svn: 232089

9 years agoRephrase find loop to use std::find_if
David Blaikie [Thu, 12 Mar 2015 19:46:21 +0000 (19:46 +0000)]
Rephrase find loop to use std::find_if

Avoids the need for an assert-only variable, among other benefits.

llvm-svn: 232088

9 years agoFix grammar in a comment, wrap to 80 columns. No behavior change.
Nico Weber [Thu, 12 Mar 2015 19:37:10 +0000 (19:37 +0000)]
Fix grammar in a comment, wrap to 80 columns. No behavior change.

llvm-svn: 232087

9 years agoRemove duplicate "the". N+1 redundancy is not useful here.
Nico Weber [Thu, 12 Mar 2015 19:35:34 +0000 (19:35 +0000)]
Remove duplicate "the". N+1 redundancy is not useful here.

llvm-svn: 232086

9 years ago[X86] Fix a regression introduced by r223641.
Quentin Colombet [Thu, 12 Mar 2015 19:34:12 +0000 (19:34 +0000)]
[X86] Fix a regression introduced by r223641.
The permps and permd instructions have their operands swapped compared to the
intrinsic definition. Therefore, they do not fall into the INTR_TYPE_2OP
category.

I did not create a new category for those two, as they are the only one AFAICT
in that case.

<rdar://problem/20108262>

llvm-svn: 232085

9 years ago[Mips] Make `readAddend` a virtual member function to escape explicit
Simon Atanasyan [Thu, 12 Mar 2015 18:53:06 +0000 (18:53 +0000)]
[Mips] Make `readAddend` a virtual member function to escape explicit
template class instantiation

No functional changes.

llvm-svn: 232081

9 years agoReapply "[dsymutil] Gather function ranges during DIE selection."
Frederic Riss [Thu, 12 Mar 2015 18:45:10 +0000 (18:45 +0000)]
Reapply "[dsymutil] Gather function ranges during DIE selection."

This reverts commit r231967 which reinstates r231957.

Now that IntervalMap uses explicitely aligned storage, it should be safe.

llvm-svn: 232080

9 years ago[ADT] IntervalMap: use AlignedCharArrayUnion.
Frederic Riss [Thu, 12 Mar 2015 18:45:07 +0000 (18:45 +0000)]
[ADT] IntervalMap: use AlignedCharArrayUnion.

Currently IntervalMap would assert when used with keys bigger than host
pointers. This patch uses the AlignedCharArrayUnion functionality to
overcome that limitation.

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

llvm-svn: 232079

9 years agoAdd missing include guards.
Yaron Keren [Thu, 12 Mar 2015 18:39:54 +0000 (18:39 +0000)]
Add missing include guards.

llvm-svn: 232078

9 years agoAdd -p and -r options to lldb-mi command -file-exec-file-and-symbols to support iOS...
Hafiz Abid Qadeer [Thu, 12 Mar 2015 18:35:54 +0000 (18:35 +0000)]
Add -p and -r options to lldb-mi command -file-exec-file-and-symbols to support iOS debugging on macOS.

The patch adds 2 options which are not present in the GDB MI. Those have been described in MIExtensions.txt.

Patch from Chuck Ries.

llvm-svn: 232077

9 years agoFix comment formatting.
Eric Christopher [Thu, 12 Mar 2015 18:23:01 +0000 (18:23 +0000)]
Fix comment formatting.

llvm-svn: 232076

9 years agoMake ModuleCache::Get to return instantiated ModuleSP instance so already created...
Oleksiy Vyalov [Thu, 12 Mar 2015 18:18:03 +0000 (18:18 +0000)]
Make ModuleCache::Get to return instantiated ModuleSP instance so already created in-memory instance can be returned instead of creating a new one.

http://reviews.llvm.org/D8270

llvm-svn: 232075

9 years ago[Tsan] Do not declare std_suppressions when not used
Viktor Kutuzov [Thu, 12 Mar 2015 18:14:42 +0000 (18:14 +0000)]
[Tsan] Do not declare std_suppressions when not used
Differential Revision: http://reviews.llvm.org/D8288

llvm-svn: 232074

9 years ago[Tsan] Adjust SA_SIGINFO and SIG_SETMASK values on FreeBSD.
Viktor Kutuzov [Thu, 12 Mar 2015 18:12:43 +0000 (18:12 +0000)]
[Tsan] Adjust SA_SIGINFO and SIG_SETMASK values on FreeBSD.
Differential Revision: http://reviews.llvm.org/D8176

llvm-svn: 232073

9 years ago[Sanitizers] Fix sanitizers to build on FreeBSD.
Viktor Kutuzov [Thu, 12 Mar 2015 18:10:06 +0000 (18:10 +0000)]
[Sanitizers] Fix sanitizers to build on FreeBSD.
Differential Revision: http://reviews.llvm.org/D8175

llvm-svn: 232072

9 years agoRemove the need to cache the subtarget in the X86 TargetRegisterInfo
Eric Christopher [Thu, 12 Mar 2015 17:54:19 +0000 (17:54 +0000)]
Remove the need to cache the subtarget in the X86 TargetRegisterInfo
classes. Use a Triple instead and simplify a lot of the querying
logic to use lookups on the Triple.

llvm-svn: 232071

9 years agoMS ABI: Allow a nullptr_t exception to be caught by void * catch handler
David Majnemer [Thu, 12 Mar 2015 17:44:49 +0000 (17:44 +0000)]
MS ABI: Allow a nullptr_t exception to be caught by void * catch handler

A nullptr exception object can be caught by any pointer type catch
handler.  However, it is not possible to express this in the exception
info for the MS ABI.  As a middle ground, allow such exception objects
to be caught with pointer-to-void catch handlers.

llvm-svn: 232069

9 years agoAvoid a failing test case by fixing things so the compiler generates a line table...
Greg Clayton [Thu, 12 Mar 2015 17:42:15 +0000 (17:42 +0000)]
Avoid a failing test case by fixing things so the compiler generates a line table entry for line the very start of the printf() before any values have been loaded into registers.

The issue was the previous code tried to stop on the following code in main.c:

21    // Stop here and set values
22    printf ("Val - %d Mine - %d, %d, %llu. Ptr - %d, %d, %llu\n",
23            val,
24            mine.first_val, mine.second_val, mine.third_val,
25            ptr->first_val, ptr->second_val, ptr->third_val);

We we set a source regex breakpoint on "// Stop here and set values" we would set a breakpoint on line 22 as expected.

The problem is the most recent clang compiler generates a line table like this

0x1000: main.c:23 // Loading of "val" into a register
0x1010: main.c:24 // Load mine.first_val, mine.second_val, mine.third_val values into registers or on the stack
0x1020: main.c:25 // Load ptr->first_val, ptr->second_val, ptr->third_val values into registers or on the stack
0x1030: main.c:22 // Call to printf

In this test, we run to line 22, then we use python to modify the value of "val" and then continue to another breakpoint and try to read the STDOUT from the printf to verify the values changed correctly.

With the above line table the value for "val" had already been loaded into a register so the string from printf would be incorrect.

Doing an easy fix for now by changing the code to:

21    // Stop here and set values
22  printf ("Val - %d Mine - %d, %d, %llu. Ptr - %d, %d, %llu\n", val,
23          mine.first_val, mine.second_val, mine.third_val,
24          ptr->first_val, ptr->second_val, ptr->third_val);

Now we get a line table entry for line 22 that is before any locals are read from the stack into registers.

I need to follow up with the compiler guys and see if we can get a fix for this as anyone setting file + line breeakpoints might be very surprised to have code from lines below the current line already have had their code run.

llvm-svn: 232068

9 years agoRefactoring CMake CrossCompile module.
Chris Bieneman [Thu, 12 Mar 2015 17:33:34 +0000 (17:33 +0000)]
Refactoring CMake CrossCompile module.

* put most of the cross-compiling support into a function llvm_create_cross_target_internal.
* when CrossCompile is included it still generates a NATIVE target.
* llvm_create_cross_target function takes a target_name which should match a toolchain.
* llvm_create_cross_target can now be used to target more than one cross-compilation target.

llvm-svn: 232067

9 years ago[docs] Update the doxygen configuration file.
Logan Chien [Thu, 12 Mar 2015 17:27:53 +0000 (17:27 +0000)]
[docs] Update the doxygen configuration file.

Update the doxygen configuration file and the Makefile build rules
to provide better output (simply use the default stylesheet and template
from the Doxygen distribution.)

This CL has upgrade doxygen.cfg.in to Doxygen 1.8.6.

llvm-svn: 232066