NAKAMURA Takumi [Thu, 13 Feb 2014 11:19:00 +0000 (11:19 +0000)]
[CMake] LLVM_PLUGIN_EXT: Use CMAKE_SHARED_LIBRARY_SUFFIX rather than CMAKE_SHARED_MODULE_SUFFIX in llvm tree.
FIXME: llvm/test may be aware of LLVM_PLUGIN_EXT, like as clang/test does.
FIXME: CMAKE_*_SUFFIX may be set in HandleLLVMOptions if those variables could be writable, rather than to set one as target properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201316
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 13 Feb 2014 11:06:23 +0000 (11:06 +0000)]
llvm/test/CodeGen/AArch64/cpus.ll: Tweak to use -mtriple=aarch64-unknown-unknown, or this would crash for targeting pecoff like *-mingw32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201315
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 13 Feb 2014 10:44:30 +0000 (10:44 +0000)]
ARM: remove floating-point patterns for @llvm.arm.neon.vabs
The front-end is now generating the generic @llvm.fabs for this
operation now, so the extra patterns are no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201314
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Thu, 13 Feb 2014 09:46:11 +0000 (09:46 +0000)]
Add Cortex-A53 and Cortex-A57 cores to the AArch64 backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201305
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 13 Feb 2014 07:12:40 +0000 (07:12 +0000)]
Remove unused method declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201301
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 13 Feb 2014 07:07:16 +0000 (07:07 +0000)]
Remove filtering concept from X86 disassembler table generation. It's no longer necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201299
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Thu, 13 Feb 2014 05:42:33 +0000 (05:42 +0000)]
[AArch64]Fix the problems that can't select mul/add/sub of v1i8/v1i16/v1i32 types.
As this problems are similar to shl/sra/srl, also add patterns for shift nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201298
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 13 Feb 2014 05:17:37 +0000 (05:17 +0000)]
[RegAlloc] Fix the assertion in the last chance recoloring to match the
condition at the call site.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201296
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 13 Feb 2014 05:11:35 +0000 (05:11 +0000)]
Copy dll storage in copyAttributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201295
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 13 Feb 2014 04:19:26 +0000 (04:19 +0000)]
[DAG] Fix the recognition of opaque constants in the SelectionDAGBuilder.
This fix checks the original LLVM IR node to identify opaque constants by
looking for the bitcast-constant pattern. Originally we looked at the generated
SDNode, but this might lead to incorrect results. The SDNode could have been
generated by an constant expression that was folded to a constant.
This fixes <rdar://problem/
16050719>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201291
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 13 Feb 2014 04:00:35 +0000 (04:00 +0000)]
Use simpler version of sys::fs::exists when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201289
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Thu, 13 Feb 2014 02:36:58 +0000 (02:36 +0000)]
[AArch64]Add support for spilling FPR8/FPR16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201287
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 13 Feb 2014 02:18:36 +0000 (02:18 +0000)]
GlobalOpt: Aliases don't have sections, don't copy them when replacing
As defined in LangRef, aliases do not have sections. However, LLVM's
GlobalAlias class inherits from GlobalValue, which means we can read and
set its section. We should probably ban that as a separate change,
since it doesn't make much sense for an alias to have a section that
differs from its aliasee.
Fixes PR18757, where the section was being lost on the global in code
from Clang like:
extern "C" {
__attribute__((used, section("CUSTOM"))) static int in_custom_section;
}
Reviewers: rafael.espindola
Differential Revision: http://llvm-reviews.chandlerc.com/D2758
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201286
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 13 Feb 2014 01:00:52 +0000 (01:00 +0000)]
[CMake] llvm_add_library: Add handling of the parameter ADDITIONAL_HEADERS to pass through to process_source.
I was insightless then about unknown optional parameters.
(Consider that LINK_LIBS foo bar ADDITIONAL_HEADERS qux quux)
Suggested by Michael Kruse. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201283
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 13 Feb 2014 00:31:14 +0000 (00:31 +0000)]
Fix misleading comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201279
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 13 Feb 2014 00:16:36 +0000 (00:16 +0000)]
The new MCJIT C-API unit test is generating objects without constant data
sections, at least on MachO. Relax expectations to keep the bots green while I
investigate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201277
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 12 Feb 2014 23:54:07 +0000 (23:54 +0000)]
Remove a very old instcombine where we would turn sequences of selects into
logical operations on the i1's driving them. This is a bad idea for every
target I can think of (confirmed with micro tests on all of: x86-64, ARM,
AArch64, Mips, and PowerPC) because it forces the i1 to be materialized into
a general purpose register, whereas consuming it directly into a select generally
allows it to exist only transiently in a predicate or flags register.
Chandler ran a set of performance tests with this change, and reported no
measurable change on x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201275
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Wed, 12 Feb 2014 23:43:47 +0000 (23:43 +0000)]
[Vectorizer] Add a new 'OperandValueKind' in TargetTransformInfo called
'OK_NonUniformConstValue' to identify operands which are constants but
not constant splats.
The cost model now allows returning 'OK_NonUniformConstValue'
for non splat operands that are instances of ConstantVector or
ConstantDataVector.
With this change, targets are now able to compute different costs
for instructions with non-uniform constant operands.
For example, On X86 the cost of a vector shift may vary depending on whether
the second operand is a uniform or non-uniform constant.
This patch applies the following changes:
- The cost model computation now takes into account non-uniform constants;
- The cost of vector shift instructions has been improved in
X86TargetTransformInfo analysis pass;
- BBVectorize, SLPVectorizer and LoopVectorize now know how to distinguish
between non-uniform and uniform constant operands.
Added a new test to verify that the output of opt
'-cost-model -analyze' is valid in the following configurations: SSE2,
SSE4.1, AVX, AVX2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201272
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Wed, 12 Feb 2014 23:42:28 +0000 (23:42 +0000)]
[X86] Teach the backend how to lower vector shift left into multiply rather than scalarizing it.
Instead of expanding a packed shift into a sequence of scalar shifts,
the backend now tries (when possible) to convert the vector shift into a
vector multiply.
Before this change, a shift of a MVT::v8i16 vector by a
build_vector of constants was always scalarized into a long sequence of "vector
extracts + scalar shifts + vector insert".
With this change, if there is SSE2 support, we emit a single vector multiply.
This change also affects SSE4.1, AVX, AVX2 shifts:
- A shift of a MVT::v4i32 vector by a build_vector of non uniform constants
is now lowered when possible into a single SSE4.1 vector multiply.
- Packed v16i16 shift left by constant build_vector are now expanded when
possible into a single AVX2 vpmullw.
This change also improves the lowering of AVX512f vector shifts.
Added test CodeGen/X86/vec_shift6.ll with some code examples that are affected
by this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201271
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 12 Feb 2014 23:26:29 +0000 (23:26 +0000)]
VS Integration: install toolsets for x64 too (PR18738)
This does exactly the same thing as for Win32, except it passes -m64 to
the compiler and the files go in a different directory.
Differential Revision: http://llvm-reviews.chandlerc.com/D2749
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201269
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 12 Feb 2014 23:03:54 +0000 (23:03 +0000)]
DebugInfo: Demonstrate that we're not currently uniquing address table entries in fission
Since I just discovered this while poking at other things, here's the
test case so I have it to come back to later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201267
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 12 Feb 2014 23:03:51 +0000 (23:03 +0000)]
DebugInfo: Merge fission and non-fission (and 32 and 64 bit) tests for TLS support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201266
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 12 Feb 2014 22:47:09 +0000 (22:47 +0000)]
Reformat a few lines with clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201265
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 12 Feb 2014 22:38:04 +0000 (22:38 +0000)]
80-col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201264
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Wed, 12 Feb 2014 22:17:13 +0000 (22:17 +0000)]
[Stackmaps] Improve the stackmap lowering code in the SelectionDAGBuilder.
We are now no longer relying on the target-specific call lowering implementation
to lower a stackmap intrinsic call. Instead we perform the call lowering in a
target-independent way directly in the stackmap lowering code. This simplifies
the code and removes the need to fixup the code after the target-specific call
lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201263
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Wed, 12 Feb 2014 22:17:10 +0000 (22:17 +0000)]
[Stackmaps] Fix the ID type to be i64 also for stackmaps (as we claim in the documenation)
The ID type for the stackmap and patchpoint intrinsics are in both cases i64.
This fixes an zero extend in the SelectionDAGBuilder that still used i32. This
also updates the target independent instructions STACKMAP and PATCHPOINT to use
the correct type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201262
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 12 Feb 2014 21:47:15 +0000 (21:47 +0000)]
Don't try to build ExceptionDemo on ARM.
The demo uses _Unwind_GetIP which is not available on that platform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201261
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 12 Feb 2014 21:30:07 +0000 (21:30 +0000)]
Extend RTDyld API to enable optionally precomputing the total amount of memory
required for all sections in a module. This can be useful when targets or
code-models place strict requirements on how sections must be laid out
in memory.
If RTDyldMemoryManger::needsToReserveAllocationSpace() is overridden to return
true then the JIT will call the following method on the memory manager, which
can be used to preallocate the necessary memory.
void RTDyldMemoryManager::reserveAllocationSpace(uintptr_t CodeSize,
uintptr_t DataSizeRO,
uintptr_t DataSizeRW)
Patch by Vaidas Gasiunas. Thanks very much Viadas!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201259
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 12 Feb 2014 21:26:20 +0000 (21:26 +0000)]
Rename Windows.h to WindowsSupport.h to avoid ambiguity
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201258
91177308-0d34-0410-b5e6-
96231b3b80d8
David Fang [Wed, 12 Feb 2014 21:02:12 +0000 (21:02 +0000)]
_CS_DARWIN_USER macros available on darwin>=9. Thanks, Dave Odell!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201255
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 12 Feb 2014 19:34:44 +0000 (19:34 +0000)]
Debug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.
rdar://problem/
16015314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201253
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 12 Feb 2014 18:09:18 +0000 (18:09 +0000)]
Pass edges weights to MachineBasicBlock::addSuccessor in TailDuplicatePass to
preserve branch probability information.
<rdar://problem/
15893208>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201245
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Wed, 12 Feb 2014 17:17:41 +0000 (17:17 +0000)]
PC-rel implemented in AArch64, test now pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201243
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 12 Feb 2014 16:48:02 +0000 (16:48 +0000)]
Move more self-contained functionality away from tools/opt/opt.cpp
BreakpointPrinter moves to its own module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201242
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 12 Feb 2014 15:39:20 +0000 (15:39 +0000)]
Revert r201237+r201238: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call
It introduced multiple test failures in the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201241
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 12 Feb 2014 14:44:54 +0000 (14:44 +0000)]
Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call
Summary:
AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for targets with mature MC support. Such targets will always parse the inline assembly (even when emitting assembly). Targets without mature MC support continue to use EmitRawText() for assembly output.
The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler to parse inline assembly (even when emitting assembly output). UseIntegratedAs is set to true for targets that consider any failure to parse valid assembly to be a bug. Target specific subclasses generally enable the integrated assembler in their constructor. The default value can be overridden with -no-integrated-as.
All tests that rely on inline assembly supporting invalid assembly (for example, those that use mnemonics such as 'foo' or 'hello world') have been updated to disable the integrated assembler.
Reviewers: rafael
Reviewed By: rafael
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2686
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201237
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 12 Feb 2014 11:50:22 +0000 (11:50 +0000)]
Windows/Path.inc: Move <shlobj.h> after "Windows.h" for some API available.
I found that swapping the order of some header files helped fix a
build issue that we're seeing on mingw32. Without the swap, windows.h
was being included before _WIN32_WINNT was being defined and the
CreateHardLinkW function was #ifdef'd out.
It looks like the header is mainly used to get the SHGetFolderPathW
function, so I don't think that there'll be much fallout from the
switch.
Suggested by Alex Crichton. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201230
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 12 Feb 2014 11:50:11 +0000 (11:50 +0000)]
Teach tablegen() macro to check needed variables
This macro depends on several variables to be set in the calling
context. Check them and report an error if they are not set.
Without this, custom commands may be silently specified that
will fail at build time.
Patch by Brad King.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201229
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 12 Feb 2014 10:17:54 +0000 (10:17 +0000)]
R600: Always implement both versions of isTruncateFree and add a sanity check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201222
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 12 Feb 2014 08:09:20 +0000 (08:09 +0000)]
Remove special case filtering for instructions with lock prefix as they are all marked with isCodeGenOnly already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201216
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 12 Feb 2014 08:02:29 +0000 (08:02 +0000)]
Mark XACQUIRE_PREFIX/XRELEASE_PREFIX as isAsmParserOnly so they'll disappear from the disassembler table build without custom filtering code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201215
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 12 Feb 2014 07:15:05 +0000 (07:15 +0000)]
[PR18809] Mark DebugInfo/empty.ll as XFAIL:cygming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201211
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 12 Feb 2014 03:58:47 +0000 (03:58 +0000)]
Test case I forgot to 'add' for r201126.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201207
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 12 Feb 2014 01:00:24 +0000 (01:00 +0000)]
Remove unneeded include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201201
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 12 Feb 2014 00:40:47 +0000 (00:40 +0000)]
DwarfUnit: Include type unit's file strings in the defining compile unit's file_names table
There's still one piece missing here, which is adding the
DW_AT_stmt_list to the type unit that refer's to the compile unit's line
table. Working on that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201198
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 12 Feb 2014 00:32:05 +0000 (00:32 +0000)]
Fix some formatting in my last commit (r201196)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201197
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 12 Feb 2014 00:31:30 +0000 (00:31 +0000)]
DwarfUnit: Provide a reference to a defining DwarfCompileUnit from DwarfTypeUnit.
Type units need to insert their file strings into the compile unit's
line/file table. This is preliminary work to that end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201196
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 12 Feb 2014 00:11:25 +0000 (00:11 +0000)]
DwarfUnit: Refactor DW_AT_file creation into a common function.
This is preliminary work to fix type unit file strings so they appear in
their originating CU's line table - but it's also just good/simple
cleanup, so I'm committing it ahead of time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201195
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 11 Feb 2014 23:57:03 +0000 (23:57 +0000)]
DwarfUnit: Replace unnecessary conditionals with asserts.
We used to be pretty vague about what debug entities were what, with
many conditionals to silently drop/skip/accept things. These don't seem
to be relevant anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201194
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 11 Feb 2014 23:49:31 +0000 (23:49 +0000)]
Tweak ARM fastcc by adopting these two AAPCS rules:
* CPRCs may be allocated to co-processor registers or the stack – they may never be allocated to core registers
* When a CPRC is allocated to the stack, all other VFP registers should be marked as unavailable
The difference is only noticeable in rare cases where there are a large number of floating point arguments (e.g.
7 doubles + additional float, double arguments). Although it's probably still better to avoid vmov as it can cause
stalls in some older ARM cores. The other, more subtle benefit, is to minimize difference between the various
calling conventions.
rdar://
16039676
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201193
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 11 Feb 2014 22:22:15 +0000 (22:22 +0000)]
Reapply r201180 with an additional error path.
Debug info: Emit values in subregisters that do not have a separate
DWARF register number by emitting a super-register + DW_OP_bit_piece.
This is necessary because on x86_64, there are no DWARF register numbers
for i386-style subregisters.
Fixes a bunch of FIXMEs.
rdar://problem/
16015314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201190
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 11 Feb 2014 22:03:30 +0000 (22:03 +0000)]
Revert "Debug info: Emit values in subregisters that do not have a separate"
This reverts commit r201179 for buildbot breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201188
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 11 Feb 2014 21:49:46 +0000 (21:49 +0000)]
DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded
This comes up in empty files or files containing #file directives that
never reference the actual source file name. Came up in a small test of
line tables I was playing with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201187
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 11 Feb 2014 21:46:46 +0000 (21:46 +0000)]
DebugInfo: Remove dependence on file numbering in the line table.
These tests were unnecessarily sensitive to the presence and ordering of
elements in the line table file_names list which will break on a future
change I'm working on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201185
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 11 Feb 2014 21:23:02 +0000 (21:23 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201181
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 11 Feb 2014 21:22:59 +0000 (21:22 +0000)]
Debug info: Emit values in subregisters that do not have a separate
DWARF register number by emitting a super-register + DW_OP_bit_piece.
This is necessary because on x86_64, there are no DWARF register numbers
for i386-style subregisters.
Fixes a bunch of FIXMEs.
rdar://problem/
16015314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201180
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 11 Feb 2014 21:22:53 +0000 (21:22 +0000)]
make llvm-dwarfdump a little more resilient when parsing .debug_loc
sections. The call to data.getUnsigned(&Offset, AddressSize) only
increments Offset if the read succeeds, which will result in an infinite
loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201179
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 11 Feb 2014 21:12:38 +0000 (21:12 +0000)]
R600/SI: Fix assertion on infinite loops.
This isn't the most useful case to fix in the real world,
but bugpoint runs into this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201177
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 11 Feb 2014 21:09:03 +0000 (21:09 +0000)]
InstCombine: Teach icmp merging about the equivalence of bit tests and UGE/ULT with a power of 2.
This happens in bitfield code. While there reorganize the existing code
a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201176
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 11 Feb 2014 20:48:41 +0000 (20:48 +0000)]
Tidy up a bit. Formatting only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201174
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 11 Feb 2014 20:48:39 +0000 (20:48 +0000)]
ARM: Thumb2 LDR(literal) can target SP.
Fix a slightly overzealous destination register restriction for the
'without .w' alias. Add some explicit testcases.
rdar://
16033140
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201173
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 11 Feb 2014 19:02:55 +0000 (19:02 +0000)]
SCEV: Cast switched values to make -Wswitch more useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201170
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Tue, 11 Feb 2014 17:30:18 +0000 (17:30 +0000)]
Improve the declaration when LDPO_PIE is not available.
Thanks to İsmail Dönmez for the better declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201163
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Tue, 11 Feb 2014 17:11:32 +0000 (17:11 +0000)]
If LDPO_PIE is not defined (before binutils 2.23 version),
use the hardcoded declaration 3
See r201110 for the initial change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201161
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Seaborn [Tue, 11 Feb 2014 16:58:03 +0000 (16:58 +0000)]
Add a note about using "Differential Revision:" in commit messages
I noticed this convention from the commit logs. It seems like it
would be useful to document it, to encourage other committers to link
back to code reviews in their commits.
Differential Revision: http://llvm-reviews.chandlerc.com/D2678
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201160
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 11 Feb 2014 15:44:32 +0000 (15:44 +0000)]
ScalarEvolution: Analyze trip count of loops with a switch guarding the exit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201159
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lougher [Tue, 11 Feb 2014 15:42:46 +0000 (15:42 +0000)]
Teach the DAGCombiner how to fold concat_vector nodes when the input is two
BUILD_VECTOR nodes, e.g.:
(concat_vectors (BUILD_VECTOR a1, a2, a3, a4), (BUILD_VECTOR b1, b2, b3, b4))
->
(BUILD_VECTOR a1, a2, a3, a4, b1, b2, b3, b4)
This fixes an issue with AVX, where a sequence was not recognized as a 256-bit
vbroadcast due to the concat_vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201158
91177308-0d34-0410-b5e6-
96231b3b80d8
Bradley Smith [Tue, 11 Feb 2014 12:59:09 +0000 (12:59 +0000)]
[AArch64] Add missing PCRel relocations for AArch64 in RuntimeDyldELF
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201149
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 11 Feb 2014 12:52:27 +0000 (12:52 +0000)]
[LPM] Switch LICM to actively use LCSSA in addition to preserving it.
Fixes PR18753 and PR18782.
This is necessary for LICM to preserve LCSSA correctly and efficiently.
There is still some active discussion about whether we should be using
LCSSA, but we can't just immediately stop using it and we *need* LICM to
preserve it while we are using it. We can restore the old SSAUpdater
driven code if and when there is a serious effort to remove the reliance
on LCSSA from all of the loop passes.
However, this also serves as a great example of why LCSSA is very nice
to have. This change significantly simplifies the process of sinking
instructions for LICM, and makes it quite a bit less expensive.
It wouldn't even be as complex as it is except that I had to start the
process of removing the big recursive LCSSA formation hammer in order to
switch even this much of the re-forming code to asserting that LCSSA was
preserved. I'll fully remove that next just to tidy things up until the
LCSSA debate settles one way or the other.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201148
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Tue, 11 Feb 2014 10:36:26 +0000 (10:36 +0000)]
XCore target: fix const section handling
Xcore target ABI requires const data that is externally visible
to be handled differently if it has C-language linkage rather than
C++ language linkage.
Clang now emits ".cp.rodata" section information.
All other externally visible constant data will be placed in the DP section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201144
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Tue, 11 Feb 2014 10:36:18 +0000 (10:36 +0000)]
XCore target: Lower ATOMIC_LOAD & ATOMIC_STORE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201143
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 11 Feb 2014 10:21:53 +0000 (10:21 +0000)]
AVX: fixed a bug in LowerVECTOR_SHUFFLE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201140
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Tue, 11 Feb 2014 09:11:18 +0000 (09:11 +0000)]
Remove TimeValue::toPosixTime() -- it is buggy, semantics are unclear, and its
only current user should be using toEpochTime() instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201136
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 11 Feb 2014 07:25:59 +0000 (07:25 +0000)]
AVX-512: Optimized BUILD_VECTOR pattern;
fixed encoding of VEXTRACTPS instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201134
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 11 Feb 2014 06:55:43 +0000 (06:55 +0000)]
[CodeGenPrepare] Test case for the promotions that bypass the
profitability check due to some other checks in the addressing
mode matcher. I.e., test case for commit r201121.
<rdar://problem/
16020230>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201132
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 11 Feb 2014 05:28:24 +0000 (05:28 +0000)]
In RuntimeDyldImpl::emitSection, make Allocate (section size to be allocated) a
uintptr_t. An unsigned could overflow for large sections.
No test case - anything big enough to overflow an unsigned is going to take an
appreciable time to zero when the test passes.
The choice of uintptr_t was made to match the RTDyldMemoryManager APIs, but
these should probably be hardcoded to uint64_ts: It is legitimate to JIT for
64-bit targets from a 32-bit host/compiler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201127
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 11 Feb 2014 04:05:33 +0000 (04:05 +0000)]
Changed attributes of all gather intrinsics from IntrReadMem to IntrReadArgMem as they access only memory based on argument. Patch by Robert Khasanov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201126
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 11 Feb 2014 03:40:14 +0000 (03:40 +0000)]
Using the helper API for random number generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201125
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 11 Feb 2014 02:47:33 +0000 (02:47 +0000)]
Hopefully fixing the MinGW 32 build, which was broken by r200767. Not using rand_s() since MinGW does not have an implementation for it, but instead using the underlying CryptGenRandom APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201124
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 11 Feb 2014 01:59:02 +0000 (01:59 +0000)]
[CodeGenPrepare] Undo changes that happened for the profitability check.
The addressing mode matcher checks at some point the profitability of folding an
instruction into the addressing mode. When the instruction to be folded has
several uses, it checks that the instruction can be folded in each use.
To do so, it creates a new matcher for each use and check if the instruction is
in the list of the matched instructions of this new matcher.
The new matchers may promote some instructions and this has to be undone to keep
the state of the original matcher consistent.
A test case will follow.
<rdar://problem/
16020230>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201121
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 11 Feb 2014 01:23:52 +0000 (01:23 +0000)]
DebugInfo: Use existing symbol rather than creating it again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201119
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Mon, 10 Feb 2014 23:34:23 +0000 (23:34 +0000)]
Move the *PassPrinter into their own module.
These are self-contained in functionality so it makes sense to separate them,
as opt.cpp has grown quite big already.
Following Eric's suggestions, if this code is ever deemed useful outside of
tools/opt, it will make sense to move it to one of the LLVM libraries like IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201116
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Mon, 10 Feb 2014 23:30:26 +0000 (23:30 +0000)]
[Stackmaps] Cleanup code. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201115
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 10 Feb 2014 23:26:14 +0000 (23:26 +0000)]
LTO API: add lto_module_create_from_memory_with_path.
This function adds an extra path argument to lto_module_create_from_memory.
The path argument will be passed to makeBuffer to make sure the MemoryBuffer
has a name and the created module has a module identifier.
This is mainly for emitting warning messages from the linker. When we emit
warning message on a module, we can use the module identifier.
rdar://
15985737
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201114
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 10 Feb 2014 21:25:13 +0000 (21:25 +0000)]
Mark the methods in the Mangler const.
A const ObjectFile needs to be able to provide its name. For an IRObjectFile,
that means being able to call the mangler. Since each IRObjectFile can have
a different mangling, it is natural for them to contain a Mangler which is
therefore also const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201113
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 10 Feb 2014 20:44:57 +0000 (20:44 +0000)]
cmake: Do not export targets when installing toolchain only
Patch by Brad King!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201111
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 10 Feb 2014 20:38:38 +0000 (20:38 +0000)]
Fix an old FIXME. LDPO_PIE is available since 2.23, realeased 2012-10-22.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201110
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 10 Feb 2014 20:24:04 +0000 (20:24 +0000)]
Change the begin and end methods in ObjectFile to match the style guide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201108
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 10 Feb 2014 19:57:42 +0000 (19:57 +0000)]
R600: Implement isTruncateFree
Truncation is just accessing a subregister for any multiple of
the register size, so it's free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201107
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 10 Feb 2014 19:39:35 +0000 (19:39 +0000)]
[LPM] A terribly simple fix to a terribly complex bug: PR18773.
The crux of the issue is that LCSSA doesn't preserve stateful alias
analyses. Before r200067, LICM didn't cause LCSSA to run in the LTO pass
manager, where LICM runs essentially without any of the other loop
passes. As a consequence the globalmodref-aa pass run before that loop
pass manager was able to survive the loop pass manager and be used by
DSE to eliminate stores in the function called from the loop body in
Adobe-C++/loop_unroll (and similar patterns in other benchmarks).
When LICM was taught to preserve LCSSA it had to require it as well.
This caused it to be run in the loop pass manager and because it did not
preserve AA, the stateful AA was lost. Most of LLVM's AA isn't stateful
and so this didn't manifest in most cases. Also, in most cases LCSSA was
already running, and so there was no interesting change.
The real kicker is that LCSSA by its definition (injecting PHI nodes
only) trivially preserves AA! All we need to do is mark it, and then
everything goes back to working as intended. It probably was blocking
some other weird cases of stateful AA but the only one I have is
a 1000-line IR test case from loop_unroll, so I don't really have a good
test case here.
Hopefully this fixes the regressions on performance that have been seen
since that revision.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201104
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 10 Feb 2014 17:13:56 +0000 (17:13 +0000)]
Copy the ThreadLocalMode in GlobalVariable::copyAttributesFrom
This fixes the oversight from r159077.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201098
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 10 Feb 2014 16:58:30 +0000 (16:58 +0000)]
R600/SI: Initialize M0 and emit S_WQM_B64 whenever DS instructions are used
DS instructions that access local memory can only uses addresses that
are less than or equal to the value of M0. When M0 is uninitialized,
then we experience undefined behavior.
This patch also changes the behavior to emit S_WQM_B64 on pixel shaders
no matter what kind of DS instruction is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201097
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 10 Feb 2014 16:58:27 +0000 (16:58 +0000)]
R600/SI: Only use S_WQM_B64 in pixel shaders
This doesn't change any functionality, since we only have two shader
types (compute and pixel) that use local memory. We're just changing
the logic to match the documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201096
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 10 Feb 2014 16:49:07 +0000 (16:49 +0000)]
Remove some prototype code accidentally committed in r201043
Thanks to Chandler for the catch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201095
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 10 Feb 2014 16:20:29 +0000 (16:20 +0000)]
ARM: use natural LLVM IR for vshll instructions
Similarly to the vshrn instructions, these are simple zext/sext + trunc
operations. Using normal LLVM IR should allow for better code, and more sharing
with the AArch64 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201093
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 10 Feb 2014 15:43:11 +0000 (15:43 +0000)]
[AArch64] Handle aliases of conditional branches without b.pred form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201091
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 10 Feb 2014 14:24:23 +0000 (14:24 +0000)]
ARM: r12 is callee-saved for interrupt handlers
For A- and R-class processors, r12 is not normally callee-saved, but is for
interrupt handlers. See AAPCS, 5.3.1.1, "Use of IP by the linker".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201089
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 10 Feb 2014 14:17:42 +0000 (14:17 +0000)]
Make succ_iterator a real random access iterator and clean up a couple of users.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201088
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 10 Feb 2014 14:17:30 +0000 (14:17 +0000)]
GlobalsModRef: Unify and clean up duplicated pointer analysis code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201087
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 10 Feb 2014 14:04:07 +0000 (14:04 +0000)]
ARM: use LLVM IR to represent the vshrn operation
vshrn is just the combination of a right shift and a truncate (and the limits
on the immediate value actually mean the signedness of the shift doesn't
matter). Using that representation allows us to get rid of an ARM-specific
intrinsic, share more code with AArch64 and hopefully get better code out of
the mid-end optimisers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201085
91177308-0d34-0410-b5e6-
96231b3b80d8