platform/upstream/llvm.git
10 years agoUpdated phabricator server.
Serge Pavlov [Mon, 7 Apr 2014 03:57:04 +0000 (03:57 +0000)]
Updated phabricator server.

llvm-svn: 205696

10 years agoUpdated phabricator server.
Serge Pavlov [Mon, 7 Apr 2014 03:39:55 +0000 (03:39 +0000)]
Updated phabricator server.

llvm-svn: 205695

10 years ago[ELF] Accept "-rpath=<foo>" as well as "-rpath <foo>".
Rui Ueyama [Sun, 6 Apr 2014 21:23:24 +0000 (21:23 +0000)]
[ELF] Accept "-rpath=<foo>" as well as "-rpath <foo>".

llvm-svn: 205694

10 years ago[ELF] Fix driver bug.
Rui Ueyama [Sun, 6 Apr 2014 21:15:05 +0000 (21:15 +0000)]
[ELF] Fix driver bug.

GNU LD-comptaible driver wrongly requires a space after '=' for a few
options such as "-init=<symbol>" or "-entry=<symbol>". This patch is
to fix that bug and add a few tests for it.

llvm-svn: 205693

10 years ago[ELF] Use typedefs to make class field declarations shorter.
Simon Atanasyan [Sun, 6 Apr 2014 19:44:50 +0000 (19:44 +0000)]
[ELF] Use typedefs to make class field declarations shorter.

No functional changes.

llvm-svn: 205692

10 years agoDebugInfo: Support type alias templates
David Blaikie [Sun, 6 Apr 2014 17:14:06 +0000 (17:14 +0000)]
DebugInfo: Support type alias templates

We already got the type alias correct (though I've included a test case
here) since Clang represents that like any other typedef - but type
alias templates weren't being handled.

llvm-svn: 205691

10 years agoChanges in IntelJITEventListener - By Arch Robinson
Elena Demikhovsky [Sun, 6 Apr 2014 11:08:33 +0000 (11:08 +0000)]
Changes in IntelJITEventListener - By Arch Robinson
   - take->release: LLVM has moved to C++11.  MockWrapper became an instance of unique_ptr.

   - method symbol_iterator::increment disappeared recently, in this revision:

     r200442 | rafael | 2014-01-29 20:49:50 -0600 (Wed, 29 Jan 2014) | 9 lines

Simplify the handling of iterators in ObjectFile.

None of the object file formats reported error on iterator increment. In
retrospect, that is not too surprising: no object format stores symbols or
sections in a linked list or other structure that requires chasing pointers.
As a consequence, all error checking can be done on begin() and end().

This reduces the text segment of bin/llvm-readobj in my machine from 521233 to
518526 bytes.

My change mimics the change that the revision made to lib/DebugInfo/DWARFContext.cpp .

    - const_cast: Shut up a warning from gcc.

I ran unittests/ExecutionEngine/JIT/Debug+Asserts/JITTests to make sure it worked.

- Arch

llvm-svn: 205689

10 years agoQuick fix: Triple::isOSMSVCRT() should be false for targeting cygwin.
NAKAMURA Takumi [Sun, 6 Apr 2014 10:01:23 +0000 (10:01 +0000)]
Quick fix: Triple::isOSMSVCRT() should be false for targeting cygwin.

It affected callee's stack pop in x86. It is one of devergences between cygwin and mingw since mingw-gcc-4.6.

Added testcases to llvm/test/CodeGen/X86/win32_sret.ll for cygwin.

llvm-svn: 205688

10 years ago[yaml2obj][ELF] Rename class SectionNameToIdxMap => NameToIdxMap. It can
Simon Atanasyan [Sun, 6 Apr 2014 09:02:55 +0000 (09:02 +0000)]
[yaml2obj][ELF] Rename class SectionNameToIdxMap => NameToIdxMap. It can
be used for indexing not only section's names.

No functional changes.

llvm-svn: 205687

10 years agoDebugInfo: emit namespace aliases as named imported declarations instead of named...
David Blaikie [Sun, 6 Apr 2014 06:30:03 +0000 (06:30 +0000)]
DebugInfo: emit namespace aliases as named imported declarations instead of named imported entities

Apparently that's how DWARF4 suggests they be emitted. So let's do that.

llvm-svn: 205686

10 years agoDebugInfo: Support namespace aliases as DW_TAG_imported_declaration instead of DW_TAG...
David Blaikie [Sun, 6 Apr 2014 06:29:01 +0000 (06:29 +0000)]
DebugInfo: Support namespace aliases as DW_TAG_imported_declaration instead of DW_TAG_imported_module

I really should read the spec more often (and test GCC more often too).
I just assumed that namespace aliases would be the same as using
directives, except with a name. But apparently that's not how the DWARF
standards suggests they be implemented. DWARF4 provides an example and
other non-normative text suggesting that namespace aliases be
implemented by named imported declarations intsead of named imported
modules.

So be it.

llvm-svn: 205685

