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

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

This fixes pr17721.

llvm-svn: 193612

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

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

llvm-svn: 193611

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

llvm-svn: 193610

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

llvm-svn: 193609

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

llvm-svn: 193608

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

llvm-svn: 193607

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

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

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

llvm-svn: 193606

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

Before:
  operator::A();

After:
  operator ::A();

llvm-svn: 193605

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

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

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

llvm-svn: 193604

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

llvm-svn: 193603

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

llvm-svn: 193602

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

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

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

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

llvm-svn: 193601

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

Allow users to disable or enable CRC subtarget feature.

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

llvm-svn: 193600

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

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

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

llvm-svn: 193599

11 years agoFix misapplied patch in r193597
Anders Waldenborg [Tue, 29 Oct 2013 09:37:28 +0000 (09:37 +0000)]
Fix misapplied patch in r193597

Sorry Peter Zotov, entirely my fault.

llvm-svn: 193598

11 years agollvm-c: Make LLVM{Get,Set}Alignment work on {Load,Store}Inst too
Anders Waldenborg [Tue, 29 Oct 2013 09:02:02 +0000 (09:02 +0000)]
llvm-c: Make LLVM{Get,Set}Alignment work on {Load,Store}Inst too

Patch by Peter Zotov

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

llvm-svn: 193597

11 years agoDoh, got this turned around. This is in fact the consistent ordering.
Chandler Carruth [Tue, 29 Oct 2013 08:57:33 +0000 (08:57 +0000)]
Doh, got this turned around. This is in fact the consistent ordering.

llvm-svn: 193596

11 years agoClean up the deeply misleading name of the "MultiLibSuffix". This is
Chandler Carruth [Tue, 29 Oct 2013 08:53:03 +0000 (08:53 +0000)]
Clean up the deeply misleading name of the "MultiLibSuffix". This is
actually a MIPS-only hack to shim in random ABI directory suffixes in
numerous places throughout the toolchain's path search. It shouldn't
appear to be anything more general or useful.

llvm-svn: 193595

11 years agoUse Rewriter::overwriteChangedFiles() directly
Alp Toker [Tue, 29 Oct 2013 08:32:41 +0000 (08:32 +0000)]
Use Rewriter::overwriteChangedFiles() directly

This replaces the custom code in RefactoringTool::saveRewrittenFiles() which
lacked atomic file saving and error diagnostics, resolving an old FIXME from
r157331.

Landing this time with the proper return code, plus a very unhelpful comment
cleared up.

Rubber-stamped by Manuel Klimek.

llvm-svn: 193594

11 years agoAArch64: add 'a' inline asm operand modifier
Tim Northover [Tue, 29 Oct 2013 08:22:33 +0000 (08:22 +0000)]
AArch64: add 'a' inline asm operand modifier

This is used in the Linux kernel, and effectively just means "print an
address".

llvm-svn: 193593

11 years agoRevert "Use Rewriter::overwriteChangedFiles() directly"
Alp Toker [Tue, 29 Oct 2013 07:56:03 +0000 (07:56 +0000)]
Revert "Use Rewriter::overwriteChangedFiles() directly"

This wasn't ready for prime time yet, seems to break tools-extra.

This reverts commit r193590.

llvm-svn: 193592

11 years agoRemove obsolete RewriteBuffer comment
Alp Toker [Tue, 29 Oct 2013 07:47:57 +0000 (07:47 +0000)]
Remove obsolete RewriteBuffer comment

The string buffer in question was replaced with RewriteRope in r43884
back in 2007.

llvm-svn: 193591

11 years agoUse Rewriter::overwriteChangedFiles() directly
Alp Toker [Tue, 29 Oct 2013 07:47:49 +0000 (07:47 +0000)]
Use Rewriter::overwriteChangedFiles() directly

The old code in RefactoringTool::saveRewrittenFiles() lacked
atomic moves and diagnostics and had FIXME to this effect.

Rubber-stamped by Manuel Klimek.

llvm-svn: 193590

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

