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

117009 Commits

Author SHA1 Message Date
Craig Topper
ffac146078 [TableGen] Simplify some code. NFC
llvm-svn: 237342
2015-05-14 05:53:59 +00:00
Craig Topper
6d6842a088 [TableGen] Remove ListInit::size() in favor of getSize() which does the same thing and is already used in most places. NFC.
llvm-svn: 237341
2015-05-14 05:53:56 +00:00
Craig Topper
c157d061a7 [TableGen] Replace some calls to ListInit::getSize() with ListInit::empty() if it was just comparing to 0. NFC.
llvm-svn: 237340
2015-05-14 05:53:53 +00:00
Justin Bogner
8efc73255a cmake: Use -fno-sanitize-recover=all - the old spelling is deprecated
llvm-svn: 237334
2015-05-14 04:52:57 +00:00
Andy Ayers
7d3cacda27 Don't omit the constant when computing a cross-section relative relocation.
Differential Revision: http://reviews.llvm.org/D9692

llvm-svn: 237327
2015-05-14 01:10:41 +00:00
Ahmed Bougacha
e34f179706 [CodeGen] Use standard -not gnueabi- naming for f16 libcalls on Darwin.
Other targets probably should as well.  Since r237161, compiler-rt has
both, but I don't see why anything other than gnueabi would use a
gnueabi naming scheme.

llvm-svn: 237324
2015-05-14 01:00:51 +00:00
Nick Lewycky
fe62b3c55b Revert r237046. See the testcase on the thread where r237046 was committed.
llvm-svn: 237317
2015-05-13 23:41:47 +00:00
Alex Lorenz
caa59f0135 YAML: Implement block scalar parsing.
This commit implements the parsing of YAML block scalars.
Some code existed for it before, but it couldn't parse block
scalars.

This commit adds a new yaml node type to represent the block
scalar values. 

This commit also deletes the 'spec-09-27' and 'spec-09-28' tests
as they are identical to the test file 'spec-09-26'.

This commit introduces 3 new utility functions to the YAML scanner
class: `skip_s_space`, `advanceWhile` and `consumeLineBreakIfPresent`.

Reviewers: Duncan P. N. Exon Smith

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

llvm-svn: 237314
2015-05-13 23:10:51 +00:00
David Blaikie
5a3ce610cc [opaque pointer type] Use the value type of the GlobalVariable rather than accessing it through the pointee's type
llvm-svn: 237312
2015-05-13 22:55:01 +00:00
David Blaikie
d6d7262c75 [opaque pointer type] Use GlobalVariable::getValueType rather than accessing it through the GV's pointee type
llvm-svn: 237311
2015-05-13 22:54:54 +00:00
Douglas Katzman
c41c10144d [X86] Fix PR23271 - RIP-relative decoding bug in disassembler.
Differential Revision: http://reviews.llvm.org/D9110

llvm-svn: 237310
2015-05-13 22:44:52 +00:00
Pete Cooper
1d6d3a29e6 Construct ArrayRef<const T*> from vector<T>
ArrayRef already has a SFINAE constructor which can construct ArrayRef<const T*> from ArrayRef<T*>.

This adds methods to do the same directly from SmallVector and std::vector.  This avoids an intermediate step through the use of makeArrayRef.

Also update the users of this in LICM and SROA to remove the now unnecessary makeArrayRef call.

Reviewed by David Blaikie.

llvm-svn: 237309
2015-05-13 22:43:09 +00:00
Kostya Serebryany
b75a071f7a [lib/Fuzzer] update docs about test corpuses in git
llvm-svn: 237308
2015-05-13 22:42:28 +00:00
Justin Bogner
8b4293b840 InstrProf: Fix display of large numbers in llvm-cov
llvm-cov was truncating numbers that were larger than a particular
fixed width, which is as confusing as it is useless. Instead, we use
engineering notation with SI prefix for magnitude.

llvm-svn: 237307
2015-05-13 22:41:48 +00:00
Pete Cooper
b39ac53a8d Add llvm::all_of which wraps std::all_of.
This version doesn't need begin/end but can instead just take a type which has begin/end methods.

Use this to replace an eligible foreach loop in LoopInfo found by David Blaikie in r237224.

Reviewed by David Blaikie.

llvm-svn: 237301
2015-05-13 22:19:13 +00:00
Jonathan Roelofs
5d0e21ce41 Fix typo on Instruction::insert{After,Before}(). NFC
llvm-svn: 237300
2015-05-13 22:14:43 +00:00
Justin Bogner
ca8e06d93f InstrProf: Treat functions with a coverage map but no profile as unreached
If we have a coverage mapping but no profile data for a function,
calling it mismatched is misleading. This can just as easily be
unreachable code that was stripped from the binary. Instead, treat
these the same as functions where we have an explicit "zero" coverage
map by setting the count to zero for each mapped region.

llvm-svn: 237298
2015-05-13 22:03:04 +00:00
Duncan P. N. Exon Smith
1840418d1e MC: clang-format MCSymbol.h, NFC
llvm-svn: 237297
2015-05-13 21:41:14 +00:00
Tim Northover
c446a370d7 ARM: remove possible vestiges of the legacy JIT???
There's no need to manually pass modifier strings around to tell an operand how
to print now, that information is encoded in the operand itself since the MC
layer came along.

