NAKAMURA Takumi [Mon, 27 Oct 2014 08:08:18 +0000 (08:08 +0000)]
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
Rui Ueyama [Mon, 27 Oct 2014 08:03:21 +0000 (08:03 +0000)]
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
Rui Ueyama [Mon, 27 Oct 2014 07:37:57 +0000 (07:37 +0000)]
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
David Majnemer [Mon, 27 Oct 2014 05:47:49 +0000 (05:47 +0000)]
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
Rafael Espindola [Mon, 27 Oct 2014 02:35:46 +0000 (02:35 +0000)]
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
David Blaikie [Sun, 26 Oct 2014 23:37:04 +0000 (23:37 +0000)]
Remove some unnecessary casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220658
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 26 Oct 2014 22:12:02 +0000 (22:12 +0000)]
[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
Lang Hames [Sun, 26 Oct 2014 21:55:54 +0000 (21:55 +0000)]
[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
Arnold Schwaighofer [Sun, 26 Oct 2014 21:50:58 +0000 (21:50 +0000)]
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
Lang Hames [Sun, 26 Oct 2014 20:57:16 +0000 (20:57 +0000)]
[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
Peter Zotov [Sun, 26 Oct 2014 20:45:22 +0000 (20:45 +0000)]
[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
Hans Wennborg [Sun, 26 Oct 2014 19:50:13 +0000 (19:50 +0000)]
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
Lang Hames [Sun, 26 Oct 2014 18:50:52 +0000 (18:50 +0000)]
[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
Lang Hames [Sun, 26 Oct 2014 18:16:27 +0000 (18:16 +0000)]
[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
Elena Demikhovsky [Sun, 26 Oct 2014 09:52:24 +0000 (09:52 +0000)]
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
Andrew Trick [Sat, 25 Oct 2014 19:59:30 +0000 (19:59 +0000)]
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
Andrew Trick [Sat, 25 Oct 2014 19:42:07 +0000 (19:42 +0000)]
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
Peter Zotov [Sat, 25 Oct 2014 19:01:14 +0000 (19:01 +0000)]
[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
Peter Zotov [Sat, 25 Oct 2014 18:50:02 +0000 (18:50 +0000)]
[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
Peter Zotov [Sat, 25 Oct 2014 18:49:56 +0000 (18:49 +0000)]
[OCaml] Expose Llvm_executionengine.ExecutionEngine.create_mcjit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220619
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Sat, 25 Oct 2014 18:34:03 +0000 (18:34 +0000)]
[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
Benjamin Kramer [Sat, 25 Oct 2014 18:20:17 +0000 (18:20 +0000)]
Unbreak the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220617
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 25 Oct 2014 18:09:01 +0000 (18:09 +0000)]
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
Jingyue Wu [Sat, 25 Oct 2014 17:36:21 +0000 (17:36 +0000)]
[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
Simon Pilgrim [Sat, 25 Oct 2014 08:11:20 +0000 (08:11 +0000)]
[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
David Majnemer [Sat, 25 Oct 2014 07:13:13 +0000 (07:13 +0000)]
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
Rafael Espindola [Sat, 25 Oct 2014 04:31:08 +0000 (04:31 +0000)]
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
Rafael Espindola [Sat, 25 Oct 2014 04:07:53 +0000 (04:07 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220610
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 25 Oct 2014 04:06:10 +0000 (04:06 +0000)]
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
Jingyue Wu [Sat, 25 Oct 2014 03:46:16 +0000 (03:46 +0000)]
[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
Rafael Espindola [Sat, 25 Oct 2014 01:14:15 +0000 (01:14 +0000)]
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
Evgeniy Stepanov [Fri, 24 Oct 2014 23:34:15 +0000 (23:34 +0000)]
[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
Rafael Espindola [Fri, 24 Oct 2014 22:50:48 +0000 (22:50 +0000)]
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
Kevin Enderby [Fri, 24 Oct 2014 22:39:40 +0000 (22:39 +0000)]
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
Frederic Riss [Fri, 24 Oct 2014 21:31:09 +0000 (21:31 +0000)]
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
Simon Pilgrim [Fri, 24 Oct 2014 21:04:41 +0000 (21:04 +0000)]
[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
Colin LeMahieu [Fri, 24 Oct 2014 19:00:32 +0000 (19:00 +0000)]
[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
Matt Arsenault [Fri, 24 Oct 2014 18:13:10 +0000 (18:13 +0000)]
Fix copy paste comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220581
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Oct 2014 18:13:04 +0000 (18:13 +0000)]
Don't ever call materializeAllPermanently during LTO.
To do this, change the representation of lazy loaded functions.
The previous representation cannot differentiate between a function whose body
has been removed and one whose body hasn't been read from the .bc file. That
means that in order to drop a function, the entire body had to be read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220580
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 24 Oct 2014 17:59:18 +0000 (17:59 +0000)]
Allow AVX vrsqrtps generation.
This is a follow-on to r220570 that allows a 256-bit (v8f32)
version of vrsqrtps to be generated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220579
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 24 Oct 2014 17:57:34 +0000 (17:57 +0000)]
DebugInfo: Sink DwarfDebug::ScopeVariables down into DwarfFile
(part of refactoring to allow subprogram emission in both the skeleton
and main units to enable -gmlt-like data to be included in the skeleton
for live inlined backtracing purposes)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220578
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 24 Oct 2014 17:55:59 +0000 (17:55 +0000)]
remove class/function/variable names from comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220577
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 24 Oct 2014 17:53:38 +0000 (17:53 +0000)]
Remove DwarfDebug::FirstCU as it has no use
It was only being used as a flag to identify the lack of debug info from
within endModule - use the section labels for that instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220575
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 24 Oct 2014 17:02:16 +0000 (17:02 +0000)]
Use rsqrt (X86) to speed up reciprocal square root calcs
This is a first step for generating SSE rsqrt instructions for
reciprocal square root calcs when fast-math is allowed.
For now, be conservative and only enable this for AMD btver2
where performance improves significantly - for example, 29%
on llvm/projects/test-suite/SingleSource/Benchmarks/BenchmarkGame/n-body.c
(if we convert the data type to single-precision float).
This patch adds a two constant version of the Newton-Raphson
refinement algorithm to DAGCombiner that can be selected by any target
via a parameter returned by getRsqrtEstimate()..
See PR20900 for more details:
http://llvm.org/bugs/show_bug.cgi?id=20900
Differential Revision: http://reviews.llvm.org/D5658
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220570
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 24 Oct 2014 16:15:27 +0000 (16:15 +0000)]
[mips] Replace MipsABIEnum with a MipsABIInfo class.
Summary:
No functional change yet, it's just an object replacement for an enum.
It will allow us to gather ABI information in a single place so that we can
start testing for properties of the ABI's instead of the ABI itself.
For example we will eventually be able to use:
ABI.MinStackAlignmentInBytes()
instead of:
(isABI_N32() || isABI_N64()) ? 16 : 8
which is clearer and more maintainable.
Reviewers: matheusalmeida
Reviewed By: matheusalmeida
Differential Revision: http://reviews.llvm.org/D3341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220568
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 24 Oct 2014 15:52:05 +0000 (15:52 +0000)]
[Object] Fix MachO's getUuid to return a pointer into the object instead of a dangling ArrayRef.
This works because uuid's are always little endian so it's not swapped.
Fixes use-after-return reported by asan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220567
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 24 Oct 2014 15:16:39 +0000 (15:16 +0000)]
These functions are not actually defined for NDEBUG or !LLVM_DUMP_ENABLED, so guarding the declarations as well. NFC, silences MSVC warnings in release builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220565
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 24 Oct 2014 14:46:00 +0000 (14:46 +0000)]
[mips] Fix >80-column line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220564
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 24 Oct 2014 13:49:54 +0000 (13:49 +0000)]
[mips] Remove redundant code in RetCC_MipsN. NFC.
Summary:
i32 is always promoted to i64 so it no longer makes sense to assign i32 to
registers.
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5964
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220561
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 24 Oct 2014 13:09:19 +0000 (13:09 +0000)]
[mips] For N32/N64, structs must be passed in the upper bits of a register.
Summary:
Most structs were fixed by r218451 but those of between >32-bits and
<64-bits remained broken since they were not marked with [ASZ]ExtUpper.
This patch fixes the remaining cases by using
CCPromoteToUpperBitsInType<i64> on i64's in addition to i32 and smaller.
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5963
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220556
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Fri, 24 Oct 2014 09:54:41 +0000 (09:54 +0000)]
[AArch64] Fix fast-isel of cbz of i1, i8, i16
This fixes a miscompilation in the AArch64 fast-isel which was
triggered when a branch is based on an icmp with condition eq or ne,
and type i1, i8 or i16. The cbz instruction compares the whole 32-bit
register, so values with the bottom 1, 8 or 16 bits clear would cause
the wrong branch to be taken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220553
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Fri, 24 Oct 2014 06:24:07 +0000 (06:24 +0000)]
Update test/MC/ARM/coff-debugging-secrel.ll expectations to fix breakage caused by r220544
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220548
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcello Maggioni [Fri, 24 Oct 2014 02:46:50 +0000 (02:46 +0000)]
Added reset of LexicalScope in LiveDebugVariables reset function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220545
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Fri, 24 Oct 2014 01:27:45 +0000 (01:27 +0000)]
Fix PR21189 -- Emit symbol subsection required to debug LLVM-built binaries with VS2012+
Reviewed at http://reviews.llvm.org/D5772
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220544
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 24 Oct 2014 00:43:47 +0000 (00:43 +0000)]
DebugInfo: Remove DwarfDebug::addScopeVariable now that it's just a trivial wrapper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220542
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 24 Oct 2014 00:03:46 +0000 (00:03 +0000)]
Make test for r220533 more robust by using GPR pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220541
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Fri, 24 Oct 2014 00:03:00 +0000 (00:03 +0000)]
[AVX512] FMA support for the 231 variants
This is asm/diasm-only support, similar to AVX.
For ISeling the register variant, they are no different from 213 other than
whether the multiplication or the addition operand is destructed.
For ISeling the memory variant, i.e. to fold a load, they are no different
than the 132 variant. The addition operand (op3) in both cases can come from
memory. Again the ony difference is which operand is destructed.
There could be a post-RA pass that would convert a 213 or 132 into a 231.
Part of <rdar://problem/
17082571>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220540
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Fri, 24 Oct 2014 00:02:55 +0000 (00:02 +0000)]
[AVX512] Introduce fma3p_forms from AVX
This multiclass generates the different forms: 213, 231, 132 in AVX.
132 in AVX512 is a separate class but I am planning to use this same
multiclass to generate 231 relying on the nice the null_frag trick from AVX to
disable codegen pattern for 231.
No functionality change, no change in X86.td.expanded except for the different
instruction definition names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220539
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 23 Oct 2014 23:49:31 +0000 (23:49 +0000)]
If requested, apply function merging at -O0 too. It's useful there to reduce the time to compile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220537
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Thu, 23 Oct 2014 23:46:28 +0000 (23:46 +0000)]
Make getDISubprogram(const Function *F) available in LLVM
Reviewed at http://reviews.llvm.org/D5950
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220536
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 23 Oct 2014 22:49:25 +0000 (22:49 +0000)]
[SelectionDAG] Teach the vector scalarizer about FP conversions.
This adds support for legalization of instructions of the form:
[fp_conv] <1 x i1> %op to <1 x double>
where fp_conv is one of fpto[us]i, [us]itofp. This used to assert
because they were simply missing from the vector operand scalarizer.
A similar problem arose in r190830, with trunc instead.
Fixes PR20778.
Differential Revision: http://reviews.llvm.org/D5810
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220533
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 23 Oct 2014 22:40:34 +0000 (22:40 +0000)]
Update comment and fix typos in assert message. (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220531
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 23 Oct 2014 22:36:13 +0000 (22:36 +0000)]
Update llvm.donothing documentation.
llvm.donothing is no longer the only intrinsic that can be invoked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220530
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 23 Oct 2014 22:31:48 +0000 (22:31 +0000)]
ScheduleDAG: record PhysReg dependencies represented by CopyFromReg nodes
x86's CMPXCHG -> EFLAGS consumer wasn't being recorded as a real EFLAGS
dependency because it was represented by a pair of CopyFromReg(EFLAGS) ->
CopyToReg(EFLAGS) nodes. ScheduleDAG was expecting the source to be an
implicit-def on the instruction, where the result numbers in the DAG and the
Uses list in TableGen matched up precisely.
The Copy notation seems much more robust, so this patch extends ScheduleDAG
rather than refactoring x86.
Should fix PR20376.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220529
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 23 Oct 2014 22:27:50 +0000 (22:27 +0000)]
DebugInfo: Remove DwarfDebug::CurrentFnArguments since we have to handle argument ordering of other arguments (abstract arguments) in the same way and already have code for that too.
While refactoring this code I was confused by both the name I had
introduced (addNonArgumentVariable... but it has all this logic to
handle argument numbering and keep things in order?) and by the
redundancy. Seems when I fixed the misordered inlined argument handling,
I didn't realize it was mostly redundant with the argument ordering code
(which I may've also written, I'm not sure). So let's just rely on the
more general case.
The only oddity in output this produces is that it means when we emit
all the variables for the current function, we don't track when we've
finished the argument variables and are about to start the local
variables and insert DW_AT_unspecified_parameters (for varargs
functions) there. Instead it ends up after the local variables, scopes,
etc. But this isn't invalid and doesn't cause DWARF consumers problems
that I know of... so we'll just go with that because it makes the code
nice & simple.
(though, let's see what the buildbots have to say about this - *crosses
fingers*)
There will be some cleanup commits to follow to remove the now trivial
wrappers, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220527
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Thu, 23 Oct 2014 22:25:31 +0000 (22:25 +0000)]
PR21189: Teach llvm-readobj to dump bits of COFF symbol subsections required to debug using VS2012+
Reviewed at http://reviews.llvm.org/D5755
Thanks to Andrey Guskov for his help investigating this!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220526
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 23 Oct 2014 22:04:30 +0000 (22:04 +0000)]
DebugInfo: Sink DwarfDebug::addNonArgumentScopeVariable into DwarfFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220520
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 23 Oct 2014 21:59:17 +0000 (21:59 +0000)]
MachODump.cpp: fix MSVC build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220518
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 23 Oct 2014 21:55:31 +0000 (21:55 +0000)]
[X86] Improve mul w/ overflow codegen, to MUL8+SETO.
Currently, @llvm.smul.with.overflow.i8 expands to 9 instructions, where
3 are really needed.
This adds X86ISD::UMUL8/SMUL8 SD nodes, and custom lowers them to
MUL8/IMUL8 + SETO.
i8 is a special case because there is no two/three operand variants of
(I)MUL8, so the first operand and return value need to go in AL/AX.
Also, we can't write patterns for these instructions: TableGen refuses
patterns where output operands don't match SDNode results. In this case,
instructions where the output operand is an implicitly defined register.
A related special case (and FIXME) exists for MUL8 (X86InstrArith.td):
// FIXME: Used for 8-bit mul, ignore result upper 8 bits.
// This probably ought to be moved to a def : Pat<> if the
// syntax can be accepted.
[(set AL, (mul AL, GR8:$src)), (implicit EFLAGS)]
Ideally, these go away with UMUL8, but we still need to improve TableGen
support of implicit operands in patterns.
Before this change:
movsbl %sil, %eax
movsbl %dil, %ecx
imull %eax, %ecx
movb %cl, %al
sarb $7, %al
movzbl %al, %eax
movzbl %ch, %esi
cmpl %eax, %esi
setne %al
After:
movb %dil, %al
imulb %sil
seto %al
Also, remove a made-redundant testcase for PR19858, and enable more FastISel
ALU-overflow tests for SelectionDAG too.
Differential Revision: http://reviews.llvm.org/D5809
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220516
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 23 Oct 2014 21:53:17 +0000 (21:53 +0000)]
DebugInfo: Remove DwarfDebug::addCurrentFnArgument declaration now that it's moved to DwarfFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220515
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 23 Oct 2014 21:52:45 +0000 (21:52 +0000)]
Handle sqrt() shrinking in SimplifyLibCalls like any other call
This patch removes a chunk of special case logic for folding
(float)sqrt((double)x) -> sqrtf(x)
in InstCombineCasts and handles it in the mainstream path of SimplifyLibCalls.
No functional change intended, but I loosened the restriction on the existing
sqrt testcases to allow for this optimization even without unsafe-fp-math because
that's the existing behavior.
I also added a missing test case for not shrinking the llvm.sqrt.f64 intrinsic
in case the result is used as a double.
Differential Revision: http://reviews.llvm.org/D5919
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220514
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 23 Oct 2014 19:53:12 +0000 (19:53 +0000)]
Change the name of the field BindTable to bindtable to not over lap the type.
Should fix the build bot issues from commit r220500.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220504
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 23 Oct 2014 19:51:40 +0000 (19:51 +0000)]
Make llvm-go test dependency optional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220503
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 23 Oct 2014 19:40:45 +0000 (19:40 +0000)]
Make llvm-link behave a bit more like LTO.
* Read modules lazily
* Don't treat the first file specially, instead merge all inputs into an empty
module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220501
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 23 Oct 2014 19:37:31 +0000 (19:37 +0000)]
Update llvm-objdump’s Mach-O symbolizer code for Objective-C references.
This prints disassembly comments for Objective-C references to CFStrings,
Selectors, Classes and method calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220500
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 23 Oct 2014 19:36:21 +0000 (19:36 +0000)]
Cleanup this test a bit.
Use simpler names and remove unnecessary fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220499
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 23 Oct 2014 19:23:42 +0000 (19:23 +0000)]
Cleanup this test a bit.
Use simpler names and remove unnecessary fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220498
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 23 Oct 2014 19:12:43 +0000 (19:12 +0000)]
DebugInfo: Simplify/tidy/correct global variable decl/def emission handling.
This fixes a bug (introduced by fixing the IR emitted from Clang where
the definition of a static member would be scoped within the class,
rather than within its lexical decl context) where the definition of a
static variable would be placed inside a class.
It also improves source fidelity by scoping static class member
definitions inside the lexical decl context in which tehy are written
(eg: namespace n { class foo { static int i; } int foo::i; } - the
definition of 'i' will be within the namespace 'n' in the DWARF output
now).
Lastly, and the original goal, this reduces debug info size slightly
(and makes debug info easier to read, etc) by placing the definitions of
non-member global variables within their namespace, rather than using a
separate namespace-scoped declaration along with a definition at global
scope.
Based on patches and discussion with Frédéric.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220497
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 23 Oct 2014 18:52:46 +0000 (18:52 +0000)]
Make this test a bit stricter.
This now:
* Forces the linker to include the internal definition.
* Checks the full output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220495
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 23 Oct 2014 18:44:07 +0000 (18:44 +0000)]
Make this test a bit stricter.
This now:
* Forces the linker to include the internal definition.
* Checks the full output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220494
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 23 Oct 2014 17:50:42 +0000 (17:50 +0000)]
Revert "Don't count inreg params when mangling fastcall functions"
This reverts commit r214981.
I'm not sure what I was thinking when I wrote this. Testing with MSVC
shows that this function is mangled to '@f@8':
int __fastcall f(int a, int b);
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220492
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 23 Oct 2014 17:22:14 +0000 (17:22 +0000)]
Adding llvm-shlib to CMake build system with a few new bells and whistles
Summary:
This patch adds a new CMake build setting LLVM_BUILD_LLVM_DYLIB, which defaults to OFF. When set to ON, this will generate a shared library containing most of LLVM. The contents of the shared library can be overriden by specifying LLVM_DYLIB_COMPONENTS. LLVM_DYLIB_COMPONENTS can be set to a semi-colon delimited list of any LLVM components that you llvm-config can resolve.
On Windows, unless you are using Cygwin, you must specify an explicit symbol export file using LLVM_EXPORTED_SYMBOL_FILE. On Cygwin and all unix-like platforms if you do not specify LLVM_EXPORTED_SYMBOL_FILE, an export file containing only the LLVM C API will be auto-generated from the list of LLVM components specified in LLVM_DYLIB_COMPONENTS.
Reviewers: rnk
Reviewed By: rnk
Subscribers: rnk, llvm-commits
Differential Revision: http://reviews.llvm.org/D5890
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220490
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 23 Oct 2014 16:12:58 +0000 (16:12 +0000)]
Remove explicit (void) use of DwarfFile::DD that was accidentally left in r220452.
Caught in post-commit review by Frédéric.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220487
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 23 Oct 2014 15:31:50 +0000 (15:31 +0000)]
Do not emit intermediate register for zero FP immediate
This updates check for double precision zero floating point constant to allow
use of instruction with immediate value rather than temporary register.
Currently "a == 0.0", where "a" is of "double" type generates:
vmov.i32 d16, #0x0
vcmpe.f64 d0, d16
With this change it becomes:
vcmpe.f64 d0, #0
Patch by Sergey Dmitrouk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220486
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 23 Oct 2014 15:20:05 +0000 (15:20 +0000)]
clang-format two code snippets to make the next patch easy to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220484
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 23 Oct 2014 14:45:19 +0000 (14:45 +0000)]
Add unittest for extreme alignments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220483
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 23 Oct 2014 11:32:16 +0000 (11:32 +0000)]
Hexagon/Disassembler/LLVMBuild.txt: Update libdeps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220482
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 23 Oct 2014 11:32:03 +0000 (11:32 +0000)]
Hexagon/LLVMBuild.txt: Prune CRLF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220481
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 23 Oct 2014 11:31:50 +0000 (11:31 +0000)]
[CMake] Prune CRLF in CMakeLists.txt(s).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220480
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 23 Oct 2014 11:31:33 +0000 (11:31 +0000)]
[CMake] Prune trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220479
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 23 Oct 2014 11:31:22 +0000 (11:31 +0000)]
Revert r220427, "[Hexagon] Adding encoding bits for add opcode."
It brought cyclic dependecy between HexagonAsmPrinter and HexagonDesc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220478
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 23 Oct 2014 11:13:59 +0000 (11:13 +0000)]
[mips][microMIPS] Implement ADDIUR1SP instruction
Differential Revision: http://reviews.llvm.org/D5153
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220477
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 23 Oct 2014 11:06:34 +0000 (11:06 +0000)]
ps][microMIPS] Implement ADDIUR2 instruction
Differential Revision: http://reviews.llvm.org/D5151
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220476
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 23 Oct 2014 10:59:24 +0000 (10:59 +0000)]
ps][microMIPS] Implement LI16 instruction
Differential Revision: http://reviews.llvm.org/D5149
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220475
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 23 Oct 2014 10:42:01 +0000 (10:42 +0000)]
[mips][microMIPS] Implement CodeGen support for SLL16 and SRL16 instructions
Differential Revision: http://reviews.llvm.org/D5774
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220474
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Thu, 23 Oct 2014 08:52:58 +0000 (08:52 +0000)]
[Thumb2] Improve disassembly of memory hints
Currently, the ARM disassembler will disassemble the Thumb2 memory hint
instructions (PLD, PLDW and PLI), even for targets which do not have
these instructions. This patch adds the required checks to the
disassmebler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220472
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 23 Oct 2014 04:17:05 +0000 (04:17 +0000)]
[ARM, stack protector] If supported, use armv7 instructions.
This commit enables using movt/movw to load the stack guard address:
movw r0, :lower16:(L_g3$non_lazy_ptr-(LPC0_0+8))
movt r0, :upper16:(L_g3$non_lazy_ptr-(LPC0_0+8))
ldr r0, [pc, r0]
Previously a pc-relative load was emitted:
ldr r0, LCPI0_0
ldr r0, [pc, r0]
rdar://problem/
18740489
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220470
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 23 Oct 2014 04:08:42 +0000 (04:08 +0000)]
Assert that ValueHandleBase::ValueIsRAUWd doesn't change the tracked Value type.
This invariant is enforced in Value::replaceAllUsesWith, thus it seems
logical to apply it also to ValueHandles. This commit fixes InstCombine
to not trigger the assertion during the removal of constant bitcasts in
call instructions.
Differential Revision: http://reviews.llvm.org/D5828
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220468
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 23 Oct 2014 04:08:38 +0000 (04:08 +0000)]
Modernize doxygen comments in Support/Dwarf.h
In post-commit review of r219442, Rafael pointed out that the comment style
of the newly introduced helper didn't follow LLVM's coding standard.
Modernize the whole file to the new standards.
Differential Revision: http://reviews.llvm.org/D5918
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220467
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 23 Oct 2014 04:08:34 +0000 (04:08 +0000)]
[dwarfdump] Dump DW_AT_ranges values inline in the debug_info dump.
The output looks like that:
DW_AT_ranges [FORM_data4] (0x00000000
[0x00000001000024a0 - 0x00000001000024c2)
[0x0000000100002505 - 0x000000010000268b))
Differential Revision: http://reviews.llvm.org/D5712
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220466
91177308-0d34-0410-b5e6-
96231b3b80d8