This touches creation of namespaces and global variables. The purpose is to
handle all DIE creations similarly: constructs the context first, then creates
the DIE and immediately adds the DIE to its parent.

We use createAndAddDIE to wrap around "new DIE(".

llvm-svn: 193589

11 years ago[FileToMutable] Garbage collect unused private member
Shankar Easwaran [Tue, 29 Oct 2013 05:33:52 +0000 (05:33 +0000)]
[FileToMutable] Garbage collect unused private member

llvm-svn: 193588

11 years ago[Sanitizer] Simplify StackTrace::PrintStack interface: prefer common flags to turn...
Alexey Samsonov [Tue, 29 Oct 2013 05:31:25 +0000 (05:31 +0000)]
[Sanitizer] Simplify StackTrace::PrintStack interface: prefer common flags to turn on/off the symbolization

llvm-svn: 193587

11 years ago[test] Fix a test failure, this test is only applicable in debug mode
Shankar Easwaran [Tue, 29 Oct 2013 05:26:49 +0000 (05:26 +0000)]
[test] Fix a test failure, this test is only applicable in debug mode

llvm-svn: 193586

11 years ago[PassManager] add ReaderWriter{Native,YAML} to the Driver.
Shankar Easwaran [Tue, 29 Oct 2013 05:12:14 +0000 (05:12 +0000)]
[PassManager] add ReaderWriter{Native,YAML} to the Driver.

Enable this for the following flavors

a) core
b) gnu
c) darwin

Its disabled for the flavor PECOFF. Convenient markers are added with FIXME
comments in the Driver that would be removed and code removed from each flavor.

llvm-svn: 193585

11 years agoFix spelling.
Rui Ueyama [Tue, 29 Oct 2013 04:54:50 +0000 (04:54 +0000)]
Fix spelling.

llvm-svn: 193584

11 years agoAdd missing attributes [[gnu::no_sanitize_address]] and
Nick Lewycky [Tue, 29 Oct 2013 03:54:41 +0000 (03:54 +0000)]
Add missing attributes [[gnu::no_sanitize_address]] and
[[gnu::no_address_safety_analysis]].

llvm-svn: 193583

11 years agoTreat [[gnu::__const]] the same as [[gnu::const]]. GCC's tokenizer can't tell
Nick Lewycky [Tue, 29 Oct 2013 03:33:57 +0000 (03:33 +0000)]
Treat [[gnu::__const]] the same as [[gnu::const]]. GCC's tokenizer can't tell
the difference.

llvm-svn: 193582

11 years ago[msan] Intercept shmat.
Evgeniy Stepanov [Tue, 29 Oct 2013 02:48:49 +0000 (02:48 +0000)]
[msan] Intercept shmat.

llvm-svn: 193581

11 years agoAdd llvm/test/Transforms/SLPVectorizer/ARM/lit.local.cfg. Tests there require ARM...
NAKAMURA Takumi [Tue, 29 Oct 2013 02:46:00 +0000 (02:46 +0000)]
Add llvm/test/Transforms/SLPVectorizer/ARM/lit.local.cfg. Tests there require ARM in targets.

llvm-svn: 193580

11 years agoFix "existant" typos
Alp Toker [Tue, 29 Oct 2013 02:35:28 +0000 (02:35 +0000)]
Fix "existant" typos

llvm-svn: 193579

11 years agoFix "existant" typos
Alp Toker [Tue, 29 Oct 2013 02:34:44 +0000 (02:34 +0000)]
Fix "existant" typos

llvm-svn: 193578

11 years agoCleanup comments and braces. No functionality changed, just trying to
Chandler Carruth [Tue, 29 Oct 2013 02:27:56 +0000 (02:27 +0000)]
Cleanup comments and braces. No functionality changed, just trying to
record what is *actually* going on here as the comments existing in the
code are confusing at best, and in places outright misleading.

The API is even more misleading. Yay.

llvm-svn: 193577