10 years ago[Frontend] If the module file lock owner have died, try to get the lock again. Needs...
Argyrios Kyrtzidis [Sun, 6 Apr 2014 03:21:44 +0000 (03:21 +0000)]
[Frontend] If the module file lock owner have died, try to get the lock again. Needs llvm r205683.

llvm-svn: 205684

10 years ago[Support] Modify LockFileManager::waitForUnlock() to return info about how the lock...
Argyrios Kyrtzidis [Sun, 6 Apr 2014 03:19:31 +0000 (03:19 +0000)]
[Support] Modify LockFileManager::waitForUnlock() to return info about how the lock was released.

llvm-svn: 205683

10 years agoRemove unused parameter
David Blaikie [Sat, 5 Apr 2014 23:33:25 +0000 (23:33 +0000)]
Remove unused parameter

Also update a few null pointers in this function to be consistent with
new null pointers being added.

Patch by Robert Matusewicz!

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

llvm-svn: 205682

10 years agoAsmParser: add a warning for compatibility parsing
Saleem Abdulrasool [Sat, 5 Apr 2014 22:42:53 +0000 (22:42 +0000)]
AsmParser: add a warning for compatibility parsing

This adds a warning when linker_private or linker_private_weak is provided and
we handle it in a compatible manner.

Suggested by Chris Lattner!

llvm-svn: 205681

10 years agoMachineInstr: introduce explicit_operands and implicit_operands ranges
David Blaikie [Sat, 5 Apr 2014 22:42:04 +0000 (22:42 +0000)]
MachineInstr: introduce explicit_operands and implicit_operands ranges

Makes iteration over implicit and explicit machine operands more
explicit (har har). Insipired by code review discussion for r205565.

llvm-svn: 205680

10 years agoRemove unnecessary "inline" of inline defined member functions
David Blaikie [Sat, 5 Apr 2014 22:20:50 +0000 (22:20 +0000)]
Remove unnecessary "inline" of inline defined member functions

Member functions defined within a class definition are implicitly
'inline' for linkage purposes. Compilers might slightly favor inlining
functions explicitly marked 'inline', but LLVM doesn't make a stylistic
habit of doing this generally.

llvm-svn: 205679

10 years agoARM: consolidate MachO checks for ARM asm parser
Saleem Abdulrasool [Sat, 5 Apr 2014 22:09:51 +0000 (22:09 +0000)]
ARM: consolidate MachO checks for ARM asm parser

This consolidates the duplicated MachO checks in the directive parsing for
various directives that are unsupported for Mach-O.  The error message change is
unimportant as this restores the behaviour to that prior to the addition of the
new directive handling.  Furthermore, use a more direct check for MachO
targeting rather than an indirect feature check of the assembler.

Also simplify the test execution command to avoid temporary files.  Further more,
perform the check in both object and assembly emission.

Whether all non-applicable directives are handled is another question.  .fnstart
is marked as being unsupported, however, the complementary .fnend is not.  The
additional unwinding directives are also still honoured.  This change does not
change that, though, it would be good to validate and mark them as being
unsupported if they are unsupported for the MachO emission.

llvm-svn: 205678

10 years agoSimplify compression API by compressing into a SmallVector rather than a MemoryBuffer
David Blaikie [Sat, 5 Apr 2014 21:53:04 +0000 (21:53 +0000)]
Simplify compression API by compressing into a SmallVector rather than a MemoryBuffer

This is the other half of r205676.

llvm-svn: 205677

10 years agoSimplify compression API by decompressing into a SmallVector rather than a MemoryBuffer
David Blaikie [Sat, 5 Apr 2014 21:26:44 +0000 (21:26 +0000)]
Simplify compression API by decompressing into a SmallVector rather than a MemoryBuffer

This avoids an extra copy during decompression and avoids the use of
MemoryBuffer which is a weirdly esoteric device that includes unrelated
concepts like "file name" (its rather generic name is a bit misleading).

Similar refactoring of zlib::compress coming up.

llvm-svn: 205676

10 years agoAsmParser: restore LLVM IR compatibility for linker_private{,_weak}
Saleem Abdulrasool [Sat, 5 Apr 2014 20:51:58 +0000 (20:51 +0000)]
AsmParser: restore LLVM IR compatibility for linker_private{,_weak}

This restores the linker_private and linker_private_weak lexemes to permit
translation of the deprecated lexmes.  The behaviour is identical to the bitcode
handling: linker_private and linker_private_weak are handled as if private had
been specified.  This enables compatibility with IR generated by LLVM 3.4.

Reported on IRC by ki9a!

llvm-svn: 205675

10 years agoFixing typo.
David Blaikie [Sat, 5 Apr 2014 20:30:31 +0000 (20:30 +0000)]
Fixing typo.

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

llvm-svn: 205674

10 years agoFix typo
David Blaikie [Sat, 5 Apr 2014 20:28:13 +0000 (20:28 +0000)]
Fix typo

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

llvm-svn: 205673

10 years agoRemove unused function
David Blaikie [Sat, 5 Apr 2014 20:20:46 +0000 (20:20 +0000)]
Remove unused function

