Commit Graph

117210 Commits

Author SHA1 Message Date
Toma Tabacu
78549eb45b [mips] [IAS] Warn when LA is used with a 64-bit symbol.
Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237356 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-14 10:53:40 +00:00
Toma Tabacu
fbcecce27e [mips] [IAS] Give expandLoadAddressSym() more specific arguments. NFC.
Summary:
If we only pass the necessary operands, we don't have to determine the position of the symbol operand when entering expandLoadAddressSym().
This simplifies the expandLoadAddressSym() code.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237355 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-14 10:02:58 +00:00
Vladimir Sukharev
3f7bd961d1 [AArch64] Slight naming changes and comments for AArch64NamedImmMapper
Reviewers: echristo

Subscribers: llvm-commits

Follow-up to: http://reviews.llvm.org/D8496#158595

Relates to: http://reviews.llvm.org/rL235089


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237354 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-14 09:50:14 +00:00
Elena Demikhovsky
2fa91afc46 AVX-512: Added i1 type handling for calling conventions.
i1 type is a legal type on AVX-512 and can be passed as parameter or return value.
i1 is promoted to i8 on return and to i32 for call arguments (i8 is also promoted to i32 here).
The result code is similar to the previous X86 targets, where i1 is allways promoted to i8.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237350 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-14 09:04:45 +00:00
Justin Bogner
f8ca978417 TableGen: Avoid undefined behaviour by doing this shift in int64
Found by ubsan. This was taking a bool and left shifting by 32 - the
result is 64 bit, so we should really do the math in a type it fits
in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237345 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-14 06:47:02 +00:00
Craig Topper
bed1965111 [TableGen] Remove an unnecessary outer 'if' around 3 separate inner ifs. No functional change intended.
The outer if had 3 separate conditions ORed together and then the inner ifs detected which of the three conditions it was by using only a portion of the specific condition. Just put the whole condition in each inner if and remove the outer if.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237343 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-14 05:54:02 +00:00
Craig Topper
8a049abf2f [TableGen] Simplify some code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237342 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-14 05:53:59 +00:00
Craig Topper
1fbf73bae3 [TableGen] Remove ListInit::size() in favor of getSize() which does the same thing and is already used in most places. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237341 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-14 05:53:56 +00:00
Craig Topper
bbf57b36bb [TableGen] Replace some calls to ListInit::getSize() with ListInit::empty() if it was just comparing to 0. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237340 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-14 05:53:53 +00:00
Justin Bogner
e6fb4ac3ed cmake: Use -fno-sanitize-recover=all - the old spelling is deprecated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237334 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-14 04:52:57 +00:00
Andy Ayers
edd2bb863e Don't omit the constant when computing a cross-section relative relocation.
Differential Revision: http://reviews.llvm.org/D9692

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237327 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-14 01:10:41 +00:00
Ahmed Bougacha
d8b3f0d785 [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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237324 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-14 01:00:51 +00:00
Nick Lewycky
172e8df4af Revert r237046. See the testcase on the thread where r237046 was committed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237317 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 23:41:47 +00:00
Alex Lorenz
b96942f6ec 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237314 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 23:10:51 +00:00
David Blaikie
7c001dac7a [opaque pointer type] Use the value type of the GlobalVariable rather than accessing it through the pointee's type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237312 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 22:55:01 +00:00
David Blaikie
ea3c20f400 [opaque pointer type] Use GlobalVariable::getValueType rather than accessing it through the GV's pointee type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237311 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 22:54:54 +00:00
Douglas Katzman
a8a342bb41 [X86] Fix PR23271 - RIP-relative decoding bug in disassembler.
Differential Revision: http://reviews.llvm.org/D9110

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237310 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 22:44:52 +00:00
Pete Cooper
393c054cd2 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237309 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 22:43:09 +00:00
Kostya Serebryany
933e6287fe [lib/Fuzzer] update docs about test corpuses in git
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237308 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 22:42:28 +00:00
Justin Bogner
98f0f26fdf 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237307 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 22:41:48 +00:00
Pete Cooper
33bf03ed89 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237301 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 22:19:13 +00:00
Jonathan Roelofs
0030b52f73 Fix typo on Instruction::insert{After,Before}(). NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237300 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 22:14:43 +00:00
Justin Bogner
42ab8c0a90 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237298 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 22:03:04 +00:00
Duncan P. N. Exon Smith
da645e31a7 MC: clang-format MCSymbol.h, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237297 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 21:41:14 +00:00
Tim Northover
b11a191088 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237295 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 20:28:41 +00:00
Tim Northover
43b1362516 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237294 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 20:28:38 +00:00
Tim Northover
edd72727ad 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237293 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 20:28:32 +00:00
Sanjoy Das
ac8a7cc8d2 [Statepoints][Docs] Fix a couple of out of date examples.
Things I had missed in r237285.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237290 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 20:20:10 +00:00
Sanjoy Das
3bc33d9ca1 [Statepoints][Docs] Fix typo: change a period to a comma.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237289 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 20:19:51 +00:00
Sanjoy Das
f11e64dc03 [Safepoints][Verifier] Fix a tautological Assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237287 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 20:11:59 +00:00
Sanjoy Das
3f0ca03e94 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237286 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 20:11:31 +00:00
Sanjoy Das
7569db4a8c [PlaceSafepoints] Update docs for r237214.
Show the two new ID and NumPatchBytes fields in the PlaceSafepoint
examples in Statepoints.rst to avoid confusion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237285 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 20:11:24 +00:00
Davide Italiano
89614e19a2 [LoopIdiomRecognize] Use auto + range-based loop. NFC intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237284 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 19:51:21 +00:00
Jordan Rose
1826197dbd [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237276 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 18:51:49 +00:00
Jim Grosbach
db703aaedd MC: Modernize MCOperand API naming. NFC.
MCOperand::Create*() methods renamed to MCOperand::create*().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237275 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 18:37:00 +00:00
David Blaikie
428e9d7608 [opaque pointer type] Constant Folding: Use GEPOperator to access the pointee source type rather than going through the first operand's pointer type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237274 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 18:35:29 +00:00
David Blaikie
115494b777 [opaque pointer type] Pass the explicit function type down to the instruction constructor when parsing invoke instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237273 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 18:35:26 +00:00
Kostya Serebryany
2727b58c88 [lib/Fuzzer] enable -use_counters=1 by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237272 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 18:31:46 +00:00
Jingyue Wu
12b5fa5f6e [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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237269 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 18:12:24 +00:00
Brendon Cahoon
a036cd4093 [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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237266 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 17:56:03 +00:00
Diego Novillo
0e0929ed98 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237265 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 17:04:29 +00:00
Toma Tabacu
552cd98683 [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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237262 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 16:02:41 +00:00
Yaron Keren
e49e65326a Update ELFObjectWriter::reset() following r236255.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237261 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 15:17:19 +00:00
Diego Novillo
a3bccceda7 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237260 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 15:13:45 +00:00
Teresa Johnson
dcc57103b8 Test commit: Remove unnecessary spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237259 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 15:04:14 +00:00
Brendon Cahoon
e55e117ad3 [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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237258 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 14:54:24 +00:00
Jozef Kolek
cdecddaf1e [mips][microMIPSr6] Implement CLO and CLZ instructions
This patch implements CLO and CLZ instructions using mapping.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237257 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 14:18:11 +00:00
Silviu Baranga
b937dadfb2 Revert r237247 - [AArch64] Codegen VMAX/VMIN.. as it is causing failures in SPEC2000/2006
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237256 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 14:03:18 +00:00
Toma Tabacu
c617a13a2e [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237255 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 13:56:16 +00:00
Artyom Skrobov
e8dceea402 [AArch64] Codegen VMAX/VMIN for safe math cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237247 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-13 12:01:09 +00:00