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

100205 Commits

Author SHA1 Message Date
Matt Arsenault
7594b13bbb Do more addrspacecast transforms that happen for bitcast.
Makes addrspacecast (gep) do addrspacecast (gep) instead.

llvm-svn: 201376
2014-02-14 00:49:12 +00:00
Tom Stellard
988925aeae R600/SI: Expand all v8[if]32 operations
llvm-svn: 201371
2014-02-13 23:34:15 +00:00
Tom Stellard
309a624102 R600/SI: Add a pattern for i32 anyext
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 201370
2014-02-13 23:34:13 +00:00
Tom Stellard
4b0c3551df R600/SI: Completely Disable TypeRewriter on compute
llvm-svn: 201369
2014-02-13 23:34:12 +00:00
Tom Stellard
4447febe55 R600/SI: Split global vector loads with more than 4 elements
llvm-svn: 201368
2014-02-13 23:34:10 +00:00
Tom Stellard
de306d4a6d R600/SI: Add ShaderType attribute to some tests
llvm-svn: 201367
2014-02-13 23:34:07 +00:00
Rafael Espindola
753d7ba297 Use __literal16. It has been supported by the linker since 2005.
llvm-svn: 201365
2014-02-13 23:16:11 +00:00
Hans Wennborg
7061403ad5 MSBuild integration: get the LibraryPath right (PR18707)
It was pointing to lib\clang\3.4, but now we're on 3.5.
Make CMake insert the right version automatically.

llvm-svn: 201363
2014-02-13 22:01:35 +00:00
Stephen Hines
e919f42bb2 Don't build DFSan functionality for Android.
llvm-svn: 201362
2014-02-13 21:21:09 +00:00
Diego Novillo
9f753a3e86 Simplify checks in MC/AsmParser/directive_loc.s
llvm-svn: 201361
2014-02-13 20:16:42 +00:00
Diego Novillo
26a166f74b Fix generation of 'isa' and 'discriminator' keywords.
Summary:
There should be a space before each of these two keywords to avoid
generating invalid assembly files.

NOTE: I could not find an obvious maintainers in CODE_OWNERS.TXT, but
      this seems related to debug info.

Reviewers: echristo

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2791

llvm-svn: 201359
2014-02-13 20:05:03 +00:00
Reid Kleckner
abe8b5fc2e Tweak an _MSC_VER ifdef to use typename with clang in a unittest
In theory, Clang should figure out how to parse this correctly without
typename, but since this is the last TU that Clang falls back on in the
self-host, I'm going to compromise and check for __clang__.

And now Clang can self-host on -win32 without fallback!  The 'check' and
'check-clang' targets both pass.

llvm-svn: 201358
2014-02-13 19:51:13 +00:00
NAKAMURA Takumi
90563965b6 Tweak llvm/test/DebugInfo/X86/generate-odr-hash.ll corresponding to r201351 (Revert r201187).
llvm-svn: 201355
2014-02-13 18:28:28 +00:00
Rafael Espindola
e01239e65c Check that GlobalAliases don't have section or alignment.
An alias is always in the section of its aliasee and has the same alignment
(since it has the same address).

llvm-svn: 201354
2014-02-13 18:26:41 +00:00
Duncan P. N. Exon Smith
1cd702e570 SCCIterator: Merge MinVisitNumStack and VisitStack
This patch merges MinVisitNumStack with VisitStack using a StackElement
struct.

Patch by Mehdi Amini!

llvm-svn: 201353
2014-02-13 18:26:15 +00:00
Benjamin Kramer
7455fc3975 InstCombine: Replace custom constant folding code with ConstantExpr.
llvm-svn: 201352
2014-02-13 18:23:24 +00:00
NAKAMURA Takumi
ecf343b2c0 [PR18809] Revert r201187, "DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded"
It really crashes cygwin's stage2 configure with "clang -g".

llvm-svn: 201351
2014-02-13 18:18:56 +00:00
Rafael Espindola
83453b6625 Use mkdir instead of stat+mkdir.
This is an optimistic version of create_diretories: it tries to create the
directory first and looks at the parent only if that fails.

