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

122574 Commits

Author SHA1 Message Date
Hrvoje Varga
14f985bea0 [mips][microMIPS] Implement LLE and SCE instructions
Differential Revision: http://reviews.llvm.org/D11630

llvm-svn: 250379
2015-10-15 08:11:50 +00:00
Hrvoje Varga
d0abe7e77c [mips][microMIPS] Implement LWLE, LWRE, SWLE and SWRE instructions
Differential Revision: http://reviews.llvm.org/D11631

llvm-svn: 250377
2015-10-15 07:23:06 +00:00
Lang Hames
52aebccefa [RuntimeDyld] Drop the '.s' suffix off the COFF test case - the MIPS bot started
failing when the suffix was added.

I assume the lack of a '.s' suffix means that the test case just wasn't running
before, and it has never worked on MIPS. I'll investigate that tomorrow.

llvm-svn: 250376
2015-10-15 07:16:40 +00:00
Eric Christopher
638d0767cb Update for llvm API change.
llvm-svn: 250375
2015-10-15 07:01:16 +00:00
Eric Christopher
fc91b95e28 Remove DIFile from createSubroutineType.
Patch by Amaury Sechet with a small modification by me.

llvm-svn: 250374
2015-10-15 06:56:10 +00:00
Lang Hames
5fbab9617e [RuntimeDyld] Don't try to get the contents of sections that don't have any
(e.g. bss sections).

MachO and ELF have been silently letting this pass, but COFFObjectFile contains
an assertion to catch this kind of (ab)use of the getSectionContents, and this
was causing the JIT to crash on COFF objects with BSS sections. This patch
should fix that.

llvm-svn: 250371
2015-10-15 06:41:45 +00:00
Akira Hatanaka
7a13b29b79 [MachO] Stop generating *coal* sections.
Recommit r250342: move coal-sections-powerpc.s to subdirectory for powerpc.

Some background on why we don't have to use *coal* sections anymore:
Long ago when C++ was new and "weak" had not been standardized, an attempt was
made in cctools to support C++ inlines that can be coalesced by putting them
into their own section (TEXT/textcoal_nt instead of TEXT/text).

The current macho linker supports the weak-def bit on any symbol to allow it to
be coalesced, but the compiler still puts weak-def functions/data into alternate
section names, which the linker must map back to the base section name.

This patch makes changes that are necessary to prevent the compiler from using
the "coal" sections and have it use the non-coal sections instead when the
target architecture is not powerpc:

TEXT/textcoal_nt instead use TEXT/text
TEXT/const_coal instead use TEXT/const
DATA/datacoal_nt instead use DATA/data

If the target is powerpc, we continue to use the *coal* sections since anyone
targeting powerpc is probably using an old linker that doesn't have support for
the weak-def bits.

Also, have the assembler issue a warning if it encounters a *coal* section in
the assembly file and inform the users to use the non-coal sections instead.

rdar://problem/14265330

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

llvm-svn: 250370
2015-10-15 05:28:38 +00:00
Hrvoje Varga
0378b83c0c Test commit.
llvm-svn: 250367
2015-10-15 05:20:51 +00:00
Manman Ren
f2865ff590 Temporarily revert r250345 to sort out bot failure.
With r250345 and r250343, we start to observe the following failure
when bootstrap clang with lto and pgo:
PHI node entries do not match predecessors!
  %.sroa.029.3.i = phi %"class.llvm::SDNode.13298"* [ null, %30953 ], [ null, %31017 ], [ null, %30998 ], [ null, %_ZN4llvm8dyn_castINS_14ConstantSDNodeENS_7SDValueEEENS_10cast_rettyIT_T0_E8ret_typeERS5_.exit.i.1804 ], [ null, %30975 ], [ null, %30991 ], [ null, %_ZNK4llvm3EVT13getScalarTypeEv.exit.i.1812 ], [ %..sroa.029.0.i, %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit.i.1826 ], !dbg !451895
