Commit Graph

109292 Commits

Author SHA1 Message Date
Juergen Ributzka
b11c5b1078 [FastISel][AArch64] Use 'cbz' also for null values (pointers).
The pattern matching for a 'ConstantInt' value was too restrictive. Checking for
a 'Constant' with a bull value is sufficient for using an 'cbz/cbnz' instruction.

This fixes rdar://problem/18784732.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220709 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 19:38:05 +00:00
Juergen Ributzka
5745cad861 [FastISel][AArch64] Don't fold the 'and' instruction into the 'tbz/tbnz' instruction if it is in a different basic block.
This fixes a bug where the input register was not defined for the 'tbz/tbnz'
instruction. This happened, because we folded the 'and' instruction from a
different basic block.

This fixes rdar://problem/18784013.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220704 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 19:16:48 +00:00
Juergen Ributzka
d3a04223e8 [FastISel][AArch64] Fix load/store with frame indices.
At higher optimization levels the LLVM IR may contain more complex patterns for
loads/stores from/to frame indices. The 'computeAddress' function wasn't able to
handle this and triggered an assertion.

This fix extends the possible addressing modes for frame indices.

This fixes rdar://problem/18783298.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220700 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 18:21:58 +00:00
Kostya Serebryany
866ee52df3 [asan] experimental tracing for indirect calls, llvm part.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220699 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 18:13:56 +00:00
Lang Hames
0059dd4dd1 [PBQP] Remove a spurious 'typename' keyword. This was causing an error on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220690 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 17:59:51 +00:00
Lang Hames
6faab9d266 [PBQP] Clarify ambiguous-looking typedef.
This was causing an error on the hexagon bots.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220689 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 17:52:05 +00:00
Lang Hames
57902cc070 [PBQP] Unique allowed-sets for nodes in the PBQP graph and use pairs of these
sets as keys into a cache of interference matrice values in the Interference
constraint adder.

Creating interference matrices was one of the large remaining time-sinks in
PBQP. Caching them reduces the total compile time (when using PBQP) on the
nightly test suite by ~10%.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220688 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 17:44:25 +00:00
Michael Gottesman
86ec9c4081 Add MapVector::rbegin(), MapVector::rend() to completment MapVector::begin(), MapVector::end().
These just delegate to the underlying vector type in the MapVector.

Also just add in some sanity unittests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220687 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 17:20:53 +00:00
NAKAMURA Takumi
af628cc0b8 Prune CRLF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220678 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 12:37:26 +00:00
Oliver Stannard
b1d8e7e77c [ARM] Select VMAXNM and VMINNM regardless of operand order
Currently, the ARM backend will select the VMAXNM and VMINNM for these C
expressions:
  (a < b) ? a : b
  (a > b) ? a : b
but not these expressions:
  (a > b) ? b : a
  (a < b) ? b : a

This patch allows all of these expressions to be matched.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220671 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 09:23:02 +00:00
Yuri Gorshenin
75bb472c06 [asan-asm-instrumentation] Added comment describing how asm instrumentation works.
Summary: [asan-asm-instrumentation] Added comment describing how asm instrumentation works.

Reviewers: eugenis

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220670 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 08:38:54 +00:00
Rui Ueyama
490f286d15 Re-commit r220667.
C++ source given to check_cxx_source_compile should have define "main".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220669 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 08:16:18 +00:00
NAKAMURA Takumi
a85a0b317c Fix unicode chars into ascii in comment lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220668 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 08:08:18 +00:00
Rui Ueyama
e975522566 Revert "Include stddef.h before including cxxabi.h" to un-break buildbot
This reverts commit r220665.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220667 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 08:03:21 +00:00
Rui Ueyama
baa8acd546 Include stddef.h before including cxxabi.h
On FreeBSD 10.0, size_t needs to be defined before including cxxabi.h.
Currenty HAVE_CXXABI_H is not defined on FreeBSD because of that reason.
This patch teaches cmake and configure how to include it.

http://reviews.llvm.org/D5940



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220665 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 07:37:57 +00:00
David Majnemer
fe58be3733 InstCombine: Fix a combine assuming that icmp operands were integers
An icmp may have pointer arguments, it isn't limited to integers or
vectors of integers.

This fixes PR21388.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220664 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 05:47:49 +00:00
Rafael Espindola
e250b13ab9 LinkModules.cpp: don't repeat names in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220662 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 02:35:46 +00:00
David Blaikie
bcc5753df8 Remove some unnecessary casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220658 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-26 23:37:04 +00:00
Lang Hames
ce3a612d3a [PBQP] Tidying up as per Dave Blaikie's suggesions for r220642.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220655 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-26 22:12:02 +00:00
Lang Hames
2666eacaf5 [PBQP] Explicitly define copy/move operations for NodeMetadata to keep VS happy.
Hopefully this fixes the bug that was introduced in r220642, and not-quite-fixed
in r220649.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220653 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-26 21:55:54 +00:00
Arnold Schwaighofer
b26fb77d9b Add an option to the LTO code generator to disable vectorization during LTO
We used to always vectorize (slp and loop vectorize) in the LTO pass pipeline.

