platform/upstream/llvm.git
11 years agoR600/SI: Convert v16i8 resource descriptors to i128
Tom Stellard [Wed, 14 Aug 2013 23:24:45 +0000 (23:24 +0000)]
R600/SI: Convert v16i8 resource descriptors to i128

Now that compute support is better on SI, we can't continue using v16i8
for descriptors since this is also a legal type in OpenCL.

This patch fixes numerous hangs with the piglit OpenCL test and since
we now use a target specific DAG node for LOAD_CONSTANT with the
correct MemOperandFlags, this should also fix:

https://bugs.freedesktop.org/show_bug.cgi?id=66805

llvm-svn: 188429

11 years agoR600/SI: Use i8 types for resource descriptors in tests
Tom Stellard [Wed, 14 Aug 2013 23:24:37 +0000 (23:24 +0000)]
R600/SI: Use i8 types for resource descriptors in tests

We switched from i32 to i8 types a while ago and the tests were never
updated.

llvm-svn: 188428

11 years agoR600/SI: Lower BUILD_VECTOR to REG_SEQUENCE v2
Tom Stellard [Wed, 14 Aug 2013 23:24:32 +0000 (23:24 +0000)]
R600/SI: Lower BUILD_VECTOR to REG_SEQUENCE v2

Using REG_SEQUENCE for BUILD_VECTOR rather than a series of INSERT_SUBREG
instructions should make it easier for the register allocator to coalasce
unnecessary copies.

v2:
  - Use an SGPR register class if all the operands of BUILD_VECTOR are
    SGPRs.

llvm-svn: 188427

11 years agoR600/SI: Choose the correct MOV instruction for copying immediates
Tom Stellard [Wed, 14 Aug 2013 23:24:24 +0000 (23:24 +0000)]
R600/SI: Choose the correct MOV instruction for copying immediates

The instruction selector will now try to infer the destination register
so it can decided whether to use V_MOV_B32 or S_MOV_B32 when copying
immediates.

llvm-svn: 188426

11 years agoR600/SI: Assign a register class to the $vaddr operand for MIMG instructions
Tom Stellard [Wed, 14 Aug 2013 23:24:17 +0000 (23:24 +0000)]
R600/SI: Assign a register class to the $vaddr operand for MIMG instructions

The previous code declared the operand as unknown:$vaddr, which made
it possible for scalar registers to be used instead of vector registers.

llvm-svn: 188425

11 years ago[llvm-build] Make Py3 compatible.
Daniel Dunbar [Wed, 14 Aug 2013 23:15:39 +0000 (23:15 +0000)]
[llvm-build] Make Py3 compatible.

llvm-svn: 188424

11 years agoDataFlowSanitizer: move abilist input file to Inputs.
Peter Collingbourne [Wed, 14 Aug 2013 22:28:36 +0000 (22:28 +0000)]
DataFlowSanitizer: move abilist input file to Inputs.

llvm-svn: 188423

11 years agoDebugInfo: Prefer references over pointers, pass by const reference for a type that...
David Blaikie [Wed, 14 Aug 2013 22:23:05 +0000 (22:23 +0000)]
DebugInfo: Prefer references over pointers, pass by const reference for a type that will grow in the future

llvm-svn: 188422

11 years agoR600/SI: Handle MSAA texture targets
Tom Stellard [Wed, 14 Aug 2013 22:22:14 +0000 (22:22 +0000)]
R600/SI: Handle MSAA texture targets

Patch by: Marek Olšák

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
llvm-svn: 188421

11 years agoR600/SI: Allow conversion between v32i8 and v8i32
Tom Stellard [Wed, 14 Aug 2013 22:22:09 +0000 (22:22 +0000)]
R600/SI: Allow conversion between v32i8 and v8i32

Patch by: Marek Olšák

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
llvm-svn: 188420

11 years agoR600/SI: Fix an obvious typo
Tom Stellard [Wed, 14 Aug 2013 22:22:03 +0000 (22:22 +0000)]
R600/SI: Fix an obvious typo

Patch by: Marek Olšák

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
llvm-svn: 188419

11 years agoR600/SI: Add pattern for fp_to_uint
Tom Stellard [Wed, 14 Aug 2013 22:21:57 +0000 (22:21 +0000)]
R600/SI: Add pattern for fp_to_uint

This fixes the F2U opcode for the Mesa driver.

Patch by: Marek Olšák

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
llvm-svn: 188418

11 years ago[lit] Add test coverage of gtest format.
Daniel Dunbar [Wed, 14 Aug 2013 22:21:11 +0000 (22:21 +0000)]
[lit] Add test coverage of gtest format.