Running strace on "mkdir -p" shows that it is pessimistic, calling mkdir on
every element of the path. We could implement that if needed.

In any case, with both strategies there is no reason to call stat, just check
the return of mkdir.

llvm-svn: 201347
2014-02-13 16:58:19 +00:00
Rafael Espindola
73f6bffbc1 Add triples to try to fix the windows bots.
llvm-svn: 201345
2014-02-13 16:49:47 +00:00
Benjamin Kramer
57d9ecca57 Reduce code duplication resulting from the ConstantVector/ConstantDataVector split.
No intended functionality change.

llvm-svn: 201344
2014-02-13 16:48:38 +00:00
Rafael Espindola
367df40fdc .file is only available on ELF, use a triple instead of -march.
llvm-svn: 201337
2014-02-13 15:38:16 +00:00
Rafael Espindola
f20c560b40 "foo" is not a ppc instruction, don't try to parse it.
llvm-svn: 201336
2014-02-13 15:33:35 +00:00
Rafael Espindola
71737927b7 Specify a triple. MachO AArch64 support is missing.
llvm-svn: 201335
2014-02-13 15:30:06 +00:00
Daniel Sanders
7a3a160940 Re-commit: 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.

Changes since review (and last commit attempt):
- Fixed test failures that were missed due to configuration of local build.
  (fixes crash.ll and a couple others).
- Fixed tests that happened to pass because the local build was on X86
  (should fix 2007-12-17-InvokeAsm.ll)
- mature-mc-support.ll's should no longer require all targets to be compiled.
  (should fix ARM and PPC buildbots)
- Object output (-filetype=obj and similar) now forces the integrated assembler
  to be enabled regardless of default setting or -no-integrated-as.
  (should fix SystemZ buildbots)

Reviewers: rafael

Reviewed By: rafael

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2686

llvm-svn: 201333
2014-02-13 14:44:26 +00:00
Rafael Espindola
709dbafdc3 Remove dead code.
llvm-svn: 201327
2014-02-13 13:45:45 +00:00
NAKAMURA Takumi
bec7f62e98 [CMake] Let llvm_add_library(MODULE) check capability of loadable module.
On unsupported platforms, llvm_add_library(MODULE) doesn't create any targets.
Caller may be responsible to check and add extra target properties.

llvm-svn: 201320
2014-02-13 11:25:17 +00:00
NAKAMURA Takumi
f29c091bdb [CMake] Move the target property PREFIX from add_llvm_loadable_module() to llvm_add_library().
llvm-svn: 201318
2014-02-13 11:19:21 +00:00
NAKAMURA Takumi
0586905e99 [CMake] llvm_add_library(MODULE) may use CMAKE_MODULE_LINKER_FLAGS instead of target property LINK_FLAGS.
I mis-dropped Darwin's link flags (in clang side) since r201073.

llvm-svn: 201317
2014-02-13 11:19:11 +00:00
NAKAMURA Takumi
812321a90a [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.
llvm-svn: 201316
2014-02-13 11:19:00 +00:00
NAKAMURA Takumi
74e8d4a7db llvm/test/CodeGen/AArch64/cpus.ll: Tweak to use -mtriple=aarch64-unknown-unknown, or this would crash for targeting pecoff like *-mingw32.
llvm-svn: 201315
2014-02-13 11:06:23 +00:00
Tim Northover
5e3ca32797 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.

llvm-svn: 201314
2014-02-13 10:44:30 +00:00
Oliver Stannard
f7cc40a705 Add Cortex-A53 and Cortex-A57 cores to the AArch64 backend
llvm-svn: 201305
2014-02-13 09:46:11 +00:00
Craig Topper
e48bd43a34 Remove unused method declaration.
llvm-svn: 201301
2014-02-13 07:12:40 +00:00
Craig Topper
882df7af18 Remove filtering concept from X86 disassembler table generation. It's no longer necessary.
llvm-svn: 201299
2014-02-13 07:07:16 +00:00
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