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

124606 Commits

Author SHA1 Message Date
Pete Cooper
93434deca8 Fix incorrect quote. NFC
llvm-svn: 254775
2015-12-04 21:59:04 +00:00
Keno Fischer
5b8c01f61a [llc/opt] Add an option to run all passes twice
Summary: Lately, I have submitted a number of patches to fix bugs that
only occurred when using the same pass manager to compile multiple
modules (generally these bugs are failure to reset some persistent
state). Unfortunately I don't think there is currently a way to test
that from the command line. This adds a very simple flag to both llc
and opt, under which the tools will simply re-run their respective
pass pipelines using the same pass manager on (a clone of the same
module). Additionally, we verify that both outputs are bitwise the
same.

Reviewers: yaron.keren

Subscribers: loladiro, yaron.keren, kcc, llvm-commits

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

llvm-svn: 254774
2015-12-04 21:56:46 +00:00
Chad Rosier
3bfc113c1a [AArch64] Expand vector SDIVREM/UDIVREM operations.
http://reviews.llvm.org/D15214
Patch by Ana Pazos <apazos@codeaurora.org>!

llvm-svn: 254773
2015-12-04 21:38:44 +00:00
David Blaikie
e43f28015a [llvm-dwp] Remove some out of date comments
llvm-svn: 254772
2015-12-04 21:38:39 +00:00
David Blaikie
138abe01f5 [llvm-dwp] Implement the required on-disk probed hash table
llvm-svn: 254770
2015-12-04 21:30:23 +00:00
Reid Kleckner
9e23002c7a Fix llvm-readobj build on Windows, match noreturn attribute on reportError in headers
llvm-svn: 254769
2015-12-04 21:29:53 +00:00
David Blaikie
d59ffbc983 [llvm-dwp] Include the debug_line.dwo section
This probably shouldn't be generated in the .dwo file for CUs, only for
TUs, but it's in the sample .dwos (generated by clang) so dwp should
reflect that.

Arguably the DWP tool could be smart enough to know that the CUs
shouldn't need a debug_line.dwo section and skip that even when it's
legitimately generated for TUs, but that's a bit more off-book.

llvm-svn: 254767
2015-12-04 21:16:42 +00:00
Sanjoy Das
6dd256008e [OperandBundles] Allow operand-specific attributes in operand bundles
Currently `OperandBundleUse::operandsHaveAttr` computes its result
without being given a specific operand.  This is problematic because it
forces us to say that, e.g., even non-pointer operands in `"deopt"`
operand bundles are `readonly`, which doesn't make sense.

This commit changes `operandsHaveAttr` to work in the context of a
specific operand, so that we can give the operand attributes that make
sense for the operands's `llvm::Type`.

llvm-svn: 254764
2015-12-04 20:34:37 +00:00
Philip Reames
cce89f4a30 [LegacyPassManager] Reduce memory usage for AnalysisUsage
The LegacyPassManager was storing an instance of AnalysisUsage for each instance of each pass. In practice, most instances of a single pass class share the same dependencies. We can't rely on this because passes can (and some do) have dynamic dependencies based on instance options.

We can exploit the likely commonality by uniqueing the usage information after querying the pass, but before storing it into the pass manager. This greatly reduces memory consumption by the AnalysisUsage objects. For a long pass pipeline, I measured a decrease in memory consumption for this storage of about 50%. I have not measured on the default O3 pipeline, but I suspect it will see some benefit as well since many passes are repeated (e.g. InstCombine).

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

llvm-svn: 254760
2015-12-04 20:05:04 +00:00
Matthias Braun
54aeb74db9 ScheduleDAGInstrs: Move LiveIntervals field to ScheduleDAGMI
Now that ScheduleDAGInstrs doesn't need it anymore we can move the field
down the class hierarcy to ScheduleDAGMI.

llvm-svn: 254759
2015-12-04 19:54:24 +00:00
Davide Italiano
cc32563ec2 [llvm-readobj] reportError() never returns. Mark with the correct attribute.
llvm-svn: 254752
2015-12-04 19:29:49 +00:00
Davide Italiano
ea8ac55c67 [llvm-readobj/ELF] Simplify Verdef handling.
llvm-svn: 254751
2015-12-04 19:27:58 +00:00
Mike Aizatsky
f03ab7c63f fixing Makefile
llvm-svn: 254749
2015-12-04 19:11:54 +00:00
Mike Aizatsky
9dfa27dd2d adding MC dependencies in hopes to pacify the hexagon build.
llvm-svn: 254745
2015-12-04 18:50:18 +00:00
Mike Aizatsky
0372f5b7df sancov -not-covered-functions.
Summary: The command prints out list of functions that were not entered.
To do this, addresses are first converted to function locations. Set
operations are used for function locations.

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

review

