Commit Graph

197719 Commits

Author SHA1 Message Date
Matthias Braun f5f89b9f7d RegAllocGreedy: Improve live interval order in ReverseLocal mode
When allocating live intervals in linear order and all of them are local
to a single basic block you get an optimal coloring. This is also true
if you reverse the order, but it is not true if you sort live ranges
beginnings in reverse order, change to sort live range endings in
reverse order. Take the following live ranges for example:

   |---| |--------|
|----------| |-------|

They get colored suboptimally with 3 registers if you sort the live range
starting points in reverse order (but optimally with live range begins in order,
or live range ends in reverse order).

Apparently the previous strategy was intentional because of allocation
time considerations. I am having a hard time replicating these effects,
while I see substantial improvements in allocation quality with this
change.

No testcase as none of the (in tree) targets use reverse order mode.

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

llvm-svn: 233742
2015-03-31 19:57:49 +00:00
Rui Ueyama d3eee4c95c Replace *(uniqueptr.get()) with *uniqueptr.
Apparently they are copy-pastes. They need to be merged, or otherwise
they will diverge needlessly as I did in r233723...

llvm-svn: 233741
2015-03-31 19:55:39 +00:00
Simon Atanasyan 772944ad3d [Hexagon] Avoid an unused variable warning when assertions are off
No functional changes.

llvm-svn: 233740
2015-03-31 19:43:47 +00:00
Rui Ueyama 73ee010d2d Use C++ non-static member initialization.
llvm-svn: 233739
2015-03-31 19:37:33 +00:00
Rui Ueyama 1f0cd04df9 Rename _AArch64TargetLayout.
This change should have been done in r233737, but I made a mistake to
not include into that.

llvm-svn: 233738
2015-03-31 19:35:35 +00:00
Rui Ueyama efaf6a77d1 Rename identifiers starting with an underscore and a uppercase letter.
Identifiers starting with _[A-Z] is reserved for the language.
User programs shouldn't use such identifiers.

llvm-svn: 233737
2015-03-31 19:33:25 +00:00
Ulrich Weigand 050527b4ac [SystemZ] Address review comments for r233689
Change lowerCTPOP to:
- Gracefully handle a known-zero input value
- Simplify computation of significant bit size

Thanks to Jay Foad for the review!

llvm-svn: 233736
2015-03-31 19:28:50 +00:00
Rui Ueyama 537287041b Remove virtual and add override.
llvm-svn: 233735
2015-03-31 19:21:43 +00:00
Simon Atanasyan f00d85a809 [Mips] Use llvm::make_unique
No functional changes.

llvm-svn: 233727
2015-03-31 19:00:54 +00:00
Benjamin Kramer acfe7d446b [lex] Bitfieldize some booleans.
Lets us fuse some branches into bit tests downstream. NFC.

llvm-svn: 233725
2015-03-31 18:47:05 +00:00
Sanjay Patel 30d589536a [X86, AVX] fix zero-extending integer operand load patterns to use integer instructions
This is a follow-on to r233704 and another partial fix for PR22685:
https://llvm.org/bugs/show_bug.cgi?id=22685

llvm-svn: 233724
2015-03-31 18:43:43 +00:00
Rui Ueyama 2b28b59311 If x is a unique_ptr, *x.get() is equivalent to *x.
llvm-svn: 233723
2015-03-31 18:26:31 +00:00
Lang Hames 1325c578c0 [Orc][MCJIT] Remove the small code model regression tests.
These regression tests are supposed to test small code model support, but have
been XFAIL'd because we don't have an in-tree memory manager that can guarantee
a small-code-model compatible memory layout. Unfortunately, they can
occasionally pass if they get lucky with memory allocation, causing unexpected
passes on the bots. That's not very helpful.

I'm going to remove these until we have the infrastructure (small-code-model
compatible memory manager) to run them properly.

llvm-svn: 233722
2015-03-31 18:19:25 +00:00
Rui Ueyama 07269cc91d Use llvm::make_unique.
llvm-svn: 233721
2015-03-31 18:19:06 +00:00
Alexey Samsonov c4ed548b40 [Sanitizer] Be consistent about separating ==%PID== and logged data.
See https://code.google.com/p/address-sanitizer/issues/detail?id=385.

llvm-svn: 233720
2015-03-31 18:16:42 +00:00
Rui Ueyama 6814d4f52d ELF: Replace a macro with an inlined function.
FINDV4BITMASK macro is defined as a macro so that the macro body is inlined.
We should use inlined functions instead of macros.

llvm-svn: 233719
2015-03-31 18:15:05 +00:00
Rui Ueyama ace9717a9b ELF: Do not use multiple inheritance.
Multiple inheritance is casually used here. Rewriting to not
using multiple inheritance reduces the complexity of the code
and also makes it shorter.

llvm-svn: 233718
2015-03-31 18:10:24 +00:00
Vince Harron 091a95d412 TestPrintStackTraces - made XFAIL more precise
Works with x86_64 inferior, fails w/i386 inferior - updated test to
reflect

