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

124370 Commits

Author SHA1 Message Date
Dan Gohman
ef1e3b1270 [WebAssembly] Add some comments. NFC.
llvm-svn: 254096
2015-11-25 21:32:06 +00:00
Marek Olsak
d73d332555 AMDGPU/SI: select S_ABS_I32 when possible (v2)
v2: added more tests, moved the SALU->VALU conversion to a separate function

It looks like it's not possible to get subregisters in the S_ABS lowering
code, and I don't feel like guessing without testing what the correct code
would look like.

llvm-svn: 254095
2015-11-25 21:22:45 +00:00
Dan Gohman
51a57a6c25 [WebAssembly] Fix WebAssembly register numbering for registers added late.
If virtual registers are created late, mappings to WebAssembly
registers need to be added explicitly. This patch adds a function
to do so and teaches WebAssemblyPeephole to use it. This fixes
an out-of-bounds access on the WARegs vector.

llvm-svn: 254094
2015-11-25 21:13:02 +00:00
Davide Italiano
157982cb11 [SCCP] More informative message if we don't know how to handle a terminator.
llvm-svn: 254093
2015-11-25 21:03:36 +00:00
Matt Arsenault
7c4b78647f AMDGPU: Check feature attributes in SIMachineFunctionInfo
llvm-svn: 254091
2015-11-25 20:55:12 +00:00
Krzysztof Parzyszek
2eff7f1fd8 Add hexagonv55 and hexagonv60 as recognized CPUs, make v60 the default
llvm-svn: 254089
2015-11-25 20:30:59 +00:00
Matt Arsenault
cb1a683d67 AMDGPU: Add some tests for promotion of v2i64 scalar_to_vector
llvm-svn: 254087
2015-11-25 20:01:03 +00:00
Matt Arsenault
538dc413bb AMDGPU: Make v2i64/v2f64 legal types.
They can be loaded and stored, so count them as legal. This is
mostly to fix a number of common cases for load/store merging.

llvm-svn: 254086
2015-11-25 19:58:34 +00:00
Artyom Skrobov
3803dae0a6 Expose isXxxConstant() functions from SelectionDAGNodes.h (NFC)
Summary:
Many target lowerings copy-paste the code to test SDValues for known constants.
This code can instead be shared in SelectionDAG.cpp, and reused in the targets.

Reviewers: MatzeB, andreadb, tstellarAMD

Subscribers: arsenm, jyknight, llvm-commits

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

llvm-svn: 254085
2015-11-25 19:41:11 +00:00
Dan Gohman
219b8c4930 [WebAssembly] Use a physical register to describe ARGUMENT liveness.
Instead of trying to move ARGUMENT instructions back up to the top after
they've been scheduled or sunk down, use a fake physical register to
create a liveness constraint that prevents ARGUMENT instructions from
moving down in the first place. This is still not entirely ideal, however
it is more robust than letting them move and moving them back.

llvm-svn: 254084
2015-11-25 19:36:19 +00:00
Xinliang David Li
4b5a7c9aac [PGO] Regroup functions in better order (NFC)
llvm-svn: 254080
2015-11-25 19:13:00 +00:00
Dan Gohman
86c5d917ca [WebAssembly] Clean up several FIXME comments.
llvm-svn: 254079
2015-11-25 18:13:18 +00:00
Dan Gohman
f204a62e6d [WebAssembly] Make several tests more strict.
llvm-svn: 254077
2015-11-25 17:33:15 +00:00
Dan Gohman
d6551e5232 [WebAssembly] Support for register stackifying with load and store instructions.
llvm-svn: 254076
2015-11-25 16:55:01 +00:00
Dan Gohman
6582e77ef0 [WebAssembly] Codegen support for ISD::ExternalSymbol
llvm-svn: 254075
2015-11-25 16:44:29 +00:00
Dan Gohman
57e1385af8 [WebAssembly] Add 'final' to some classes. NFC.
llvm-svn: 254073
2015-11-25 16:29:24 +00:00
Dan Gohman
5e90843e80 [WebAssembly] Whitespace consistency. NFC.
llvm-svn: 254071
2015-11-25 16:26:14 +00:00
Sanjay Patel
836b13b706 fix typo; NFC
llvm-svn: 254069
2015-11-25 15:33:36 +00:00
Hal Finkel
f66d2e051d [PowerPC] Don't generate mfocrf on the e500mc
The e500mc does not actually support the mfocrf instruction; update the
processor definitions to reflect that fact.

Patch by Tom Rix (with some test-case cleanup by me).