llvm-svn: 237295
2015-05-13 20:28:41 +00:00
Tim Northover
47431217a2 ARM: remove custom jump table UID
We were creating and propagating two separate indices for each jump table (from
back in the mists of time). However, the generic index used by other backends
is sufficient to emit a unique symbol so this was unneeded.

llvm-svn: 237294
2015-05-13 20:28:38 +00:00
Tim Northover
bd66fdc24b ARM: refactor optimizeThumb2JumpTables.
The previous logic mixed 2 separate questions:
  + Can we form a TBB/TBH instruction?
  + Can we remove the jump-table calculation before it?

It then performed a bunch of random tests on the instructions earlier in the
basic block, which were probably sufficient to answer 2 but only because of the
very limited ways in which a t2BR_JT can actually be created.

For example there's no reason to expect the LeaInst to define the same base
register as the following indexing calulation. In practice this means we might
have missed opportunities to form TBB/TBH, in theory you could end up
misidentifying a sequence and removing the wrong LEA:

     %R1 = t2LEApcrelJT ...
     %R2 = t2LEApcrelJT ...
     <... using and killing %R2 ...>
     %R2 = t2ADDr %R1, $Ridx

Before we would have looked for an LEA defining %R2 and found the wrong one. We
just got lucky that jump table setup was (almost?) always confined to a single
basic block and there was only one jump table per block.

llvm-svn: 237293
2015-05-13 20:28:32 +00:00
Sanjoy Das
cc4ee8fbd2 [Statepoints][Docs] Fix a couple of out of date examples.
Things I had missed in r237285.

llvm-svn: 237290
2015-05-13 20:20:10 +00:00
Sanjoy Das
ffc7dafe40 [Statepoints][Docs] Fix typo: change a period to a comma.
llvm-svn: 237289
2015-05-13 20:19:51 +00:00
Sanjoy Das
b765d00436 [Safepoints][Verifier] Fix a tautological Assert.
llvm-svn: 237287
2015-05-13 20:11:59 +00:00
Sanjoy Das
961d383020 [PlaceSafepoints] New attributes for patchable statepoints.
Summary:
This patch teaches the PlaceSafepoints pass about two `CallSite`
function attributes:

 * "statepoint-id": if the string value of this attribute can be parsed
   as an integer, then it is propagated to the ID parameter of the
   statepoint created.

 * "statepoint-num-patch-bytes": if the string value of this attribute
   can be parsed as an integer, then it is propagated to the `num patch
   bytes` parameter of the statepoint created.

This change intentionally does not assert on a malformed value for these
attributes, given that they're not "official" attributes.

Reviewers: reames, pgavlin

Subscribers: llvm-commits

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

llvm-svn: 237286
2015-05-13 20:11:31 +00:00
Sanjoy Das
58d34e616d [PlaceSafepoints] Update docs for r237214.
Show the two new ID and NumPatchBytes fields in the PlaceSafepoint
examples in Statepoints.rst to avoid confusion.

llvm-svn: 237285
2015-05-13 20:11:24 +00:00
Davide Italiano
abe740882b [LoopIdiomRecognize] Use auto + range-based loop. NFC intended.
llvm-svn: 237284
2015-05-13 19:51:21 +00:00
Jordan Rose
a329c65e7d [llvm-bcanalyzer] Add -show-binary-blobs option.
-dump mode normally omits blob data that contains unprintable characters.
When -show-binary-blobs is passed, it unilaterally escapes all blobs,
allowing those with binary data to be displayed.

llvm-svn: 237276
2015-05-13 18:51:49 +00:00
Jim Grosbach
b635db1046 MC: Modernize MCOperand API naming. NFC.
MCOperand::Create*() methods renamed to MCOperand::create*().

llvm-svn: 237275
2015-05-13 18:37:00 +00:00
David Blaikie
3fb6d82fb4 [opaque pointer type] Constant Folding: Use GEPOperator to access the pointee source type rather than going through the first operand's pointer type
llvm-svn: 237274
2015-05-13 18:35:29 +00:00
David Blaikie
26b7a1ff69 [opaque pointer type] Pass the explicit function type down to the instruction constructor when parsing invoke instructions
llvm-svn: 237273
2015-05-13 18:35:26 +00:00
Kostya Serebryany
31389337e7 [lib/Fuzzer] enable -use_counters=1 by default
llvm-svn: 237272
2015-05-13 18:31:46 +00:00
Jingyue Wu
bba2e6d3b0 [NaryReassociate] avoid running forever
Avoid running forever by checking we are not reassociating an expression into
the same form.

Tested with @avoid_infinite_loops in nary-add.ll

llvm-svn: 237269
2015-05-13 18:12:24 +00:00
Brendon Cahoon
72f21b863a [Hexagon] Generate loop1 instruction for nested loops
loop1 is for the outer loop and loop0 is for the inner loop.

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