llvm-svn: 188417

11 years ago[lit] Ensure test output is converted to strings where possible.
Daniel Dunbar [Wed, 14 Aug 2013 22:21:01 +0000 (22:21 +0000)]
[lit] Ensure test output is converted to strings where possible.

 - This cleans up the text output of failing tests when run under PY3.

llvm-svn: 188416

11 years agoFix small typo: s/succ/Succ/
Mark Lacey [Wed, 14 Aug 2013 22:11:42 +0000 (22:11 +0000)]
Fix small typo: s/succ/Succ/

llvm-svn: 188415

11 years agoRelax testcase for r188400 to not test for forward-slashes as path separators.
Adrian Prantl [Wed, 14 Aug 2013 22:10:17 +0000 (22:10 +0000)]
Relax testcase for r188400 to not test for forward-slashes as path separators.

llvm-svn: 188414

11 years agoRelax complete-type check for functions and function pointers to allow void return...
Howard Hinnant [Wed, 14 Aug 2013 21:28:31 +0000 (21:28 +0000)]
Relax complete-type check for functions and function pointers to allow void return type.  This bug was exposed by Eli Friedman's commit to clang r188324.  Anywhere this version of clang ships, this libc++ fix must follow.  However this fix is compatible with previous clangs, and so this libc++ doesn't need to wait for this clang.

llvm-svn: 188413

11 years agoDataFlowSanitizer: Instrumentation for memset.
Peter Collingbourne [Wed, 14 Aug 2013 20:51:38 +0000 (20:51 +0000)]
DataFlowSanitizer: Instrumentation for memset.

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

llvm-svn: 188412

11 years ago[dfsan] New __dfsan_set_label runtime function.
Peter Collingbourne [Wed, 14 Aug 2013 20:51:33 +0000 (20:51 +0000)]
[dfsan] New __dfsan_set_label runtime function.

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

llvm-svn: 188411

11 years agoPR16875: The return type of a dependent function type is visible when it's
Richard Smith [Wed, 14 Aug 2013 20:16:31 +0000 (20:16 +0000)]
PR16875: The return type of a dependent function type is visible when it's
referenced as a member of the current instantiation. In that case, deduce the
type of the function to a dependent type rather than exposing an undeduced auto
type to the rest of the current instantiation.

The standard doesn't really say that the type is dependent in this case; I'll
bring this up with CWG.

llvm-svn: 188410

11 years agoBug fix: note diagnosis on expression narrowing should say "variable template" instea...
Larisse Voufo [Wed, 14 Aug 2013 20:15:02 +0000 (20:15 +0000)]
Bug fix: note diagnosis on expression narrowing should say "variable template" instead of "static data member" when appropriate

llvm-svn: 188409

11 years agoFix grammar mistake.
Shuxin Yang [Wed, 14 Aug 2013 20:07:23 +0000 (20:07 +0000)]
Fix grammar mistake.

Thank Richard Smith for figuring out this problem.

llvm-svn: 188408

11 years agoActually fix PPC64 64-bit GPR inline asm constraint matching
Hal Finkel [Wed, 14 Aug 2013 20:05:04 +0000 (20:05 +0000)]
Actually fix PPC64 64-bit GPR inline asm constraint matching

This is a follow-up to r187693, correcting that code to request the correct
register class. The previous version, with the wrong register class, was not
really correcting the constraints, but rather was removing them. Coincidentally,
this fixed the failing test case in r187693, but obviously created other
problems.

llvm-svn: 188407

11 years agoDo no use -emit-llvm for -flto.
Shuxin Yang [Wed, 14 Aug 2013 19:45:49 +0000 (19:45 +0000)]
Do no use -emit-llvm for -flto.

Tested on multiple OSes.

llvm-svn: 188406

11 years agoTestcase for r188400.
Benjamin Kramer [Wed, 14 Aug 2013 19:45:27 +0000 (19:45 +0000)]
Testcase for r188400.

llvm-svn: 188405

11 years agocpp11-migrate: Remove mention of 'headers' from serialization code
Edwin Vane [Wed, 14 Aug 2013 19:02:28 +0000 (19:02 +0000)]
cpp11-migrate: Remove mention of 'headers' from serialization code

* HeaderChangeDocument -> MigratorDocument
* HeaderFileName -> TargetFile
* SourceFileName -> MainSourceFile
* Removed TransformID
* Comments updated, at least with respect to serialization
* Unit tests updated.

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

llvm-svn: 188404

