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

118442 Commits

Author SHA1 Message Date
Pawel Bylica
c3956ce2ba Fix shl folding in DAG combiner.
Summary: The code responsible for shl folding in the DAGCombiner was assuming incorrectly that all constants are less than 64 bits. This patch simply changes the way values are compared.

Test Plan: A regression test included.

Reviewers: andreadb

Reviewed By: andreadb

Subscribers: andreadb, test, llvm-commits

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

llvm-svn: 240291
2015-06-22 15:58:11 +00:00
Rafael Espindola
ec7f530a6c Add a triple to the test to fix it on some hosts.
The slp vectorizer doesn't optimize this case in 32 bits.

Fixes PR23453.

llvm-svn: 240289
2015-06-22 15:44:20 +00:00
Joseph Tremoulet
d0e52901ee [ORC] Add NullResolver
Summary:
This is an implementation of RuntimeDyld::SymbolResolver that simply
rejects all resolution requests; useful for clients that do not have any
cross-object symbol references.

Reviewers: lhames

Reviewed By: lhames

Subscribers: llvm-commits

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

llvm-svn: 240288
2015-06-22 15:27:58 +00:00
Rafael Espindola
c87c2aa297 Support Solaris unused sections' gc link syntax.
It is not clear if this would work or not with LLVM_NO_DEAD_STRIP
binaries, so be conservative for now.

Patch by Xan López.

llvm-svn: 240287
2015-06-22 15:06:17 +00:00
Toma Tabacu
3870d18445 [mips] [IAS] Add support for LAReg with identical source and destination register operands.
Summary: In this case, we're supposed to load the immediate in AT and then ADDu it with the source register and put it in the destination register.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 240278
2015-06-22 13:10:23 +00:00
Elena Demikhovsky
0d6489273b AVX-512: added VPSHUFB instruction - all SKX forms
Added intrinsics and encoding tests.

llvm-svn: 240277
2015-06-22 13:00:42 +00:00
Rafael Espindola
2c6ed3c85c Do not pass optimization flags to Solaris' linker.
It is not supported.

Patch by Xan López.

llvm-svn: 240276
2015-06-22 12:41:52 +00:00
Rafael Espindola
5fb5fa8872 Use right syntax to pass version script to Solaris' ld.
Patch by Xan Lopez!

llvm-svn: 240275
2015-06-22 12:34:54 +00:00
Toma Tabacu
2d14fb4231 [mips] [IAS] Add support for LASym with identical source and destination register operands.
Summary:
In this case, we're supposed to load the address of the symbol in AT and then ADDu it with the source register and
put it in the destination register.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 240273
2015-06-22 12:08:39 +00:00
Elena Demikhovsky
833648a31f AVX-512: All forms of VCOPMRESS VEXPAND instructions,
encoding tests.

llvm-svn: 240272
2015-06-22 11:16:30 +00:00
Alexander Kornienko
25bf7721bc Fixed/added namespace ending comments using clang-tidy. NFC
A few more files that were fixed while preparing r240270.

llvm-svn: 240271
2015-06-22 09:57:54 +00:00
Elena Demikhovsky
07d3690bdf Reverted AVX-512 vector shuffle
llvm-svn: 240258
2015-06-22 09:01:15 +00:00
Michael Kuperstein
dec359bcf7 [X86] Allow more call sequences to use push instructions for argument passing
This allows more call sequences to use pushes instead of movs when optimizing for size.
In particular, calling conventions that pass some parameters in registers (e.g. thiscall) are now supported.

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

llvm-svn: 240257
2015-06-22 08:31:22 +00:00
Elena Demikhovsky
9ebb2c82d0 AVX-512: Added intrinsics for VPERMT2W/D/Q/PS/PD and
VPERMI2W/D/Q/PS/PD instructions.
Added tests.