llvm-svn: 205672

10 years agoReapply r205655, DebugInfo: Place global constants in their appropriate context.
David Blaikie [Sat, 5 Apr 2014 07:46:57 +0000 (07:46 +0000)]
Reapply r205655, DebugInfo: Place global constants in their appropriate context.

This was reverted in 205664 and seems to be fixed by 205668... though
that may be more by accident than anything well founded.

llvm-svn: 205669

10 years agoDebugInfo: Avoid emitting constnants for every use
David Blaikie [Sat, 5 Apr 2014 07:23:17 +0000 (07:23 +0000)]
DebugInfo: Avoid emitting constnants for every use

While the folding set would deduplicate the nodes themselves and LLVM
would handle not emitting the same global twice, it still meant creating
a long/redundant list of global variables.

llvm-svn: 205668

10 years ago[analyzer] Add an ErrnoChecker (PR18701) to the Potential Checkers list.
Jordan Rose [Sat, 5 Apr 2014 06:10:28 +0000 (06:10 +0000)]
[analyzer] Add an ErrnoChecker (PR18701) to the Potential Checkers list.

llvm-svn: 205667

10 years ago[analyzer] Update Open Projects page with BitwiseConstraintManager.
Jordan Rose [Sat, 5 Apr 2014 06:10:22 +0000 (06:10 +0000)]
[analyzer] Update Open Projects page with BitwiseConstraintManager.

Also, add the names of people most recently working on particular projects,
and remove "relate bugs and checkers" (thanks, Alex!).

llvm-svn: 205666

10 years agoAdd a new subgroup to -Wtautological-compare, -Wtautological-overlap-compare,
Richard Trieu [Sat, 5 Apr 2014 05:17:01 +0000 (05:17 +0000)]
Add a new subgroup to -Wtautological-compare, -Wtautological-overlap-compare,
which warns on compound conditionals that always evaluate to the same value.
For instance, (x > 5 && x < 3) will always be false since no value for x can
satisfy both conditions.

This patch also changes the CFG to use these tautological values for better
branch analysis.  The test for -Wunreachable-code shows how this change catches
additional dead code.

Patch by Anders Rönnholm.

llvm-svn: 205665

10 years agoRevert "DebugInfo: Place global constants in their appropriate context."
David Blaikie [Sat, 5 Apr 2014 03:39:29 +0000 (03:39 +0000)]
Revert "DebugInfo: Place global constants in their appropriate context."

This reverts commit r205655.

Breaks the compiler-rt build with an assertion failure in LLVM...
reverting while I investigate.

llvm-svn: 205664

10 years ago[ELF] Add a test for -rpath.
Rui Ueyama [Sat, 5 Apr 2014 02:15:23 +0000 (02:15 +0000)]
[ELF] Add a test for -rpath.

llvm-svn: 205663

10 years ago[ELF] Fix --soname option.
Rui Ueyama [Sat, 5 Apr 2014 02:07:04 +0000 (02:07 +0000)]
[ELF] Fix --soname option.

Currently LLD accepts only "-soname <string>", but all the following
options are actually valid.

  --soname=foo
  --soname foo
  -soname=foo
  -soname foo
  -h foo

This patch fixes that issue.

llvm-svn: 205662

10 years ago[analyzer] Look through temporary destructors when finding a region to construct.
Jordan Rose [Sat, 5 Apr 2014 02:01:41 +0000 (02:01 +0000)]
[analyzer] Look through temporary destructors when finding a region to construct.

Fixes a false positive when temporary destructors are enabled where a temporary
is destroyed after a variable is constructed but before the VarDecl itself is
processed, which occurs when the variable is in the condition of an if or while.

Patch by Alex McCarthy, with an extra test from me.

llvm-svn: 205661

10 years ago[PowerPC] Remove unused TM member variable to unbreak build
Hal Finkel [Sat, 5 Apr 2014 00:16:28 +0000 (00:16 +0000)]
[PowerPC] Remove unused TM member variable to unbreak build

Fix "error: private field 'TM' is not used [-Werror,-Wunused-private-field]"

llvm-svn: 205660

10 years agoObjective-C arc [Sema]. Allow bridge cast of a qualified-id expression
Fariborz Jahanian [Fri, 4 Apr 2014 23:53:45 +0000 (23:53 +0000)]
Objective-C arc [Sema]. Allow bridge cast of a qualified-id expression
when bridged Objective-C type conforms to the protocols in CF types's
Objective-C class. // rdar://16393330

llvm-svn: 205659

10 years ago[PowerPC] Adjust load/store costs in PPCTTI
Hal Finkel [Fri, 4 Apr 2014 23:51:18 +0000 (23:51 +0000)]
[PowerPC] Adjust load/store costs in PPCTTI

This provides more realistic costs for the insert/extractelement instructions
(which are load/store pairs), accounts for the cheap unaligned Altivec load
sequence, and for unaligned VSX load/stores.