11 years agoAdd support for -fsanitize-blacklist and default blacklists for DFSan.
Peter Collingbourne [Wed, 14 Aug 2013 18:54:18 +0000 (18:54 +0000)]
Add support for -fsanitize-blacklist and default blacklists for DFSan.
Also add some documentation.

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

llvm-svn: 188403

11 years agoDataFlowSanitizer: greylist is now ABI list.
Peter Collingbourne [Wed, 14 Aug 2013 18:54:12 +0000 (18:54 +0000)]
DataFlowSanitizer: greylist is now ABI list.

This replaces the old incomplete greylist functionality with an ABI
list, which can provide more detailed information about the ABI and
semantics of specific functions.  The pass treats every function in
the "uninstrumented" category in the ABI list file as conforming to
the "native" (i.e. unsanitized) ABI.  Unless the ABI list contains
additional categories for those functions, a call to one of those
functions will produce a warning message, as the labelling behaviour
of the function is unknown.  The other supported categories are
"functional", "discard" and "custom".

- "discard" -- This function does not write to (user-accessible) memory,
  and its return value is unlabelled.
- "functional" -- This function does not write to (user-accessible)
  memory, and the label of its return value is the union of the label of
  its arguments.
- "custom" -- Instead of calling the function, a custom wrapper __dfsw_F
  is called, where F is the name of the function.  This function may wrap
  the original function or provide its own implementation.

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

llvm-svn: 188402

11 years ago[dfsan] Runtime support for ABI list functionality; can now run integration tests...
Peter Collingbourne [Wed, 14 Aug 2013 18:54:06 +0000 (18:54 +0000)]
[dfsan] Runtime support for ABI list functionality; can now run integration tests with args ABI.

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

llvm-svn: 188401

11 years agoEnhance the clang -v gcc debug printing to skip obviously bad and duplicate paths.
Benjamin Kramer [Wed, 14 Aug 2013 18:38:51 +0000 (18:38 +0000)]
Enhance the clang -v gcc debug printing to skip obviously bad and duplicate paths.

Otherwise it lists all files (e.g. shared libraries) that happen to be in the
same paths the GCC installations usually reside in.

On a x86_64 Debian 7 system with i386 multilibs.
before: clang -v 2>&1|wc -l
        3059
after:  clang -v 2>&1|wc -l
        10

llvm-svn: 188400

11 years ago[lit] Support parsing scripts with inconsistent or invalid encodings.
Daniel Dunbar [Wed, 14 Aug 2013 18:22:41 +0000 (18:22 +0000)]
[lit] Support parsing scripts with inconsistent or invalid encodings.

 - For whatever reason, we have a lot of test files with bogus unicode
   characters. This patch allows those scripts to still be parsed on Python3 by
   changing the parsing logic to work on binary files, and only require the
   actual script commands to be convertible to ascii.

 - This patch has been tweaked to now ensure that the command strings are not of
   unicode type on Python 2.6-7.

llvm-svn: 188398

11 years agoUse the MSVC __cpuid intrinsic instead of inline asm
Reid Kleckner [Wed, 14 Aug 2013 18:21:51 +0000 (18:21 +0000)]
Use the MSVC __cpuid intrinsic instead of inline asm

This works around PR16830 in LLVM when self-hosting clang on Windows.

llvm-svn: 188397

11 years agoXing Xue: port to IBM XLC++/AIX.
Howard Hinnant [Wed, 14 Aug 2013 18:00:20 +0000 (18:00 +0000)]
Xing Xue:  port to IBM XLC++/AIX.

llvm-svn: 188396

11 years agoFix signed/unsigned warnings when building libc++ in C++14 mode
Marshall Clow [Wed, 14 Aug 2013 17:53:31 +0000 (17:53 +0000)]
Fix signed/unsigned warnings when building libc++ in C++14 mode

llvm-svn: 188395

11 years agocpp11-migrate: Fixing doxygen warnings
Tareq A. Siraj [Wed, 14 Aug 2013 17:47:39 +0000 (17:47 +0000)]
cpp11-migrate: Fixing doxygen warnings

For some reason doxygen doesn't seem to like the using namespace
clang::tooling in the source file and complaints about missing class
members.

Also fixed missing parameter documentation for TransformName in
SourceOverrides::applyReplacements().

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

llvm-svn: 188394

11 years agoRemove unnecessary parameter to RenumberValues.
Jakob Stoklund Olesen [Wed, 14 Aug 2013 17:28:52 +0000 (17:28 +0000)]
Remove unnecessary parameter to RenumberValues.

Patch by Matthias Braun!

llvm-svn: 188393