r220345 changed it so that we used the PassManager's fields 'LoopVectorize' and
'SLPVectorize' out of the desire to be able to disable vectorization using the
cl::opt flags 'vectorize-loops'/'slp-vectorize' which the before mentioned
fields default to.
Unfortunately, this turns off vectorization because those fields
default to false.
This commit adds flags to the LTO library to disable lto vectorization which
reconciles the desire to optionally disable vectorization during LTO and
the desired behavior of defaulting to enabled vectorization.

We really want tools to set PassManager flags directly to enable/disable
vectorization and not go the route via cl::opt flags *in*
PassManagerBuilder.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220652 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-26 21:50:58 +00:00
Lang Hames
9a6482a840 [PBQP] Re-commit r220642 with a workaround for quirky Visual Studio behavior.
Apparently unique_ptr'ifying NodeMetadata exposed an issue in VS where it
occasionally tries to synthesize copy constructors instead of moves. Hopefully
explicitly deleting the copy constructor and defining the move constructor will
fix this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220649 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-26 20:57:16 +00:00
Peter Zotov
bd116514bc [OCaml] Expose existing documentation in ocamldoc.
Patch by Gabriel Radanne <drupyog@zoho.com>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220648 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-26 20:45:22 +00:00
Hans Wennborg
0846d688d1 Revert "[PBQP] Unique-ptrify some PBQP Metadata structures. No functional change." (r220642)
It broke the Windows build:

  [1/19] Building CXX object lib\CodeGen\CMakeFiles\LLVMCodeGen.dir\RegAllocPBQP.cpp.obj
  C:\bb-win7\ninja-clang-i686-msc17-R\llvm-project\llvm\include\llvm/CodeGen/RegAllocPBQP.h(132) : error C2248: 'std::unique_ptr<_Ty>::unique_ptr' : cannot access private member declared in class 'std::unique_ptr<_Ty>'

     with
     [
         _Ty=unsigned int []
     ]
     D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\memory(1600) : see declaration of 'std::unique_ptr<_Ty>::unique_ptr'
     with
     [
         _Ty=unsigned int []
     ]
     This diagnostic occurred in the compiler generated function 'llvm::PBQP::RegAlloc::NodeMetadata::NodeMetadata(const llvm::PBQP::RegAlloc::NodeMetadata &)'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220645 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-26 19:50:13 +00:00
Lang Hames
82256c4019 [PBQP] Unique-ptrify some PBQP Metadata structures. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220642 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-26 18:50:52 +00:00
Lang Hames
015e0c4bd3 [PBQP] Tidy up CostAllocator.h: fix variable case, rename CostPool to ValuePool.
No functional change. This just brings things more in-line with coding
standards, and makes ValuePool's functionality clearer (it's not tied to pooling
costs, and we may want to use it to hold other things in the future).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220641 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-26 18:16:27 +00:00
Elena Demikhovsky
9e19cf1ffd AVX-512: Fixed encoding of VPBROADCASTM and added SKX forms of this instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220638 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-26 09:52:24 +00:00
Andrew Trick
916ba45c62 LSR: Minor cleanup after Daniel's patch.
Combine the Inserted an Done sets into a Visited set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220623 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 19:59:30 +00:00
Andrew Trick
abb11dd303 Fix LSR compile time.
This is a simple fix that brings the compilation time from 5min to 5s
on a specific real-world example. It's a large chain of computation in
a crypto routine (always a problem for SCEV). A unit test is not
feasible and there would be no way to check it. The fix is just basic
good practice for dealing with SCEVs, there's no risk of regression.

Patch by Daniel Reynaud!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220622 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 19:42:07 +00:00
Peter Zotov
2e643bbeae [OCaml] hexagon can't run MCJIT tests, XFAIL it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220621 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 19:01:14 +00:00
Peter Zotov
0ce2ef8c2d [OCaml] Unbreak Llvm_executionengine.initialize_native_target.
First, return true on success, as it is the OCaml convention.
Second, also initialize the native assembly printer, which is,
despite the name, required for MCJIT operation.

Since this function did not initialize the assembly printer earlier
and no function to initialize native assembly printer was available
elsewhere, it is safe to break its interface: it means that it
simply could not be used successfully before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220620 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 18:50:02 +00:00
Peter Zotov
60d3f5918d [OCaml] Expose Llvm_executionengine.ExecutionEngine.create_mcjit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220619 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 18:49:56 +00:00
Jingyue Wu
71fe4f0197 [SeparateConstOffsetFromGEP] Fixed a bug related to unsigned modulo
The dividend in "signed % unsigned" is treated as unsigned instead of signed,
causing unexpected behavior such as -64 % (uint64_t)24 == 0.

