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

124445 Commits

Author SHA1 Message Date
Rafael Espindola
0bc33d1f7e Use default member initializers.
llvm-svn: 254473
2015-12-01 23:06:26 +00:00
Xinliang David Li
c258245ddf Define member operator delete
For the struct with trailing objects, define
a member operator delete. Without this, the program
will fail when -fsized-deallocation option is used
where the wrong size will be passed to the global
delete operator.

llvm-svn: 254471
2015-12-01 23:05:27 +00:00
Matt Arsenault
a4bcdcc1fc AMDGPU: Error on addrspacecasts that aren't actually implemented
llvm-svn: 254469
2015-12-01 23:04:05 +00:00
Matt Arsenault
d3e9d622f3 AMDGPU: Implement isNoopAddrSpaceCast
llvm-svn: 254468
2015-12-01 23:04:00 +00:00
Rafael Espindola
5ecdd9cb53 Remove unnecessary getter.
llvm-svn: 254466
2015-12-01 23:01:51 +00:00
Rafael Espindola
43979b3579 Pass down the dst GV to linkGlobalValueBody. NFC.
llvm-svn: 254465
2015-12-01 22:40:40 +00:00
Cong Hou
cde8fe1853 Fix a bug in IfConversion.cpp.
The bug is introduced in r254377 which failed some tests on ARM, where a new
probability is assigned to a successor but the provided BB may not be a
successor.

llvm-svn: 254463
2015-12-01 21:50:20 +00:00
Matthias Braun
d2311b10bb ARM: Change ArchCheck field to uint64_t
The values in this field are compared against getAvailableFeatures()
which returns an uint64_t. This was causing problems in an internal
branch.

llvm-svn: 254462
2015-12-01 21:48:52 +00:00
Matt Arsenault
f4f3156f3d AMDGPU: Disallow flat_scr in SI assembler
llvm-svn: 254459
2015-12-01 20:31:08 +00:00
Xinliang David Li
5715dafdb5 [PGO] Add support for reading multiple versions of indexed profile format profile data
Profile readers using incompatible on-disk hash table format can now share the same 
implementation and interfaces. 

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

llvm-svn: 254458
2015-12-01 20:26:26 +00:00
Rafael Espindola
dfd9cfc115 Delete unused includes.
llvm-svn: 254457
2015-12-01 20:23:19 +00:00
Justin Bogner
8c2884c8f4 IR: Clean up some duplicated code in ConstantDataSequential creation. NFC
ConstantDataArray::getImpl and ConstantDataVector::getImpl had a lot
of copy pasta in how they handled sequences of constants. Break that
out into a couple of simple functions.

llvm-svn: 254456
2015-12-01 20:20:49 +00:00
Rafael Espindola
e644b56ccd clang-format LinkModules.cpp.
Most of the file has been changed recently and was already clang-format
clean.

llvm-svn: 254454
2015-12-01 20:11:43 +00:00
Sanjay Patel
8c981fd85d use range-based for loops; NFCI
llvm-svn: 254453
2015-12-01 19:57:43 +00:00
Matt Arsenault
fe33d5e59a AMDGPU: Optimize VOP2 operand legalization
Don't use commuteInstruction, and don't commute if
doing so will not improve legality. Skip the more
complex checks for literal operands and constant bus restrictions,
which are not a concern for VOP2 instructions because src1
does not accept SGPRs or constants and few implicitly
read vcc.

This gets called quite a few times and the
attempts at commuting are a significant fraction
of the time spent in SIFixSGPRCopies, so it's
somewhat worthwhile to optimize. With this patch and others
leading up to it, this reduces the compile time of SIFixSGPRCopies
on some of the LuxMark 2 kernels from ~8ms to ~5ms on my system.

llvm-svn: 254452
2015-12-01 19:57:17 +00:00
Rafael Espindola
e3fda2ca99 Use references now that it is natural to do so.
The linker never takes ownership of a module or changes which module it
is refering to, making it natural to use references.

llvm-svn: 254449
2015-12-01 19:50:54 +00:00
Quentin Colombet
91b4595716 [X86] Make sure the prologue does not clobber EFLAGS when it lives accross it.
This fixes PR25629.

llvm-svn: 254448
2015-12-01 19:49:31 +00:00
Xinliang David Li
81c6407bd3 Use nullptr (NFC)
llvm-svn: 254447
2015-12-01 19:47:32 +00:00
Sanjay Patel
066954fb02 don't repeat function/variable names in comments; NFC
llvm-svn: 254445
2015-12-01 19:32:35 +00:00
Artyom Skrobov
6a5edfbbef Fix Thumb1 epilogue generation
Summary:
This had been broken for a very long time, but nobody noticed until
D14357 enabled shrink-wrapping by default.

Reviewers: jroelofs, qcolombet

Subscribers: tyomitch, llvm-commits, rengolin

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