Bad news:
MultiSource/Applications/sgefa/sgefa - 35% slowdown (this will require more investigation)
SingleSource/Benchmarks/McGill/queens - 20% slowdown (we no longer vectorize this, but it was a constant store that was scalarized)
MultiSource/Benchmarks/FreeBench/pcompress2/pcompress2 - 2% slowdown

Good news:
SingleSource/Benchmarks/Shootout/ary3 - 54% speedup
SingleSource/Benchmarks/Shootout-C++/ary - 40% speedup
MultiSource/Benchmarks/Ptrdist/ks/ks - 35% speedup
MultiSource/Benchmarks/FreeBench/neural/neural - 30% speedup
MultiSource/Benchmarks/TSVC/Symbolics-flt/Symbolics-flt - 20% speedup

Unfortunately, estimating the costs of the stack-based scalarization sequences
is hard, and adjusting these costs is like a game of whac-a-mole :( I'll
revisit this again after we have better codegen for vector extloads and
truncstores and unaligned load/stores.

llvm-svn: 205658

10 years ago[PowerPC] PPCTTI Cleanup
Hal Finkel [Fri, 4 Apr 2014 23:51:11 +0000 (23:51 +0000)]
[PowerPC] PPCTTI Cleanup

Remove the declaration of an unimplemented function.

llvm-svn: 205657

10 years agoMinor change to StackMapLiveness DEBUG output.
Andrew Trick [Fri, 4 Apr 2014 23:49:35 +0000 (23:49 +0000)]
Minor change to StackMapLiveness DEBUG output.

llvm-svn: 205656

10 years agoDebugInfo: Place global constants in their appropriate context.
David Blaikie [Fri, 4 Apr 2014 23:16:44 +0000 (23:16 +0000)]
DebugInfo: Place global constants in their appropriate context.

We also don't need to duplicate the name in the LinkageName field. Just
leave it empty.

llvm-svn: 205655

10 years ago[ELF] Diagnose malformed --dynsym option.
Rui Ueyama [Fri, 4 Apr 2014 22:36:30 +0000 (22:36 +0000)]
[ELF] Diagnose malformed --dynsym option.

llvm-svn: 205654

10 years agoTry harder about not suggesting methods as corrections when they
Kaelyn Takata [Fri, 4 Apr 2014 22:16:30 +0000 (22:16 +0000)]
Try harder about not suggesting methods as corrections when they
obviously won't work. Specifically, don't suggest methods (static or
not) from unrelated classes when the expression is a method call
through a specific object.

llvm-svn: 205653

10 years agoAdd failure decorators
Ed Maste [Fri, 4 Apr 2014 21:16:39 +0000 (21:16 +0000)]
Add failure decorators

These tests started failing on FreeBSD after r205497 "Make the fail
messages"

llvm.org/pr19347

llvm-svn: 205652

10 years agoDebugInfo: PR19298: function local const variables duplicated in the root scope
David Blaikie [Fri, 4 Apr 2014 20:56:17 +0000 (20:56 +0000)]
DebugInfo: PR19298: function local const variables duplicated in the root scope

See the comment for CodeGenFunction::tryEmitAsConstant that describes
how in some contexts (lambdas) we must not emit references to the
variable, but instead use the constant directly - because of this we end
up emitting a constant for the variable, as well as emitting the
variable itself.

Should we just skip putting the variable on the stack at all and omit
the debug info for the constant? It's not clear to me - what if the
address of the local is taken?

llvm-svn: 205651

10 years agoDriver: add target definition for Windows on ARM
Saleem Abdulrasool [Fri, 4 Apr 2014 20:31:19 +0000 (20:31 +0000)]
Driver: add target definition for Windows on ARM

This introduces the definitions needed for the Windows on ARM target.  Add
target definitions for both the MSVC environment and the MSVC + Itanium C++ ABI
environment.  The Visual Studio definitions correspond to the definitions
provided by Visual Studio 2012.

llvm-svn: 205650

10 years agoAdd DAG parameter to ComputeNumSignBitsForTargetNode
Matt Arsenault [Fri, 4 Apr 2014 20:13:13 +0000 (20:13 +0000)]
Add DAG parameter to ComputeNumSignBitsForTargetNode

This way, you can check the number of sign bits in the
operands. The depth parameter it already has is pretty useless
without this.

llvm-svn: 205649

10 years agoFix tabs
Matt Arsenault [Fri, 4 Apr 2014 20:13:08 +0000 (20:13 +0000)]
Fix tabs

llvm-svn: 205648

10 years agoUpdate the test to use FileCheck.
Juergen Ributzka [Fri, 4 Apr 2014 19:57:01 +0000 (19:57 +0000)]
Update the test to use FileCheck.

llvm-svn: 205647

10 years agoVector [Sema]. Vector "splats" which are truncated should have a warning
Fariborz Jahanian [Fri, 4 Apr 2014 19:33:39 +0000 (19:33 +0000)]
Vector [Sema]. Vector "splats" which are truncated should have a warning
with -Wconversion. // rdar://16502418

llvm-svn: 205646

10 years ago[X86-64] Add missing relocation.
Michael J. Spencer [Fri, 4 Apr 2014 19:22:14 +0000 (19:22 +0000)]
[X86-64] Add missing relocation.

llvm-svn: 205645

10 years agoThis is yet another case clang-modernize failed to add "override".
Rui Ueyama [Fri, 4 Apr 2014 19:17:59 +0000 (19:17 +0000)]
This is yet another case clang-modernize failed to add "override".

llvm-svn: 205644

10 years agoSplit a utility function not to use goto statement.
Rui Ueyama [Fri, 4 Apr 2014 18:34:40 +0000 (18:34 +0000)]
Split a utility function not to use goto statement.

llvm-svn: 205643

10 years agouseNew is set to false in all branches, so set it to false outside the if-else.
Rui Ueyama [Fri, 4 Apr 2014 18:21:53 +0000 (18:21 +0000)]
useNew is set to false in all branches, so set it to false outside the if-else.

llvm-svn: 205642

10 years agoReplace dyn_cast<T>s immediately followed by asserts with cast<T>s.
Rui Ueyama [Fri, 4 Apr 2014 18:21:51 +0000 (18:21 +0000)]
Replace dyn_cast<T>s immediately followed by asserts with cast<T>s.

llvm-svn: 205641

10 years agoXcode 5 crashes if lldb stops at breakpoint if long c++ template lists are present.
Greg Clayton [Fri, 4 Apr 2014 18:15:18 +0000 (18:15 +0000)]
Xcode 5 crashes if lldb stops at breakpoint if long c++ template lists are present.

This fix reduces the stack size of SymbolFileDWARF::ParseType(). It seems that clang is not very good at sharing locations on the stack with local variables in large functions that have many blocks and each variable gets unique locations. The reduction in size was done by:
1 - removing some large locals that were default constructed by not used
2 - Placing some larger local variables into std::unique_ptr<> to make them on the heap
3 - removing local variables there were large and being populated but not being used
4 - reducing the size of some typedefs to llvm::SmallVector<T, N> so that N wasn’t excessively large

<rdar://problem/16431645>

llvm-svn: 205640

10 years agoFix indentation.
Rui Ueyama [Fri, 4 Apr 2014 18:12:27 +0000 (18:12 +0000)]
Fix indentation.

llvm-svn: 205639

10 years agoDon’t exit the command interpreter if we get interrupted by an EINTR when calling...
Greg Clayton [Fri, 4 Apr 2014 18:11:31 +0000 (18:11 +0000)]
Don’t exit the command interpreter if we get interrupted by an EINTR when calling fgets().

llvm-svn: 205638

10 years agoRevert "temporary commit."
Rui Ueyama [Fri, 4 Apr 2014 18:06:56 +0000 (18:06 +0000)]
Revert "temporary commit."

This reverts commit r205635 that was submitted by mistake.

llvm-svn: 205637

10 years agoRemember to clear the cached data for the OptionValueFileSpec in SetValueFromCString.
Jim Ingham [Fri, 4 Apr 2014 18:06:54 +0000 (18:06 +0000)]
Remember to clear the cached data for the OptionValueFileSpec in SetValueFromCString.

<rdar://problem/16179718> target.expr-prefix contents appear to be cached for an entire session

llvm-svn: 205636

10 years agotemporary commit.
Rui Ueyama [Fri, 4 Apr 2014 18:01:52 +0000 (18:01 +0000)]
temporary commit.

llvm-svn: 205635

10 years agoDon’t crash when we get an invalid .debug_aranges set, just ignore it. Also print...
Greg Clayton [Fri, 4 Apr 2014 17:53:30 +0000 (17:53 +0000)]
Don’t crash when we get an invalid .debug_aranges set, just ignore it. Also print out warning messages if LLDB_CONFIGURATION_DEBUG is defined.

<rdar://problem/16516343>

llvm-svn: 205634

10 years agoTidy up naming.
Jim Grosbach [Fri, 4 Apr 2014 17:36:55 +0000 (17:36 +0000)]
Tidy up naming.

llvm-svn: 205633

10 years agoAdd a test where the module map is overriden in the vfs
Ben Langmuir [Fri, 4 Apr 2014 16:42:53 +0000 (16:42 +0000)]
Add a test where the module map is overriden in the vfs

Specifically, we pass two -ivfsoverlay yaml files, and the topmost one
remaps the module map file.

llvm-svn: 205632

10 years ago[mips] Add Octeon cnMips instructions seqi/snei and v3mulu/vmm0/vmulu.
Kai Nacke [Fri, 4 Apr 2014 16:21:59 +0000 (16:21 +0000)]
[mips] Add Octeon cnMips instructions seqi/snei and v3mulu/vmm0/vmulu.

This patch adds the Octeon cnMips instructions seqi/snei and v3mulu/vmm0/vmulu.
It is only for the assembler. Test case is included.

Reviewed by: Daniel.Sanders@imgtec.com

llvm-svn: 205631

10 years ago[PowerPC] Add a full condition code register to make the "cc" clobber work
Hal Finkel [Fri, 4 Apr 2014 15:15:57 +0000 (15:15 +0000)]
[PowerPC] Add a full condition code register to make the "cc" clobber work

gcc inline asm supports specifying "cc" as a clobber of all condition
registers. Add just enough modeling of the full register to make this work.
Fixed PR19326.

llvm-svn: 205630

10 years agoIn preparation for being able to use simple Boolean logic expressions involving capab...
Aaron Ballman [Fri, 4 Apr 2014 15:13:57 +0000 (15:13 +0000)]
In preparation for being able to use simple Boolean logic expressions involving capabilities, the semantics for attributes now looks through the types of the constituent parts of a capability expression instead of at the aggregate expression type.

llvm-svn: 205629

10 years ago[mips] abs.[ds], and neg.[ds] should be allowed regardless of -enable-no-nans-fp...
Daniel Sanders [Fri, 4 Apr 2014 14:52:54 +0000 (14:52 +0000)]
[mips] abs.[ds], and neg.[ds] should be allowed regardless of -enable-no-nans-fp-math

Summary:
They behave in accordance with the Has2008 and ABS2008 configuration bits of the
processor which are used to select between the 1985 and 2008 versions of IEEE
754. In 1985 mode, these instructions are arithmetic (i.e. they raise invalid
operation exceptions when given NaN), in 2008 mode they are non-arithmetic
(i.e. they are copies).

nmadd.[ds], and nmsub.[ds] are still subject to -enable-no-nans-fp-math because
the ISA spec does not explicitly state that they obey Has2008 and ABS2008.

Reviewers: matheusalmeida

Reviewed By: matheusalmeida

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

llvm-svn: 205628

10 years ago[sanitizer] Intercept a subset of sunrpc interface (xdr_*).
Evgeniy Stepanov [Fri, 4 Apr 2014 14:51:23 +0000 (14:51 +0000)]
[sanitizer] Intercept a subset of sunrpc interface (xdr_*).

llvm-svn: 205627

10 years agoDAGLegalize: add last-ditch type-legalization for VSELECT.
Tim Northover [Fri, 4 Apr 2014 14:49:30 +0000 (14:49 +0000)]
DAGLegalize: add last-ditch type-legalization for VSELECT.

When LLVM sees something like (v1iN (vselect v1i1, v1iN, v1iN)) it can
decide that the result is OK (v1i64 is legal on AArch64, for example)
but it still need scalarising because of that v1i1. There was no code
to do this though.

AArch64 and ARM64 have DAG combines to produce efficient code and
prevent that occuring in *most* such situations, but there are edge
cases that they miss. This adds a legalization to cope with that.

llvm-svn: 205626

10 years agoARM64: handle v1i1 types arising from setcc properly.
Tim Northover [Fri, 4 Apr 2014 14:49:21 +0000 (14:49 +0000)]
ARM64: handle v1i1 types arising from setcc properly.

There were several overlapping problems here, and this solution is
closely inspired by the one adopted in AArch64 in r201381.

Firstly, scalarisation of v1i1 setcc operations simply fails if the
input types are legal. This is fixed in LegalizeVectorTypes.cpp this
time, and allows AArch64 code to be simplified slightly.

Second, vselect with such a setcc feeding into it ends up in
ScalarizeVectorOperand, where it's not handled. I experimented with an
implementation, but found that whatever DAG came out was rather
horrific. I think Hao's DAG combine approach is a good one for
quality, though there are edge cases it won't catch (to be fixed
separately).