label %30998
label %_ZNK4llvm3EVTeqES0_.exit19.thread.i
LLVM ERROR: Broken function found, compilation aborted!

I will re-commit this if the bot does not recover.

llvm-svn: 250366
2015-10-15 04:58:24 +00:00
Craig Topper
ccb1d31da1 Add XSAVE/XSAVEOPT to KNL processor.
llvm-svn: 250362
2015-10-15 03:56:54 +00:00
David Majnemer
5f97443fe9 s/NumFiles/NumStreams/
llvm-svn: 250357
2015-10-15 01:39:00 +00:00
David Majnemer
6f3ef70e32 [llvm-pdbdump] Provide a mechanism to dump the raw contents of a PDB
A PDB can be thought of as a very simple file system.  It is
occasionally illuminating to see the contents of the underlying files.

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

llvm-svn: 250356
2015-10-15 01:27:19 +00:00
Richard Smith
1d36b8d928 Fix -Wmismatched-tags error in modules build by removing unused forward declaration.
llvm-svn: 250355
2015-10-15 01:15:26 +00:00
Davide Italiano
eac74efe76 [bugpoint] llvm-gcc doesn't exist anymore ...
... so this comment is stale. Remove it. Range-loopify while here.

llvm-svn: 250354
2015-10-15 01:12:01 +00:00
Quentin Colombet
1d3f29342f [ARM] Make sure we do not dereference the end iterator when accessing debug
information.
Although the problem was always here, it would only be exposed when
shrink-wrapping is enable.

rdar://problem/23110493

llvm-svn: 250352
2015-10-15 00:41:26 +00:00
Akira Hatanaka
a93f930f7c Revert r250349.
Test case coal-sections-powerpc.s is still failing on some buildbots.

llvm-svn: 250351
2015-10-15 00:11:03 +00:00
Davide Italiano
c86d3309a5 [JIT] TrivialMemoryManager: Fail if we can't allocate memory.
TrivialMemoryManager currently doesn't check the return type of AllocateRWX --
and returns a 'null' MemoryBlock to its caller. As pointed out by Lang,
this exposes some serious issues with the MemoryManager interface. There's,
in fact, no way to report back an error to clients rather than aborting in
case memory can't be allocated. Eventually the interface will grow to support
this, but for now, fail sooner rather than later.

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

llvm-svn: 250350
2015-10-15 00:05:32 +00:00
Akira Hatanaka
f53ec10f0a [MachO] Stop generating *coal* sections.
Recommit r250342: add -arch=ppc32 to the RUN lines of powerpc tests.

Some background on why we don't have to use *coal* sections anymore:
Long ago when C++ was new and "weak" had not been standardized, an attempt was
made in cctools to support C++ inlines that can be coalesced by putting them
into their own section (TEXT/textcoal_nt instead of TEXT/text).

The current macho linker supports the weak-def bit on any symbol to allow it to
be coalesced, but the compiler still puts weak-def functions/data into alternate
section names, which the linker must map back to the base section name.

This patch makes changes that are necessary to prevent the compiler from using
the "coal" sections and have it use the non-coal sections instead when the
target architecture is not powerpc:

TEXT/textcoal_nt instead use TEXT/text
TEXT/const_coal instead use TEXT/const
DATA/datacoal_nt instead use DATA/data

If the target is powerpc, we continue to use the *coal* sections since anyone
targeting powerpc is probably using an old linker that doesn't have support for
the weak-def bits.

Also, have the assembler issue a warning if it encounters a *coal* section in
the assembly file and inform the users to use the non-coal sections instead.

rdar://problem/14265330

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

llvm-svn: 250349
2015-10-14 23:48:10 +00:00
Akira Hatanaka
16b2844360 Revert r250342.
Investigate why coal-sections-powerpc.s is failing on some buildbots.