11 years agoClean up.
Richard Smith [Tue, 29 Oct 2013 01:44:23 +0000 (01:44 +0000)]
Clean up.

llvm-svn: 193576

11 years agoDWARFFormValue.cpp: Appease gcc to give explicit constructors.
NAKAMURA Takumi [Tue, 29 Oct 2013 01:43:05 +0000 (01:43 +0000)]
DWARFFormValue.cpp: Appease gcc to give explicit constructors.

  error: conversion from `const uint8_t*' to non-scalar type `llvm::ArrayRef<unsigned char>' requested

llvm-svn: 193575

11 years agoARM cost model: Unaligned vectorized double stores are expensive
Arnold Schwaighofer [Tue, 29 Oct 2013 01:33:57 +0000 (01:33 +0000)]
ARM cost model: Unaligned vectorized double stores are expensive

Updated a test case that assumed that <2 x double> would vectorize to use
<4 x float>.

radar://15338229

llvm-svn: 193574

11 years agoARM cost model: Account for zero cost scalar SROA instructions
Arnold Schwaighofer [Tue, 29 Oct 2013 01:33:53 +0000 (01:33 +0000)]
ARM cost model: Account for zero cost scalar SROA instructions

By vectorizing a series of srl, or, ... instructions we have obfuscated the
intention so much that the backend does not know how to fold this code away.

radar://15336950

llvm-svn: 193573

11 years agoSLPVectorizer: Use vector type for vectorized memory operations
Arnold Schwaighofer [Tue, 29 Oct 2013 01:33:50 +0000 (01:33 +0000)]
SLPVectorizer: Use vector type for vectorized memory operations

No test case, because with the current cost model we don't see a difference.
An upcoming ARM memory cost model change will expose and test this bug.

radar://15332579

llvm-svn: 193572

11 years agoCleaning up comments in lli
Andrew Kaylor [Tue, 29 Oct 2013 01:33:14 +0000 (01:33 +0000)]
Cleaning up comments in lli

llvm-svn: 193571

11 years agoAdding a workaround for __main linking with remote lli and Cygwin/MinGW
Andrew Kaylor [Tue, 29 Oct 2013 01:29:56 +0000 (01:29 +0000)]
Adding a workaround for __main linking with remote lli and Cygwin/MinGW

llvm-svn: 193570

11 years agoMove the STT_FILE symbols out of the normal symbol table processing for
Joerg Sonnenberger [Tue, 29 Oct 2013 01:06:17 +0000 (01:06 +0000)]
Move the STT_FILE symbols out of the normal symbol table processing for
ELF. They can overlap with the other symbols, e.g. if a source file
"foo.c" contains a function "foo" with a static variable "c".

llvm-svn: 193569

11 years agoDebug Info: use createAndAddDIE to wrap around "new DIE" in DwarfDebug.
Manman Ren [Tue, 29 Oct 2013 01:03:01 +0000 (01:03 +0000)]
Debug Info: use createAndAddDIE to wrap around "new DIE" in DwarfDebug.

This commit ensures DIEs are constructed within a compile unit and
immediately added to their parents.

Reviewed off-list by Eric.

llvm-svn: 193568

11 years agoDebug Info: use createAndAddDIE for newly-created Subprogram DIEs.
Manman Ren [Tue, 29 Oct 2013 00:58:04 +0000 (00:58 +0000)]
Debug Info: use createAndAddDIE for newly-created Subprogram DIEs.

More patches will be submitted to convert "new DIE(" to use createAddAndDIE in
DwarfCompileUnit.cpp. This will simplify implementation of addDIEEntry where
we have to decide between ref4 and ref_addr, because DIEs that can be shared
across CU will be added to a CU already.

Reviewed off-list by Eric.

llvm-svn: 193567

11 years agoDebug Info: add a helper function createAndAddDIE.
Manman Ren [Tue, 29 Oct 2013 00:53:03 +0000 (00:53 +0000)]
Debug Info: add a helper function createAndAddDIE.