Should fix PR19335.

llvm-svn: 205625

10 years agoWhen printing types for the OpenCL kernel metadata, use the PrintingPolicy.
Joey Gouly [Fri, 4 Apr 2014 13:43:57 +0000 (13:43 +0000)]
When printing types for the OpenCL kernel metadata, use the PrintingPolicy.

This allows 'half' to be printed as 'half' and not as '__fp16'.

Patch by Fraser Cormack!

llvm-svn: 205624

10 years ago[ASan] Explicitly specify -ldl/-lpthread in RUN-lines where needed
Alexey Samsonov [Fri, 4 Apr 2014 12:24:46 +0000 (12:24 +0000)]
[ASan] Explicitly specify -ldl/-lpthread in RUN-lines where needed

llvm-svn: 205623

10 years agoFix for PR18921 (LDRD/STRD part)::
Stepan Dyatkovskiy [Fri, 4 Apr 2014 10:17:56 +0000 (10:17 +0000)]
Fix for PR18921 (LDRD/STRD part)::
Removed "GNU Assembler extension (compatibility)" definitions from ARMInstrInfo.td
Fixed ARMAsmParser::ParseInstruction GNU compatability branch, so it also works for thumb mode from now.
Added new tests.

llvm-svn: 205622

10 years agoTweak unconditional-branch.ll passing on any hosts, while investigating x86_64-mingw32.
NAKAMURA Takumi [Fri, 4 Apr 2014 10:16:51 +0000 (10:16 +0000)]
Tweak unconditional-branch.ll passing on any hosts, while investigating x86_64-mingw32.