llvm-svn: 254064
2015-11-25 10:14:31 +00:00
Eric Christopher
db86123b7f Accept any stack offset, including none, here.
llvm-svn: 254062
2015-11-25 09:21:36 +00:00
Eric Christopher
5f84aed4f6 Fix some places where we were assuming that memory type had been legalized
to a simple type when lowering a truncating store of a vector type. In this
case for an EVT we'll return Expand as we should in all of the cases anyhow.

The testcase triggered at the one in VectorLegalizer::LegalizeOp, inspection
found the rest.

llvm-svn: 254061
2015-11-25 09:11:53 +00:00
Simon Pilgrim
5bd89dab62 [X86][AVX] Regenerate Splat OptSize tests
Tidied up triple and regenerate tests using update_llc_test_checks.py

llvm-svn: 254060
2015-11-25 09:06:17 +00:00
Elena Demikhovsky
f792042843 AVX-512: Fixed a bug in VPERMT2* intrinsic.
It was wrong order of operands (from intrinsic to DAG node).
I added more strict type specification for instruction selection.

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

llvm-svn: 254059
2015-11-25 08:17:56 +00:00
Xinliang David Li
29597bc958 [PGO] Convert InstrProfRecord based serialization methods to use common C methods
1. Convert serialization methods using InstrProfRecord as source into C (impl)
   interfaces using Closure.
2. Reimplement InstrProfRecord serialization method to use new C interface
   as dummy wrapper. 

Now it is ready to implement wrapper for runtime value profile data.

(The new code need better source location -- but not changed in this patch to
 minimize diffs. )

llvm-svn: 254057
2015-11-25 06:23:38 +00:00
Xinliang David Li
960920a165 [PGO] convert a subset of C++ interfaces into C (for sharing) (NFC)
llvm-svn: 254056
2015-11-25 04:29:24 +00:00
Xinliang David Li
ddaedd9e31 Move member functions closer to others of the same class (NFC)
llvm-svn: 254055
2015-11-25 03:24:37 +00:00
Peter Collingbourne
3ca337d5d9 AsmParser: Make the code for parsing unnamed aliases more closely resemble that for unnamed globals.
This fixes parsing of forward references to unnamed aliases.

While here, remove an unnecessary isa check.

llvm-svn: 254054
2015-11-25 02:54:07 +00:00
Xinliang David Li
03ec0b37d7 Add missing documentation. (NFC)
llvm-svn: 254051
2015-11-25 01:13:44 +00:00
Matthias Braun
650d1f2fc1 Doxygen: Use mathjax to create formulas.
The main motivation is to not require a latex installation when building
the documentation. I would also expect a better image quality and the
ability to copy&paste from formulas with a javascript based solution for
displaying the math.

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

llvm-svn: 254048
2015-11-25 00:50:47 +00:00
Sanjoy Das
dcc5bddb02 [OperandBundles] Extract duplicated code into a helper function, NFC
llvm-svn: 254047
2015-11-25 00:42:24 +00:00
Sanjoy Das
d16b4e5c5e [InstCombine] Don't drop operand bundles
Reviewers: majnemer

Subscribers: llvm-commits

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

llvm-svn: 254046
2015-11-25 00:42:19 +00:00
Xinliang David Li
607229aea6 Fix function naming (NFC)
llvm-svn: 254045
2015-11-25 00:08:49 +00:00
Hans Wennborg
d31e84b3b4 Revert r253528: "[X86] Enable shrink-wrapping by default."
This caused PR25607 and also caused Chromium to crash on start-up.

(Also had to update test/CodeGen/X86/avx-splat.ll, which was committed
after shrink wrapping was enabled.)

llvm-svn: 254044
2015-11-25 00:05:13 +00:00
Kaelyn Takata
37f6ab1581 Fix an asan error where NumElements > 32 for at least one case in
test/CodeGen/X86/avg.ll.

llvm-svn: 254043
2015-11-25 00:03:29 +00:00
Rong Xu
0c33c67e46 Revert r254021
llvm-svn: 254042
2015-11-24 23:57:51 +00:00
Rong Xu
c4f897c441 [PGO] Revert revision r254021,r254028,r254035
Revert the above revision due to multiple issues.

llvm-svn: 254040
2015-11-24 23:49:08 +00:00
Xinliang David Li
ddeee8f963 [PGO] Add mapper callback to interfaces retrieving value data for site (NFC)
This allows cleaner implementation and merging retrieving/mapping in
one pass.

llvm-svn: 254038
2015-11-24 23:36:52 +00:00
Teresa Johnson
cbf6e0bf1b [ThinLTO] Add option to limit importing based on instruction count
Add a simple initial heuristic to control importing based on the number
of instructions recorded in the function's summary. Add option to
control the limit, and test using option.