It wraps around "new DIE(" and handles the bookkeeping part of the newly-created
DIE. It adds the DIE to its parent, and calls insertDIE if necessary. It makes
sure that bookkeeping is done at the earliest time and we should not see
parentless DIEs if all constructions of DIEs go through this helper function.

Later on, we can use an allocator for DIE allocation, and will only need to
change createAndAddDIE instead of modifying all the "new DIE(".

Reviewed off-list by Eric.

llvm-svn: 193566

11 years ago[PECOFF] Fix __ImageBase symbol.
Rui Ueyama [Tue, 29 Oct 2013 00:33:34 +0000 (00:33 +0000)]
[PECOFF] Fix __ImageBase symbol.

__ImageBase is an absolute symbol whose address is the same as the image base
address. What we did before this patch was to create __ImageBase symbol as a
symbol whose *contents* (not location) is the image base address, which is
clearly wrong.

llvm-svn: 193565

11 years ago<rdar://problem/15144376>
Enrico Granata [Tue, 29 Oct 2013 00:28:35 +0000 (00:28 +0000)]
<rdar://problem/15144376>

This commit reimplements the TypeImpl class (the class that backs SBType) in terms of a static,dynamic type pair

This is useful for those cases when the dynamic type of an ObjC variable can only be obtained in terms of an "hollow" type with no ivars
In that case, we could either go with the static type (+iVar information) or with the dynamic type (+inheritance chain)

With the new TypeImpl implementation, we try to combine these two sources of information in order to extract as much information as possible
This should improve the functionality of tools that are using the SBType API to do extensive dynamic type inspection

llvm-svn: 193564

11 years agoMerge DWARFDIE::extractFast and DWARFDIE::extract into one function.
Alexey Samsonov [Mon, 28 Oct 2013 23:58:58 +0000 (23:58 +0000)]
Merge DWARFDIE::extractFast and DWARFDIE::extract into one function.

Complicated CU-DIE-specific logic in the latter was never used,
and it makes sense to have safety checks for broken dwarf in the former.

llvm-svn: 193563

11 years agoRenaming MCJIT .ir files to .ll and moving them to Inputs
Andrew Kaylor [Mon, 28 Oct 2013 23:51:03 +0000 (23:51 +0000)]
Renaming MCJIT .ir files to .ll and moving them to Inputs

llvm-svn: 193562

11 years agoSwitch %clang -cc1 tests to %clang_cc1
Alp Toker [Mon, 28 Oct 2013 23:47:09 +0000 (23:47 +0000)]
Switch %clang -cc1 tests to %clang_cc1

llvm-svn: 193561

11 years agoDWARF parser: Use ArrayRef to represent form sizes and simplify DWARFDIE::extractFast...
Alexey Samsonov [Mon, 28 Oct 2013 23:41:49 +0000 (23:41 +0000)]
DWARF parser: Use ArrayRef to represent form sizes and simplify DWARFDIE::extractFast() interface. No functionality change.

llvm-svn: 193560

11 years agolit: add missing substitutions for recently added tools
Alp Toker [Mon, 28 Oct 2013 23:37:49 +0000 (23:37 +0000)]
lit: add missing substitutions for recently added tools

llvm-mcmarkup, obj2yaml and yaml2obj were missing from the substitutions list,
causing the test suite to fail in a sandboxed environment.

llvm-svn: 193559

11 years agoQuote potential shell expansions found in tests
Alp Toker [Mon, 28 Oct 2013 23:37:45 +0000 (23:37 +0000)]
Quote potential shell expansions found in tests

llvm-svn: 193558

11 years agoFix comment.
Rui Ueyama [Mon, 28 Oct 2013 23:34:41 +0000 (23:34 +0000)]
Fix comment.

llvm-svn: 193557

11 years ago[PECOFF] Set section name for BSS atoms.
Rui Ueyama [Mon, 28 Oct 2013 23:26:33 +0000 (23:26 +0000)]
[PECOFF] Set section name for BSS atoms.

This change has no effect now, but will be needed to emit BSS atoms
to .bss section.