llvm-svn: 240256
2015-06-22 06:45:48 +00:00
Chandler Carruth
440d4e2329 [PM/AA] Hoist the AliasResult enum out of the AliasAnalysis class.
This will allow classes to implement the AA interface without deriving
from the class or referencing an internal enum of some other class as
their return types.

Also, to a pretty fundamental extent, concepts such as 'NoAlias',
'MayAlias', and 'MustAlias' are first class concepts in LLVM and we
aren't saving anything by scoping them heavily.

My mild preference would have been to use a scoped enum, but that
feature is essentially completely broken AFAICT. I'm extremely
disappointed. For example, we cannot through any reasonable[1] means
construct an enum class (or analog) which has scoped names but converts
to a boolean in order to test for the possibility of aliasing.

[1]: Richard Smith came up with a "solution", but it requires class
templates, and lots of boilerplate setting up the enumeration multiple
times. Something like Boost.PP could potentially bundle this up, but
even that would be quite painful and it doesn't seem realistically worth
it. The enum class solution would probably work without the need for
a bool conversion.

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

llvm-svn: 240255
2015-06-22 02:16:51 +00:00
Chandler Carruth
745bc09941 [PM/AA] Rework the names and comments in AliasSetTracker to more
accurately describe what is being tracked.

While these two enums do track mod/ref information and aliasing
information, they don't represent the exact same things as either the
mod/ref enums or the alias result enum in AA. They're definitions are
dominated by the structure of their lattice and the bit's various
semantics. This patch just calls them what they are and tries to spell
out usefully distinct names for these things.

This will clear the path for using a raw unscoped enum to represent some
of these concepts across LLVM's analysis library.

No functionality changed here.

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

llvm-svn: 240254
2015-06-22 02:12:52 +00:00
Rafael Espindola
97aff73f30 Add the testcase from pr23900.
llvm-svn: 240253
2015-06-22 01:29:24 +00:00
Simon Pilgrim
8dcdc654d7 [X86] Code tidyup - Use SDValue bool operator. NFC.
llvm-svn: 240249
2015-06-21 21:34:32 +00:00
Duncan P. N. Exon Smith
e09a8eebf6 AsmPrinter: Don't emit empty .debug_loc entries
If we don't know how to represent a .debug_loc entry, skip the entry
entirely rather than emitting an empty one.  Similarly, if a .debug_loc
list has no entries, don't create the list.

We still want to create the variables, just in an optimized-out form
that doesn't have a DW_AT_location.

llvm-svn: 240244
2015-06-21 16:54:56 +00:00
Duncan P. N. Exon Smith
d2c6e427d5 AsmPrinter: Rewrite initialization of DbgVariable, NFC
There are three types of `DbgVariable`:
  - alloca variables, created based on the MMI table,
  - register variables, created based on DBG_VALUE instructions, and
  - optimized-out variables.

This commit reconfigures `DbgVariable` to make it easier to tell which
kind we have, and make initialization a little clearer.

For MMI/alloca variables, `FrameIndex.size()` must always equal
`Expr.size()`, and there shouldn't be an `MInsn`.  For register
variables (with a `MInsn`), `FrameIndex` must be empty, and `Expr`
should have 0 or 1 element depending on whether it has a complex
expression (registers with multiple locations use `DebugLocListIndex`).
Optimized-out variables shouldn't have any of these fields.

Moreover, this separates DBG_VALUE initialization until after the
variable is created, simplifying logic in a future commit that changes
`collectVariableInfo()` to stop creating empty .debug_loc entries/lists.

