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

64762 Commits

Author SHA1 Message Date
Bob Wilson
555b9f9daa Fix llvm-cov counts to be 64-bit integers to avoid overflows.
Line counts in llvm-cov are read in as 64-bit integers but were being truncated
to 32-bit in collectLineCounts(), which caused overflow for large counts.
This patch fixes all counts to be uint64_t.

Patch by Yuchen Wu!

llvm-svn: 193172
2013-10-22 17:43:47 +00:00
Alp Toker
be591422bc Fix the -Werror -Wpedantic clang selfhost build
This is a stopgap fix for cast warnings introduced in r192864.

A proper fix should be investigated by the author when possible.

llvm-svn: 193160
2013-10-22 12:30:55 +00:00
Matheus Almeida
06be00bac8 [mips][msa] Direct Object Emission support for conditional branches.
These branches have a 16-bit offset (R_MIPS_PC16).

List of conditional branch instructions:
bnz.{b,h,w,d}
bnz.v
bz.{b,h,w,d}
bz.v

llvm-svn: 193157
2013-10-22 09:43:32 +00:00
Elena Demikhovsky
3136868b1d AVX-512: aligned / unaligned load and store for 512-bit integer vectors.
llvm-svn: 193156
2013-10-22 09:19:28 +00:00
Wan Xiaofei
dc0d564687 Using FoldingSet in SelectionDAG::getVTList.
VTList has a long life cycle through the module and getVTList is frequently called. In current getVTList, sequential search over a std::vector is used, this is inefficient in big module.
This patch use FoldingSet to implement hashing mechanism when searching.

Reviewer: Nadav Rotem
Test    : Pass unit tests & LNT test suite

llvm-svn: 193150
2013-10-22 08:02:02 +00:00
Anders Waldenborg
28b7b8c64d llvm-c: Add LLVMPrintTypeToString
Differential Revision: http://llvm-reviews.chandlerc.com/D1963

llvm-svn: 193149
2013-10-22 06:58:34 +00:00
Bob Wilson
dfa90927ed Change llvm-cov output formatting to be more similar to gcov.
- Replaced tabs with proper padding
- print() takes two arguments, which are the GCNO and GCDA filenames
- Files are listed at the top of output, appended by line 0
- Stripped strings of trailing \0s
- Removed last two lines of whitespace in output

Patch by Yuchen Wu!

llvm-svn: 193148
2013-10-22 05:09:41 +00:00
Andrew Trick
a454a863ad Clarify SCEV comments.
We handle for(i=n; i>0; i -= s) by canonicalizing within SCEV to for(i=-n; i<0; i += s).

llvm-svn: 193147
2013-10-22 05:09:40 +00:00
Craig Topper
8b2b2a7210 Replace (V)MOVZDI2PDIrr/rm instructions with patterns that select (V)MOVDI2PDIrr/rm.
llvm-svn: 193146
2013-10-22 04:35:20 +00:00
Jim Grosbach
4ccaf97952 ARM: Thumb2 copy for GPRPair needs to use thumb instructions.
Use tMOVr instead of plain MOVr.

rdar://15193017

llvm-svn: 193139
2013-10-22 02:29:37 +00:00
Jim Grosbach
fb572e0475 ARM: Clean up copyPhysReg() a bit.
No functional change, just cleaning things up for readability.

llvm-svn: 193138
2013-10-22 02:29:35 +00:00
Manman Ren
87bfd7a670 TBAA: fix PR17620.
We can have a struct type with a single field and the field does not start
with 0. In that case, we should correctly update the offset.

llvm-svn: 193137
2013-10-22 01:40:25 +00:00
Eric Christopher
acde576724 Formatting/whitespace.
llvm-svn: 193135
2013-10-22 00:22:39 +00:00
Bob Wilson
1a96904c72 Move the printing of llvm-cov information out from collectLineCounts().
collectLineCounts() should only organize the output data. This is done in
anticipation of subsequent changes which will pass in GCNO and GCDA filenames
into the print function where it is printed similar to the gcov output.

Patch by Yuchen Wu!

llvm-svn: 193134
2013-10-22 00:09:03 +00:00
Andrew Kaylor
ee628fc0df FIXME comment shouldn't have been doxygen style
llvm-svn: 193131
2013-10-21 23:27:02 +00:00
Eric Christopher
4762bba338 Fix spelling, grammar, and match naming convention for test files.
llvm-svn: 193130
2013-10-21 23:14:06 +00:00
David Blaikie
da979f0e59 DWARF Type Hashing: Include reference and rvalue reference type in the declarable summary hashing path
More support for 7.25 Part 5.