llvm-svn: 233717
2015-03-31 17:45:54 +00:00
Vince Harron 3d2979ee2f Enabled a bunch of tests on Linux
Removed expectedFailureLinux from failures that I was unable to
reproduce, updated and improved some other comments near XFAIL tests

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

llvm-svn: 233716
2015-03-31 17:44:37 +00:00
Eli Bendersky 7a0d89153f Add sm_37 target to Clang for NVPTX
Support for this target was added in LLVM r233575 and r233583

llvm-svn: 233715
2015-03-31 17:03:16 +00:00
Greg Clayton 581186ce39 Fix DynamicLoaderMacOSXDYLD to deal with new shared cache changes.
<rdar://problem/20357466>

llvm-svn: 233714
2015-03-31 17:02:36 +00:00
Tom Stellard 1ded220cc0 Implement fmax using __builtin_fmax
This ensures correct handling of NaNi.

This has been tested with piglit, OpenCV, and the ocl conformance tests.

llvm-svn: 233713
2015-03-31 16:59:23 +00:00
Tom Stellard 310da7bfd2 Implement fmin using __builtin_fmin
This ensures correct handling of NaN.

This has been tested with piglit, OpenCV, and the ocl conformance tests.

llvm-svn: 233712
2015-03-31 16:59:21 +00:00
Eric Fiselier e782178e9c [libcxx] Optimize vectors uninitialized construction of trivial types from an iterator range.
Summary:
In certain cases vector can use memcpy to construct a range of elements at the back of the vector. We currently don't do this resulting in terrible code gen in non-optimized mode and a
very large slowdown compared to libstdc++. 

This patch adds a `__construct_forward_range(Allocator, Iter, Iter, _Ptr&)` and `__construct_forward_range(Allocator, Tp*, Tp*, Tp*&)` functions to `allocator_traits` which act similarly to the existing `__construct_forward(...)` functions.

This patch also changes vectors `__construct_at_end(Iter, Iter)` to be `__construct_at_end(Iter, Iter, SizeType)` where SizeType is the size of the range. `__construct_at_end(Iter, Iter, SizeType)` now calls `allocator_traits<Tp>::__construct_forward_range(...)`. 

This patch is based off the design of `__swap_out_circular_buffer(...)` which uses `allocator_traits<Tp>::__construct_forward(...)`.

On my machine this code performs 4x better than the current implementation when tested against `std::vector<int>`. 



Reviewers: howard.hinnant, titus, kcc, mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 233711
2015-03-31 16:54:19 +00:00
Rui Ueyama c351f9563a Use DEBUG_TYPE and DEBUG instead of DEBUG_WITH_TYPE.
llvm-svn: 233710
2015-03-31 16:48:57 +00:00
Tim Northover 0efe1ff405 AArch64: fix v8.1 sqrdmlah tests on Darwin platforms
llvm-svn: 233709
2015-03-31 16:41:38 +00:00
NAKAMURA Takumi cb9aed3ec0 Rework r233647, "llvm/examples: Suppress building a few JIT examples."
It didn't work with "install".

llvm-svn: 233708
2015-03-31 16:41:25 +00:00
Timur Iskhodzhanov 89608af26d [ASan/Win] UnmapOrDie should not fail on zero address / size
llvm-svn: 233707
2015-03-31 16:39:20 +00:00
Tom Stellard b919c7d9eb Sema: Accept pointers to any address space for builtin functions
As long as they don't have an address space explicitly defined.

This allows builtins with pointer arguments to be used with OpenCL.

llvm-svn: 233706
2015-03-31 16:39:02 +00:00
Ed Maste bf441f4ffa Fix FreeBSD test runs after r233311
On FreeBSD LLDB's triple ends up as e.g. "x86_64-unknown-freebsd10.1"
but getPlatform() consumers expect just the name with no version
number.