llvm-svn: 250346
2015-10-14 23:29:10 +00:00
Cong Hou
07a3f21d1f Update the branch weight metadata in JumpThreading pass.
Currently in JumpThreading pass, the branch weight metadata is not updated after CFG modification. Consider the jump threading on PredBB, BB, and SuccBB. After jump threading, the weight on BB->SuccBB should be adjusted as some of it is contributed by the edge PredBB->BB, which doesn't exist anymore. This patch tries to update the edge weight in metadata on BB->SuccBB by scaling it by 1 - Freq(PredBB->BB) / Freq(BB->SuccBB).

This is the third attempt to submit this patch, while the first two led to failures in some FDO tests. After investigation, it is the edge weight normalization that caused those failures. In this patch the edge weight normalization is fixed so that there is no zero weight in the output and the sum of all weights can fit in 32-bit integer. Several unit tests are added.

Differential revision: http://reviews.llvm.org/D10979

llvm-svn: 250345
2015-10-14 23:14:17 +00:00
Philip Reames
b2c152ecb1 Test case which should have been part of 250343
llvm-svn: 250344
2015-10-14 22:47:06 +00:00
Philip Reames
8476b7e229 [SimplifyCFG] Speculatively flatten CFG based on profiling metadata
If we have a series of branches which are all unlikely to fail, we can possibly combine them into a single check on the fastpath combined with a bit of dispatch logic on the slowpath. We don't want to do this unconditionally since it requires speculating instructions past a branch, but if the profiling metadata on the branch indicates profitability, this can reduce the number of checks needed along the fast path.

The canonical example this is trying to handle is removing the second bounds check implied by the Java code: a[i] + a[i+1]. Note that it can currently only do so for really simple conditions and the values of a[i] can't be used anywhere except in the addition. (i.e. the load has to have been sunk already and not prevent speculation.) I plan on extending this transform over the next few days to handle alternate sequences.

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

llvm-svn: 250343
2015-10-14 22:46:19 +00:00
Akira Hatanaka
3114aeb050 [MachO] Stop generating *coal* sections.
Some background on why we don't have to use *coal* sections anymore:
Long ago when C++ was new and "weak" had not been standardized, an attempt was
made in cctools to support C++ inlines that can be coalesced by putting them
into their own section (TEXT/textcoal_nt instead of TEXT/text).

The current macho linker supports the weak-def bit on any symbol to allow it to
be coalesced, but the compiler still puts weak-def functions/data into alternate
section names, which the linker must map back to the base section name.

This patch makes changes that are necessary to prevent the compiler from using
the "coal" sections and have it use the non-coal sections instead when the
target architecture is not powerpc:

TEXT/textcoal_nt instead use TEXT/text
TEXT/const_coal instead use TEXT/const
DATA/datacoal_nt instead use DATA/data

If the target is powerpc, we continue to use the *coal* sections since anyone
targeting powerpc is probably using an old linker that doesn't have support for
the weak-def bits.

Also, have the assembler issue a warning if it encounters a *coal* section in
the assembly file and inform the users to use the non-coal sections instead.

rdar://problem/14265330

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

llvm-svn: 250342
2015-10-14 22:45:36 +00:00
Philip Reames
1bb1df8eb7 Tighten known bits for ctpop based on zero input bits
This is a cleaned up patch from the one written by John Regehr based on the findings of the Souper superoptimizer.

The basic idea here is that input bits that are known zero reduce the maximum count that the intrinsic could return. We know that the number of bits required to represent a particular count is at most log2(N)+1.

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

llvm-svn: 250338
2015-10-14 22:42:12 +00:00
Chris Bieneman
e5b325f335 [CMake] Make LLVM_VERSION_* variables user definable
CMake's set command overwrites existing values. Package maintainers may want or need to set the version variables manually, so we need to only set them if they are not already defined. Note I use the "if(NOT DEFINED ...)" syntax deliberately in the last case because empty string is a valid value for the suffx, but not the other variables.

