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

4975 Commits

Author SHA1 Message Date
Craig Topper
c1da102d02 Remove dead code.
llvm-svn: 222781
2014-11-25 20:11:29 +00:00
Craig Topper
7a0892403a Remove unused MaxSize variable.
llvm-svn: 222780
2014-11-25 20:11:27 +00:00
Craig Topper
6d0c335936 Move a vector instead of copying it.
llvm-svn: 222779
2014-11-25 20:11:25 +00:00
Craig Topper
c4009eedfd Replace a comment that says 'unreachable' with llvm_unreachable in TableGen AsmWriter output.
llvm-svn: 222650
2014-11-24 14:09:52 +00:00
Craig Topper
b0d4991215 Detect best type for some static index tables instead of just using uint32_t to reduce total data size.
llvm-svn: 222643
2014-11-24 02:08:35 +00:00
Craig Topper
3199a0602e Tablegen output formatting fixes.
llvm-svn: 222633
2014-11-23 09:40:10 +00:00
Elena Demikhovsky
36a2243ab7 Masked Vector Load and Store Intrinsics.
Introduced new target-independent intrinsics in order to support masked vector loads and stores. The loop vectorizer optimizes loops containing conditional memory accesses by generating these intrinsics for existing targets AVX2 and AVX-512. The vectorizer asks the target about availability of masked vector loads and stores.
Added SDNodes for masked operations and lowering patterns for X86 code generator.
Examples:
<16 x i32> @llvm.masked.load.v16i32(i8* %addr, <16 x i32> %passthru, i32 4 /* align */, <16 x i1> %mask)
declare void @llvm.masked.store.v8f64(i8* %addr, <8 x double> %value, i32 4, <8 x i1> %mask)

Scalarizer for other targets (not AVX2/AVX-512) will be done in a separate patch.

http://reviews.llvm.org/D6191

llvm-svn: 222632
2014-11-23 08:07:43 +00:00
Craig Topper
9b0aeb935e Reduce size of some tables in tablegen register info output.
Primarily done by using SequenceToOffsetTable to reduce the register pressure set tables and then sizing the indices into the tables appropriately. Size a few other table entries based on content as well. Reduces X86RegisterInfo.o by ~9k.

llvm-svn: 222621
2014-11-22 18:30:18 +00:00
Craig Topper
b487f2dfc6 Add extra new line and remove some trailing whitespace from tablegen RegisterInfo output file.
llvm-svn: 222508
2014-11-21 05:58:14 +00:00
Craig Topper
65bda63c2e Remove unnecessary extra spaces from tablegen register info output.
llvm-svn: 222411
2014-11-20 05:22:35 +00:00
Craig Topper
ca7045d052 Use array_lengthof instead of sizeof(array)/sizeof(element) in a tablegen output.
llvm-svn: 222410
2014-11-20 05:22:32 +00:00
David Blaikie
60e6c80905 Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool>
This is to be consistent with StringSet and ultimately with the standard
library's associative container insert function.

This lead to updating SmallSet::insert to return pair<iterator, bool>,
and then to update SmallPtrSet::insert to return pair<iterator, bool>,
and then to update all the existing users of those functions...

llvm-svn: 222334
2014-11-19 07:49:26 +00:00
David Blaikie
7499cbae4c Remove StringMap::GetOrCreateValue in favor of StringMap::insert
Having two ways to do this doesn't seem terribly helpful and
consistently using the insert version (which we already has) seems like
it'll make the code easier to understand to anyone working with standard
data structures. (I also updated many references to the Entry's
key and value to use first() and second instead of getKey{Data,Length,}
and get/setValue - for similar consistency)

Also removes the GetOrCreateValue functions so there's less surface area
to StringMap to fix/improve/change/accommodate move semantics, etc.

llvm-svn: 222319
2014-11-19 05:49:42 +00:00
Peter Collingbourne
583d440894 Teach llvm-build to avoid touching LibraryDependencies.inc unless the contents
change. This saves us from rebuilding llvm-config each time we reconfigure.