11 years agoRemove unused function.
Jakob Stoklund Olesen [Wed, 14 Aug 2013 17:28:49 +0000 (17:28 +0000)]
Remove unused function.

Patch by Matthias Braun!

llvm-svn: 188392

11 years agoImprove misleading comment.
Jakob Stoklund Olesen [Wed, 14 Aug 2013 17:28:46 +0000 (17:28 +0000)]
Improve misleading comment.

Patch by Matthias Braun!

llvm-svn: 188391

11 years agoRemove declaration of nonexistant function.
Jakob Stoklund Olesen [Wed, 14 Aug 2013 17:28:44 +0000 (17:28 +0000)]
Remove declaration of nonexistant function.

Patch by Matthias Braun!

llvm-svn: 188390

11 years agoLiveIntervalUnion is not used in RegAllocBase.
Jakob Stoklund Olesen [Wed, 14 Aug 2013 17:28:42 +0000 (17:28 +0000)]
LiveIntervalUnion is not used in RegAllocBase.

Patch by Matthias Braun!

llvm-svn: 188389

11 years agoRemove unused struct/enum
Jakob Stoklund Olesen [Wed, 14 Aug 2013 17:28:39 +0000 (17:28 +0000)]
Remove unused struct/enum

Patch by Matthias Braun!

llvm-svn: 188388

11 years agoAdded some missing issues to the c++1y status page, and put in hyperlinks for the...
Howard Hinnant [Wed, 14 Aug 2013 17:26:18 +0000 (17:26 +0000)]
Added some missing issues to the c++1y status page, and put in hyperlinks for the papers.

llvm-svn: 188387

11 years agollvm-symbolizer: add support for .gnu_debuglink section
Alexey Samsonov [Wed, 14 Aug 2013 17:09:30 +0000 (17:09 +0000)]
llvm-symbolizer: add support for .gnu_debuglink section

llvm-svn: 188386

11 years agoLet t2LDRBi8 and t2LDRBi12 have same Base Pointer
Renato Golin [Wed, 14 Aug 2013 16:35:29 +0000 (16:35 +0000)]
Let t2LDRBi8 and t2LDRBi12 have same Base Pointer

When determining if two different loads are from the same base address,
this patch allows one load to use a t2LDRi8 address mode and another to
use a t2LDRi12 address mode. The current implementation is very
conservative and this allows the case of differing Thumb2 byte loads to
be considered. Allowing these differing modes instead of forcing the exact
same opcode is useful for situations where one opcodes loads from a base
address+1 and a second opcode loads for a base address-1.

Patch by Daniel Stewart.

llvm-svn: 188385

11 years ago[tests] Reapply r188354, ensure subsitution string is ascii.
Daniel Dunbar [Wed, 14 Aug 2013 16:32:20 +0000 (16:32 +0000)]
[tests] Reapply r188354, ensure subsitution string is ascii.

 - Now fixed to ensure substitution value isn't of unicode type on Python 2.6-7.

llvm-svn: 188384

11 years agoremove CWG papers from list; add link to clang status page
Marshall Clow [Wed, 14 Aug 2013 16:30:37 +0000 (16:30 +0000)]
remove CWG papers from list; add link to clang status page

llvm-svn: 188383

11 years agoSphinx refuses to render this code block. Try adding a newline.
Benjamin Kramer [Wed, 14 Aug 2013 16:18:47 +0000 (16:18 +0000)]
Sphinx refuses to render this code block. Try adding a newline.

llvm-svn: 188382

11 years agoAdded CWG and SG1 papers to libc++ status page
Marshall Clow [Wed, 14 Aug 2013 16:12:34 +0000 (16:12 +0000)]
Added CWG and SG1 papers to libc++ status page

llvm-svn: 188381

11 years agoExpose CRC-32 implementation from zlib
Alexey Samsonov [Wed, 14 Aug 2013 16:03:29 +0000 (16:03 +0000)]
Expose CRC-32 implementation from zlib

llvm-svn: 188380

11 years agoRevert r188376, "[lit] Support parsing scripts with inconsistent or invalid encodings...
Daniel Dunbar [Wed, 14 Aug 2013 15:55:25 +0000 (15:55 +0000)]
Revert r188376, "[lit] Support parsing scripts with inconsistent or invalid encodings.", this doesn't work yet for bots using the internal shell.

llvm-svn: 188379

11 years agoMark LWG Issue #2110 and #2113 as completed - they were already done
Marshall Clow [Wed, 14 Aug 2013 15:28:40 +0000 (15:28 +0000)]
Mark LWG Issue #2110 and #2113 as completed - they were already done