Added a regression test in split-gep.ll

Patched by Hao Liu.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220618 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 18:34:03 +00:00
Benjamin Kramer
1f79facb06 Unbreak the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220617 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 18:20:17 +00:00
Benjamin Kramer
05b492db56 Clean up assume intrinsic pattern matching, no need to check that the argument is a value.
Also make it const safe and remove superfluous casting. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220616 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 18:09:01 +00:00
Jingyue Wu
5c50ab84b3 [SeparateConstOffsetFromGEP] Fixed a bug in rebuilding OR expressions
The two operands of the new OR expression should be NextInChain and TheOther
instead of the two original operands.

Added a regression test in split-gep.ll.

Hao Liu reported this bug, and provded the test case and an initial patch.
Thanks! 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220615 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 17:36:21 +00:00
Simon Pilgrim
c31aaa5a3f [X86][SSE] Vector integer/float conversion memory folding
Tidied up some entries in the folding tables so that they are under the correct comment section (they were categorised as AVX2 instructions when they're AVX1).

Minor patch agreed with qcolombet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220613 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 08:11:20 +00:00
David Majnemer
ae7aa60b2d InstCombine: Remove overzealous asserts
These asserts can trigger if the worklist iteration order is
sufficiently unlucky.  Instead of adding special case logic to handle
these edge conditions, just bail out on trying to transform them:
InstSimplify will get them when it reaches them on the worklist.

This fixes PR21378.

N.B.  No test case is included because any test would rely on the
fragile worklist iteration order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220612 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 07:13:13 +00:00
Rafael Espindola
f4a288c0f0 Allow the C API users to keep relying on the OutMessages parameter.
Should fix the Ocaml tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220611 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 04:31:08 +00:00
Rafael Espindola
e272236d69 Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220610 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 04:07:53 +00:00
Rafael Espindola
72478e59c7 Update the error handling of lib/Linker.
Instead of passing a std::string&, use the new diagnostic infrastructure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220608 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 04:06:10 +00:00
Jingyue Wu
1d1d705a95 [NVPTX] aligned byte-buffers for vector return types
Summary:
Fixes PR21100 which is caused by inconsistency between the declared return type
and the expected return type at the call site. The new behavior is consistent
with nvcc and the NVPTXTargetLowering::getPrototype function.

Test Plan: test/Codegen/NVPTX/vector-return.ll

Reviewers: jholewinski

Reviewed By: jholewinski

Subscribers: llvm-commits, meheff, eliben, jholewinski

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220607 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 03:46:16 +00:00
Rafael Espindola
b31d53a60f Add a test for the -suppress-warnings option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220603 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-25 01:14:15 +00:00
Evgeniy Stepanov
e376441786 [msan] Make -msan-check-constant-shadow a bit stronger.
Allow (under the experimental flag) non-Instructions to participate in MSan checks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220601 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 23:34:15 +00:00
Rafael Espindola
c498284e46 Modernize the error handling of the Materialize function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220600 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 22:50:48 +00:00
Kevin Enderby
44ccedc273 Fix a Mach-O assembler segfault for a subtraction expression with an undefined symbol.
In a Mach-O object file a relocatable expression of the form
SymbolA - SymbolB + constant is allowed when both symbols are
defined in a section.  But when either symbol is undefined it
is an error.

The code was crashing when it had an undefined symbol in this case.
And should have printed a error message using the location information
in the relocation entry.

rdar://18678402


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220599 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 22:39:40 +00:00
Frederic Riss
ab08da75d7 Sink DwarfUnit::constructImportedEntityDIE into DwarfCompileUnit.
So that it has access to getOrCreateGlobalVariableDIE. If we ever support
decsribing using directive in C++ classes (thus requiring support in type
units), it will certainly use another mechanism anyway.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220594 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 21:31:09 +00:00
Simon Pilgrim
44efa200e2 [X86][SSE] Bitcast assertion in XFormVExtractWithShuffleIntoLoad
Minor patch to fix an issue in XFormVExtractWithShuffleIntoLoad where a load is unary shuffled, then bitcast (to a type with the same number of elements) before extracting an element.

An undef was created for the second shuffle operand using the original (post-bitcasted) vector type instead of the pre-bitcasted type like the rest of the shuffle node - this was then causing an assertion on the different types later on inside SelectionDAG::getVectorShuffle.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220592 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 21:04:41 +00:00
Colin LeMahieu
8699f5390b [Hexagon] Resubmission of 220427
Modified library structure to deal with circular dependency between HexagonInstPrinter and HexagonMCInst.
Adding encoding bits for add opcode.
Adding llvm-mc tests.
Removing unit tests.

http://reviews.llvm.org/D5624

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220584 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 19:00:32 +00:00
Matt Arsenault
a36665918f Fix copy paste comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220581 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24 18:13:10 +00:00