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

113084 Commits

Author SHA1 Message Date
David Majnemer
b2167a7a64 AsmParser: Don't crash when insertvalue has bad operands
llvm-svn: 228813
2015-02-11 07:43:58 +00:00
David Majnemer
9d531d29e7 AsmParser: Switch some vectors to maps
This speeds up parsing .ll files with metadata nodes with large IDs.

llvm-svn: 228812
2015-02-11 07:43:56 +00:00
Peter Collingbourne
1810ed44f8 Fix build for CMake < 2.8.12.
llvm-svn: 228810
2015-02-11 05:58:57 +00:00
Zachary Turner
76143c865c Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects.
This allows IDEs to recognize the entire set of header files for
each of the core LLVM projects.

Differential Revision: http://reviews.llvm.org/D7526
Reviewed By: Chris Bieneman

llvm-svn: 228798
2015-02-11 03:28:02 +00:00
Justin Bogner
8b002ea8d6 InstrProf: Lower coverage mappings by setting their sections appropriately
Add handling for __llvm_coverage_mapping to the InstrProfiling
pass. We need to make sure the constant and any profile names it
refers to are in the correct sections, which is easier and cleaner to
do here where we have to know about profiling sections anyway.

This is really tricky to test without a frontend, so I'm committing
the test for the fix in clang. If anyone knows a good way to test this
within LLVM, please let me know.

Fixes PR22531.

llvm-svn: 228793
2015-02-11 02:52:44 +00:00
Andrew Kaylor
578ec9bef5 Temporary workaround to fix MSVC 2012 build problems
llvm-svn: 228788
2015-02-11 02:16:34 +00:00
Reid Kleckner
f2f6e76b2c Fix invalid LLVM IR in PruneEH tests
llvm-svn: 228786
2015-02-11 02:06:47 +00:00
Reid Kleckner
86643b627c Don't promote asynch EH invokes of nounwind functions to calls
If the landingpad of the invoke is using a personality function that
catches asynch exceptions, then it can catch a trap.

Also add some landingpads to invalid LLVM IR test cases that lack them.

Over-the-shoulder reviewed by David Majnemer.

llvm-svn: 228782
2015-02-11 01:23:16 +00:00
Tom Stellard
01068df0db R600/SI: Store immediate offsets > 12-bits in soffset
This will save us from having to extend these offsets to 64-bits
and storing them in a pair of vgprs.

llvm-svn: 228776
2015-02-11 00:34:35 +00:00
Tom Stellard
dbe7759986 R600/SI: Add soffset operand to mubuf addr64 instruction
We were previously hard-coding soffset to 0.

llvm-svn: 228775
2015-02-11 00:34:32 +00:00
Zachary Turner
d0cba5883a Fix warning due to unused private member variable.
llvm-svn: 228774
2015-02-11 00:33:00 +00:00
Zachary Turner
e45364f2b5 Fix some warnings due to -Wcovered-switch-default.
llvm-svn: 228773
2015-02-11 00:13:39 +00:00
Zachary Turner
a89d75c45b Convert std::make_unique<> to llvm::make_unique<>.
llvm-svn: 228768
2015-02-10 23:46:48 +00:00
Adrian Prantl
a9fa7d488c Add the missing testcase for r228764.
llvm-svn: 228766
2015-02-10 23:32:56 +00:00
Petar Jovanovic
2b0935a094 Fix makeLibCall argument (signed) in SoftenFloatRes_XINT_TO_FP function
The isSigned argument of makeLibCall function was hard-coded to false
(unsigned). This caused zero extension on MIPS64 soft float.
As the result SingleSource/Benchmarks/Stanford/FloatMM test and
SingleSource/UnitTests/2005-07-17-INT-To-FP test failed. 
The solution was to use the proper argument.

Patch by Strahinja Petrovic.

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

llvm-svn: 228765
2015-02-10 23:30:14 +00:00
Adrian Prantl
988ec9ddfa Debug Info: Support variables that are described by more than one MMI
table entry. This happens when SROA splits up an alloca and the resulting
allocas cannot be lowered to SSA values because their address is passed
to a function.

Fixes PR22502.

llvm-svn: 228764
2015-02-10 23:18:28 +00:00
Adrian Prantl
7f72d35a3f Fix indentation.
llvm-svn: 228763
2015-02-10 23:18:15 +00:00
David Majnemer
15b422ab6d EarlyCSE: Add check lines for test added in r228760
llvm-svn: 228761
2015-02-10 23:11:02 +00:00
David Majnemer
530afeca43 EarlyCSE: It isn't safe to CSE across synchronization boundaries
This fixes PR22514.

llvm-svn: 228760
2015-02-10 23:09:43 +00:00
Zachary Turner
3222ed56a7 Add missing function and header include.
llvm-svn: 228758
2015-02-10 22:56:21 +00:00
Zachary Turner
328cc93033 Oops. Don't call Windows functions on non-windows.
llvm-svn: 228756
2015-02-10 22:47:14 +00:00
Zachary Turner
473b4aac78 Rewrite llvm-pdbdump in terms of LLVMDebugInfoPDB.
This makes llvm-pdbdump available on all platforms, although it
will currently fail to create a dumper if there is no PDB reader
implementation for the current platform.