llvm-svn: 250333
2015-10-14 21:50:09 +00:00
Sanjay Patel
f2e24b0ae7 add x86 codegen tests for 'add nsw' followed by 'sext'
llvm-svn: 250332
2015-10-14 21:47:03 +00:00
Bill Schmidt
345a95f427 [PowerPC] Fix invalid lxvdsx optimization (PR25157)
PR25157 identifies a bug where a load plus a vector shuffle is
incorrectly converted into an LXVDSX instruction.  That optimization
is only valid if the load is of a doubleword, and in the noted case,
it was not.  This corrects that problem.

Joint patch with Eric Schweitz, who provided the bugpoint-reduced test
case.

llvm-svn: 250324
2015-10-14 20:45:00 +00:00
Davide Italiano
9fca22ddf4 [Bugpoint] Use 'CC' instead of 'GCC' for variable naming.
We now use clang by default and fallback to gcc when requested.
With this commit, names reflect reality. No functional change
intended.

Discussed with: Rafael Espindola.

llvm-svn: 250321
2015-10-14 20:29:54 +00:00
Daniel Berlin
3ccfa001ee [IDFCalculator] Use DominatorTreeBase instead of DominatorTree
Summary:
IDFCalculator used a DominatorTree instance for its calculations. Since the PostDominatorTree struct is not a subclass of DominatorTree, it wasn't possible to use PDT in IDFCalculator to compute post-dominance frontiers.

This patch makes IDFCalculator work with a DominatorTreeBase<BasicBlock> instead, which enables PDTs to be utilized.

Patch by Victor Campos (vhscampos@gmail.com)

Reviewers: dberlin

Subscribers: dberlin, llvm-commits

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

llvm-svn: 250320
2015-10-14 19:54:24 +00:00
Davide Italiano
b2aad5775a [Bugpoint] Use clang by default.
We now rely on gcc only if either of the following is true:
1) -gcc option is passed by the user
2) clang is not found in the default path.

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

llvm-svn: 250318
2015-10-14 19:48:01 +00:00
Chen Li
fecbc60363 [LoopUnswitch] Correct misleading comments.
Reviewers: reames

Subscribers: llvm-commits

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

llvm-svn: 250317
2015-10-14 19:47:43 +00:00
Arch D. Robison
796feea796 Add 'other' in description of extractvalue operands.
llvm-svn: 250314
2015-10-14 19:10:45 +00:00
Diego Novillo
4fd12b32db Sample profiles - Add documentation for binary profile encoding. NFC.
This adds documentation for the binary profile encoding and moves the
documentation for the text encoding into the header file
SampleProfReader.h.

llvm-svn: 250309
2015-10-14 18:36:30 +00:00
Artyom Skrobov
1bf2c6a5ef A doccomment for CombineTo, and some NFC refactorings
Summary:
Caching SDLoc(N), instead of recreating it in every single
function call, keeps the code denser, and allows to unwrap long lines.

Reviewers: sunfish, atrick, sdmitrouk

Subscribers: llvm-commits

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

llvm-svn: 250305
2015-10-14 17:18:35 +00:00
Artyom Skrobov
e21cb2ab0e Merge DAGCombiner::visitSREM and DAGCombiner::visitUREM (NFC)
Summary: The two implementations had more code in common than not.

Reviewers: sunfish, MatzeB, sdmitrouk

Subscribers: llvm-commits

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

llvm-svn: 250302
2015-10-14 16:54:14 +00:00
Igor Kudrin
9ab65044fb [llvm-readobj/ELF] fix: add correct test inputs
llvm-svn: 250292
2015-10-14 12:21:30 +00:00
Igor Kudrin
9a3f5f5cf9 [llvm-readobj/ELF] Print GNU Hash section
Add a new command line switch, -gnu-hash-table, to print the content of that section.

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

llvm-svn: 250291
2015-10-14 12:11:50 +00:00
Andrea Di Biagio
f179f2ff85 [x86][FastISel] Teach how to select nontemporal stores.
This patch teaches x86 fast-isel how to select nontemporal stores.