Sorry for the breakage.

For now, it will fail in two ways:

  1. To fail for targeting x86_64-mingw32.
    <stdin>:131:8: note: possible intended match here
    0x30830a0100000002 3 0 1 0 0 is_stmt

  2. To fail not to find the target x86.
    llc: : error: unable to get target for 'x86_64-unknown-unknown',
      see --version and --triple.

llvm-svn: 205621

10 years ago[OPENMP][C++11] Renamed loop vars properly.
Alexey Bataev [Fri, 4 Apr 2014 10:02:14 +0000 (10:02 +0000)]
[OPENMP][C++11] Renamed loop vars properly.

llvm-svn: 205620

10 years agotsan: improve error message in test
Dmitry Vyukov [Fri, 4 Apr 2014 09:52:41 +0000 (09:52 +0000)]
tsan: improve error message in test
we've seen a flake on this test
next time it happens we will be able to gather some info

llvm-svn: 205619

10 years ago[msan] Introduce MsanThread. Move thread-local allocator cache out of TLS.
Evgeniy Stepanov [Fri, 4 Apr 2014 09:47:41 +0000 (09:47 +0000)]
[msan] Introduce MsanThread. Move thread-local allocator cache out of TLS.

This reduces .tbss from 109K down to almost nothing.

llvm-svn: 205618