It implements dumping of compilands and children, which is less
information than was previously available, but it has to be
rewritten from scratch using the new set of interfaces, so the
rest of the functionality will be added back in subsequent commits.

llvm-svn: 228755
2015-02-10 22:43:25 +00:00
David Majnemer
e15f9edb53 X86: @llvm.frameaddress should defer to SelectionDAG for Win CFI
llvm-svn: 228754
2015-02-10 22:00:34 +00:00
Zachary Turner
99035c991d Fix build due to mismatched function signatures.
llvm-svn: 228752
2015-02-10 21:40:29 +00:00
Simon Atanasyan
e177e3f1c8 [Object] Reformat the code with clang-format
No functional changes.

llvm-svn: 228751
2015-02-10 21:38:25 +00:00
David Majnemer
9809999374 X86: Make @llvm.frameaddress work correctly with Windows unwind codes
Simply loading or storing the frame pointer is not sufficient for
Windows targets.  Instead, create a synthetic frame object that we will
lower later.  References to this synthetic object will be replaced with
the correct reference to the frame address.

llvm-svn: 228748
2015-02-10 21:22:05 +00:00
Zachary Turner
422f6e29d5 Provide DIA implementation of DebugInfoPDB.
This implements DebugInfoPDB when the DIA SDK is present on the system.
Specifically, this means that the following conditions are met:
  1) You are building on Windows.
  2) You are building with MSVC.
  3) Visual Studio did not corrupt the installation of DIA due to a
     known issue with side-by-side installations of VS2012 and VS2013.
If all of these conditions are true, you will be able to pass a value
of PDB_Reader::DIA to PDB::createPdbReader().

There are no tests for this yet, as any test will be in the form of a
lit test which tests the llvm-pdbdump.exe, which still needs to be
rewritten in terms of this library.

llvm-svn: 228747
2015-02-10 21:17:52 +00:00
Eric Christopher
a46732b919 Reformat (and remove some tabs) to make debugging this code a
little easier to step through.

llvm-svn: 228746
2015-02-10 21:15:06 +00:00
Aaron Ballman
e5024a035a Now use the __debugbreak intrinsic instead of calling RaiseException; it requires no forward declares and still calls VEH.
llvm-svn: 228745
2015-02-10 21:13:04 +00:00
Daniel Jasper
609bd5e8bc Fix overly prescriptive test that broken on Mac after r228725.
llvm-svn: 228742
2015-02-10 20:49:05 +00:00
Nico Weber
3c9f2a746e fix docs typo
llvm-svn: 228741
2015-02-10 20:43:54 +00:00
Aaron Ballman
39da612547 Changing the status code generated by LLVM_BUILTIN_TRAP on Windows to be something categorized as a valid error code. Fixes crashing uses (such as not --crash) with existing sys::Wait behavior.
llvm-svn: 228738
2015-02-10 20:13:52 +00:00
Andrew Kaylor
fff974fc6d Adding support for llvm.eh.begincatch and llvm.eh.endcatch intrinsics and beginning the documentation of native Windows exception handling.
Differential Revision: http://reviews.llvm.org/D7398

llvm-svn: 228733
2015-02-10 19:52:43 +00:00
Tim Northover
0eba2eb04d DeadArgElim: arguments affect all returned sub-values by default.
Unless we meet an insertvalue on a path from some value to a return, that value
will be live if *any* of the return's components are live, so all of those
components must be added to the MaybeLiveUses.

Previously we were deleting arguments if sub-value 0 turned out to be dead.

llvm-svn: 228731
2015-02-10 19:49:18 +00:00
Bill Schmidt
e087024395 Fix up r228725, missed change in PPCSubtarget definition
llvm-svn: 228728
2015-02-10 19:31:55 +00:00
Duncan P. N. Exon Smith
73d123e7bc IR: Add MDNode::replaceWithPermanent()
Add new API for converting temporaries that may self-reference.
Self-referencing nodes are not allowed to be uniqued, so sending them
into `replaceWithUniqued()` is dangerous (and this commit adds
assertions that prevent it).

`replaceWithPermanent()` has similar semantics to `get()` followed by
calls to `replaceOperandWith()`.  In particular, if there's a
self-reference, it returns a distinct node; otherwise, it returns a
uniqued one.  Like `replaceWithUniqued()` and `replaceWithDistinct()`
(well, it calls out to them) it mutates the temporary node in place if
possible, only calling `replaceAllUsesWith()` on a uniquing collision.

llvm-svn: 228726
2015-02-10 19:13:46 +00:00
Bill Schmidt
37700f757e [PowerPC] Fix reverted patch r227976 to avoid register assignment issues
See full discussion in http://reviews.llvm.org/D7491.