On x86, we can use MOVNTI for nontemporal stores of doublewords/quadwords.
Instructions (V)MOVNTPS/PD/DQ can be used for SSE2/AVX aligned nontemporal
vector stores.

Before this patch, fast-isel always selected 'movd/movq' instead of 'movnti'
for doubleword/quadword nontemporal stores. In the case of nontemporal stores
of aligned vectors, fast-isel always selected movaps/movapd/movdqa instead of
movntps/movntpd/movntdq.

With this patch, if we use SSE2/AVX intrinsics for nontemporal stores we now
always get the expected (V)MOVNT instructions.
The lack of fast-isel support for nontemporal stores was spotted when analyzing
the -O0 codegen for nontemporal stores.

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

llvm-svn: 250285
2015-10-14 10:03:13 +00:00
Chris Bieneman
20487687e5 [CMake] Add LLVM_VERSION_PATCH to the -current_version flag for libLTO and libLLVM.
This is to match autoconf where LLVM_SUBMIT_SUBVERSION is usually set to ${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}.

llvm-svn: 250277
2015-10-14 07:50:21 +00:00
Chris Bieneman
17fd000b81 [CMake] Fixing the bots I broke.
I meant to put the POLICY setting below the version defaults.

llvm-svn: 250276
2015-10-14 07:40:34 +00:00
Chris Bieneman
c7eb59a1ea [CMake] Set Policy CMP0048 to NEW
CMake 3.0 introduced the VERSION option for the project() command. If you don't specify the VERSION in the function it will clear out variables matching ${PROJECT_NAME}_VERSION_${MAJOR|MINOR|PATCH|TWEAK}.

This makes overriding LLVM_VERSION_* not work properly with newer versions of CMake. To make this work properly we need to:

(1) Optionally set the policy to NEW
(2) Move default versions and setting PACKAGE_VERSION to before the call to project()
(3) If the policy is set, pass the VERSION and LANGUAGES options in the new format

This change should have no behavioral change for CMake versions before 3.0, and it makes the behavior of later versions match the earlier versions.

llvm-svn: 250275
2015-10-14 07:37:00 +00:00
Xinliang David Li
1b001b9f04 Add a instrumentation test for Linux
Make sure __llvm_profile_init is not emitted.

llvm-svn: 250274
2015-10-14 07:24:14 +00:00
Craig Topper
b4211ec488 [X86] Update CPU detection to only enable XSAVE features if the OS has enabled them and the saving of YMM state. This seems to be consistent with gcc behavior.
llvm-svn: 250269
2015-10-14 05:37:42 +00:00
Craig Topper
975ee18a02 [X86] Add XSAVE feature flags to their various processors.
llvm-svn: 250268
2015-10-14 05:37:38 +00:00
Craig Topper
0bf746f691 Use range-based for loops. NFC
llvm-svn: 250266
2015-10-14 04:36:00 +00:00
Manman Ren
0a63668758 Revert r250204 and r250240 due to bot failure. We failed to build PGO-ed clang.
llvm-svn: 250264
2015-10-14 03:04:03 +00:00
Evgeniy Stepanov
e4ea992485 [msan] Fix crash on multiplication by a non-integer constant.
Fixes PR25160.

llvm-svn: 250260
2015-10-14 00:21:13 +00:00
Kostya Serebryany
b4d1390441 [asan] Disabling speculative loads under asan. Patch by Mike Aizatsky
llvm-svn: 250259
2015-10-14 00:21:05 +00:00
Richard Smith
b279442823 Rename one of our two llvm::GCOVOptions classes to llvm::GCOV::Options. We used
to get away with this because llvm/Support/GCOV.h was an implementation detail
of the llvm-gcov tool, but it's now being used by FDO.

llvm-svn: 250258
2015-10-14 00:04:19 +00:00
Eric Fiselier
064bc4af87 Split -pedantic and -Wno-long-long into two separate flags so libc++ can remove -pedantic
llvm-svn: 250255
2015-10-13 23:51:58 +00:00