llvm-svn: 254742
2015-12-04 18:35:37 +00:00
Dan Gohman
cbb957006f [WebAssembly] Add several more calling conventions to the supported list.
llvm-svn: 254741
2015-12-04 18:27:03 +00:00
Sanjay Patel
2b56d370e1 don't repeat function names in comments; NFC
llvm-svn: 254740
2015-12-04 17:54:31 +00:00
Sanjay Patel
37ab6c70a5 fix formatting; NFC
llvm-svn: 254739
2015-12-04 17:51:55 +00:00
Manman Ren
107407fcfc [CXX TLS calling convention] Add CXX TLS calling convention.
This commit adds a new target-independent calling convention for C++ TLS
access functions. It aims to minimize overhead in the caller by perserving as
many registers as possible.

The target-specific implementation for X86-64 is defined as following:
  Arguments are passed as for the default C calling convention
  The same applies for the return value(s)
  The callee preserves all GPRs - except RAX and RDI

The access function makes C-style TLS function calls in the entry and exit
block, C-style TLS functions save a lot more registers than normal calls.
The added calling convention ties into the existing implementation of the
C-style TLS functions, so we can't simply use existing calling conventions
such as preserve_mostcc.

rdar://9001553

llvm-svn: 254737
2015-12-04 17:40:13 +00:00
David Blaikie
3fd553d9d8 [llvm-dwp] Retrieve the DWOID from the CU for the cu_index entry
llvm-svn: 254731
2015-12-04 17:20:04 +00:00
Dan Gohman
65c0a6df4d [WebAssembly] Give names to the callseq begin and end instructions.
llvm-svn: 254730
2015-12-04 17:19:44 +00:00
Dan Gohman
047117da4b [WebAssembly] clang-format CallingConvSupported. NFC.
llvm-svn: 254729
2015-12-04 17:18:32 +00:00
Dan Gohman
e843c33b85 [WebAssembly] Factor out the list of supported calling conventions.
llvm-svn: 254728
2015-12-04 17:16:07 +00:00
Dan Gohman
c27f79021b [WebAssembly] Check for more unsupported ABI flags.
llvm-svn: 254727
2015-12-04 17:12:52 +00:00
Dan Gohman
a01b7cf263 [WebAssembly] Use SelectionDAG::getUNDEF. NFC.
llvm-svn: 254726
2015-12-04 17:09:42 +00:00
Krzysztof Parzyszek
9969382578 [Hexagon] Simplify LowerCONCAT_VECTORS, handle different types better
llvm-svn: 254724
2015-12-04 16:18:15 +00:00
Rafael Espindola
b4f7892e3a Modernize the C++ APIs for creating LTO modules.
This is a continuation of r253367.

These functions return is owned by the caller, so they return
std::unique_ptr now.

The call can fail, so the return is wrapped in ErrorOr.

They have a context where to report diagnostics, so they don't need to
take a string out parameter.

With this there are no call to getGlobalContext in lib/LTO.

llvm-svn: 254721
2015-12-04 16:14:31 +00:00
Tim Northover
0fc6828d56 ARM/AArch64: update reference documentation.
There's a more comprehensive ACLE and a real v8 ARM ARM now.

llvm-svn: 254720
2015-12-04 16:10:48 +00:00
Colin LeMahieu
6dbeb3981c [Hexagon] Using multiply instead of shift on signed number which can be UB
llvm-svn: 254719
2015-12-04 15:48:45 +00:00
Jonas Paulsson
aa681c815f [SystemZ] Bugfix: Don't add CC twice to new three-address instruction.
Since BuildMI() automatically adds the implicit operands for a new instruction,
adding the old instructions CC operand resulted in that there were two CC imp-def
operands, where only one was marked as dead. This caused buildSchedGraph() to
miss dependencies on the CC reg.

Review by Ulrich Weigand

llvm-svn: 254714
2015-12-04 12:48:51 +00:00
Alexey Bataev
4422895312 LEA code size optimization pass (Part 1): Remove redundant address recalculations, by Andrey Turetsky
Add new x86 pass which replaces address calculations in load or store instructions with def register of existing LEA (must be in the same basic block), if the LEA calculates address that differs only by a displacement. Works only with -Os or -Oz.
Differential Revision: http://reviews.llvm.org/D13294

llvm-svn: 254712
2015-12-04 10:53:15 +00:00
Oliver Stannard
d6c1f64332 [AArch64] Clean up statistical profiling test
This check has nothing to do with the statistical profiling extension, so
shouldn't be in this test.