llvm-svn: 193129
2013-10-21 23:06:19 +00:00
David Blaikie
8d41a02789 DWARF type hashing: begin implementing Step 5, summary hashing in declarable contexts
There are several other tag types that need similar handling but to
ensure test coverage they'll be coming incrementally.

llvm-svn: 193126
2013-10-21 22:36:50 +00:00
Chad Rosier
838b6065b8 [AArch64] Add the constraint to NEON scalar mla/mls instructions.
llvm-svn: 193117
2013-10-21 20:11:47 +00:00
Tom Stellard
6f3b22d6ce SimplifyCFG: Don't duplicate calls to functions marked noduplicate v2
v2:
  - Use CI->cannotDuplicate()

llvm-svn: 193115
2013-10-21 20:07:30 +00:00
Matt Arsenault
69e2fc4f25 Remove unused TargetLowering field.
llvm-svn: 193113
2013-10-21 20:04:01 +00:00
Matt Arsenault
dad904931b Fix CodeGen for different size address space GEPs
llvm-svn: 193111
2013-10-21 20:03:54 +00:00
Matt Arsenault
fcca6dd732 Use more type helper functions
llvm-svn: 193109
2013-10-21 19:43:56 +00:00
Matt Arsenault
aee21d27ea Reuse variable
llvm-svn: 193107
2013-10-21 19:24:15 +00:00
Reid Kleckner
d93f48d387 Fix the build in DIE.cpp with MSVC 2010
llvm-svn: 193106
2013-10-21 19:18:31 +00:00
David Blaikie
0cee42e793 DWARF type hashing: Handle multiple (including recursive) references to the same type
This uses a map, keeping the type DIE numbering separate from the DIEs
themselves - alternatively we could do things the way GCC does if we
want to add an integer to the DIE type to record the numbering there.

llvm-svn: 193105
2013-10-21 18:59:40 +00:00
Matt Arsenault
8faf1f4444 Teach SimplifyCFG about address spaces
llvm-svn: 193104
2013-10-21 18:55:08 +00:00
Matt Arsenault
3089ca20bd Fix creating bitcasts between address spaces in SCEV.
The test before wasn't successfully testing this
since it was missing the datalayout piece to change
the size of the second address space.

llvm-svn: 193102
2013-10-21 18:41:10 +00:00
Matt Arsenault
5b1a8d26fc Remove unused SCEV functions
llvm-svn: 193097
2013-10-21 18:08:09 +00:00
Lang Hames
df2443e32e X86 vector element shift-by-immediate instructions take i8 immediates. Make
the instruction defenitions and ISEL reflect this.

Prior to this patch these instructions took an i32i8imm, and the high bits were
dropped during encoding. This led to incorrect behavior for shifts by
immediates higher than 255. This patch fixes that issue by detecting large
immediate shifts and returning constant zero (for logical shifts) or capping
the shift amount at an encodable value (for arithmetic shifts).

Fixes <rdar://problem/14968098>

llvm-svn: 193096
2013-10-21 17:51:24 +00:00
Eric Christopher
5f7595e860 Fix up some old review feedback.
llvm-svn: 193095
2013-10-21 17:48:51 +00:00
Andrew Kaylor
71bf2c88c5 Improving MCJIT/RuntimeDyld thread safety
llvm-svn: 193094
2013-10-21 17:42:06 +00:00
David Blaikie
e9f0bff07e DebugInfo: Put each kind of constant (form, attribute, tag, etc) into its own enum for ease of use.
This allows various variables to be more self-documenting and easier to
debug by being of specific types without overlapping enum values.

Precommit review by Eric Christopher.

llvm-svn: 193091
2013-10-21 17:28:37 +00:00
Rafael Espindola
34304975c5 Optimize more linkonce_odr values during LTO.
When a linkonce_odr value that is on the dso list is not unnamed_addr
we can still look to see if anything is actually using its address. If
not, it is safe to hide it.

This patch implements that by moving GlobalStatus to Transforms/Utils
and using it in Internalize.

llvm-svn: 193090
2013-10-21 17:14:55 +00:00
David Blaikie
592241ee6f DebugInfo: Hash DW_FORM_GNU_str_index as a string.
Found while adding type safety to the various DWARF enumerations (form,
attribute, tag, etc) that caused Clang to warn on an incompletely
covered switch. Converting the comment to a default/unreachable
uncovered this case of an unsupported form encoding. Seems we were
skipping fission strings entirely.

