1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

100221 Commits

Author SHA1 Message Date
Hao Liu
386fc0d8ae [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.

llvm-svn: 201298
2014-02-13 05:42:33 +00:00
Quentin Colombet
375bcb6380 [RegAlloc] Fix the assertion in the last chance recoloring to match the
condition at the call site.

llvm-svn: 201296
2014-02-13 05:17:37 +00:00
Rafael Espindola
3b5b5b2a0f Copy dll storage in copyAttributes.
llvm-svn: 201295
2014-02-13 05:11:35 +00:00
Juergen Ributzka
19fe55f203 [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>

llvm-svn: 201291
2014-02-13 04:19:26 +00:00
Rafael Espindola
248ced2efa Use simpler version of sys::fs::exists when possible.
llvm-svn: 201289
2014-02-13 04:00:35 +00:00
Hao Liu
ee04163cfe [AArch64]Add support for spilling FPR8/FPR16.
llvm-svn: 201287
2014-02-13 02:36:58 +00:00
Reid Kleckner
72c9e73170 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

llvm-svn: 201286
2014-02-13 02:18:36 +00:00
NAKAMURA Takumi
1cff87e287 [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!

llvm-svn: 201283
2014-02-13 01:00:52 +00:00
Lang Hames
2cb1d4c349 Fix misleading comment.
llvm-svn: 201279
2014-02-13 00:31:14 +00:00
Lang Hames
56c71b5750 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. 

llvm-svn: 201277
2014-02-13 00:16:36 +00:00
Owen Anderson
5dc9f991c9 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.

llvm-svn: 201275
2014-02-12 23:54:07 +00:00
Andrea Di Biagio
594ea331ef [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.

llvm-svn: 201272
2014-02-12 23:43:47 +00:00
Andrea Di Biagio
b682c0a265 [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.

llvm-svn: 201271
2014-02-12 23:42:28 +00:00
Hans Wennborg
081111b3a1 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

llvm-svn: 201269
2014-02-12 23:26:29 +00:00
David Blaikie
e9b9cea9b1 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.

llvm-svn: 201267
2014-02-12 23:03:54 +00:00
David Blaikie
f000ab907f DebugInfo: Merge fission and non-fission (and 32 and 64 bit) tests for TLS support.
llvm-svn: 201266
2014-02-12 23:03:51 +00:00
Eric Christopher
baee8f6671 Reformat a few lines with clang-format.
llvm-svn: 201265
2014-02-12 22:47:09 +00:00
Eric Christopher
24d12aa095 80-col.
llvm-svn: 201264
2014-02-12 22:38:04 +00:00
Juergen Ributzka
8716214931 [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.

llvm-svn: 201263
2014-02-12 22:17:13 +00:00
Juergen Ributzka
e7d529f2ab [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.

llvm-svn: 201262
2014-02-12 22:17:10 +00:00
Rafael Espindola
2db67019d3 Don't try to build ExceptionDemo on ARM.
The demo uses _Unwind_GetIP which is not available on that platform.

llvm-svn: 201261
2014-02-12 21:47:15 +00:00
Lang Hames
f16cc85169 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!

llvm-svn: 201259
2014-02-12 21:30:07 +00:00
Reid Kleckner
9cb7be892d Rename Windows.h to WindowsSupport.h to avoid ambiguity
llvm-svn: 201258
2014-02-12 21:26:20 +00:00
David Fang
c12b9865cd _CS_DARWIN_USER macros available on darwin>=9. Thanks, Dave Odell!
llvm-svn: 201255
2014-02-12 21:02:12 +00:00
Adrian Prantl
5b1e439b75 Debug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.
rdar://problem/16015314

llvm-svn: 201253
2014-02-12 19:34:44 +00:00
Akira Hatanaka
b360215008 Pass edges weights to MachineBasicBlock::addSuccessor in TailDuplicatePass to
preserve branch probability information.

<rdar://problem/15893208>

llvm-svn: 201245
2014-02-12 18:09:18 +00:00
Renato Golin
77cff15c8b PC-rel implemented in AArch64, test now pass
llvm-svn: 201243
2014-02-12 17:17:41 +00:00
Eli Bendersky
cfbe523e4a Move more self-contained functionality away from tools/opt/opt.cpp
BreakpointPrinter moves to its own module.

llvm-svn: 201242
2014-02-12 16:48:02 +00:00
Daniel Sanders
656c4d360b Revert r201237+r201238: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call
It introduced multiple test failures in the buildbots.

llvm-svn: 201241
2014-02-12 15:39:20 +00:00
Daniel Sanders
e647d6441b 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

llvm-svn: 201237
2014-02-12 14:44:54 +00:00
NAKAMURA Takumi
db2274631d 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!

llvm-svn: 201230
2014-02-12 11:50:22 +00:00
NAKAMURA Takumi
90092f6522 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.

llvm-svn: 201229
2014-02-12 11:50:11 +00:00
Benjamin Kramer
b51d0de00f R600: Always implement both versions of isTruncateFree and add a sanity check.
llvm-svn: 201222
2014-02-12 10:17:54 +00:00
Craig Topper
f39f3fd69a Remove special case filtering for instructions with lock prefix as they are all marked with isCodeGenOnly already.
llvm-svn: 201216
2014-02-12 08:09:20 +00:00
Craig Topper
8189467f87 Mark XACQUIRE_PREFIX/XRELEASE_PREFIX as isAsmParserOnly so they'll disappear from the disassembler table build without custom filtering code.
llvm-svn: 201215
2014-02-12 08:02:29 +00:00
NAKAMURA Takumi
0dcc05a825 [PR18809] Mark DebugInfo/empty.ll as XFAIL:cygming.
llvm-svn: 201211
2014-02-12 07:15:05 +00:00
Craig Topper
b0531a9e59 Test case I forgot to 'add' for r201126.
llvm-svn: 201207
2014-02-12 03:58:47 +00:00
Matt Arsenault
f329c592ca Remove unneeded include
llvm-svn: 201201
2014-02-12 01:00:24 +00:00
David Blaikie
acf90a3777 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.

llvm-svn: 201198
2014-02-12 00:40:47 +00:00
David Blaikie
81d038e087 Fix some formatting in my last commit (r201196)
llvm-svn: 201197
2014-02-12 00:32:05 +00:00
David Blaikie
76cef86094 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.

llvm-svn: 201196
2014-02-12 00:31:30 +00:00
David Blaikie
6f2b533143 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.

llvm-svn: 201195
2014-02-12 00:11:25 +00:00
David Blaikie
ef63706736 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.

llvm-svn: 201194
2014-02-11 23:57:03 +00:00
Evan Cheng
f8b059795f 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

llvm-svn: 201193
2014-02-11 23:49:31 +00:00
Adrian Prantl
42b57f6dee 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

llvm-svn: 201190
2014-02-11 22:22:15 +00:00
Adrian Prantl
dbf8ec2eec Revert "Debug info: Emit values in subregisters that do not have a separate"
This reverts commit r201179 for buildbot breakage.

llvm-svn: 201188
2014-02-11 22:03:30 +00:00
David Blaikie
5a053d4ea1 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.

llvm-svn: 201187
2014-02-11 21:49:46 +00:00
David Blaikie
4af7429b68 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.

llvm-svn: 201185
2014-02-11 21:46:46 +00:00
Adrian Prantl
408e34f39e whitespace
llvm-svn: 201181
2014-02-11 21:23:02 +00:00
Adrian Prantl
a3d563a0d0 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

llvm-svn: 201180
2014-02-11 21:22:59 +00:00