10 years ago[asan] fix a leak in __tls_get_addr handler; introduce a run-time flag to disable...
Kostya Serebryany [Fri, 4 Apr 2014 09:10:58 +0000 (09:10 +0000)]
[asan] fix a leak in __tls_get_addr handler; introduce a run-time flag to disable this handler completely; remove a workaround for a bug fixed in glibc

llvm-svn: 205617

10 years agoARM64: use regalloc-friendly COPY_TO_REGCLASS for bitcasts
Tim Northover [Fri, 4 Apr 2014 09:03:09 +0000 (09:03 +0000)]
ARM64: use regalloc-friendly COPY_TO_REGCLASS for bitcasts

The previous patterns directly inserted FMOV or INS instructions into
the DAG for scalar_to_vector & bitconvert patterns. This is horribly
inefficient and can generated lots more GPR <-> FPR register traffic
than necessary.

It's much better to emit instructions the register allocator
understands so it can coalesce the copies when appropriate.

It led to at least one ISelLowering hack to avoid the problems, which
was incorrect for v1i64 (FPR64 has no dsub). It can now be removed
entirely.

This should also fix PR19331.

llvm-svn: 205616

10 years agoARM64: add 128-bit MLA operations to the custom selection code.
Tim Northover [Fri, 4 Apr 2014 09:03:02 +0000 (09:03 +0000)]
ARM64: add 128-bit MLA operations to the custom selection code.

Without this change, the llvm_unreachable kicked in. The code pattern
being spotted is rather non-canonical for 128-bit MLAs, but it can
happen and there's no point in generating sub-optimal code for it just
because it looks odd.

Should fix PR19332.

llvm-svn: 205615

10 years agoRevert r205613.
Evgeniy Stepanov [Fri, 4 Apr 2014 08:58:16 +0000 (08:58 +0000)]
Revert r205613.

llvm-svn: 205614

10 years ago[msan] Fix compilation of a disabled test.
Evgeniy Stepanov [Fri, 4 Apr 2014 08:39:50 +0000 (08:39 +0000)]
[msan] Fix compilation of a disabled test.

llvm-svn: 205613

10 years agoFixed register class in STRD instruction for Thumb2 mode.
Stepan Dyatkovskiy [Fri, 4 Apr 2014 08:14:13 +0000 (08:14 +0000)]
Fixed register class in STRD instruction for Thumb2 mode.

llvm-svn: 205612

10 years agoclang-format: Don't merge simple blocks in case statements.
Daniel Jasper [Fri, 4 Apr 2014 06:46:23 +0000 (06:46 +0000)]
clang-format: Don't merge simple blocks in case statements.

Before:
  switch (a) {
  case 1: { return 'a'; }
  }

After:
  switch (a) {
  case 1: {
    return 'a';
  }
  }

llvm-svn: 205611

10 years agoMake consistent use of MCPhysReg instead of uint16_t throughout the tree.
Craig Topper [Fri, 4 Apr 2014 05:16:06 +0000 (05:16 +0000)]
Make consistent use of MCPhysReg instead of uint16_t throughout the tree.

llvm-svn: 205610

10 years agoBasic: rename VisualStudio to Windows
Saleem Abdulrasool [Fri, 4 Apr 2014 05:08:53 +0000 (05:08 +0000)]
Basic: rename VisualStudio to Windows

Visual Studio is the Integrated Development Environment.  The toolchain is
generally referred to MSVC.  Rename the target information to be more precise as
per the recommendation of Reid Kleckner.

llvm-svn: 205609