llvm-svn: 254444
2015-12-01 19:25:11 +00:00
Sanjay Patel
a033ae35a1 fix typo; NFC
llvm-svn: 254442
2015-12-01 19:19:18 +00:00
David Blaikie
2b4f493936 [llvm-dwp] Deduplicate strings in the debug_str.dwo section
Also, ensure that references to those strings in debug_str_offsets.dwo
correctly refer to the deduplicated strings.

llvm-svn: 254441
2015-12-01 19:17:58 +00:00
Weiming Zhao
6501fb731e [AArch64] Fix a corner case in BitFeild select
Summary:
When not useful bits, BitWidth becomes 0 and APInt will not be happy.

See https://llvm.org/bugs/show_bug.cgi?id=25571

We can just mark the operand as IMPLICIT_DEF is none bits of it is used.

Reviewers: t.p.northover, jmolloy

Subscribers: gberry, jmolloy, mgrang, aemerson, llvm-commits, rengolin

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

llvm-svn: 254440
2015-12-01 19:17:49 +00:00
Matt Arsenault
8a9536c837 AMDGPU: Report extractelement as free in cost model
The cost for scalarized operations is computed as N * (scalar operation
cost + 1 extractelement + 1 insertelement). This partially fixes
inflating the cost of scalarized operations since every operation is
scalarized and free. I don't think we want any cost asociated with
scalarization, but for now insertelement is still counted. I'm not sure
if we should pretend that insertelement is also free, or add a way
to compute a custom scalarization cost.

llvm-svn: 254438
2015-12-01 19:08:39 +00:00
Keno Fischer
4fa39fc1a7 [Verifier] Improve error for cross-module refs
By including the module name in the error message.
This makes the error message much more useful and
saves a trip to the debugger.

Reviewers: dexonsmith

Subscribers: dexonsmith, llvm-commits

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

llvm-svn: 254437
2015-12-01 19:06:36 +00:00
Rafael Espindola
8c37192246 Delete dead code.
llvm-svn: 254436
2015-12-01 18:50:35 +00:00
Rafael Espindola
876cd0cb5e Use a forwarding constructor instead of an init method.
llvm-svn: 254435
2015-12-01 18:46:19 +00:00
Rafael Espindola
49b4ffd0b8 Delete the setModule method from the Linker.
It was only used from LTO for a debug feature, and LTO can just create
another linker.

It is pretty odd to have a method to reset the module in the middle of a
link. It would make IdentifiedStructTypes inconsistent with the Module
for example.

llvm-svn: 254434
2015-12-01 18:41:30 +00:00
David Blaikie
3fa2e45f02 [llvm-dwp] Correctly update debug_str_offsets.dwo when linking dwo files
This doesn't deduplicate strings in the debug_str section, nor does it
properly wire up the index so that debug_info can /find/ these strings,
but it does correct the str_offsets specifically.

Follow up patches to address those related/next issues.

llvm-svn: 254431
2015-12-01 18:07:07 +00:00
Tom Stellard
f2ce04ba14 AMDGPU/SI: Remove REGISTER_STORE/REGISTER_LOAD code which is now dead
Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 254427
2015-12-01 17:45:22 +00:00
Tom Stellard
38c62313dd AMDGPU: Use the default strings for data emission directives
Summary:
This makes the assembly output look nicer and there is no reason to
have custom strings for these.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 254426
2015-12-01 17:45:17 +00:00
Sanjay Patel
01aa788c76 [x86] add a convenience method to check for FMA capability; NFCI
llvm-svn: 254425
2015-12-01 17:27:55 +00:00
Rafael Espindola
82e166db32 Make appending var linking less of a special case.
It has to be a bit special because:
* materializeInitFor is not really supposed to call replaceAllUsesWith.
  The caller has a plain variable with Dst and expects just the
  initializer to be set, not for it to be removed.
* Calling mutateType as we used to do before gets some type
  inconsistency which breaks the bitcode writer.
* If linkAppendingVarProto create a dest decl with the correct type to
  avoid the above problems, it needs to put the original dst init in
  some side table for materializeInitFor to use.