llvm-svn: 254709
2015-12-04 09:45:18 +00:00
Yury Gribov
69044c0c7c [asan] Fix dynamic allocas unpoisoning on PowerPC64.
For PowerPC64 we cannot just pass SP extracted from @llvm.stackrestore to
_asan_allocas_unpoison due to specific ABI requirements
(http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#DYNAM-STACK).
This patch adds the value returned by @llvm.get.dynamic.area.offset to
extracted from @llvm.stackrestore stack pointer, so dynamic allocas unpoisoning
stuff would work correctly on PowerPC64.

Patch by Max Ostapenko.

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

llvm-svn: 254707
2015-12-04 09:19:14 +00:00
Rafael Espindola
31c80a1770 Revert "[BranchFolding] Merge MMOs during tail merge"
This reverts commit r254694.

It broke bootstrap.

llvm-svn: 254700
2015-12-04 04:15:05 +00:00
Rafael Espindola
b0476044d6 Move a call to getGlobalContext out of lib/LTO.
llvm-svn: 254696
2015-12-04 02:42:28 +00:00
Lang Hames
d25663ec5d [Orc] Fix Kaleidoscope example for change in r254693.
llvm-svn: 254695
2015-12-04 02:32:32 +00:00
Junmo Park
ee04c948e2 [BranchFolding] Merge MMOs during tail merge
Summary:
If we remove the MMOs from Load/Store instructions,
they are treated as volatile. This makes other optimization passes unhappy.
eg. Load/Store Optimization

So, it looks better to merge, not remove.

Reviewers: gberry, mcrosier

Subscribers: gberry, llvm-commits

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

llvm-svn: 254694
2015-12-04 02:29:25 +00:00
Lang Hames
84deb31665 [Orc] Rename JITCompileCallbackManagerBase to JITCompileCallbackManager.
This class is turning into a useful interface, rather than an implementation
detail, so I'm dropping the 'Base' suffix.

No functional change.

llvm-svn: 254693
2015-12-04 02:15:39 +00:00
Justin Bogner
92f40f4d09 IR: Use format_hex instead of handrolling the conversion. NFC
Cleans up some very old code in AsmWriter's WriteConstantInternal.

llvm-svn: 254688
2015-12-04 02:14:34 +00:00
Nathan Slingerland
5a941550ef Revert "[llvm-profdata] Add support for weighted merge of profile data"
This reverts commit b7250858d96b8ce567681214273ac0e62713c661.

Reverting in order to investigate Windows test failure.

llvm-svn: 254687
2015-12-04 02:13:58 +00:00
Junmo Park
a54cd98f95 (no commit message)
llvm-svn: 254686
2015-12-04 02:06:59 +00:00
NAKAMURA Takumi
b22bd78068 Move llvm/test/CodeGen/Generic/function-alias.ll to X86. It is incompatible to PECOFF.
FIXME: It may be ELF-generic.
llvm-svn: 254685
2015-12-04 02:00:12 +00:00
Quentin Colombet
e25f0bd1c6 [ARM] When a bitcast is about to be turned into a VMOVDRR, try to combine it
with its source instead of forcing the values on GPRs.

This improves the lowering of vector code when such bitcasts happen in the
middle of vector computations.

rdar://problem/23691584 

llvm-svn: 254684
2015-12-04 01:53:14 +00:00
Matthias Braun
cdae83c48c ScheduleDAGInstrs: Rework schedule graph builder.
Re-comitting with a change that avoids undefined uses getting put into
the VRegUses list.

The new algorithm remembers the uses encountered while walking backwards
until a matching def is found. Contrary to the previous version this:
- Works without LiveIntervals being available
- Allows to increase the precision to subregisters/lanemasks
  (not used for now)

The changes in the AMDGPU tests are necessary because the R600 scheduler
is not stable with respect to the order of nodes in the ready queues.

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

llvm-svn: 254683
2015-12-04 01:51:19 +00:00
Matthias Braun
60703e1f97 raw_ostream: << operator for callables with raw_ostream argument
This is a revised version of r254655 which uses a Printable wrapper
class to avoid ambiguous overload problems.

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

llvm-svn: 254681
2015-12-04 01:31:59 +00:00
JF Bastien
7719a9592b X86InstrInfo::copyPhysReg: workaround reg liveness
Summary:
computeRegisterLiveness and analyzePhysReg are currently getting
confused about liveness in some cases, breaking copyPhysReg's
calculation of whether AX is dead in some cases. Work around this issue
temporarily by assuming that AX is always live.

See detail in: https://llvm.org/bugs/show_bug.cgi?id=25033#c7
And associated bugs PR24535 PR25033 PR24991 PR24992 PR25201.

This workaround makes the code correct but slightly inefficient, but it
seems to confuse the machine instr verifier which now things EAX was
undefined in some cases where it's being conservatively saved /
restored.

Reviewers: majnemer, sanjoy
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15198

llvm-svn: 254680
2015-12-04 01:18:17 +00:00
Justin Bogner
8699ec5ec0 IR: Update a comment and a bool that've been out of date since 2012
It became impossible to get here with a half in r157393, over 3 years
ago.

llvm-svn: 254679
2015-12-04 01:14:24 +00:00
Xinliang David Li
799fa97d82 [PGO] Unify VP data format between raw and indexed profile (Reader)
With the latest refactoring and code sharing patches landed, 
it is possible to unify the value profile implementation between
raw and indexed profile. This is the patch in raw profile reader 
that uses the common interface. 

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

llvm-svn: 254677
2015-12-04 01:02:10 +00:00
Evgeniy Stepanov
3e073a3644 Fix function-alias.ll test on non-X86 targets.
llvm-svn: 254676
2015-12-04 00:57:25 +00:00
Rafael Espindola
dda25171b9 Simplify the error handling in llvm-lto a bit.
llvm-svn: 254675
2015-12-04 00:45:57 +00:00