We now hide the add-immediate and call instructions together in a
separate pseudo-op, which is tagged to define GPR3 and clobber the
call-killed registers.  The PPCTLSDynamicCall pass prior to RA now
expands this op into the two separate addi and call ops, with explicit
definitions of GPR3 on both instructions, and explicit clobbers on the
call instruction.  The pass is now marked as requiring and preserving
the LiveIntervals and SlotIndexes analyses, and fixes these up after
the replacement sequences are introduced.

Self-hosting has been verified on LE P8 and BE P7 with various
optimization levels, etc.  It has also been verified with the
--no-tls-optimize flag workaround removed.

llvm-svn: 228725
2015-02-10 19:09:05 +00:00
David Majnemer
65abff8895 X86: Emit Win64 SaveXMM opcodes at the right offset in the right order
Walk the instructions marked FrameSetup and consider any stores of XMM
registers to the stack as needing a SaveXMM opcode.

This fixes PR22521.

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

llvm-svn: 228724
2015-02-10 19:01:47 +00:00
Hal Finkel
1ec493a7ab [PowerPC] Support the (old) cntlz instruction alias
Some old assembly code uses the cntlz alias for cntlzw, binutils supports this,
and we should too. Fixes PR22519.

llvm-svn: 228719
2015-02-10 18:45:02 +00:00
Michael Zolotukhin
5d9638624f Add a test case for new unrolling heuristics.
THe heuristics were added in r228265 and r228434.

llvm-svn: 228713
2015-02-10 17:54:54 +00:00
Colin LeMahieu
350f7188f4 [Hexagon] Adding vector load with post-increment instructions. Adding decoder function for 64bit control register class.
llvm-svn: 228708
2015-02-10 16:59:36 +00:00
Zoran Jovanovic
7f0e9478f6 [mips][microMIPS] Implement movep instruction
Differential Revision: http://reviews.llvm.org/D7465

llvm-svn: 228703
2015-02-10 16:36:20 +00:00
Jonas Paulsson
bee296d752 Two comment typo fixes in lib/CodeGen/SelectionDAG/DAGCombiner.cpp.
llvm-svn: 228700
2015-02-10 15:34:29 +00:00
Paul Robinson
b0fca412c4 Explicitly initialize a flag in a default constructor.
Works around a Visual C++ issue.

Patch by Douglas Yung!

llvm-svn: 228699
2015-02-10 15:30:02 +00:00
Bradley Smith
78565d178b [ARM] Add armv6s[-]m as an alias to armv6[-]m
llvm-svn: 228696
2015-02-10 15:15:08 +00:00
Aaron Ballman
a7a249093b Re-committing r228628 with a fix for 64-bit builds.
On Windows, we now use RaiseException to generate the kind of trap we require (one which calls our vectored exception handler), and fall back to using a volatile write to simulate a trap elsewhere.

llvm-svn: 228691
2015-02-10 14:28:11 +00:00
Renato Golin
a82e770335 Fix typo in cmake example docs
Patch by Vinicius Tinti.

llvm-svn: 228690
2015-02-10 14:15:58 +00:00
Simon Pilgrim
6fc796d731 [X86][AVX2] Missing AVX2 memory folding instructions
Added most of the missing vector folding patterns for AVX2 (as well as fixing the vpermpd and verpmq patterns)

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

llvm-svn: 228688
2015-02-10 13:22:57 +00:00
Jozef Kolek
b9a2be0332 [mips][microMIPS] Add disassembler tests for 16-bit instructions BREAK16 and SDBBP16
Differential Revision: http://reviews.llvm.org/D7443

llvm-svn: 228687
2015-02-10 13:20:51 +00:00
Jonas Paulsson
5d62b29353 Bugfix for missed dependency from store to load in buildSchedGraph().
Background: When handling underlying objects for a store, the vector
of previous mem uses, mapped to the same Value, is afterwards cleared
(regardless of ThisMayAlias). This means that during handling of the
next store using the same Value, adjustChainDeps() must be called,
otherwise a dependency might be missed.

For example, three spill/reload (NonAliasing) memory accesses using
the same Value 'a', with different offsets:

    SU(2): store  @a
    SU(1): store  @a, Offset:1
    SU(0): load   @a

In this case we have:

* SU(1) does not need a dep against SU(0). Therefore,SU(0) ends up in
  RejectMemNodes and is removed from the mem-uses list (AliasMemUses
  or NonAliasMemUses), as this list is cleared.

* SU(2) needs a dep against SU(0). Therefore, SU(2) must check
  RejectMemNodes by calling adjustChainDeps().

Previously, for store SUs, adjustChainDeps() was only called if
MayAlias was true, missing the S(2) to S(0) dependency in the case
above. The fix is to always call adjustChainDeps(), regardless of
MayAlias, since this applies both for AliasMemUses and
NonAliasMemUses.

No testcase found for any in-tree target.

llvm-svn: 228686
2015-02-10 13:03:32 +00:00