10 years agoExtend -Wtautological-constant-out-of-range-compare to handle boolean values
Richard Trieu [Fri, 4 Apr 2014 04:13:47 +0000 (04:13 +0000)]
Extend -Wtautological-constant-out-of-range-compare to handle boolean values
better.  This warning will now trigger on the following conditionals:

bool b;
int i;

if (b > 1) {}  // always false
if (0 <= (i > 5)) {} // always true
if (-1 > b) {} // always false

Patch by Per Viberg.

llvm-svn: 205608

10 years agosweep up -Wformat warnings from gcc
Saleem Abdulrasool [Fri, 4 Apr 2014 04:06:10 +0000 (04:06 +0000)]
sweep up -Wformat warnings from gcc

This is a purely mechanical change explicitly casting any parameters for printf
style conversion.  This cleans up the warnings emitted by gcc 4.8 on Linux.

llvm-svn: 205607

10 years agoCodeGen: Don't create branch weight metadata from empty profiles
Justin Bogner [Fri, 4 Apr 2014 02:48:51 +0000 (02:48 +0000)]
CodeGen: Don't create branch weight metadata from empty profiles

If all of our weights are zero when calculating branch weights, it
means we haven't profiled the code in question. Avoid creating a
metadata node that says all branches are equally likely in this case.

The test also checks constructs that hit the other createBranchWeights
overload. These were already working.

llvm-svn: 205606

10 years agoFix spelling. Sigh.
Jim Grosbach [Fri, 4 Apr 2014 02:14:38 +0000 (02:14 +0000)]
Fix spelling. Sigh.

llvm-svn: 205605

10 years agoARM: Range based for-loop over block predecessors.
Jim Grosbach [Fri, 4 Apr 2014 02:11:03 +0000 (02:11 +0000)]
ARM: Range based for-loop over block predecessors.

No functional change.

llvm-svn: 205604

10 years agoAdd iterator_ranges for block pred/succ.
Jim Grosbach [Fri, 4 Apr 2014 02:10:59 +0000 (02:10 +0000)]
Add iterator_ranges for block pred/succ.

llvm-svn: 205603

10 years agoARM: Use range-based for loops in frame lowering.
Jim Grosbach [Fri, 4 Apr 2014 02:10:55 +0000 (02:10 +0000)]
ARM: Use range-based for loops in frame lowering.

No functional change.

llvm-svn: 205602

10 years ago[RegAllocGreedy][Last Chance Recoloring] Emit diagnostics when last chance
Quentin Colombet [Fri, 4 Apr 2014 02:05:21 +0000 (02:05 +0000)]
[RegAllocGreedy][Last Chance Recoloring] Emit diagnostics when last chance
recoloring cut-offs are encountered and register allocation failed.

This is related to PR18747

Patch by MAYUR PANDEY <mayur.p@samsung.com>.

llvm-svn: 205601

10 years agoRevert r205599, the commit was not intended to have so many changes
Quentin Colombet [Fri, 4 Apr 2014 02:02:49 +0000 (02:02 +0000)]
Revert r205599, the commit was not intended to have so many changes

llvm-svn: 205600

10 years ago[RegAllocGreedy][Last Chance Recoloring] Emit diagnostics when last chance
Quentin Colombet [Fri, 4 Apr 2014 01:58:57 +0000 (01:58 +0000)]
[RegAllocGreedy][Last Chance Recoloring] Emit diagnostics when last chance
recoloring cut-offs are hit.

This is related to PR18747.

Patch by MAYUR PANDEY <mayur.p@samsung.com>

llvm-svn: 205599

10 years agoAdd clang-cl alias to allow users to disable c4005
Reid Kleckner [Fri, 4 Apr 2014 01:36:55 +0000 (01:36 +0000)]
Add clang-cl alias to allow users to disable c4005

If we ever want three or more aliases, at that point we should put MSVC
warning ids in DiagnosticGroups.td.  We can use that to support #pragma
warning.

llvm-svn: 205598

10 years agoSymbolTable::size() returns an unsigned int.
Rui Ueyama [Fri, 4 Apr 2014 01:22:51 +0000 (01:22 +0000)]
SymbolTable::size() returns an unsigned int.

It's better to use the same type rather than a fixed width integer type
that may be different from the return type.

llvm-svn: 205597

10 years agoARM: fix test case missed in previous roundup
Saleem Abdulrasool [Fri, 4 Apr 2014 01:19:56 +0000 (01:19 +0000)]
ARM: fix test case missed in previous roundup

This should hopefully bring the last MSVC buildbot back to green!

llvm-svn: 205596

10 years agoMIPS: remove vim swap file
Saleem Abdulrasool [Fri, 4 Apr 2014 01:19:54 +0000 (01:19 +0000)]
MIPS: remove vim swap file

llvm-svn: 205595

10 years agoUse range-based for loop. No functionality change.
Rui Ueyama [Fri, 4 Apr 2014 00:59:50 +0000 (00:59 +0000)]
Use range-based for loop. No functionality change.

llvm-svn: 205594