llvm-svn: 188378

11 years agoAdd the C99 hex-float assembly syntax to our extension document.
Tim Northover [Wed, 14 Aug 2013 15:27:20 +0000 (15:27 +0000)]
Add the C99 hex-float assembly syntax to our extension document.

As Ben pointed out, GAS doesn't support this syntax so we should give at least
some warning that it might not be portable.

llvm-svn: 188377

11 years ago[lit] Support parsing scripts with inconsistent or invalid encodings.
Daniel Dunbar [Wed, 14 Aug 2013 15:24:58 +0000 (15:24 +0000)]
[lit] Support parsing scripts with inconsistent or invalid encodings.

 - For whatever reason, we have a lot of test files with bogus unicode
   characters. This patch allows those scripts to still be parsed on Python3 by
   changing the parsing logic to work on binary files, and only require the
   actual script commands to be convertible to ascii.

llvm-svn: 188376

11 years agoAdd a deleted assignment operator for basic_ostream; LWG Issue #2067
Marshall Clow [Wed, 14 Aug 2013 15:15:28 +0000 (15:15 +0000)]
Add a deleted assignment operator for basic_ostream; LWG Issue #2067

llvm-svn: 188375

11 years agocpp11-migrate: Fix silly logic error preventing multiple transforms
Edwin Vane [Wed, 14 Aug 2013 15:09:44 +0000 (15:09 +0000)]
cpp11-migrate: Fix silly logic error preventing multiple transforms

A missed clause in an error test added in r188371 caused any use of the
migrator requesting multiple transforms to fail.

llvm-svn: 188374

11 years agoRevert r188354, "[tests] Ensure subsitution string is ascii."
NAKAMURA Takumi [Wed, 14 Aug 2013 14:57:01 +0000 (14:57 +0000)]
Revert r188354, "[tests] Ensure subsitution string is ascii."

It caused "shell parser error" on win32 internal shell. ShParser doesn't expect unicode, but str.

llvm-svn: 188373

11 years agoAdd test-case for hex floating-literals
Tim Northover [Wed, 14 Aug 2013 14:55:54 +0000 (14:55 +0000)]
Add test-case for hex floating-literals

Somehow I forgot to test one of the error conditions I'd added.

llvm-svn: 188372

11 years agocpp11-migrate: Adding -yaml-only option
Edwin Vane [Wed, 14 Aug 2013 14:52:45 +0000 (14:52 +0000)]
cpp11-migrate: Adding -yaml-only option

For use with -headers, -yaml-only will cause cpp11-migrate to not write header
changes to disk and instead write them as header change description files. This
option facilitiates upcoming functionality to properly support changing headers
as part of migration.

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

llvm-svn: 188371

11 years agoSupport C99 hexadecimal floating-point literals in assembly
Tim Northover [Wed, 14 Aug 2013 14:23:31 +0000 (14:23 +0000)]
Support C99 hexadecimal floating-point literals in assembly

It's useful to be able to write down floating-point numbers without having to
worry about what they'll be rounded to (as C99 discovered), this extends that
ability to the MC assembly parsers.

llvm-svn: 188370

11 years ago[sanitizer] Split platform_limits_posix into system- and kernel-dependent parts.
Evgeniy Stepanov [Wed, 14 Aug 2013 13:34:14 +0000 (13:34 +0000)]
[sanitizer] Split platform_limits_posix into system- and kernel-dependent parts.

This change moves everything depending on kernel headers (mostly ioctl types
and ids) into a separate source file. This will reduce the possibility of
header conflict on various platforms (most importantly, older glibc versions).

This change also removes 2 deprecated ioctls, and symbolic ids for other bunch
of ambiguous ioctls (i.e. same id is shared by ioctls with different memory
behavior).

llvm-svn: 188369

11 years ago\param is not for referring to arguments.
Benjamin Kramer [Wed, 14 Aug 2013 10:21:47 +0000 (10:21 +0000)]
\param is not for referring to arguments.

Found by -Wdocumentation.

llvm-svn: 188368

11 years agoFix a really terrifying but improbable bug in mem2reg. If you have seen
Chandler Carruth [Wed, 14 Aug 2013 08:56:41 +0000 (08:56 +0000)]
Fix a really terrifying but improbable bug in mem2reg. If you have seen
extremely subtle miscompilations (such as a load getting replaced with
the value stored *below* the load within a basic block) related to
promoting an alloca to an SSA value, there is the dim possibility that
you hit this. Please let me know if you won this unfortunate lottery.