In the end the simplest solution seems to be to just have
linkAppendingVarProto do all the work and set ValueMap[SrcGV to avoid
recursion.

llvm-svn: 254424
2015-12-01 17:17:04 +00:00
Teresa Johnson
0bc8d23948 [ThinLTO] Wrap dbgs() output in DEBUG macro
Missed in a couple places.

llvm-svn: 254422
2015-12-01 17:12:10 +00:00
Teresa Johnson
0e55603ffe [ThinLTO] Remove stale comment (NFC)
Stale as of r254036 which added basic profitability check.

llvm-svn: 254421
2015-12-01 16:45:23 +00:00
Rafael Espindola
e634703981 Simplify test. NFC.
llvm-svn: 254419
2015-12-01 15:46:46 +00:00
Rafael Espindola
e91510452a Bring r254336 back:
The difference is that now we don't error on out-of-comdat access to
internal global values. We copy them instead. This seems to match the
expectation of COFF linkers (see pr25686).

Original message:

    Start deciding earlier what to link.

    A traditional linker is roughly split in symbol resolution and
"copying
    stuff".

    The two tasks are badly mixed in lib/Linker.

    This starts splitting them apart.

    With this patch there are no direct call to linkGlobalValueBody or
    linkGlobalValueProto. Everything is linked via WapValue.

    This also includes a few fixes:
    * A GV goes undefined if the comdat is dropped (comdat11.ll).
    * We error if an internal GV goes undefined (comdat13.ll).
    * We don't link an unused comdat.

    The first two match the behavior of an ELF linker. The second one is
    equivalent to running globaldce on the input.

llvm-svn: 254418
2015-12-01 15:19:48 +00:00
Chad Rosier
ba78625193 [LIR] Push check into helper function. NFC.
llvm-svn: 254416
2015-12-01 14:26:35 +00:00
Yury Gribov
3e9d2bdddc Fix "WARNING: Title underline too short." introduced by r254404.
Patch by Max Ostapenko. 

llvm-svn: 254413
2015-12-01 13:24:48 +00:00
Elena Demikhovsky
a67f2cd5e4 AVX-512: fixed asm string of vsqrtss
(vvsqrtss was generated before)

llvm-svn: 254411
2015-12-01 12:43:46 +00:00
Elena Demikhovsky
c1ecdc488f AVX-512: regenerated test for avx512 arithmetics, NFC
llvm-svn: 254410
2015-12-01 12:35:03 +00:00
Elena Demikhovsky
9e2f96fa49 Fixed a failure in getSpaltValue()
llvm-svn: 254409
2015-12-01 12:30:40 +00:00
Elena Demikhovsky
ce52715df6 Fixed a failure in cost calculation for vector GEP
Cost calculation for vector GEP failed with due to invalid cast to GEP index operand.
The bug is fixed, added a test.

http://reviews.llvm.org/D14976

llvm-svn: 254408
2015-12-01 12:08:36 +00:00
Hrvoje Varga
590f1f78f9 [mips][microMIPS] Implement RECIP.fmt, RINT.fmt, ROUND.L.fmt, ROUND.W.fmt, SEL.fmt, SELEQZ.fmt, SELNEQZ.fmt and CLASS.fmt
Differential Revision: http://reviews.llvm.org/D13885

llvm-svn: 254405
2015-12-01 11:59:21 +00:00
Yury Gribov
8eadab0fdb Introduce new @llvm.get.dynamic.area.offset.i{32, 64} intrinsics.
The @llvm.get.dynamic.area.offset.* intrinsic family is used to get the offset
from native stack pointer to the address of the most recent dynamic alloca on
the caller's stack. These intrinsics are intendend for use in combination with
@llvm.stacksave and @llvm.restore to get a pointer to the most recent dynamic
alloca. This is useful, for example, for AddressSanitizer's stack unpoisoning
routines.

Patch by Max Ostapenko.

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

llvm-svn: 254404
2015-12-01 11:40:55 +00:00
Cong Hou
6dc70ed78f Allow known and unknown probabilities coexist in MBB's successor list.
Previously it is not allowed for each MBB to have successors with both known and
unknown probabilities. However, this may be too strict as at this stage we could
not always guarantee that. It is better to remove this restriction now, and I
will work on validating MBB's successors' probabilities first (for example,
check if the sum is approximate one).

llvm-svn: 254402
2015-12-01 11:05:39 +00:00
Oliver Stannard
03049a3fcc [AArch64] Add ARMv8.2-A Statistical Profiling Extension
The Statistical Profiling Extension is an optional extension to
ARMv8.2-A. Since it is an optional extension, I have added the
FeatureSPE subtarget feature to control it. The assembler-visible parts
of this extension are the new "psb csync" instruction, which is
equivalent to "hint #17", and a number of system registers.

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

llvm-svn: 254401
2015-12-01 10:48:51 +00:00
Oliver Stannard
c41a38aefa [ARM] Add ARMv8.2-A to TargetParser
Add ARMv8.2-A to TargetParser, so that it can be used by the clang
command-line options and the .arch directive.

Most testing of this will be done in clang, checking that the
command-line options that this enables work.

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

llvm-svn: 254400
2015-12-01 10:33:56 +00:00
Oliver Stannard
41b601d11e [ARM] Add subtarget features for ARMv8.2-A
This adds subtarget features for ARMv8.2-A, which builds on (and
requires the features from) ARMv8.1-A. Most assembler-visible features
of ARMv8.2-A are system instructions, and are all required parts of the
architecture, so just depend on the HasV8_2aOps subtarget feature.
There is also one large, optional feature, which adds 16-bit floating
point versions of all existing floating-point instructions (VFP and
SIMD), this is represented by the FeatureFullFP16 subtarget feature.

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

llvm-svn: 254399
2015-12-01 10:23:06 +00:00
NAKAMURA Takumi
8c95a54bf7 llvm/test/DebugInfo/X86/safestack-byval.ll: Give an explicit triple for now. It crashes for targeting *-win32.
Also revert r254375 and r254361.

llvm-svn: 254397
2015-12-01 10:07:41 +00:00