llvm-svn: 193556

11 years agoDWARF parser: since DWARF4, DW_AT_high_pc may be a constant representing function...
Alexey Samsonov [Mon, 28 Oct 2013 23:15:15 +0000 (23:15 +0000)]
DWARF parser: since DWARF4, DW_AT_high_pc may be a constant representing function size

llvm-svn: 193555

11 years agoRevert "Support cross linking to arm on ubuntu."
Rafael Espindola [Mon, 28 Oct 2013 23:14:34 +0000 (23:14 +0000)]
Revert "Support cross linking to arm on ubuntu."

This reverts commit r193528 (and fixes).

It broke Chandler's setup.

llvm-svn: 193554

11 years agoDebugInfo: Introduce the notion of "form classes"
Alexey Samsonov [Mon, 28 Oct 2013 23:01:48 +0000 (23:01 +0000)]
DebugInfo: Introduce the notion of "form classes"

Summary:
Use DWARF4 table of form classes to fetch attributes from DIE
in a more consistent way. This shouldn't change the functionality and
serves as a refactoring for upcoming change: DW_AT_high_pc has different
semantics depending on its form class.

Reviewers: dblaikie, echristo

Reviewed By: echristo

CC: echristo, llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1961

llvm-svn: 193553

11 years agoFix the lli --extra-module value_desc
Alp Toker [Mon, 28 Oct 2013 22:51:25 +0000 (22:51 +0000)]
Fix the lli --extra-module value_desc

llvm-svn: 193552

11 years ago[MachO] pointer align linker generated (non)lazy pointers
Nick Kledzik [Mon, 28 Oct 2013 22:48:33 +0000 (22:48 +0000)]
[MachO] pointer align linker generated (non)lazy pointers

llvm-svn: 193551

11 years agoAdd a few tests for StringRef::{start,end}with.
Rui Ueyama [Mon, 28 Oct 2013 22:42:54 +0000 (22:42 +0000)]
Add a few tests for StringRef::{start,end}with.

llvm-svn: 193550

11 years agoAllow a new syntax in a module requires-declaration:
Richard Smith [Mon, 28 Oct 2013 22:18:19 +0000 (22:18 +0000)]
Allow a new syntax in a module requires-declaration:

  requires ! feature

The purpose of this is to allow (for instance) the module map for /usr/include
to exclude <tgmath.h> and <complex.h> when building in C++ (these headers are
instead provided by the C++ standard library in this case, and the glibc C
<tgmath.h> header would otherwise try to include <complex.h>, resulting in a
module cycle).

llvm-svn: 193549

11 years agoConvert another llc -filetype=obj test.
Rafael Espindola [Mon, 28 Oct 2013 22:17:19 +0000 (22:17 +0000)]
Convert another llc -filetype=obj test.

llvm-svn: 193548

11 years agoConvert another llc -filetype=obj test.
Rafael Espindola [Mon, 28 Oct 2013 22:11:47 +0000 (22:11 +0000)]
Convert another llc -filetype=obj test.

llvm-svn: 193547

11 years agoConvert another llc -filetype=obj test.
Rafael Espindola [Mon, 28 Oct 2013 22:05:05 +0000 (22:05 +0000)]
Convert another llc -filetype=obj test.

llvm-svn: 193546

11 years agoFix a parser crash when there are #pragmas in a context which requires a single
Richard Smith [Mon, 28 Oct 2013 22:04:30 +0000 (22:04 +0000)]
Fix a parser crash when there are #pragmas in a context which requires a single
statement (after a case label, if, etc). Patch by Olivier Goffart!

llvm-svn: 193545

11 years agoStandardizing lli's extra module command line option
Andrew Kaylor [Mon, 28 Oct 2013 21:58:15 +0000 (21:58 +0000)]
Standardizing lli's extra module command line option

llvm-svn: 193544

11 years agoRemove stray '_'.
Bill Wendling [Mon, 28 Oct 2013 21:43:54 +0000 (21:43 +0000)]
Remove stray '_'.

