1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
Commit Graph

133880 Commits

Author SHA1 Message Date
Jonas Paulsson
1b9ddf5605 [IfConversion] Bugfix: Don't use undef flag while adding use operands.
IfConversion used to always add the undef flag when adding a use operand
on a newly predicated instruction. This would be an operand for the register
being conditionally redefined. Due to the undef flag, the liveness of this
register prior to the predicated instruction would get lost.

This patch changes this so that such use operands are added only when the
register is live, without the undef flag.

Reviewed by Quentin Colombet.
http://reviews.llvm.org/D209077

llvm-svn: 273545
2016-06-23 08:13:20 +00:00
Diana Picus
57a17f3578 [ARM] Do not test for CPUs, use SubtargetFeatures (Part 1). NFCI
This is a cleanup commit similar to r271555, but for ARM.

The end goal is to get rid of the isSwift / isCortexXY / isWhatever methods.

Since the ARM backend seems to have quite a lot of calls to these methods, I
intend to submit 5-6 subtarget features at a time, instead of one big lump.

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

llvm-svn: 273544
2016-06-23 07:47:35 +00:00
Craig Topper
396e4cbe72 [AVX512] Remove masked unpack intrinsics and autoupgrade to vectorshuffle and selects.
llvm-svn: 273543
2016-06-23 07:37:33 +00:00
Craig Topper
78e3ff059d [X86] Add assert to ensure only 128-bit vector types are used. 256 or 512-bit would require lane handling which is missing.
llvm-svn: 273542
2016-06-23 07:37:26 +00:00
Vassil Vassilev
308837c806 [modules] Good ol' JIT is gone.
llvm-svn: 273541
2016-06-23 07:33:03 +00:00
Vassil Vassilev
3f6b4c29ad Add missing include. Should fix modules builds.
llvm-svn: 273540
2016-06-23 07:30:12 +00:00
Sagar Thakur
a4a97086ee [LLVM][MIPS] Introduce 64 bit atomic check in CheckAtomic.cmake
Patch by Nitesh Jain.