llvm-svn: 237266
2015-05-13 17:56:03 +00:00
Diego Novillo
1153681873 Add function entry counts from sample profiles.
This patch uses the new function profile metadata "function_entry_count"
to annotate entry counts from sample profiles.

In a sampling profile, the total samples collected at the function entry
are an approximation for the number of times that function was invoked.

llvm-svn: 237265
2015-05-13 17:04:29 +00:00
Toma Tabacu
92f862f5b4 [mips] [IAS] Preemptively fix warning introduced by r237255. NFC.
Some compilers warn about using the ternary operator with an unsigned variable
and enum.
I haven't seen this trigger in the llvm.org buildbots yet, but it probably will
at some point.

Reported by Daniel Sanders.

llvm-svn: 237262
2015-05-13 16:02:41 +00:00
Yaron Keren
413d5fd1e4 Update ELFObjectWriter::reset() following r236255.
llvm-svn: 237261
2015-05-13 15:17:19 +00:00
Diego Novillo
6c03596a32 Add function entry count metadata.
Summary:
This adds three Function methods to handle function entry counts:
setEntryCount() and getEntryCount().

Entry counts are stored under the MD_prof metadata node with the name
"function_entry_count". They are unsigned 64 bit values set by profilers
(instrumentation and sample profiler changes coming up).

Added documentation for new profile metadata and tests.

Reviewers: dexonsmith, bogner

Subscribers: llvm-commits

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

llvm-svn: 237260
2015-05-13 15:13:45 +00:00
Teresa Johnson
ec11770555 Test commit: Remove unnecessary spaces.
llvm-svn: 237259
2015-05-13 15:04:14 +00:00
Brendon Cahoon
1b5bcf570f [Hexagon] Generate hardware loop when loop has a critical edge
The hardware loop pass should try to generate a hardware loop
instruction when the original loop has a critical edge.

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

llvm-svn: 237258
2015-05-13 14:54:24 +00:00
Jozef Kolek
946ef7f356 [mips][microMIPSr6] Implement CLO and CLZ instructions
This patch implements CLO and CLZ instructions using mapping.

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

llvm-svn: 237257
2015-05-13 14:18:11 +00:00
Silviu Baranga
452d76e681 Revert r237247 - [AArch64] Codegen VMAX/VMIN.. as it is causing failures in SPEC2000/2006
llvm-svn: 237256
2015-05-13 14:03:18 +00:00
Toma Tabacu
d3389f5bbb [mips] [IAS] Unify common functionality of LA and LI.
Summary: A side-effect of this is that LA gains proper handling of unsigned and positive signed 16-bit immediates and more accurate error messages.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 237255
2015-05-13 13:56:16 +00:00
Artyom Skrobov
b27364c475 [AArch64] Codegen VMAX/VMIN for safe math cases
llvm-svn: 237247
2015-05-13 12:01:09 +00:00
Michael Kuperstein
5efc4deda0 Reverting r237234, "Use std::bitset for SubtargetFeatures"
The buildbots are still not satisfied.
MIPS and ARM are failing (even though at least MIPS was expected to pass).

llvm-svn: 237245
2015-05-13 10:28:46 +00:00
Toma Tabacu
d49821a633 [mips] [IAS] Merge the micromips-expressions.s test into expr1.s. NFC.
Summary: Also did some minor reformatting in the resulting test.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 237242
2015-05-13 09:53:53 +00:00
Sergey Dmitrouk
5e3a4d1a49 [DebugInfo] Debug locations for constant SD nodes
Several updates for [DebugInfo] Add debug locations to constant SD nodes (r235989).
Includes:

 *  re-enabling the change (disabled recently);
 *  missing change for FP constants;
 *  resetting debug location of constant node if it's used more than at one place
    to prevent emission of wrong locations in case of coalesced constants;
 *  a couple of additional tests.

Now all look ups in CSEMap are wrapped by additional method.

Comment in D9084 suggests that debug locations aren't useful for "target constants",
so there might be one more change related to this API (namely, dropping debug
locations for getTarget*Constant methods).

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

llvm-svn: 237237
2015-05-13 08:58:03 +00:00
Michael Kuperstein
56a8e05a6b Use std::bitset for SubtargetFeatures
Previously, subtarget features were a bitfield with the underlying type being uint64_t. 
Since several targets (X86 and ARM, in particular) have hit or were very close to hitting this bound, switching the features to use a bitset.
No functional change.

The first two times this was committed (r229831, r233055), it caused several buildbot failures. 
At least some of the ARM and MIPS ones were due to gcc/binutils issues, and should now be fixed.

llvm-svn: 237234
2015-05-13 08:27:08 +00:00
Elena Demikhovsky
0803046ed4 AVX-512: fixed a bug in encoding of VPSRAQ instrcution,
added a bunch of encoding tests.

llvm-svn: 237232
2015-05-13 07:35:05 +00:00
Craig Topper
8641edf78d Use ArrayRef::slice instead of manually constructing an ArrayRef from ArrayRef iterators. NFC
llvm-svn: 237231
2015-05-13 06:57:51 +00:00