llvm-svn: 254036
2015-11-24 22:55:46 +00:00
Rong Xu
9a7262eb26 [PGO] Relax test cases in PGO instrumentation
Fix buildbot failure for clang-x86_64-linux-selfhost-modules.
http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/8866
The failing test cases are newly added from r254021. It seems the IR has a
different order in this platform. In this patch, I temporarily relax the test
case to make the build green. I'll have a complete fix (more robust way to test)
soon.

llvm-svn: 254035
2015-11-24 22:50:34 +00:00
Diego Novillo
2b7c3c54ab SamplePGO - Add test for hot/cold inlined functions.
When the original binary is executed and sampled, the resulting profile
contains information on the original inline stack. We currently follow
the original inline plan if we notice that the inlined callsite has more
than 0 samples to it.

A better way is to determine whether the callsite is actually worth
inlining. If the callsite accumulates a small fraction of the samples
spent in the parent function, then we don't want to bother inlining it
(as it means that the callsite is actually cold).

This patch introduces a threshold expressed in percentage of samples
in relation to the parent function.  If the callsite uses less than N%
of the total samples used by its parent, the original inline decision is
not re-applied.

I've set the threshold to the very arbitrary value of 5%. I'm yet to do
any actual experiments to see what's a good value. I wanted to separate
the basic mechanism from the tuning.

llvm-svn: 254034
2015-11-24 22:38:37 +00:00
Simon Pilgrim
440ffd70de [X86][SSE] Regenerate PMUL tests
Tidied up triple and regenerate tests using update_llc_test_checks.py

llvm-svn: 254029
2015-11-24 22:09:31 +00:00
Rong Xu
f74fb8bb95 [PGO] Fix build errors in x86_64-darwin
Fix buildbot failure for x86_64-darwin due to r254021

llvm-svn: 254028
2015-11-24 21:55:50 +00:00
Evgeniy Stepanov
4168a65f41 [msan] Relax origin-alignment test.
Change origin-alignment test to test only the alignment of the origin
store, and not the exact instruction sequence used to compute the
address. This makes the test less fragile and, in particular, lets it
pass both with the old and new MSan ABIs.

llvm-svn: 254027
2015-11-24 21:44:16 +00:00
Rong Xu
025bf7be0c [PGO] MST based PGO instrumentation infrastructure
This patch implements a minimum spanning tree (MST) based instrumentation for
PGO. The use of MST guarantees minimum number of CFG edges getting
instrumented. An addition optimization is to instrument the less executed
edges to further reduce the instrumentation overhead. The patch contains both the
instrumentation and the use of the profile to set the branch weights.

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

llvm-svn: 254021
2015-11-24 21:31:25 +00:00
Teresa Johnson
697f6bcd05 [ThinLTO] Refactor function body scan during importing into helper (NFC)
llvm-svn: 254020
2015-11-24 21:15:19 +00:00
Xinliang David Li
7067931ac2 Fix sphinx-build error when building documentation.
Consolidate the description of -binary/-text option description
to avoid duplicate ID error by sphinux-build.

llvm-svn: 254018
2015-11-24 20:48:25 +00:00
Sanjoy Das
abf380ea6d [RuntimeDyld] Fix a class of arithmetic errors introduced in r253918
r253918 had refactored expressions like "A - B.Address + C" to "A -
B.getAddressWithOffset(C)".  This is incorrect, since the latter really
computes "A - B.Address - C".

None of the tests I can run locally on x86 broke due to this bug, but it
is the current suspect for breakage on the AArch64 buildbots.

llvm-svn: 254017
2015-11-24 20:37:01 +00:00
Simon Pilgrim
cded55a15d [X86][FMA] Optimize FNEG(FMA) Patterns
X86 needs to use its own FMA opcodes, preventing the standard FNEG(FMA) pattern table recognition method used by other platforms. This patch adds support for lowering FNEG(FMA(X,Y,Z)) into a single suitably negated FMA instruction.

Fix for PR24364

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

llvm-svn: 254016
2015-11-24 20:31:46 +00:00
Matthias Braun
6606f69fc1 LiveVariables should not clobber MachineOperand::IsDead, ::IsKill on reserved physical registers
Patch by Nick Johnson <Nicholas.Paul.Johnson@deshawresearch.com>

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

llvm-svn: 254012
2015-11-24 20:06:56 +00:00
Teresa Johnson
a3214913e6 [ThinLTO] Enable iterative importing in FunctionImport pass
Analyze imported function bodies and add any new external calls to
the worklist for importing. Currently no controls on the importing
so this will end up importing everything possible in the call tree
below the importing module. Basic profitability checks coming next.

Update test to check for iteratively inlined functions.

llvm-svn: 254011
2015-11-24 19:55:04 +00:00