The first half of mem2reg's core logic (as it is used both in the
standalone mem2reg pass and in SROA) builds up a mapping from
'Instruction *' to the index of that instruction within its basic block.
This allows quickly establishing which store dominate a particular load
even for large basic blocks. We cache this information throughout the
run of mem2reg over a function in order to amortize the cost of
computing it.

This is not in and of itself a strange pattern in LLVM. However, it
introduces a very important constraint: absolutely no instruction can be
deleted from the program without updating the mapping. Otherwise a newly
allocated instruction might get the same pointer address, and then end
up with a wrong index. Yes, LLVM routinely suffers from a *single
threaded* variant of the ABA problem. Most places in LLVM don't find
avoiding this an imposition because they don't both delete and create
new instructions iteratively, but mem2reg *loves* to do this... All the
time. Fortunately, the mem2reg code was really careful about updating
this cache to handle this eventuallity... except when it comes to the
debug declare intrinsic. Oops. The fix is to invalidate that pointer in
the cache when we delete it, the same as we do when deleting alloca
instructions and other instructions.

I've also caused the same bug in new code while working on a fix to
PR16867, so this seems to be a really unfortunate pattern. Hopefully in
subsequent patches the deletion of dead instructions can be consolidated
sufficiently to make it less likely that we'll see future occurences of
this bug.

Sorry for not having a test case, but I have literally no idea how to
reliably trigger this kind of thing. It may be single-threaded, but it
remains an ABA problem. It would require a really amazing number of
stars to align.

llvm-svn: 188367

11 years agoMake more helper methods into static functions.
Craig Topper [Wed, 14 Aug 2013 07:53:41 +0000 (07:53 +0000)]
Make more helper methods into static functions.

llvm-svn: 188366

11 years agoRemove tab characters.
Craig Topper [Wed, 14 Aug 2013 07:35:18 +0000 (07:35 +0000)]
Remove tab characters.

llvm-svn: 188365

11 years agoMake some helper methods static.
Craig Topper [Wed, 14 Aug 2013 07:34:43 +0000 (07:34 +0000)]
Make some helper methods static.

llvm-svn: 188364

11 years agoUse MVT in more lowering code.
Craig Topper [Wed, 14 Aug 2013 07:04:42 +0000 (07:04 +0000)]
Use MVT in more lowering code.

llvm-svn: 188363

11 years agoReplace EVT with MVT in isVectorShift. Keeps compiler from generating unneeded checks...
Craig Topper [Wed, 14 Aug 2013 06:21:10 +0000 (06:21 +0000)]
Replace EVT with MVT in isVectorShift. Keeps compiler from generating unneeded checks and handling for extended types.

llvm-svn: 188362

11 years agoReplace EVT with MVT in many of the shuffle lowering functions. Keeps compiler from...
Craig Topper [Wed, 14 Aug 2013 05:58:39 +0000 (05:58 +0000)]
Replace EVT with MVT in many of the shuffle lowering functions. Keeps compiler from generating unneeded checks and handling for extended types.

llvm-svn: 188361

11 years ago[lit] Fix a relative import issue I missed earlier.
Daniel Dunbar [Wed, 14 Aug 2013 05:07:16 +0000 (05:07 +0000)]
[lit] Fix a relative import issue I missed earlier.

llvm-svn: 188360

11 years ago[lit] Avoid StringIO.
Daniel Dunbar [Wed, 14 Aug 2013 05:07:13 +0000 (05:07 +0000)]
[lit] Avoid StringIO.
 - We barely used it, and it is very hard to use in a 2.5-3 compatible
   way because of changing expectations for its input types.

llvm-svn: 188359

11 years ago[lit] Fix tests to execute lit with same python as invoked with.
Daniel Dunbar [Wed, 14 Aug 2013 05:07:09 +0000 (05:07 +0000)]
[lit] Fix tests to execute lit with same python as invoked with.

llvm-svn: 188358

11 years ago[lit] Factor ShTest format script command parsing from other processing.
Daniel Dunbar [Wed, 14 Aug 2013 05:07:04 +0000 (05:07 +0000)]
[lit] Factor ShTest format script command parsing from other processing.

llvm-svn: 188357

11 years ago[lit] Move executeCommand() into lit.util.
Daniel Dunbar [Wed, 14 Aug 2013 05:07:01 +0000 (05:07 +0000)]
[lit] Move executeCommand() into lit.util.

llvm-svn: 188356

11 years ago[lit] Move formats into their own subpackage.
Daniel Dunbar [Wed, 14 Aug 2013 05:06:55 +0000 (05:06 +0000)]
[lit] Move formats into their own subpackage.