llvm-svn: 240243
2015-06-21 16:50:43 +00:00
Simon Pilgrim
cb02250c85 [X86][SSE] Added missing stack folding test for CVTSD2SS instruction.
llvm-svn: 240241
2015-06-21 16:07:47 +00:00
NAKAMURA Takumi
7c7c56e0fb OptTable.h: Prune a couple of \param(s), since Arg has been ArrayRef-ized. [-Wdocumentation]
llvm-svn: 240240
2015-06-21 13:44:46 +00:00
David Blaikie
42301b8c06 Devirtualize ArgList's dtor now that -Wvirtual-dtor and C++11 allow a better way to describe this situation
llvm-svn: 240238
2015-06-21 06:51:35 +00:00
David Blaikie
fadceb8c9d ArrayRef-ify libDriverMain
llvm-svn: 240234
2015-06-21 06:31:56 +00:00
David Blaikie
e3a1c91588 ArrayRef-ify ParseArgs
llvm-svn: 240233
2015-06-21 06:31:53 +00:00
Rui Ueyama
57a210fa38 Object: Add load configuration structure for 64 bit PE/COFF.
llvm-svn: 240230
2015-06-21 01:12:32 +00:00
Hans Wennborg
59ddcf57cd Switch lowering: add heuristic for filling leaf nodes in the weight-balanced binary search tree
Sparse switches with profile info are lowered as weight-balanced BSTs. For
example, if the node weights are {1,1,1,1,1,1000}, the right-most node would
end up in a tree by itself, bringing it closer to the top.

However, a leaf in this BST can contain up to 3 cases, and having a single
case in a leaf node as in the example means the tree might become
unnecessarily high.

This patch adds a heauristic to the pivot selection algorithm that moves more
cases into leaf nodes unless that would lower their rank. It still doesn't
yield the optimal tree in every case, but I believe it's conservatibely correct.

llvm-svn: 240224
2015-06-20 17:14:07 +00:00
Simon Pilgrim
7e530e8e8e [X86][SSE] Fix PerformSExtCombine bug that accessed the wrong return value of an aggregate type.
Fix to rL237885 to ensure that it accesses the correct return value of an aggregate type.

llvm-svn: 240223
2015-06-20 16:19:24 +00:00
Benjamin Kramer
7a29bc912f [PPC] Factor vector removal into a function and remove O(n^2) behavior.
No functionality change intended.

llvm-svn: 240222
2015-06-20 15:59:41 +00:00
Benjamin Kramer
90b6e24039 [SwitchLowering] Remove quadratic vector removal.
This can be triggered with giant switches. No functionality change
intended.

llvm-svn: 240221
2015-06-20 15:59:34 +00:00
Simon Pilgrim
76d548e80e [X86][SSE][CostModel] Added full set of sitofp/uitofp costings for SSE2/AVX/AVX2/AVX512F.
Merged separate (but equivalent) SSE2/AVX512F tests.

Removed codegen tests since these are already done better in test/CodeGen/X86.

The actual cost values still need to be updated to match recent codegen improvements.

llvm-svn: 240219
2015-06-20 14:58:01 +00:00
Yaron Keren
fa0d7e1489 Update ELFObjectWriter::reset() following r238073.
llvm-svn: 240218
2015-06-20 11:54:32 +00:00
Yaron Keren
a1bf88d988 Rangify for loops in Inliner::runOnSCC(), NFC.
llvm-svn: 240215
2015-06-20 07:12:33 +00:00
Justin Bogner
908a91ed1f IndVarSimplify: Avoid UB from binding a reference to a null pointer
Calling operator* on a WeakVH whose Value is null hits undefined
behaviour, since we bind the value to a reference. Instead, go through
`operator Value*` so that we work with the pointer itself.

Found by ubsan.

llvm-svn: 240214
2015-06-20 06:24:05 +00:00
NAKAMURA Takumi
3735eeef92 Reformat.
llvm-svn: 240213
2015-06-20 06:22:04 +00:00
NAKAMURA Takumi
0a80c769f9 Revert r240040, "[BranchFolding] Replace custom MachineInstr with MachineInstrExpressionTrait"
It caused different emission between stage2 and stage3. Investigating.

llvm-svn: 240212
2015-06-20 06:21:48 +00:00
NAKAMURA Takumi
d743249356 TargetInstrInfo.h: Fix r240192. [-Wdocumentation]
llvm-svn: 240210
2015-06-20 03:53:18 +00:00
Justin Bogner
5391d5c278 Revert "InstrProf: When reading, copy the data instead of taking a reference. NFC"
Seems like MSVC doesn't like this:

  InstrProf.h(49) : error C2614: 'llvm::InstrProfRecord' : illegal member initialization: 'Hash' is not a base or member