llvm-svn: 193089
2013-10-21 16:37:22 +00:00
Elena Demikhovsky
dceb9534bf AVX-512: MUL operation lowering for v8i64
llvm-svn: 193083
2013-10-21 13:27:34 +00:00
Matheus Almeida
8cdecf1482 [mips][msa] Direct Object Emission support for LD/ST instructions.
llvm-svn: 193082
2013-10-21 13:07:13 +00:00
Matheus Almeida
49a9f349f1 [mips][msa] Direct Object Emission support for LDI instructions.
llvm-svn: 193081
2013-10-21 12:56:20 +00:00
Matheus Almeida
c0cc50e68b [mips][msa] Direct Object Emission support for MOVE.v.
llvm-svn: 193080
2013-10-21 12:43:54 +00:00
Matheus Almeida
e54e855dbb [mips][msa] Direct Object Emission support for CTCMSA and CFCMSA.
These instructions are logically related as they allow read/write of MSA control registers.
Currently MSA control registers are emitted by number but hopefully that will change as soon 
as GAS starts accepting them by name as that would make the assembly easier to read.

llvm-svn: 193078
2013-10-21 12:26:50 +00:00
Matheus Almeida
1fede43958 [mips][msa] Direct Object Emission of SPLAT instruction.
llvm-svn: 193077
2013-10-21 12:07:26 +00:00
Matheus Almeida
1760b2c642 [mips][msa] Fix definition of SLD instruction.
The second parameter of the SLD intrinsic is the number of columns (GPR) to 
slide left the source array.

llvm-svn: 193076
2013-10-21 11:47:56 +00:00
Michael Gottesman
80054d1ccd Fix the predecessor removal logic in r193045.
Additionally some small comment/stylistic fixes are included as well.

llvm-svn: 193068
2013-10-21 05:20:11 +00:00
Bill Wendling
ab46af5515 Don't eliminate a partially redundant load if it's in a landing pad.
A landing pad can be jumped to only by the unwind edge of an invoke
instruction. If we eliminate a partially redundant load in a landing pad, it
will create a basic block that violates this constraint. It then leads to other
problems down the line if it tries to merge that basic block with the landing
pad. Avoid this by not eliminating the load in a landing pad.

PR17621

llvm-svn: 193064
2013-10-21 04:09:17 +00:00
Michael Gottesman
f056facc24 Teach simplify-cfg how to correctly create covered lookup tables for switches on iN with N >= 3.
One optimization simplify-cfg performs is the converting of switches to
lookup tables if the switch has > 4 cases. This is done by:

1. Finding the max/min case value and calculating the switch case range.
2. Create a lookup table basic block.
3. Perform a check in the switch's BB to see if the input value is in
the switch's case range. If the input value satisfies said predicate
branch to the lookup table BB, otherwise branch to the switch's default
destination BB using the default value as the result.

The conditional check consists of subtracting the min case value of the
table from any input iN value and then ensuring that said value is
unsigned less than the size of the lookup table represented as an iN
value.

If the lookup table is a covered lookup table, the size of the table will be N
which is 0 as an iN value. Thus the comparison will be an `icmp ult` of an iN
value against 0 which is always false yielding the incorrect result.

This patch fixes this problem by recognizing if we have a covered lookup table
and if we do, unconditionally jumps to the lookup table BB since the covering
property of the lookup table implies no input values could not be handled by
said BB.

rdar://15268442

llvm-svn: 193045
2013-10-20 07:04:37 +00:00
Peter Collingbourne
657e872155 Emit prefix data after debug and EH directives.
This ensures that the prefix data is treated as part of the function for
the purpose of debug info.  This provides a better debugging experience,
among other things by allowing a debug info client to correctly look up
a function in debug info given a function pointer.

llvm-svn: 193042
2013-10-20 02:16:21 +00:00
Peter Collingbourne
b815e25b6f Emit DWARF line entries for all data in the instruction stream.
r182712 attempted to do this, but it failed to handle data emitted via
EmitBytes.

llvm-svn: 193041
2013-10-20 02:16:18 +00:00
Benjamin Kramer
7113d15173 Remove unused variable.
llvm-svn: 193038
2013-10-19 16:32:15 +00:00
Bill Wendling
fda67cdf91 Perform an intelligent splice of the predecessor with the single successor.
If the predecessor's being spliced into a landing pad, then we need the PHIs to
come first and the rest of the predecessor's code to come *after* the landing
pad instruction.

llvm-svn: 193035
2013-10-19 11:27:12 +00:00
Yaron Keren
d726dbad15 Avoid duplicate search by reusing the iterator.
llvm-svn: 193034
2013-10-19 09:04:26 +00:00