llvm-svn: 188355

11 years ago[tests] Ensure subsitution string is ascii.
Daniel Dunbar [Wed, 14 Aug 2013 05:05:39 +0000 (05:05 +0000)]
[tests] Ensure subsitution string is ascii.

llvm-svn: 188354

11 years agorevert 188352
Shuxin Yang [Wed, 14 Aug 2013 04:47:39 +0000 (04:47 +0000)]
revert 188352

llvm-svn: 188353

11 years agoDriver::IsUsingLTO() no longer return true when seeing -emit-llvm.
Shuxin Yang [Wed, 14 Aug 2013 04:36:53 +0000 (04:36 +0000)]
Driver::IsUsingLTO() no longer return true when seeing -emit-llvm.

The rationale for this change is to differentiate following two situations:
  1) clang -c -emit-llvm a.c
  2) clang -c -flto a.c

Reviewed by Eric Christopher. Thanks a lot!

llvm-svn: 188352

11 years ago[CMake] add_llvm_library: Specify explicit suffix .imp to import library to avoid...
NAKAMURA Takumi [Wed, 14 Aug 2013 03:34:49 +0000 (03:34 +0000)]
[CMake] add_llvm_library: Specify explicit suffix .imp to import library to avoid a warning between profile_rt-static and profile_rt-shared with lib/profile_rt.lib.

FIXME: It seems MS version of profile_rt.dll doesn't contain any export symbols.
llvm-svn: 188351

11 years agoBug fix: disallow a variable template to be redeclared as a non-templated variable
Larisse Voufo [Wed, 14 Aug 2013 03:09:19 +0000 (03:09 +0000)]
Bug fix: disallow a variable template to be redeclared as a non-templated variable

llvm-svn: 188350

11 years agoclang-tools-extra/test/cpp11-migrate/HeaderReplacements/main.cpp: Use "%/t" instead...
NAKAMURA Takumi [Wed, 14 Aug 2013 02:28:25 +0000 (02:28 +0000)]
clang-tools-extra/test/cpp11-migrate/HeaderReplacements/main.cpp: Use "%/t" instead of "%t" on sed(1) to avoid \'s expanded to control chars.

The feature, "%/t", has been introduced in llvm/lit since r188348.

llvm-svn: 188349

11 years agoLit: Introduce "%/[STpst] into parseIntegratedTestScript(), to normalize substitutions.
NAKAMURA Takumi [Wed, 14 Aug 2013 02:26:31 +0000 (02:26 +0000)]
Lit: Introduce "%/[STpst] into parseIntegratedTestScript(), to normalize substitutions.

llvm-svn: 188348

11 years agoclang-tools-extra/test/cpp11-migrate/HeaderReplacements/main.cpp: Use FileCheck inste...
NAKAMURA Takumi [Wed, 14 Aug 2013 02:26:03 +0000 (02:26 +0000)]
clang-tools-extra/test/cpp11-migrate/HeaderReplacements/main.cpp: Use FileCheck instead of grep(1).

llvm-svn: 188347

11 years agoDriver: Forward -Wl, and -Xlink arguments when using windows linker
Hans Wennborg [Wed, 14 Aug 2013 01:24:35 +0000 (01:24 +0000)]
Driver: Forward -Wl, and -Xlink arguments when using windows linker

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

llvm-svn: 188346

11 years agoclang-tools-extra/test/cpp11-migrate/HeaderReplacements/main.cpp: Suppress this on...
NAKAMURA Takumi [Wed, 14 Aug 2013 01:20:33 +0000 (01:20 +0000)]
clang-tools-extra/test/cpp11-migrate/HeaderReplacements/main.cpp: Suppress this on win32, for now. Investigating.

llvm-svn: 188345

11 years ago[mips] Fix bug in parsing accumulator registers.
Akira Hatanaka [Wed, 14 Aug 2013 01:15:52 +0000 (01:15 +0000)]
[mips] Fix bug in parsing accumulator registers.

llvm-svn: 188344

11 years ago[mips] Use register operands instead of register classes in DSP instruction
Akira Hatanaka [Wed, 14 Aug 2013 01:02:20 +0000 (01:02 +0000)]
[mips] Use register operands instead of register classes in DSP instruction
definitions.

llvm-svn: 188343

11 years ago[mips] Rename DSPRegs.
Akira Hatanaka [Wed, 14 Aug 2013 00:53:38 +0000 (00:53 +0000)]
[mips] Rename DSPRegs.

llvm-svn: 188342