llvm-svn: 193543

11 years agoUse the correct reference. Spotted by Sean Silva.
Bill Wendling [Mon, 28 Oct 2013 21:43:11 +0000 (21:43 +0000)]
Use the correct reference. Spotted by Sean Silva.

llvm-svn: 193542

11 years agoRemove 2.4 from the list of supported Python versions.
Bill Wendling [Mon, 28 Oct 2013 21:22:23 +0000 (21:22 +0000)]
Remove 2.4 from the list of supported Python versions.

llvm-svn: 193541

11 years ago[mips] Simplify LowerFormalArguments using getRegClassFor.
Akira Hatanaka [Mon, 28 Oct 2013 21:21:36 +0000 (21:21 +0000)]
[mips] Simplify LowerFormalArguments using getRegClassFor.

No functionality change.

llvm-svn: 193540

11 years agoConvert another llc -filetype=obj test.
Rafael Espindola [Mon, 28 Oct 2013 21:12:15 +0000 (21:12 +0000)]
Convert another llc -filetype=obj test.

llvm-svn: 193539

11 years agoConvert another llc -filetype=obj test.
Rafael Espindola [Mon, 28 Oct 2013 21:06:12 +0000 (21:06 +0000)]
Convert another llc -filetype=obj test.

llvm-svn: 193538

11 years agoConvert another llc -filetype=obj test.
Rafael Espindola [Mon, 28 Oct 2013 20:59:41 +0000 (20:59 +0000)]
Convert another llc -filetype=obj test.

llvm-svn: 193537

11 years agoConvert another llc -filetype=obj test.
Rafael Espindola [Mon, 28 Oct 2013 20:54:33 +0000 (20:54 +0000)]
Convert another llc -filetype=obj test.

llvm-svn: 193536

11 years agoReturn early from getUnconditionalBranchTargetOpValue if the branch target is
Lang Hames [Mon, 28 Oct 2013 20:51:11 +0000 (20:51 +0000)]
Return early from getUnconditionalBranchTargetOpValue if the branch target is
an MCExpr, in order to avoid writing an encoded zero value in the immediate
field.

When getUnconditionalBranchTargetOpValue is called with an MCExpr target, we
don't know what the final immediate field value should be. We shouldn't
explicitly set the immediate field to an encoded zero value as zero is encoded
with a non-zero bit pattern. This leads to bits being set that pollute the
final immediate value. The nature of the encoding is such that the polluted
bits only affect very large immediate values, explaining why this hasn't
caused problems earlier.

Fixes <rdar://problem/15155975>.

llvm-svn: 193535

11 years agoConvert a llc -filetype=obj test into a llvm-mc test.
Rafael Espindola [Mon, 28 Oct 2013 20:40:20 +0000 (20:40 +0000)]
Convert a llc -filetype=obj test into a llvm-mc test.

llvm-svn: 193534

11 years agoMore windows path handling.
Rafael Espindola [Mon, 28 Oct 2013 19:40:25 +0000 (19:40 +0000)]
More windows path handling.

llvm-svn: 193533

11 years agoRelax test to pass with windows paths.
Rafael Espindola [Mon, 28 Oct 2013 19:19:29 +0000 (19:19 +0000)]
Relax test to pass with windows paths.

llvm-svn: 193532

11 years agoChange the default handling for SIGALRM and SIGCHLD to not notify.
Jim Ingham [Mon, 28 Oct 2013 19:00:42 +0000 (19:00 +0000)]
Change the default handling for SIGALRM and SIGCHLD to not notify.

<rdar://problem/15208799>

llvm-svn: 193530

11 years ago[msan] Fix a typo and enable poison_in_free flag.
Evgeniy Stepanov [Mon, 28 Oct 2013 18:53:37 +0000 (18:53 +0000)]
[msan] Fix a typo and enable poison_in_free flag.

llvm-svn: 193529