llvm-svn: 233705
2015-03-31 16:37:10 +00:00
Sanjay Patel 2ae9943881 [X86, AVX] try to lowerVectorShuffleAsElementInsertion() for all 256-bit vector sub-types
I suggested this change in D7898 (http://llvm.org/viewvc/llvm-project?view=revision&revision=231354)

It improves the v4i64 case although not optimally. This AVX codegen:

  vmovq {{.*#+}} xmm0 = mem[0],zero
  vxorpd %ymm1, %ymm1, %ymm1
  vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1,2,3]

Becomes:

  vmovsd {{.*#+}} xmm0 = mem[0],zero

Unfortunately, this doesn't completely solve PR22685. There are still at least 2 problems under here:

    We're not handling v32i8 / v16i16.
    We're not getting the FP / int domains right for instruction selection.

But since this patch alone appears to do no harm, reduces code duplication, and helps v4i64, 
I'm submitting this patch ahead of fixing the above.

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

llvm-svn: 233704
2015-03-31 16:32:11 +00:00
Hafiz Abid Qadeer 0e1f11ffe0 Changed a function to static.
A temp object was being created to call StripOffFileName. This function
is not dependent on class members so I am making it static.
No regression on testsuite on Linux.

llvm-svn: 233703
2015-03-31 16:30:29 +00:00
Alexander Kornienko 0b024619df [clang-tidy] Clarify message for the google-explicit-constructor check
Use "constructors that are callable with a single argument" instead of
"single-argument constructors" when referring to constructors using default
arguments or parameter packs.

llvm-svn: 233702
2015-03-31 16:24:44 +00:00
Sanjay Patel d399d94837 typos; NFC
llvm-svn: 233701
2015-03-31 16:17:51 +00:00
Ulrich Weigand daa72f5120 [SystemZ] Add Analysis to required_libraries (fall-out from r233688)
Should fix build failures with cmake builds

llvm-svn: 233700
2015-03-31 15:16:13 +00:00
Scott Douglass db32277043 [docs] add cross-reference
llvm-svn: 233699
2015-03-31 15:07:53 +00:00
Daniel Jasper f46dec86b6 clang-format: [JS] Support getters, setters and methods in object literals.
llvm-svn: 233698
2015-03-31 14:34:15 +00:00
Samuel Benzaquen 462501ee7e Force braces on the else branch if they are being added to the if branch.
Summary:
Force braces on the else branch if they are being added to the if branch.
This ensures consistency in the transformed code.

Reviewers: alexfh

Subscribers: cfe-commits

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

llvm-svn: 233697
2015-03-31 13:53:03 +00:00
Krzysztof Parzyszek c05dff1792 Expand MUX instructions early on Hexagon
This time with all files included.

llvm-svn: 233696
2015-03-31 13:35:12 +00:00
Krzysztof Parzyszek 8c4fd2bdeb Revert 233694. Weak SVN-fu.
llvm-svn: 233695
2015-03-31 13:32:32 +00:00
Krzysztof Parzyszek 261d62c862 Expand MUX instructions early on Hexagon
llvm-svn: 233694
2015-03-31 13:29:17 +00:00
Vladimir Sukharev 297bf0eae0 [AArch64] Add v8.1a "Rounding Double Multiply Add/Subtract" extension
Reviewers: t.p.northover, jmolloy

Subscribers: llvm-commits

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

llvm-svn: 233693
2015-03-31 13:15:48 +00:00
Simon Atanasyan 1b2a089951 [Mips] Remove redundant #include
No functional changes.

llvm-svn: 233692
2015-03-31 13:04:08 +00:00
Simon Atanasyan 0d26edab09 [Mips] Do not use MIPS assembler and disassembler in the tests
No functional changes.

llvm-svn: 233691
2015-03-31 13:04:01 +00:00
Ulrich Weigand 371d10a4eb [SystemZ] Support RISBGN instruction on zEC12
So far, we do not yet support any instruction specific to zEC12.
Most of the facilities added with zEC12 are indeed not very useful
to compiler code generation, but there is one exception: the
miscellaneous-extensions facility provides the RISBGN instruction,
which is a variant of RISBG that does not set the condition code.

Add support for this facility, MC support for RISBGN, and CodeGen
support for prefering RISBGN over RISBG on zEC12, unless we can
actually make use of the condition code set by RISBG.

llvm-svn: 233690
2015-03-31 12:58:17 +00:00
Ulrich Weigand b401218ca2 [SystemZ] Use POPCNT instruction on z196
We already exploit a number of instructions specific to z196,
but not yet POPCNT.  Add support for the population-count
facility, MC support for the POPCNT instruction, CodeGen
support for using POPCNT, and implement the getPopcntSupport
TargetTransformInfo hook.

llvm-svn: 233689
2015-03-31 12:56:33 +00:00
Ulrich Weigand 1f6666a49c [SystemZ] Provide basic TargetTransformInfo implementation
This hooks up the TargetTransformInfo machinery for SystemZ,
and provides an implementation of getIntImmCost.

In addition, the patch adds the isLegalICmpImmediate and
isLegalAddImmediate TargetLowering overrides, and updates
a couple of test cases where we now generate slightly
better code.

llvm-svn: 233688
2015-03-31 12:52:27 +00:00
Timur Iskhodzhanov 6c66ad0d75 [Sanitizer RT] Put the Symbolizer module name string ownership in order
Reviewed at http://reviews.llvm.org/D8666

llvm-svn: 233687
2015-03-31 12:50:05 +00:00
Rafael Espindola dd3add6c60 Fix the operand encoding in the test instruction.
Fixes pr22995.

llvm-svn: 233686
2015-03-31 12:31:55 +00:00
Mohit K. Bhakkad 09ba1a323e [LLDB][MIPS] Read/Write register for MIPS64
Patch by Sagar Thakur

Reviewers: clayborg, tberghammer.

Subscribers: jaydeep, bhushan, mohit.bhakkad, llvm-commits.

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

llvm-svn: 233685
2015-03-31 12:01:27 +00:00