llvm-svn: 222308
2014-11-19 03:34:20 +00:00
David Blaikie
79f6f3ce15 Make StringSet::insert return pair<iterator, bool> like other self-associative containers
StringSet is still a bit dodgy in that it exposes the raw iterator of
the StringMap parent, which exposes the weird detail that StringSet
actually has a 'value'... but anyway, this is useful for a handful of
clients that want to reference the newly inserted/persistent string data
in the StringSet/Map/Entry/thing.

llvm-svn: 222302
2014-11-19 02:56:00 +00:00
David Blaikie
6fac8481fc Revert "Improve memory ownership/management in TableGen by unique_ptrifying TreePattern's Tree member."
This reverts commit r222183.

Broke on the MSVC buildbots due to MSVC not producing default move
operations - I'd fix it immediately but just broke my build system a
bit, so backing out until I have a chance to get everything going again.

llvm-svn: 222187
2014-11-17 22:55:41 +00:00
David Blaikie
56647fa3d9 Improve memory ownership/management in TableGen by unique_ptrifying TreePattern's Tree member.
The next step is to actually use unique_ptr in TreePatternNode's
Children vector. That will be more intrusive, and may not work,
depending on exactly how these things are handled (I have a bad
suspicion things are shared more than they should be, making this more
DAG than tree - but if it's really a tree, unique_ptr should suffice)

llvm-svn: 222183
2014-11-17 22:16:55 +00:00
Craig Topper
5b6e56da60 Move register class name strings to a single array in MCRegisterInfo to reduce static table size and number of relocation entries.
Indices into the table are stored in each MCRegisterClass instead of a pointer. A new method, getRegClassName, is added to MCRegisterInfo and TargetRegisterInfo to lookup the string in the table.

llvm-svn: 222118
2014-11-17 05:50:14 +00:00
David Blaikie
d0f57445b1 Turn a leaked object into a stack variable instead.
llvm-svn: 222046
2014-11-14 21:53:50 +00:00
Bill Schmidt
66f498a584 Change order of tablegen generated fast-isel instruction code to be
based on instruction complexity

The order that tablegen fast-isel instruction code is generated is
currently based on the text of the predicate (using string
less-than). This patch changes this to instead use the instruction
complexity. Because the complexities are not unique a C++ multimap is
used instead of a map.

This fixes the problem where code with no predicate always comes out
first (the empty string always compares as less than all other
strings) thus making the code with predicates dead code. See the FMUL
code in PPCFastISel.cpp for an example. It also more closely matches
the normal codegen ordering. Some error checking in the tablegen
fast-isel code is fixed as well.

Patch by Bill Seurer.

llvm-svn: 222038
2014-11-14 21:05:45 +00:00
David Blaikie
9aaa1dd2e1 Fix nested namespace with decltype to hopefully work with MSVC
Build failed here:
http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/14629/steps/build_Lld/logs/stdio

So I'm taking a shot in the dark that MSVC (whatever version that is)
can't cope with nested name specifiers with a decltype prefix.

llvm-svn: 221931
2014-11-13 21:56:57 +00:00
David Blaikie
6d609b52ab Use unique_ptr to handle ownership of TreePatterns in CodeGenDAGPatterns::PatternFragments
We might be able to use unique_ptr to handle ownership of the
TreePatternNodes too - looking into that next.

llvm-svn: 221928
2014-11-13 21:40:02 +00:00
Matt Arsenault
f24b2619a2 Make TreePattern::error use Twine
The underlying error function already uses a Twine,
and most of the uses build up strings.

llvm-svn: 221740
2014-11-11 23:48:11 +00:00
Rafael Espindola
476a83ecd4 MCAsmParserExtension has a copy of the MCAsmParser. Use it.
Base classes were storing a second copy.

llvm-svn: 221667
2014-11-11 05:18:41 +00:00
Michael J. Spencer
17a3ab5413 Use findProgramByName.
llvm-svn: 221221
2014-11-04 01:29:59 +00:00
Rafael Espindola
00a6342814 Handle ASAN_OPTIONS and UBSAN_OPTIONS in TestingConfig.py
Currently they are passed to tests of llvm itself, but not, for example, lld.

With this patch the options are visible in every test.

llvm-svn: 221198
2014-11-03 23:04:56 +00:00
Rafael Espindola
6214a8c737 refactor duplicated code. NFC.
llvm-svn: 221191
2014-11-03 22:17:49 +00:00
Rafael Espindola
48899041bd [lit] Forward LD_PRELOAD to tests.
With this patch I can use asan to test the gold plugin without having
to build gold itself with asan.

llvm-svn: 221183
2014-11-03 21:24:43 +00:00
Matt Arsenault
1838bf2925 Support REG_SEQUENCE in tablegen.
The problem is mostly that variadic output instruction
aren't handled, so it is rejected for having an inconsistent
number of operands, and then the right number of operands
isn't emitted.

llvm-svn: 221117
2014-11-02 23:46:51 +00:00
Matt Arsenault
05da066691 Fix typo
llvm-svn: 221116
2014-11-02 23:46:47 +00:00
Matt Arsenault
97e5c314c1 Fix missing C++ mode comment
llvm-svn: 221115
2014-11-02 23:46:44 +00:00
Daniel Sanders
79790d7c5e [tablegen] Add CustomCallingConv and use it to tablegen-erate the outermost parts of the Mips O32 implementation
Summary:
CustomCallingConv is simply a CallingConv that tablegen should not generate the
implementation for. It allows regular CallingConv's to delegate to these custom
functions. This is (currently) necessary for Mips and we cannot use CCCustom
without having to adapt to the different API that CCCustom uses.

This brings us a bit closer to being able to remove
MipsCC::analyzeCallOperands and MipsCC::analyzeFormalArguments in favour of
the common implementation.

No functional change to the targets.

Depends on D3341

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: vmedic, llvm-commits

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

llvm-svn: 221052
2014-11-01 17:38:22 +00:00
Michael Kuperstein
134dc7e512 Fix build with CMake if LLVM_USE_INTEL_JITEVENTS option is enabled
* Added LLVM libraries required for IntelJITEvents to LLVMBuild.txt.
* Removed 'jit' library from llvm-jitlistener.
* Added support for OptionalLibraries to llvm-build cmake files generator.

Patch by aleksey.a.bader@intel.com

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

llvm-svn: 220848
2014-10-29 09:18:49 +00:00
Robert Khasanov
2ca56ad410 [AVX512] Extended avx512_sqrt_packed (sqrt instructions) to VL subset.
Refactored through AVX512_maskable

llvm-svn: 220806
2014-10-28 18:15:20 +00:00
Daniel Dunbar
0e45326cc9 [lit] Fix Python-3 compatibility, patch by Dan Liew.
llvm-svn: 220357
2014-10-22 01:26:06 +00:00
Daniel Dunbar
ab9d73a70e [lit] Bump version number.
llvm-svn: 220355
2014-10-22 00:48:23 +00:00
Daniel Dunbar
685b3765e0 Fix ShTest parsing error when a keyword line doesn't end with a newline.
llvm-svn: 220354
2014-10-22 00:34:31 +00:00
Dan Liew
802c28f78d Teach Lit to catch OSError exceptions when creating a process during the
execution of a shell command. This can happen for example if the
``RUN:`` line calls a python script which can work correctly under
Linux/OSX but will not work under Windows. A more useful error message
is now shown rather than an unhelpful backtrace.

llvm-svn: 220227
2014-10-20 20:14:28 +00:00
Robert Khasanov
c3a1b1b644 Moved out IIT_V64 from common values section.
Thanks Juergen Ributzka for notice.

llvm-svn: 220224
2014-10-20 19:25:05 +00:00
Peter Collingbourne
22590da2c9 Initial version of Go bindings.
This code is based on the existing LLVM Go bindings project hosted at:
https://github.com/go-llvm/llvm

Note that all contributors to the gollvm project have agreed to relicense
their changes under the LLVM license and submit them to the LLVM project.

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

llvm-svn: 219976
2014-10-16 22:48:02 +00:00
Rafael Espindola
253081a9b6 Delete -std-compile-opts.
These days -std-compile-opts was just a silly alias for -O3.

llvm-svn: 219951
2014-10-16 20:00:02 +00:00
Robert Khasanov
625ba0e53e [AVX512] Extended avx512_binop_rm for AVX512VL subsets.
Added avx512_binop_rm_vl multiclass for VL subset
Added encoding tests

llvm-svn: 219390
2014-10-09 08:38:48 +00:00
Adam Nemet
80cc28c134 [AVX512] Support mask register in MRMDestReg format
This is necessary for masking vextract*x4.

llvm-svn: 219359
2014-10-08 23:25:29 +00:00
Renato Golin
cfffbc9054 Update git-svnrevert to accept git and svn revisions
Interchangeable commit ids can now be used on this git-svnrevert, which
will figure out what kind of commit that is (if you use format rNNNN for SVN
commits) and make sure the right ids are used in the right places.

It's a little bit more robust and user-friendly.

llvm-svn: 219290
2014-10-08 09:32:47 +00:00
Bob Wilson
84f3fb3ea5 PR21101: tablegen's FastISel emitter should filter out unused functions.
FastISel has a fixed set of virtual functions that are overridden by the
tablegen-generated code for each target. These functions are distinguished by
the kinds of operands, e.g., register + immediate = "ri". The FastISel emitter
has been blindly emitting functions with different combinations of operand
kinds, even for combinations that are completely unused by FastISel, e.g.,
"fastEmit_rrr". Change to filter out functions that will be irrelevant for
FastISel and do not bother generating the code for them. Also add explicit
"override" keywords for the virtual functions that are overridden.

llvm-svn: 218838
2014-10-01 22:44:01 +00:00
Adam Nemet
e0d1a483d8 [X86 disasm tblegen backend] Clean up numPhysicalOperands asserts
No functionality change intended.

This implements Elena's idea to put the new additionalOperand outside the
switch to cover all cases
(http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140929/237763.html).

Note only nontrivial change is in MRMSrcMemFrm.  This requires an inclusive
interval of [2, 4] because we have prefix-dependent *optional* immediate
operand.

llvm-svn: 218790
2014-10-01 19:28:11 +00:00
Robert Khasanov
2972b6033d [AVX512] Added intrinsics for VPCMPEQB and VPCMPEQW.
Added new operand type for intrinsics (IIT_V64)

llvm-svn: 218668
2014-09-30 11:32:22 +00:00
Craig Topper
456f534a1e Reduce code duplication a bit.
llvm-svn: 218563
2014-09-27 05:26:42 +00:00
Craig Topper
94e5f75223 Fix TableGen -gen-disassembler output for bit fields with an offset.
This fixes bit assignments like this
Inst{7-0} = Foo{9-2}

Patch by Steve King.

llvm-svn: 218560
2014-09-27 04:38:02 +00:00
Daniel Sanders
c3ccff7583 [mips] Add CCValAssign::[ASZ]ExtUpper and CCPromoteToUpperBitsInType and handle struct's correctly on big-endian N32/N64 return values.
Summary:
The N32/N64 ABI's require that structs passed in registers are laid out
such that spilling the register with 'sd' places the struct at the lowest
address. For little endian this is trivial but for big-endian it requires
that structs are shifted into the upper bits of the register.

We also require that structs passed in registers have the 'inreg'
attribute for big-endian N32/N64 to work correctly. This is because the
tablegen-erated calling convention implementation only has access to the
lowered form of struct arguments (one or more integers of up to 64-bits
each) and is unable to determine the original type.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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

llvm-svn: 218451
2014-09-25 12:15:05 +00:00