11 years agoSupport cross linking to arm on ubuntu.
Rafael Espindola [Mon, 28 Oct 2013 18:52:30 +0000 (18:52 +0000)]
Support cross linking to arm on ubuntu.

With this patch we correctly determine that ubuntu's ARM tree is not biarch
and use "lib" istead of "lib32".

Without this patch the search inside the arm tree for the crt files was failing
and we would end up trying to use the i686 ones in lib32.

llvm-svn: 193528

11 years agoTableGen: remove unused variable.
Ahmed Bougacha [Mon, 28 Oct 2013 18:19:04 +0000 (18:19 +0000)]
TableGen: remove unused variable.

llvm-svn: 193527

11 years agoTableGen: Refactor DAG patterns to enable parsing one pattern at a time.
Ahmed Bougacha [Mon, 28 Oct 2013 18:07:21 +0000 (18:07 +0000)]
TableGen: Refactor DAG patterns to enable parsing one pattern at a time.

llvm-svn: 193526

11 years agoTableGen: Refactor AsmWriterEmitter to keep AsmWriterInsts.
Ahmed Bougacha [Mon, 28 Oct 2013 18:07:17 +0000 (18:07 +0000)]
TableGen: Refactor AsmWriterEmitter to keep AsmWriterInsts.

These used to be referenced by the CGI->AWI map (in AsmWriterEmitter), but
stored in a vector local to EmitPrintInstruction. Move the vector to
AsmWriterEmitter too.

llvm-svn: 193525

11 years ago[arm] Implement eabi_attribute, cpu, and fpu directives.
Logan Chien [Mon, 28 Oct 2013 17:51:12 +0000 (17:51 +0000)]
[arm] Implement eabi_attribute, cpu, and fpu directives.

This commit allows the ARM integrated assembler to parse
and assemble the code with .eabi_attribute, .cpu, and
.fpu directives.

To implement the feature, this commit moves the code from
AttrEmitter to ARMTargetStreamers, and several new test
cases related to cortex-m4, cortex-r5, and cortex-a15 are
added.

Besides, this commit also change the Subtarget->isFPOnlySP()
to Subtarget->hasD16() to match the usage of .fpu directive.

This commit changes the test cases:

* Several .eabi_attribute directives in
  2010-09-29-mc-asm-header-test.ll are removed because the .fpu
  directive already cover the functionality.

* In the Cortex-A15 test case, the value for
  Tag_Advanced_SIMD_arch has be changed from 1 to 2,
  which is more precise.

llvm-svn: 193524

11 years agosimplify ConstantRange::getSetSize()
Nuno Lopes [Mon, 28 Oct 2013 16:52:38 +0000 (16:52 +0000)]
simplify ConstantRange::getSetSize()

llvm-svn: 193523

11 years ago[Sanitizer] Revert r193501 and properly fix r193448
Alexey Samsonov [Mon, 28 Oct 2013 16:31:39 +0000 (16:31 +0000)]
[Sanitizer] Revert r193501 and properly fix r193448

llvm-svn: 193522

11 years ago[SystemZ] Set usaAA to true
Richard Sandiford [Mon, 28 Oct 2013 13:53:37 +0000 (13:53 +0000)]
[SystemZ] Set usaAA to true

useAA significantly improves the handling of vector code that has TBAA
information attached.  It also helps other cases, as shown by the testsuite
changes here.  The only real downside I've seen is that it interferes with
MergeConsecutiveStores.  The problem is that that optimization works top
down, starting at the first store in the chain, and looks for cases where
the chain result is only used by a single related store.  These related
stores don't alias, so useAA will have rewritten all the later stores to
use a different chain input (typically the same one as the first store).

I think the advantages outweigh the disadvantages though, so for now I've
just disabled alias analysis for the unaligned-01.ll test.

llvm-svn: 193521

11 years agoasan/msan: separate different report blocks with new lines
Dmitry Vyukov [Mon, 28 Oct 2013 13:05:32 +0000 (13:05 +0000)]
asan/msan: separate different report blocks with new lines

this makes the reports consistent with tsan, and much more readable.

