Adam Nemet [Thu, 14 May 2015 12:33:32 +0000 (12:33 +0000)]
Attempt to fix MSVC bots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237359
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 14 May 2015 12:05:18 +0000 (12:05 +0000)]
New Loop Distribution pass
Summary:
This implements the initial version as was proposed earlier this year
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/080462.html).
Since then Loop Access Analysis was split out from the Loop Vectorizer
and was made into a separate analysis pass. Loop Distribution becomes
the second user of this analysis.
The pass is off by default and can be enabled
with -enable-loop-distribution. There is currently no notion of
profitability; if there is a loop with dependence cycles, the pass will
try to split them off from other memory operations into a separate loop.
I decided to remove the control-dependence calculation from this first
version. This and the issues with the PDT are actively discussed so it
probably makes sense to treat it separately. Right now I just mark all
terminator instruction required which keeps identical CFGs for each
distributed loop. This seems to be working pretty well for 456.hmmer
where even though there is an empty if-then block in the distributed
loop initially, it gets completely removed.
The pass keeps DominatorTree and LoopInfo updated. I've tested this
with -loop-distribute-verify with the testsuite where we distribute ~90
loops. SimplifyLoop is violated in some cases and I have a FIXME
covering this.
Reviewers: hfinkel, nadav, aschwaighofer
Reviewed By: aschwaighofer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8831
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237358
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Thu, 14 May 2015 10:58:59 +0000 (10:58 +0000)]
Fixed some typos and broken links in source level debugging docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237357
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Thu, 14 May 2015 10:53:40 +0000 (10:53 +0000)]
[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
Toma Tabacu [Thu, 14 May 2015 10:02:58 +0000 (10:02 +0000)]
[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
Vladimir Sukharev [Thu, 14 May 2015 09:50:14 +0000 (09:50 +0000)]
[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
Elena Demikhovsky [Thu, 14 May 2015 09:04:45 +0000 (09:04 +0000)]
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
Justin Bogner [Thu, 14 May 2015 06:47:02 +0000 (06:47 +0000)]
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
Craig Topper [Thu, 14 May 2015 05:54:02 +0000 (05:54 +0000)]
[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
Craig Topper [Thu, 14 May 2015 05:53:59 +0000 (05:53 +0000)]
[TableGen] Simplify some code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237342
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 14 May 2015 05:53:56 +0000 (05:53 +0000)]
[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
Craig Topper [Thu, 14 May 2015 05:53:53 +0000 (05:53 +0000)]
[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
Justin Bogner [Thu, 14 May 2015 04:52:57 +0000 (04:52 +0000)]
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
Andy Ayers [Thu, 14 May 2015 01:10:41 +0000 (01:10 +0000)]
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
Ahmed Bougacha [Thu, 14 May 2015 01:00:51 +0000 (01:00 +0000)]
[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
Nick Lewycky [Wed, 13 May 2015 23:41:47 +0000 (23:41 +0000)]
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
Alex Lorenz [Wed, 13 May 2015 23:10:51 +0000 (23:10 +0000)]
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
David Blaikie [Wed, 13 May 2015 22:55:01 +0000 (22:55 +0000)]
[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
David Blaikie [Wed, 13 May 2015 22:54:54 +0000 (22:54 +0000)]
[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
Douglas Katzman [Wed, 13 May 2015 22:44:52 +0000 (22:44 +0000)]
[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
Pete Cooper [Wed, 13 May 2015 22:43:09 +0000 (22:43 +0000)]
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
Kostya Serebryany [Wed, 13 May 2015 22:42:28 +0000 (22:42 +0000)]
[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
Justin Bogner [Wed, 13 May 2015 22:41:48 +0000 (22:41 +0000)]
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
Pete Cooper [Wed, 13 May 2015 22:19:13 +0000 (22:19 +0000)]
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
Jonathan Roelofs [Wed, 13 May 2015 22:14:43 +0000 (22:14 +0000)]
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
Justin Bogner [Wed, 13 May 2015 22:03:04 +0000 (22:03 +0000)]
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
Duncan P. N. Exon Smith [Wed, 13 May 2015 21:41:14 +0000 (21:41 +0000)]
MC: clang-format MCSymbol.h, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237297
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 13 May 2015 20:28:41 +0000 (20:28 +0000)]
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
Tim Northover [Wed, 13 May 2015 20:28:38 +0000 (20:28 +0000)]
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
Tim Northover [Wed, 13 May 2015 20:28:32 +0000 (20:28 +0000)]
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
Sanjoy Das [Wed, 13 May 2015 20:20:10 +0000 (20:20 +0000)]
[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
Sanjoy Das [Wed, 13 May 2015 20:19:51 +0000 (20:19 +0000)]
[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
Sanjoy Das [Wed, 13 May 2015 20:11:59 +0000 (20:11 +0000)]
[Safepoints][Verifier] Fix a tautological Assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237287
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 13 May 2015 20:11:31 +0000 (20:11 +0000)]
[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
Sanjoy Das [Wed, 13 May 2015 20:11:24 +0000 (20:11 +0000)]
[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
Davide Italiano [Wed, 13 May 2015 19:51:21 +0000 (19:51 +0000)]
[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
Jordan Rose [Wed, 13 May 2015 18:51:49 +0000 (18:51 +0000)]
[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
Jim Grosbach [Wed, 13 May 2015 18:37:00 +0000 (18:37 +0000)]
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
David Blaikie [Wed, 13 May 2015 18:35:29 +0000 (18:35 +0000)]
[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
David Blaikie [Wed, 13 May 2015 18:35:26 +0000 (18:35 +0000)]
[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
Kostya Serebryany [Wed, 13 May 2015 18:31:46 +0000 (18:31 +0000)]
[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
Jingyue Wu [Wed, 13 May 2015 18:12:24 +0000 (18:12 +0000)]
[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
Brendon Cahoon [Wed, 13 May 2015 17:56:03 +0000 (17:56 +0000)]
[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
Diego Novillo [Wed, 13 May 2015 17:04:29 +0000 (17:04 +0000)]
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
Toma Tabacu [Wed, 13 May 2015 16:02:41 +0000 (16:02 +0000)]
[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
Yaron Keren [Wed, 13 May 2015 15:17:19 +0000 (15:17 +0000)]
Update ELFObjectWriter::reset() following r236255.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237261
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Wed, 13 May 2015 15:13:45 +0000 (15:13 +0000)]
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
Teresa Johnson [Wed, 13 May 2015 15:04:14 +0000 (15:04 +0000)]
Test commit: Remove unnecessary spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237259
91177308-0d34-0410-b5e6-
96231b3b80d8
Brendon Cahoon [Wed, 13 May 2015 14:54:24 +0000 (14:54 +0000)]
[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
Jozef Kolek [Wed, 13 May 2015 14:18:11 +0000 (14:18 +0000)]
[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
Silviu Baranga [Wed, 13 May 2015 14:03:18 +0000 (14:03 +0000)]
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
Toma Tabacu [Wed, 13 May 2015 13:56:16 +0000 (13:56 +0000)]
[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
Artyom Skrobov [Wed, 13 May 2015 12:01:09 +0000 (12:01 +0000)]
[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
Michael Kuperstein [Wed, 13 May 2015 10:28:46 +0000 (10:28 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237245
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Wed, 13 May 2015 09:53:53 +0000 (09:53 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237242
91177308-0d34-0410-b5e6-
96231b3b80d8
Sergey Dmitrouk [Wed, 13 May 2015 08:58:03 +0000 (08:58 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237237
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Wed, 13 May 2015 08:27:08 +0000 (08:27 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237234
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 13 May 2015 07:35:05 +0000 (07:35 +0000)]
AVX-512: fixed a bug in encoding of VPSRAQ instrcution,
added a bunch of encoding tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237232
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 13 May 2015 06:57:51 +0000 (06:57 +0000)]
Use ArrayRef::slice instead of manually constructing an ArrayRef from ArrayRef iterators. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237231
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 13 May 2015 01:12:18 +0000 (01:12 +0000)]
Constify arguments to methods in LICM. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237227
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 13 May 2015 01:12:16 +0000 (01:12 +0000)]
Change LoadAndStorePromoter to take ArrayRef instead of SmallVectorImpl&.
The array passed to LoadAndStorePromoter's constructor was a constant reference to a SmallVectorImpl, which is just the same as passing an ArrayRef.
Also, the data in the array can be 'const Instruction*' instead of 'Instruction*'. Its not possible to convert a SmallVectorImpl<T*> to SmallVectorImpl<const T*>, but ArrayRef does provide such a method.
Currently this added calls to makeArrayRef which should be a nop, but i'm going to kick off a discussion about improving ArrayRef to not need these.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237226
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 13 May 2015 01:12:12 +0000 (01:12 +0000)]
Constify arguments in AliasSetTracker methods. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237225
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 13 May 2015 01:12:09 +0000 (01:12 +0000)]
Change a loop in LoopInfo to foreach. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237224
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 13 May 2015 01:12:06 +0000 (01:12 +0000)]
Constify arguments to methods in LoopInfo. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237223
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Wed, 13 May 2015 00:32:23 +0000 (00:32 +0000)]
[PlaceSafepoints] Reduce dominator tree recalculation
Reduce recalculation of the dominator tree by identifying all sites that will need a safepoint poll before doing any of the insertion. This allows us to invalidate the dominator info once, rather than once per safepoint poll inserted.
While I'm at it, update findLocationForEntrySafepoint to properly update the dom tree now that the interface has been made easy. When first written, it wasn't per comment in the code.
Differential Revision: http://reviews.llvm.org/D9727
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237220
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Wed, 13 May 2015 00:03:17 +0000 (00:03 +0000)]
[SLSR] handles non-canonicalized Mul candidates
such as (2 + B) * S.
Tested by @non_canonicalized in slsr-mul.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237216
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 12 May 2015 23:52:24 +0000 (23:52 +0000)]
[Statepoints] Support for "patchable" statepoints.
Summary:
This change adds two new parameters to the statepoint intrinsic, `i64 id`
and `i32 num_patch_bytes`. `id` gets propagated to the ID field
in the generated StackMap section. If the `num_patch_bytes` is
non-zero then the statepoint is lowered to `num_patch_bytes` bytes of
nops instead of a call (the spill and reload code remains unchanged).
A non-zero `num_patch_bytes` is useful in situations where a language
runtime requires complete control over how a call is lowered.
This change brings statepoints one step closer to patchpoints. With
some additional work (that is not part of this patch) it should be
possible to get rid of `TargetOpcode::STATEPOINT` altogether.
PlaceSafepoints generates `statepoint` wrappers with `id` set to
`0xABCDEF00` (the old default value for the ID reported in the stackmap)
and `num_patch_bytes` set to `0`. This can be made more sophisticated
later.
Reviewers: reames, pgavlin, swaroop.sridhar, AndyAyers
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9546
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237214
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 12 May 2015 23:39:23 +0000 (23:39 +0000)]
[PlaceSafepoints] Followup to commit L237172
Responding to review feedback from http://reviews.llvm.org/D9585
1) Remove a variable shadow by converting the outer loop to a range for loop. We never really used the 'i' variable which was being shadowed.
2) Reduce DominatorTree recalculations by passing the DT to SplitEdge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237212
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 12 May 2015 23:36:18 +0000 (23:36 +0000)]
CodeGen: ignore DEBUG_VALUE nodes in KILL tagging
DEBUG_VALUE nodes do not take part in code generation. Ignore them when
performing KILL updates. Addresses PR23486.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237211
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 12 May 2015 23:34:27 +0000 (23:34 +0000)]
Revert r237175: [X86] Always return the sret parameter in eax/rax ...
This commit broke an x86 test and the bots have been broken for well
over an hour now so I'm just reverting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237210
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 12 May 2015 23:32:56 +0000 (23:32 +0000)]
[Unrolling] Refactor the start and step offsets to simplify overflow
checking and make the cache faster and smaller.
I had thought that using an APInt here would be useful, but I think
I was just wrong. Notably, we don't have to do any fancy overflow
checking, we can just bound the values as quite small and do the math in
a higher precision integer. I've switched to a signed integer so that
UBSan will even point out if we ever have integer overflow. I've added
various asserts to try to catch things as well and hoisted the overflow
checks so that we just leave the too-large offsets out of the SCEV-GEP
cache. This makes the value in the cache quite a bit smaller which is
probably worthwhile.
No functionality changed here (for trip counts under 1 billion).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237209
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 12 May 2015 23:19:12 +0000 (23:19 +0000)]
[lib/Fuzzer] A simple script to synchronise a fuzz test corpus with an external git repository.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237208
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Fiselier [Tue, 12 May 2015 22:49:18 +0000 (22:49 +0000)]
Allow the CMake option 'LLVM_ABI_BREAKING_CHECKS' to be undefined.
When building libc++abi in a standalone configuration the CMake option
'LLVM_ABI_BREAKING_CHECKS` will not be defined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237204
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Steinbrink [Tue, 12 May 2015 22:31:47 +0000 (22:31 +0000)]
CVP: Improve handling of Selects used as incoming PHI values
Summary:
If the branch that leads to the PHI node and the Select instruction
depend on correlated conditions, we might be able to directly use the
corresponding value from the Select instruction as the incoming value
for the PHI node, allowing later removal of the select instruction.
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9051
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237201
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 12 May 2015 22:19:52 +0000 (22:19 +0000)]
[RewriteStatepointsForGC] Extend base pointer to handle more cases w/vectors
When relocating a pointer, we need to determine a base pointer for the derived pointer being relocated. We have limited support for handling a pointer extracted from a vector; the current code only handled the case where the entire vector was known to contain base pointers. This patch extends the reasoning to handle chains of insertelements where the indices are constants. This case turns out to be fairly common in vectorized code. We can now handle vectors which contains mixtures of base and derived pointers provided the insertelements use constant indices.
Note that this doesn't solve the general problem. To handle variable indexed insertelements, we'd need to scalarize and introduce conditional branching based on the index. Alternatively, we could eagerly scalarize, but the code structure doesn't currently make either fix easy. The patch also doesn't handle shufflevector or other vector manipulation for much the same reasons. I plan to defer this work until I have a motivating test case.
Differential Revision: http://reviews.llvm.org/D9676
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237200
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 12 May 2015 22:03:34 +0000 (22:03 +0000)]
[lib/Fuzzer] use sha1sum for the file hash
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237198
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Tue, 12 May 2015 22:03:00 +0000 (22:03 +0000)]
Tidy comments in SampleProfile header. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237197
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Tue, 12 May 2015 21:49:47 +0000 (21:49 +0000)]
[PlaceSafepoints] Add missing "override" to PlaceBackedgeSafepointsImpl::runOnFunction
Pointed out by -Winconsistent-missing-override.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237196
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 12 May 2015 21:49:03 +0000 (21:49 +0000)]
Add missing #include and forward decl, found by modules build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237195
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 12 May 2015 21:42:22 +0000 (21:42 +0000)]
MergeFunctions: Two different sized allocas are *not* the same
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237193
91177308-0d34-0410-b5e6-
96231b3b80d8
Pat Gavlin [Tue, 12 May 2015 21:33:48 +0000 (21:33 +0000)]
[Statepoints] Clean up statepoint argument accessors.
Differential Revision: http://reviews.llvm.org/D9622
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237191
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 12 May 2015 21:28:39 +0000 (21:28 +0000)]
Revert "ARM: Remove Itineraries for swift CPU"
Reverting until I figure out the new lit failures.
This reverts commit r237179.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237189
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Tue, 12 May 2015 21:23:09 +0000 (21:23 +0000)]
InstrProf: Update name of compiler-rt routine for setting filename
Patch by Teresa Johnson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237186
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 12 May 2015 21:21:18 +0000 (21:21 +0000)]
[PlaceSafepoints] Switch to being a FunctionPass
The pass doesn't actually modify the module outside of the function being processed. The only confusing piece is that it both inserts calls and then inlines the resulting calls. Given that, it definitely invalidates module level analysis results, but many FunctionPasses do that.
Differential Revision: http://reviews.llvm.org/D9590
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237185
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 12 May 2015 21:14:24 +0000 (21:14 +0000)]
fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237181
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 12 May 2015 21:09:36 +0000 (21:09 +0000)]
[PlaceSafepoints] Make internal helper pass a FunctionPass
Switch from using a LoopPass to using a FunctionPass for the internal helper analysis pass. The next step is going to be to make this a true analysis pass which is required by the PlaceSafepoints pass itself.
p.s. The interesting semantic part here is that we're changing the iteration order over the loops. It shouldn't matter, but that's the reason to separate this into it's own distinct patch.
Differential Revision: http://reviews.llvm.org/D9588
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237180
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 12 May 2015 21:07:54 +0000 (21:07 +0000)]
ARM: Remove Itineraries for swift CPU
They do more harm than good when used in the MachineScheduler as they
tend to take preference to register pressure minimsation which is more
important for swift.
Differential Revision: http://reviews.llvm.org/D9718
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237179
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 12 May 2015 20:56:33 +0000 (20:56 +0000)]
[PlaceSafepoints] Use analysis infrastructure to get dominator tree
The old code computed dominators for every loop. This was terribly slow with no good reason. Just use the standard infrastructure for analysis passes.
Differential Revision: http://reviews.llvm.org/D9586
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237176
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 12 May 2015 20:56:32 +0000 (20:56 +0000)]
[X86] Always return the sret parameter in eax/rax, even on 32-bit
Summary:
This rule was always in the old SysV i386 ABI docs and the new ones that
H.J. Lu has put together, but we never noticed:
EAX scratch register; also used to return integer and pointer values
from functions; also stores the address of a returned struct or union
Fixes PR23491.
Reviewers: majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9715
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237175
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 12 May 2015 20:43:48 +0000 (20:43 +0000)]
[PlaceSafepoints] Remove dependence on LoopSimplify
As a step towards getting rid of internal pass manager hack entirely, remove the need for loop simplify to run in the inner pass manager. The new code does produce slightly different loop structures, so this isn't technically NFC.
Differential Revision: http://reviews.llvm.org/D9585
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237172
91177308-0d34-0410-b5e6-
96231b3b80d8
Sundeep Kushwaha [Tue, 12 May 2015 20:13:10 +0000 (20:13 +0000)]
[PATCH] [HEXAGON] Add a test program to verify calling convention
for large struct return by value.
Differential Revision: http://reviews.llvm.org/D9709
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237170
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Tue, 12 May 2015 20:05:31 +0000 (20:05 +0000)]
Convert PHI getIncomingValue() to foreach over incoming_values(). NFC.
We already had a method to iterate over all the incoming values of a PHI. This just changes all eligible code to use it.
Ineligible code included anything which cared about the index, or was also trying to get the i'th incoming BB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237169
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Tue, 12 May 2015 20:05:23 +0000 (20:05 +0000)]
Add a const method to iterator over PHI incoming values.
This will be used in the next commit which converts code to use incoming_values().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237168
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Tue, 12 May 2015 20:05:20 +0000 (20:05 +0000)]
Constify method. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237167
91177308-0d34-0410-b5e6-
96231b3b80d8
Pat Gavlin [Tue, 12 May 2015 19:50:19 +0000 (19:50 +0000)]
[Statepoints] Split the calling convention and statepoint flags operand to STATEPOINT into two separate operands.
Differential Revision: http://reviews.llvm.org/D9623
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237166
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Katzman [Tue, 12 May 2015 19:42:31 +0000 (19:42 +0000)]
Strip trailing whitespace. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237165
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 12 May 2015 18:59:17 +0000 (18:59 +0000)]
R600/SI: Fix bug in VGPR spilling
AMDGPU::SI_SPILL_V96_RESTORE was missing from a switch statement, which
caused the srsrc and soffset register to not be set correctly.
This commit replaces the switch statement with a SITargetInfo query
to make sure all spill instructions are covered.
Differential Revision: http://reviews.llvm.org/D9582
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237164
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 12 May 2015 18:51:57 +0000 (18:51 +0000)]
[lib/Fuzzer] guess the right number of workers if -jobs=N is given but -workers=M is not. Update the docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237163
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 12 May 2015 17:44:32 +0000 (17:44 +0000)]
Revert r237157, "YAML: Fix typos. NFC".
'Iff' isn't a typo, it's a shorthand for 'if and only if'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237160
91177308-0d34-0410-b5e6-
96231b3b80d8
Jozef Kolek [Tue, 12 May 2015 17:39:32 +0000 (17:39 +0000)]
[mips][microMIPSr6] Implement SELEQZ and SELNEZ instructions
This patch implements SELEQZ and SELNEZ instructions using mapping.
Differential Revision: http://reviews.llvm.org/D8497
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237158
91177308-0d34-0410-b5e6-
96231b3b80d8