Summary: On some target like MIPS32 we need to explicitly link atomic library for 64 bit atomic operations. This module then can be used in LLDB (http://reviews.llvm.org/D20464) or Libcxx (http://reviews.llvm.org/D16613) for explicitly link to atomic library.

Reviewers: chandlerc, beanz
Differential: reviews.llvm.org/D20896
llvm-svn: 273534
2016-06-23 06:39:35 +00:00
Matt Arsenault
de4baf55a8 Fix doubly included header
llvm-svn: 273528
2016-06-23 02:34:51 +00:00
Vitaly Buka
2553ec0992 [libFuzzer] Add standard license info and comment header to AFLDriverTest.cpp
Summary: Add license info and brief description of file to AFLDriverTest.cpp.

Reviewers: kcc, aizatsky

Subscribers: llvm-commits

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

llvm-svn: 273527
2016-06-23 02:19:36 +00:00
Eric Christopher
78f634c79a Use C++ comments for large block comment.
llvm-svn: 273526
2016-06-23 01:33:38 +00:00
Matt Arsenault
efcd632db2 AMDGPU: readlane/writelane do not read exec
llvm-svn: 273525
2016-06-23 01:26:16 +00:00
Eric Christopher
02b46c7c7a Fix unused variable warning by folding the temporary into the debug statement.
llvm-svn: 273523
2016-06-23 00:42:00 +00:00
David Majnemer
ad37be7f64 [SCCP] Don't assume all Constants are ConstantInt
This fixes PR28269.

llvm-svn: 273521
2016-06-23 00:14:29 +00:00
David Majnemer
bed83762f6 [ADT] Add a range variant of std::transform
This will be used in a followup change in clang.

llvm-svn: 273520
2016-06-23 00:14:26 +00:00
Davide Italiano
8753e3d95a [IRObjectFile] Try to be defensive, add a break.
Suggested by Sean Silva.

llvm-svn: 273519
2016-06-23 00:07:31 +00:00
Peter Collingbourne
509ed7ea1b Revert r273456, "Preserve DebugInfo when replacing values in DAGCombiner" as it caused pr28270.
llvm-svn: 273518
2016-06-23 00:06:17 +00:00
Vedant Kumar
be80eac3fd [llvm-cov] Fix a buggy lit test
There is no check prefix for "WHOLE-FILE": this particular line was
supposed to use the "ALL" prefix.

llvm-svn: 273517
2016-06-22 23:58:03 +00:00
Reid Kleckner
2044eb6527 [codeview] Add EFLAGS to the list of CodeView register numbers
llvm-svn: 273516
2016-06-22 23:50:19 +00:00
Matt Arsenault
16d286fb34 AMDGPU: Fix liveness when expanding m0 loop
llvm-svn: 273514
2016-06-22 23:40:57 +00:00
Sanjoy Das
7392dd541f [RS4GC] Use StringRef; NFC
Spotted during random inspection.

llvm-svn: 273512
2016-06-22 23:32:46 +00:00
Reid Kleckner
87052ef156 Change that to include MCMachObjectWriter.h
llvm-svn: 273511
2016-06-22 23:30:43 +00:00
Reid Kleckner
03a9de65fe Add one more missing MCObjectWriter.h include
llvm-svn: 273510
2016-06-22 23:28:12 +00:00
Reid Kleckner
ddae27ab66 Fix instance of -Wdelete-incomplete
llvm-svn: 273508
2016-06-22 23:25:26 +00:00
Reid Kleckner
9f07d0d304 Prune some includes from headers and sink some inline functions
MCSymbol.h shouldn't pull in MCAssembler.h, just MCFragment.h.
MCLinkerOptimizationHint.h shouldn't need MCMachObjectWriter.h.  The
rest is fixing the fallout.

llvm-svn: 273507
2016-06-22 23:23:08 +00:00
Xinliang David Li
bdb71e165e [PM]: LoopAccessInfo simple refactoring
To make definition of mov ctors easier.
Differential Revision: http://reviews.llvm.org/D21563

llvm-svn: 273506
2016-06-22 23:20:59 +00:00
Reid Kleckner
90797dd1c4 [pdb] Treat a stream size of ~0U as 0
My PDBs always have this size for stream 11. Not sure why.

llvm-svn: 273504
2016-06-22 22:42:24 +00:00
Chris Bieneman
1af15b52de [MachO] Finish moving fat header swap functions to MachO.h
This is a follow-up to r273479. At the time I wrote r273479 I didn't connect the dots that the functions I was adding had to exist somewhere. Turns out, they do. This finishes moving the functions to MachO.h.

Existing MachO fat header tests like test/tools/llvm-readobj/Inputs/macho-universal-archive.x86_64.i386 execute this code.

llvm-svn: 273502
2016-06-22 22:19:08 +00:00
Sanjoy Das
6cd19fcfb8 [ImplicitNullChecks] Hoist trivial depdendencies if possible
When trying to convert a loading instruction into a FAULTING_LOAD, we
sometimes face code like this:

  if %R10 is not null:
    %R9<def> = MOV32ri Immediate
    %R9<def, tied> = AND32rm %R9, 0x20(%R10)
  else:
    goto TRAP

In these cases we would like to use the AND32rm instruction as the
faulting operation by hoisting the "depedency" def-ing %R9 also above
the control flow, transforming the program into:

  %R9<def> = MOV32ri Immediate
  %R9<def, tied> = FAULTING_LOAD_OP(AND32rm %R9, 0x20(%R10), FailPath: TRAP)

This change teaches ImplicitNullChecks to do the above, when safe.

llvm-svn: 273501
2016-06-22 22:16:51 +00:00
Rafael Espindola
6c4a0b7a05 Use shouldAssumeDSOLocal.
With this it handle -fPIE.

llvm-svn: 273499
2016-06-22 22:09:17 +00:00
Rafael Espindola
c74cdbfe37 Extract a few variables to make 'if' smaller. NFC.
llvm-svn: 273497
2016-06-22 21:56:34 +00:00
Changpeng Fang
2689f02d01 AMDGPU/SI: Define an intrinsic to expose ds_swizzle_b32
Reviewers: tstellarAMD, arsenm

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

llvm-svn: 273496
2016-06-22 21:33:49 +00:00
Hans Wennborg
8471b87ab7 [codeview] Write LF_UDT_SRC_LINE records (PR28251)
Differential Revision: http://reviews.llvm.org/D21621

llvm-svn: 273495
2016-06-22 21:22:13 +00:00
Pawel Bylica
cebaa10055 Do not require __STDC_LIMIT_MACROS and others
Summary: Do not require __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS macros to be defined globally. They are not needed for C++11 compliant standard headers.

Reviewers: joerg, jyknight

Subscribers: llvm-commits

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

llvm-svn: 273493
2016-06-22 21:15:51 +00:00
Chris Bieneman
7decd11bd4 [CMake] LLVM_BINARY_DIR was not being properly set in LLVMConfig.cmake
LLVMConfig.cmake needs to set LLVM_BINARY_DIR differently based on whether or not it is the build directory or the install directory. The build directory just needs to set the value from the configuration, the install directory needs to set it to the install prefix.

llvm-svn: 273479
2016-06-22 21:01:19 +00:00
Chris Bieneman
a9925c6207 [MachO] Adding a few missing swapStruct functions
These are just missing swap functions for handling endian conversion.

llvm-svn: 273478
2016-06-22 21:01:17 +00:00
Reid Kleckner
dcb890e1f1 [codeview] Fix the alignment padding that we add to list records
Tweak the big-types.ll test case to catch this bug. We just need an
enumerator name that doesn't have a length that is a multiple of 4.

llvm-svn: 273477
2016-06-22 20:59:17 +00:00
Davide Italiano
792dc4b5c7 [IRObjectFile] Propagate .weak attribute correctly for ASM symbols.
PR: 28256
Differential Revision:  http://reviews.llvm.org/D21616

llvm-svn: 273474
2016-06-22 20:48:15 +00:00
Daniel Berlin
3c6fd1837c Update header documentation for API deliberately made public
llvm-svn: 273473
2016-06-22 20:31:12 +00:00
Peter Collingbourne
19c2aae8a8 IR: Introduce Module::global_objects().
This is a convenience iterator that allows clients to enumerate the
GlobalObjects within a Module.

Also start using it in a few places where it is obviously the right thing
to use.

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

llvm-svn: 273470
2016-06-22 20:29:42 +00:00
Matt Arsenault
37494fff2a AMDGPU: Run verifier after 2nd run of SIShrinkInstructions
llvm-svn: 273469
2016-06-22 20:26:24 +00:00
Matt Arsenault
66eec46266 AMDGPU: Fix verifier errors in SILowerControlFlow
The main sin this was committing was using terminator
instructions in the middle of the block, and then
not updating the block successors / predecessors.
Split the blocks up to avoid this and introduce new
pseudo instructions for branches taken with exec masking.

Also use a pseudo instead of emitting s_endpgm and erasing
it in the special case of a non-void return.

llvm-svn: 273467
2016-06-22 20:15:28 +00:00
Krzysztof Parzyszek
fcede394cf [Hexagon] Add SDAG preprocessing step to expose shifted addressing modes
Transform: (store ch addr (add x (add (shl y c) e)))
       to: (store ch addr (add x (shl (add y d) c))),
where e = (shl d c) for some integer d.
The purpose of this is to enable generation of loads/stores with
shifted addressing mode, i.e. mem(x+y<<#c). For that, the shift
value c must be 0, 1 or 2.

llvm-svn: 273466
2016-06-22 20:08:27 +00:00
Davide Italiano
e42bdc124e [UpdateCompilerUsed] API rename and cleanup, suggested by Rafaael.
* UpdateCompilerUsed() -> updateCompilerUsed()
* ThinLTO doesn't use the API so we can remove the include
* Clean up unused #include <functional> from the header
* Rename #ifdef guard comment to be correct.

llvm-svn: 273461
2016-06-22 19:50:42 +00:00
Xinliang David Li
f64754931d [MBFI]: Add a new suboption for graph viewer
-view-machine-block-freq-propagation-dags currently
support integer and fraction as the suboptions. This
patch adds the 'count' suboption to display actual
profile count if available.

llvm-svn: 273460
2016-06-22 19:26:44 +00:00
Sanjay Patel
4cc3c35fb0 [ValueTracking] improve ComputeNumSignBits for vector constants
This is similar to the computeKnownBits improvement in rL268479. 
There's probably more we can do for vector logic instructions, but 
this should let us see non-splat constant masking ops that can
become vector selects instead of and/andn/or sequences.

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

llvm-svn: 273459
2016-06-22 19:20:59 +00:00
Chad Rosier
1c84c804c7 [AArch64] Remove an overly aggressive assert.
llvm-svn: 273458
2016-06-22 19:18:52 +00:00
Rafael Espindola
589bd1a4f9 Start using shouldAssumeDSOLocal on Hexagon.
Include a token test showing that access to private is now the same as
to internal.

llvm-svn: 273457
2016-06-22 19:09:14 +00:00
Nirav Dave
4b5c6b61b9 Preserve DebugInfo when replacing values in DAGCombiner
Recommiting after fixing over-aggressive assertion

[DAG] Previously debug values would transfer debuginfo for the selected
start node for a replacement which allows for debug to be dropped.

Push debug value transfer to occur with node/value replacement in
SelectionDAG, remove now extraneous transfers of debug values.

This refixes PR9817 which was being incompletely checked in the
testsuite.

Reviewers: jyknight

Subscribers: dblaikie, llvm-commits

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

llvm-svn: 273456
2016-06-22 19:03:26 +00:00
Wei Ding
14148ed32d AMDGPU: Add convergent flag to INLINEASM instruction.
Differential Revision: http://reviews.llvm.org/D21214

llvm-svn: 273455
2016-06-22 18:51:08 +00:00
Reid Kleckner
5d925cf04d [codeview] Add IntroducingVirtual debug info flag
CodeView needs to know if a virtual method was introduced in the current
class, and base classes may not have complete type information, so we
need to thread this bit through from the frontend.

llvm-svn: 273453
2016-06-22 18:31:14 +00:00