llvm-svn: 193520

11 years agotsan: start the background thread with signals blocked, otherwise it can steal users...
Dmitry Vyukov [Mon, 28 Oct 2013 12:29:32 +0000 (12:29 +0000)]
tsan: start the background thread with signals blocked, otherwise it can steal users signals

llvm-svn: 193519

11 years ago[DAGCombiner] Respect volatility when checking for aliases
Richard Sandiford [Mon, 28 Oct 2013 12:00:00 +0000 (12:00 +0000)]
[DAGCombiner] Respect volatility when checking for aliases

Making useAA() default to true for SystemZ showed that the combiner alias
analysis wasn't handling volatile accesses.  This hit many of the SystemZ
tests, but I arbitrarily picked one for the purpose of this patch.

llvm-svn: 193518

11 years agoKeep TBAA info when rewriting SelectionDAG loads and stores
Richard Sandiford [Mon, 28 Oct 2013 11:17:59 +0000 (11:17 +0000)]
Keep TBAA info when rewriting SelectionDAG loads and stores

Most SelectionDAG code drops the TBAA info when creating a new form of a
load and store (e.g. during legalization, or when converting a plain
load to an extending one).  This patch tries to catch all cases where
the TBAA information can legitimately be carried over.

The patch adds alternative forms of getLoad() and getExtLoad() that take
a MachineMemOperand instead of individual fields.  (The corresponding
getTruncStore() already exists.)  The idea is to use the MachineMemOperand
forms when all fields are carried over (size, pointer info, isVolatile,
isNonTemporal, alignment and TBAA info).  If some adjustment is being
made, e.g. to narrow the load, then we still pass the individual fields
but also pass the TBAA info.

llvm-svn: 193517

11 years agolit: multiprocessing platform fix attempt
Alp Toker [Mon, 28 Oct 2013 10:26:13 +0000 (10:26 +0000)]
lit: multiprocessing platform fix attempt

The error raised by Python varies by platform(!), so let's just catch any
exception and fall back.

Thanks to Sylvestre Ledru for noticing this on a Debian / Python 2.7 system
running code coverage.

llvm-svn: 193516

11 years ago[libsanitizer] configure+make: install include/sanitizer into Clang
Alexander Potapenko [Mon, 28 Oct 2013 08:21:35 +0000 (08:21 +0000)]
[libsanitizer] configure+make: install include/sanitizer into Clang

When building Clang with compiler-rt, copy the contents of compiler-rt/include/sanitizer into lib/clang/3.4/include/sanitizer

llvm-svn: 193515

11 years agoSCEV: Make the final add of an inbounds GEP nuw if we know that the index is positive.
Benjamin Kramer [Mon, 28 Oct 2013 07:30:06 +0000 (07:30 +0000)]
SCEV: Make the final add of an inbounds GEP nuw if we know that the index is positive.

We can't do this for the general case as saying a GEP with a negative index
doesn't have unsigned wrap isn't valid for negative indices.
  %gep = getelementptr inbounds i32* %p, i64 -1

But an inbounds GEP cannot run past the end of address space. So we check for
the very common case of a positive index and make GEPs derived from that NUW.
Together with Andy's recent non-unit stride work this lets us analyze loops
like

  void foo3(int *a, int *b) {
    for (; a < b; a++) {}
  }

PR12375, PR12376.

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

llvm-svn: 193514

11 years agoStaticAnalyzer/Checkers/DynamicTypePropagation.cpp: Fix in comments. 80-col and an...
NAKAMURA Takumi [Mon, 28 Oct 2013 04:14:33 +0000 (04:14 +0000)]
StaticAnalyzer/Checkers/DynamicTypePropagation.cpp: Fix in comments. 80-col and an utf8 char.

llvm-svn: 193513

11 years agoPrune utf8 chars in comments.
NAKAMURA Takumi [Mon, 28 Oct 2013 04:07:38 +0000 (04:07 +0000)]
Prune utf8 chars in comments.

llvm-svn: 193512