11 years ago[mips] Rename HIRegs and LORegs.
Akira Hatanaka [Wed, 14 Aug 2013 00:47:08 +0000 (00:47 +0000)]
[mips] Rename HIRegs and LORegs.

llvm-svn: 188341

11 years agollvm/test/CodeGen/X86/setcc-sentinals.ll: Relax expressions for x86_64-win32.
NAKAMURA Takumi [Wed, 14 Aug 2013 00:46:00 +0000 (00:46 +0000)]
llvm/test/CodeGen/X86/setcc-sentinals.ll: Relax expressions for x86_64-win32.

llvm-svn: 188340

11 years agoFix always creating GEP with i32 indices
Matt Arsenault [Wed, 14 Aug 2013 00:24:38 +0000 (00:24 +0000)]
Fix always creating GEP with i32 indices

Use the pointer size if datalayout is available.
Use i64 if it's not, which is consistent with what other
places do when the pointer size is unknown.

The test doesn't really test this in a useful way
since it will be transformed to that later anyway,
but this now tests it for non-zero arrays and when
datalayout isn't available. The cases in
visitGetElementPtrInst should save an extra re-visit to
the newly created GEP since it won't need to cleanup after
itself.

llvm-svn: 188339

11 years agoUse type helper functions instead of cast
Matt Arsenault [Wed, 14 Aug 2013 00:24:34 +0000 (00:24 +0000)]
Use type helper functions instead of cast

llvm-svn: 188338

11 years agoUse array initializer, space around operator
Matt Arsenault [Wed, 14 Aug 2013 00:24:05 +0000 (00:24 +0000)]
Use array initializer, space around operator

llvm-svn: 188337

11 years ago[mips] Properly parse registers that appear in inline-asm constraints.
Akira Hatanaka [Wed, 14 Aug 2013 00:21:25 +0000 (00:21 +0000)]
[mips] Properly parse registers that appear in inline-asm constraints.

llvm-svn: 188336

11 years agoRefine diagnostics in my last patch.
Fariborz Jahanian [Wed, 14 Aug 2013 00:07:10 +0000 (00:07 +0000)]
Refine diagnostics in my last patch.
// rdar://14303083

llvm-svn: 188335

11 years agoDon't produce duplicate notes if we have deduction failure notes when resolving
Richard Smith [Wed, 14 Aug 2013 00:00:44 +0000 (00:00 +0000)]
Don't produce duplicate notes if we have deduction failure notes when resolving
the address of an overloaded function template.

llvm-svn: 188334

11 years agoImplement LWG Issue #2187 (emplace_back and emplace for vector<bool>)
Marshall Clow [Tue, 13 Aug 2013 23:54:12 +0000 (23:54 +0000)]
Implement LWG Issue #2187 (emplace_back and emplace for vector<bool>)

llvm-svn: 188333

11 years agoObjectiveC [QoI] issue warning if an element of an nsarray
Fariborz Jahanian [Tue, 13 Aug 2013 23:44:55 +0000 (23:44 +0000)]
ObjectiveC [QoI] issue warning if an element of an nsarray
expresison is a concatenated nsstring element.
// rdar://14303083

llvm-svn: 188332

11 years agoclang-cl: Support /link option and set target to win32
Hans Wennborg [Tue, 13 Aug 2013 23:38:57 +0000 (23:38 +0000)]
clang-cl: Support /link option and set target to win32

This adds support for the /link option, which forwards
subsequent arguments to the linker.

The test for this will only work when targetting win32.
Since that's the only target where clang-cl makes sense,
use that target by default.

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

llvm-svn: 188331

11 years agoFix Altivec vector literal parser hack for C++11.
Eli Friedman [Tue, 13 Aug 2013 23:38:34 +0000 (23:38 +0000)]
Fix Altivec vector literal parser hack for C++11.

It doesn't make any sense to accept "..." in the argument to a C-style cast,
so use a separate expression list parsing routine which rejects it. PR16874.

llvm-svn: 188330

11 years agoBBVectorize: Add initial stores to the write set when tracking uses
Hal Finkel [Tue, 13 Aug 2013 23:34:32 +0000 (23:34 +0000)]
BBVectorize: Add initial stores to the write set when tracking uses

When computing the use set of a store, we need to add the store to the write
set prior to iterating over later instructions. Otherwise, if there is a later
aliasing load of that store, that load will not be tagged as a use, and bad
things will happen.

trackUsesOfI still adds later dependent stores of an instruction to that
instruction's write set, but it never sees the original instruction, and so
when tracking uses of a store, the store must be added to the write set by the
caller.

Fixes PR16834.

llvm-svn: 188329