This reverts r240206.

llvm-svn: 240208
2015-06-20 01:37:56 +00:00
Peter Collingbourne
e41720cb1c Use correct escaping for semicolon on Windows.
llvm-svn: 240207
2015-06-20 01:28:20 +00:00
Justin Bogner
f4084a2560 InstrProf: When reading, copy the data instead of taking a reference. NFC
This consolidates the logic to read instrprof records into the on disk
hash table's lookup trait and makes us copy the counter data instead
of taking references to it as we read. This will simplify further
changes to the format.

Patch by Betul Buyukkurt.

llvm-svn: 240206
2015-06-20 01:26:04 +00:00
Peter Collingbourne
b3f5a1083a LibDriver tests require x86 target.
llvm-svn: 240205
2015-06-20 01:14:37 +00:00
Peter Collingbourne
f38314b83d LibDriver: implement /libpath and $LIB; ignore /ignore and /machine.
llvm-svn: 240203
2015-06-20 00:57:12 +00:00
Keno Fischer
dc411f550e [MCJIT] Add a FindGlobalVariableNamed utility
Summary: This adds FindGlobalVariableNamed to ExecutionEngine
(plus implementation in MCJIT), which is an analog of
FindFunctionNamed for GlobalVariables.

Reviewers: lhames

Reviewed By: lhames

Subscribers: llvm-commits

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

llvm-svn: 240202
2015-06-20 00:55:58 +00:00
Justin Bogner
3a6fe4b208 LowerSwitch: Avoid some undefined behaviour
When a case of INT64_MIN was followed by a case that was greater than
zero, we were overflowing a signed integer here. Since we've sorted
the cases here anyway (and thus currentValue must be greater than
nextValue) it's simple enough to avoid this by using addition rather
than subtraction.

Found by UBSAN on existing tests.

llvm-svn: 240201
2015-06-20 00:28:25 +00:00
Sanjoy Das
135b5cb956 [Statepoint] Remove unnecessary argument from Statepoint::getRelocates
NFC.

llvm-svn: 240198
2015-06-20 00:01:03 +00:00
Sanjoy Das
aae1b2bbd9 [Statepoint][NFC] Fix include guard style.
llvm-svn: 240197
2015-06-20 00:00:58 +00:00
Nico Weber
cea0f30bb1 Revert 240130, it caused crashes (repro in PR23900).
llvm-svn: 240193
2015-06-19 23:43:47 +00:00
Sanjay Patel
db0841b8c7 name change: hasPattern() -> getMachineCombinerPatterns() ; NFC
This was suggested as part of D10460, but it's independent of
any functional change.

llvm-svn: 240192
2015-06-19 23:21:42 +00:00
Sanjoy Das
3200fa8f55 [CallGraph] Given -print-callgraph a stable printing order.
Summary:
Since FunctionMap has llvm::Function pointers as keys, the order in
which the traversal happens can differ from run to run, causing spurious
FileCheck failures.  Have CallGraph::print sort the CallGraphNodes by
name before printing them.

Reviewers: bogner, chandlerc

Subscribers: llvm-commits

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

llvm-svn: 240191
2015-06-19 23:20:31 +00:00
Dan Liew
655af07ce2 Try to fix generation of LLVMExports.cmake under Visual Studio.
If LLVMDebugInfoPDB links against the DIA SDK then the exports file
would contain an INTERFACE_LINK_LIBRARIES property that contained an
absolute path to ``diaguids.lib`` which used a native windows path (interpreted
as escape sequences when LLVMExports.cmake is imported causing
``find_package(LLVM)`` to fail) rather than the correct CMake style path.

llvm-svn: 240181
2015-06-19 21:50:27 +00:00