OSDN Git Service
Pavel Labath [Wed, 9 Nov 2016 11:43:52 +0000 (11:43 +0000)]
[dsymutil] Replace TimeValue with TimePoint
Summary:
All changes are pretty straight-forward. I chose to use TimePoints with
second precision, as that is all that seems to be required here.
Reviewers: friss, zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25908
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286358
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 9 Nov 2016 10:14:55 +0000 (10:14 +0000)]
[mips] Add non-const getter for the Elf_Mips_Options class. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286351
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Wed, 9 Nov 2016 09:59:27 +0000 (09:59 +0000)]
[MachineScheduler] Comments fixing.
The name/comment of the third argument to the ScheduleDAGMI constructor
is RemoveKillFlags and not IsPostRA. Only the comments are changed.
Review: A Trick
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286350
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexandros Lamprineas [Wed, 9 Nov 2016 08:53:07 +0000 (08:53 +0000)]
[ARM] Loop Strength Reduction crashes when targeting ARM or Thumb.
Scalar Evolution asserts when not all the operands of an Add Recurrence
Expression are loop invariants. Loop Strength Reduction should only
create affine Add Recurrences, so that both the start and the step of
the expression are loop invariants.
Differential Revision: https://reviews.llvm.org/D26185
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286347
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 9 Nov 2016 07:48:51 +0000 (07:48 +0000)]
[AVX-512] Add lowering to cvttpd2udq/cvttps2udq for fptoui v2f64/2f32 to 2i32
This patch adds support for fptoui to 2i32 from both 2f64 and 2f32, building on Simon's change for the signed version in r284459 and using AVX-512 instructions.
If we don't have VLX support we need to use a 512-bit operation for v2f64->v2i32 and extract the result.
It also recognises that cvttpd2udq zeroes the upper 64-bits of the xmm result.
Differential Revision: https://reviews.llvm.org/D26331
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286345
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 9 Nov 2016 07:31:32 +0000 (07:31 +0000)]
[X86] Lower AVX512 and SSE intrinsics for CVTTPD2DQ to X86ISD::CVTTPD2DQ.
Summary: This allows the SSE intrinsic to use the EVEX instruction when available. It also fixes EVEX to not use a weird (v4i32 (fp_to_sint v2f64)) node and it merges some isel patterns. This also fixes some cases that weren't combining vzmovl with cvttpd2dq to remove extra moves.
Reviewers: delena, zvi, RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26330
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286344
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 9 Nov 2016 05:38:47 +0000 (05:38 +0000)]
[AVX-512] Add more varied alignments to tests for storing the lower 128-bits of a 256 or 512-bit subvector extract.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286343
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 9 Nov 2016 05:31:57 +0000 (05:31 +0000)]
[AVX-512] Use alignedstore256 in patterns that look for stores of the lower 256-bits of a 512-bit vector to use a 256-bit aligned store.
Previously we were only checking for 16 byte alignment instead of 32 byte alignment. Fixes PR30947.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286342
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 9 Nov 2016 05:31:53 +0000 (05:31 +0000)]
[AVX-512] Add test cases to demonstrate PR30947. We accidentally use 32 byte aligned store instructions when the original store was only 16 byte aligned if the store is from the lower bits of a subvector extract.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286341
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 9 Nov 2016 04:50:48 +0000 (04:50 +0000)]
[AVX-512] Make VBMI instruction set enabling imply that the BWI instruction set is also enabled.
Summary:
This is needed to make the v64i8 and v32i16 types legal for the 512-bit VBMI instructions. Fixes PR30912.
Reviewers: delena, zvi
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26322
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286339
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Wed, 9 Nov 2016 02:12:13 +0000 (02:12 +0000)]
[XRay][docs] Fix llvm snippets to be well-formed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286330
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 9 Nov 2016 01:45:13 +0000 (01:45 +0000)]
Revert "[ThinLTO] Prevent exporting of locals used/defined in module level asm"
This reverts commit r286297.
Introduces a dependency from libAnalysis to libObject, which I missed
during the review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286329
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 9 Nov 2016 01:44:42 +0000 (01:44 +0000)]
[doc] Remove explicit CMake version requirement for MSVC
The global minimum one is way past this version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286328
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 9 Nov 2016 01:09:11 +0000 (01:09 +0000)]
Bitcode: Remove the remnants of the BitcodeDiagnosticInfo class.
The BitcodeReader no longer produces BitcodeDiagnosticInfo diagnostics.
The only remaining reference was in the gold plugin; the code there has been
dead since we stopped producing InvalidBitcodeSignature error codes in r225562.
While at it remove the InvalidBitcodeSignature error code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286326
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Wed, 9 Nov 2016 00:58:19 +0000 (00:58 +0000)]
Enable Loop Sink pass for functions that has profile.
Summary: For functions with profile data, we are confident that loop sink will be optimal in sinking code.
Reviewers: davidxl, hfinkel
Subscribers: mehdi_amini, mzolotukhin, llvm-commits
Differential Revision: https://reviews.llvm.org/D26155
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286325
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 9 Nov 2016 00:51:04 +0000 (00:51 +0000)]
Bitcode: Change the BitcodeReader to use llvm::Error internally.
Differential Revision: https://reviews.llvm.org/D26430
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286323
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Wed, 9 Nov 2016 00:24:58 +0000 (00:24 +0000)]
[XRay][Docs] Add documentation for XRay in LLVM
Summary:
This is the initial version of the documentation for how to use XRay as
it stands in LLVM, Clang, and compiler-rt. We leave some room for later
expansion mentioining what is work in progress and what could be
expected moving forward.
We also give a high level overview of future work that's both ongoing
and planned.
Reviewers: echristo, dblaikie, chandlerc
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D26386
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286319
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 9 Nov 2016 00:24:44 +0000 (00:24 +0000)]
[ValueTracking] recognize obfuscated variants of umin/umax
The smallest tests that expose this are codegen tests (because SelectionDAGBuilder::visitSelect() uses matchSelectPattern
to create UMAX/UMIN nodes), but it's also possible to see the effects in IR alone with folds of min/max pairs.
If these were written as unsigned compares in IR, InstCombine canonicalizes the unsigned compares to signed compares.
Ie, running the optimizer pessimizes the codegen for this case without this patch:
define <4 x i32> @umax_vec(<4 x i32> %x) {
%cmp = icmp ugt <4 x i32> %x, <i32
2147483647, i32
2147483647, i32
2147483647, i32
2147483647>
%sel = select <4 x i1> %cmp, <4 x i32> %x, <4 x i32> <i32
2147483647, i32
2147483647, i32
2147483647, i32
2147483647>
ret <4 x i32> %sel
}
$ ./opt umax.ll -S | ./llc -o - -mattr=avx
vpmaxud LCPI0_0(%rip), %xmm0, %xmm0
$ ./opt -instcombine umax.ll -S | ./llc -o - -mattr=avx
vpxor %xmm1, %xmm1, %xmm1
vpcmpgtd %xmm0, %xmm1, %xmm1
vmovaps LCPI0_0(%rip), %xmm2 ## xmm2 = [
2147483647,
2147483647,
2147483647,
2147483647]
vblendvps %xmm1, %xmm0, %xmm2, %xmm0
Differential Revision: https://reviews.llvm.org/D26096
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286318
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 9 Nov 2016 00:23:20 +0000 (00:23 +0000)]
[cmake] Fix handling compiler-rt in LLVM_ENABLE_PROJECTS by turning any "-" into "_"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286317
91177308-0d34-0410-b5e6-
96231b3b80d8
Greg Clayton [Wed, 9 Nov 2016 00:15:54 +0000 (00:15 +0000)]
Added the ability to dump hex bytes easily into a raw_ostream.
Unit tests were added to verify this functionality keeps working correctly.
Example output for raw hex bytes:
llvm::ArrayRef<uint8_t> Bytes = ...;
llvm::outs() << format_hex_bytes(Bytes);
554889e5 4881ec70 04000048 8d051002
00004c8d 05fd0100 004c8b0d d0020000
Example output for raw hex bytes with offsets:
llvm::outs() << format_hex_bytes(Bytes, 0x100000d10);
0x0000000100000d10:
554889e5 4881ec70 04000048 8d051002
0x0000000100000d20:
00004c8d 05fd0100 004c8b0d d0020000
Example output for raw hex bytes with ASCII with offsets:
llvm::outs() << format_hex_bytes_with_ascii(Bytes, 0x100000d10);
0x0000000100000d10:
554889e5 4881ec70 04000048 8d051002 |UH.?H.?p...H....|
0x0000000100000d20:
00004c8d 05fd0100 004c8b0d d0020000 |..L..?...L..?...|
The default groups bytes into 4 byte groups, but this can be changed to 1 byte:
llvm::outs() << format_hex_bytes(Bytes, 0x100000d10, 16 /*NumPerLine*/, 1 /*ByteGroupSize*/);
0x0000000100000d10: 55 48 89 e5 48 81 ec 70 04 00 00 48 8d 05 10 02
0x0000000100000d20: 00 00 4c 8d 05 fd 01 00 00 4c 8b 0d d0 02 00 00
llvm::outs() << format_hex_bytes(Bytes, 0x100000d10, 16 /*NumPerLine*/, 2 /*ByteGroupSize*/);
0x0000000100000d10: 5548 89e5 4881 ec70 0400 0048 8d05 1002
0x0000000100000d20: 0000 4c8d 05fd 0100 004c 8b0d d002 0000
llvm::outs() << format_hex_bytes(Bytes, 0x100000d10, 8 /*NumPerLine*/, 1 /*ByteGroupSize*/);
0x0000000100000d10: 55 48 89 e5 48 81 ec 70
0x0000000100000d18: 04 00 00 48 8d 05 10 02
0x0000000100000d20: 00 00 4c 8d 05 fd 01 00
0x0000000100000d28: 00 4c 8b 0d d0 02 00 00
https://reviews.llvm.org/D26405
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286316
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 9 Nov 2016 00:13:11 +0000 (00:13 +0000)]
[InstCombine] fix profitability equation for max-of-nots transform
As the test change shows, we can increase the critical path by adding
a 'not' instruction, so make sure that we're actually removing an
instruction if we do this transform.
This transform could also cause us to miss folds of min/max pairs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286315
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 8 Nov 2016 23:49:15 +0000 (23:49 +0000)]
[InstCombine] reduce indentation; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286314
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 8 Nov 2016 22:30:11 +0000 (22:30 +0000)]
Fix some size_t / uint32_t ambiguity errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286305
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 8 Nov 2016 22:24:53 +0000 (22:24 +0000)]
[CodeView] Hook up CodeViewRecordIO to type serialization path.
Previously support had been added for using CodeViewRecordIO
to read (deserialize) CodeView type records. This patch adds
support for writing those same records. With this patch,
reading and writing of CodeView type records finally uses a single
codepath.
Differential Revision: https://reviews.llvm.org/D26253
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286304
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 8 Nov 2016 22:11:38 +0000 (22:11 +0000)]
Emit the DW_AT_type for a C++ static member definition
if it is more specific than the one in its DW_AT_specification.
If a static member is an array, the translation unit containing the
member definition may have a more specific type (including its length)
than TUs only seeing the class declaration. This patch adds a
DW_AT_type to the member's DW_TAG_variable in addition to the
DW_AT_specification in these cases. The member type in the
DW_AT_specification still shows the more generic type (without the
length) to avoid defeating type uniquing.
The DWARF standard discourages “duplicating” a DW_AT_type in a member
variable definition but doesn’t explicitly forbid it. Having the more
specific type (with the array length) available is what allows the
debugger to print the contents of a static array member variable.
https://reviews.llvm.org/D26368
rdar://problem/
28706946
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286302
91177308-0d34-0410-b5e6-
96231b3b80d8
David L. Jones [Tue, 8 Nov 2016 22:03:23 +0000 (22:03 +0000)]
GlobalISel: make sure debugging variables are appropriately elided in release builds.
Summary:
There are two variables here that break. This change constrains both of them to
debug builds (via DEBUG() or #ifndef NDEBUG).
Reviewers: bkramer, t.p.northover
Subscribers: mehdi_amini, vkalintiris
Differential Revision: https://reviews.llvm.org/D26421
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286300
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 8 Nov 2016 21:57:37 +0000 (21:57 +0000)]
[libFuzzer] minor docs update
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286299
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Tue, 8 Nov 2016 21:53:35 +0000 (21:53 +0000)]
[ThinLTO] Prevent exporting of locals used/defined in module level asm
Summary:
This patch uses the same approach added for inline asm in r285513 to
similarly prevent promotion/renaming of locals used or defined in module
level asm.
All static global values defined in normal IR and used in module level asm
should be included on either the llvm.used or llvm.compiler.used global.
The former were already being flagged as NoRename in the summary, and
I've simply added llvm.compiler.used values to this handling.
Module level asm may also contain defs of values. We need to prevent
export of any refs to local values defined in module level asm (e.g. a
ref in normal IR), since that also requires renaming/promotion of the
local. To do that, the summary index builder looks at all values in the
module level asm string that are not marked Weak or Global, which is
exactly the set of locals that are defined. A summary is created for
each of these local defs and flagged as NoRename.
This required adding handling to the BitcodeWriter to look at GV
declarations to see if they have a summary (rather than skipping them
all).
Finally, added an assert to IRObjectFile::CollectAsmUndefinedRefs to
ensure that an MCAsmParser is available, otherwise the module asm parse
would silently fail. Initialized the asm parser in the opt tool for use
in testing this fix.
Fixes PR30610.
Reviewers: mehdi_amini
Subscribers: johanengelen, krasin, llvm-commits
Differential Revision: https://reviews.llvm.org/D26146
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286297
91177308-0d34-0410-b5e6-
96231b3b80d8
Kuba Brecka [Tue, 8 Nov 2016 21:30:41 +0000 (21:30 +0000)]
[asan] Speed up compilation of large C++ stringmaps (tons of allocas) with ASan
This addresses PR30746, <https://llvm.org/bugs/show_bug.cgi?id=30746>. The ASan pass iterates over entry-block instructions and checks each alloca whether it's in NonInstrumentedStaticAllocaVec, which is apparently slow. This patch gathers the instructions to move during visitAllocaInst.
Differential Revision: https://reviews.llvm.org/D26380
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286296
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Tue, 8 Nov 2016 21:07:42 +0000 (21:07 +0000)]
[BasicAA] Teach BasicAA to handle the inaccessiblememonly and inaccessiblemem_or_argmemonly attributes
Differential Revision: https://reviews.llvm.org/D26382
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286294
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 8 Nov 2016 20:59:03 +0000 (20:59 +0000)]
AArch64DeadRegisterDefinitionsPass: Fix Changed flag
Fix a bug in the calculation of the changed flag introduced in r285488.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286293
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 8 Nov 2016 20:48:38 +0000 (20:48 +0000)]
Use a default constructor. (NFC)
Thanks to David Blaikie for suggesting this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286292
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 8 Nov 2016 20:46:01 +0000 (20:46 +0000)]
[TBAA] Drop support for "old style" scalar TBAA tags
Summary:
We've had support for auto upgrading old style scalar TBAA access
metadata tags into the "new" struct path aware TBAA metadata for 3 years
now. The only way to actually generate old style TBAA was explicitly
through the IRBuilder API. I think this is a good time for dropping
support for old style scalar TBAA.
I'm not removing support for textual or bitcode upgrade -- if you have
IR with the old style scalar TBAA tags that go through the AsmParser orf
the bitcode parser before LLVM sees them, they will keep working as
usual.
Note:
%val = load i32, i32* %ptr, !tbaa !N
!N = < scalar tbaa node >
is equivalent to
%val = load i32, i32* %ptr, !tbaa !M
!N = < scalar tbaa node >
!M = !{!N, !N, 0}
Reviewers: manmanren, chandlerc, sunfish
Subscribers: mcrosier, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D26229
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286291
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 8 Nov 2016 20:39:03 +0000 (20:39 +0000)]
GlobalISel: allow CodeGen to fallback on VReg type/class issues.
After instruction selection we perform some checks on each VReg just before
discarding the type information. These checks were assertions before, but that
breaks the fallback path so this patch moves the logic into the main flow and
reports a better error on failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286289
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 8 Nov 2016 20:18:41 +0000 (20:18 +0000)]
[SystemZ] Add missing FP extension instructions
This completes assembler / disassembler support for all BFP
instructions provided by the floating-point extensions facility.
The instructions added here are not currently used for codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286285
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 8 Nov 2016 20:17:02 +0000 (20:17 +0000)]
[SystemZ] Add program mask and addressing mode instructions
Add several instructions that operate on the program mask
or the addressing mode. These are not really needed for
code generation under Linux, but are provided for completeness
for the assembler/disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286284
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 8 Nov 2016 20:15:26 +0000 (20:15 +0000)]
[SystemZ] Model access registers as LLVM registers
Add the 16 access registers as LLVM registers. This allows removing
a lot of special cases in the assembler and disassembler where we
were handling access registers; this can all just use the generic
register code now.
Also add a bunch of instructions to operate on access registers,
for assembler/disassembler use only. No change in code generation
intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286283
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 8 Nov 2016 19:52:32 +0000 (19:52 +0000)]
[LoopDistribute] Preserve GlobalsAA also in the new Pass Manager.
Differential Revision: https://reviews.llvm.org/D26408
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286280
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 8 Nov 2016 19:43:56 +0000 (19:43 +0000)]
Don't store Twine in a local variable.
Fixes post-commit review comment from r286177.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286275
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 8 Nov 2016 19:40:38 +0000 (19:40 +0000)]
[WebAssembly] Convert stackified IMPLICIT_DEF into constant 0.
Since IMPLIFIT_DEF instructions are omitted in the output, when the output
of an IMPLICIT_DEF instruction is stackified, the resulting register lacks
an explicit push, leading to a push/pop mismatch. Fix this by converting
such IMPLICIT_DEFs into CONST_I32 0 instructions so that they have explicit
pushes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286274
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 8 Nov 2016 19:27:13 +0000 (19:27 +0000)]
[GlobalISel] Dump all instructions inserted by selector.
This is helpful when multiple instructions are inserted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286273
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 8 Nov 2016 19:27:10 +0000 (19:27 +0000)]
[GlobalISel] Permit select() to erase.
Erasing reverse_iterators is problematic; iterate manually.
While there, keep track of the range of inserted instructions.
It can miss instructions inserted elsewhere, but those are harder
to track.
Differential Revision: http://reviews.llvm.org/D22924
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286272
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 8 Nov 2016 19:18:20 +0000 (19:18 +0000)]
[LibcallsShrinkWrap] This pass doesn't preserve the CFG.
For example, it invalidates the domtree, causing assertions
in later passes which need dominator infos. Make it preserve
GlobalsAA, as suggested by Eli.
Differential Revision: https://reviews.llvm.org/D26381
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286271
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 8 Nov 2016 19:10:25 +0000 (19:10 +0000)]
Fix typo in comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286270
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 8 Nov 2016 18:44:40 +0000 (18:44 +0000)]
CODE_OWNERS: Take ownership of the loop vectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286269
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 8 Nov 2016 18:37:48 +0000 (18:37 +0000)]
[SystemZ] Always use semantic instruction classes
Define a couple of additional semantic classes and use them
throughout the .td files to make them more consistent and
more easily readable.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286268
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 8 Nov 2016 18:36:31 +0000 (18:36 +0000)]
[SystemZ] Refactor InstRR* instruction format patterns
This changes the InstRR (and related) patterns to no longer
automatically add an "r" at the end of the mnemonic. This
makes the .td files more obviously understandable, and also
allows using the patterns for those few instructions that
do not follow the *r scheme.
Also add some more sub-formats of the RRF format class, to
match operand names and sequence from the PoP better.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286267
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 8 Nov 2016 18:32:50 +0000 (18:32 +0000)]
[SystemZ] Rename some Inst* instruction format classes
Now that we've added instruction format subclasses like
InstRIb, it makes sense to rename the old InstRI to InstRIa.
Similar for InstRX, InstRXY, InstRS, InstRSY, and InstSS.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286266
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Tue, 8 Nov 2016 18:31:04 +0000 (18:31 +0000)]
[MC][AArch64] Cleanup end-of-line parsing in AArch64 AsmParser.
Reviewers: t.p.northover, rengolin
Subscribers: llvm-commits, aemerson
Differential Revision: https://reviews.llvm.org/D26309
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286265
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 8 Nov 2016 18:30:50 +0000 (18:30 +0000)]
[SystemZ] Refactor branch and conditional instruction patterns
Rework patterns for branches, call & return instructions,
compare-and-branch, compare-and-trap, and conditional move
instructions.
In particular, simplify creation of patterns for the extended
opcodes of instructions that take a CC mask.
Also, use semantical instruction classes for all the instructions
instead of open-coding them in SystemZInstrInfo.td.
Adds a couple of the basic branch instructions (that are unused
for codegen) for the assembler/disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286263
91177308-0d34-0410-b5e6-
96231b3b80d8
Piotr Padlewski [Tue, 8 Nov 2016 18:20:51 +0000 (18:20 +0000)]
NFC small changes in MemDep
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286260
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Mi [Tue, 8 Nov 2016 18:19:36 +0000 (18:19 +0000)]
[RegAllocGreedy] Another fix about NewVRegs for last chance recoloring after r281783.
About when we should move a vreg from CurrentNewVRegs to NewVRegs,
if the vreg in CurrentNewVRegs was added into RecoloringCandidate and was
evicted, it shouldn't be added to NewVRegs because its physical register
will be restored at the end of tryLastChanceRecoloring after the recoloring
failed. If the vreg in CurrentNewVRegs was not in RecoloringCandidate, i.e.
it was evicted in selectOrSplitImpl inside tryRecoloringCandidates, its
physical register will not be restored even if the recoloring failed. In
that case, we need to add the vreg to NewVRegs.
Same as r281783, the problem was seen on out-of-tree target and we didn't
have a test case that reproduce the problem with in-tree targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286259
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 8 Nov 2016 18:12:19 +0000 (18:12 +0000)]
[InstCombine] move min/max tests to min/max test file; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286256
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 8 Nov 2016 18:06:14 +0000 (18:06 +0000)]
[InstCombine] update checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286255
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 8 Nov 2016 17:44:07 +0000 (17:44 +0000)]
GlobalISel: support selecting fpext/fptrunc instructions on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286253
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 8 Nov 2016 17:19:59 +0000 (17:19 +0000)]
Fix PR27500: on MSP430 the branch destination offset is measured in words, not bytes.
Summary: In addition, the branch instructions will have proper BB destinations, not offsets, like before.
Reviewers: asl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23718
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286252
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 8 Nov 2016 16:51:19 +0000 (16:51 +0000)]
Remove unused include. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286250
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 8 Nov 2016 16:49:24 +0000 (16:49 +0000)]
[docs] fix link to AMD manuals (PR30946)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286249
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Tue, 8 Nov 2016 16:32:32 +0000 (16:32 +0000)]
Use the last 7 bits to represent the discriminator to fit it in 1 byte ULEB128 (NFC).
From experiments, discriminator is rarely greater than 127. Here we enforce it to be no greater than 127 so that it will always fit in 1 byte.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286245
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 8 Nov 2016 15:42:49 +0000 (15:42 +0000)]
[X86][SSE] Regenerate test (just adds missing header)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286241
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 8 Nov 2016 15:07:01 +0000 (15:07 +0000)]
[TargetLowering] Fix undef vector element issue with true/false result handling
Fixed an issue with vector usage of TargetLowering::isConstTrueVal / TargetLowering::isConstFalseVal boolean result matching.
The comment said we shouldn't handle constant splat vectors with undef elements. But the the actual code was returning false if the build vector contained no undef elements....
This patch now ignores the number of undefs (getConstantSplatNode will return null if the build vector is all undefs).
The change has also unearthed a couple of missed opportunities in AVX512 comparison code that will need to be addressed.
Differential Revision: https://reviews.llvm.org/D26031
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286238
91177308-0d34-0410-b5e6-
96231b3b80d8
Pablo Barrio [Tue, 8 Nov 2016 14:53:30 +0000 (14:53 +0000)]
[JumpThreading] Unfold selects that depend on the same condition
Summary:
These are good candidates for jump threading. This enables later opts
(such as InstCombine) to combine instructions from the selects with
instructions out of the selects. SimplifyCFG will fold the select
again if unfolding wasn't worth it.
Patch by James Molloy and Pablo Barrio.
Reviewers: rengolin, haicheng, sebpop
Subscribers: jojo, jmolloy, llvm-commits
Differential Revision: https://reviews.llvm.org/D26391
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286236
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 8 Nov 2016 14:10:28 +0000 (14:10 +0000)]
[VectorLegalizer] Expansion of CTLZ using CTPOP when possible
This patch avoids scalarization of CTLZ by instead expanding to use CTPOP (ref: "Hacker's Delight") when the necessary operations are available.
This also adds the necessary cost models for X86 SSE2 targets (the main beneficiary) to ensure vectorization only happens when its useful.
Differential Revision: https://reviews.llvm.org/D25910
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286233
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 8 Nov 2016 14:04:16 +0000 (14:04 +0000)]
cleanup hashSysV a bit.
Don't pass a reference to a StringRef and use a range loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286232
91177308-0d34-0410-b5e6-
96231b3b80d8
Roger Ferrer Ibanez [Tue, 8 Nov 2016 13:34:41 +0000 (13:34 +0000)]
[AArch64] Fix incorrect CSEL node created
Under -enable-unsafe-fp-math, SELECT_CC lowering in AArch64
transforms floating point comparisons of the form "a == 0.0 ? 0.0 : x" to
"a == 0.0 ? a : x". But it incorrectly assumes that 'x' and 'a' have
the same type which can lead to a wrong CSEL node that crashes later
due to nonsensical copies.
Differential Revision: https://reviews.llvm.org/D26394
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286231
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 8 Nov 2016 13:03:45 +0000 (13:03 +0000)]
[mips] Renable small data section test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286230
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Tue, 8 Nov 2016 11:18:59 +0000 (11:18 +0000)]
Adds the loop end location to the loop metadata.
This additional information can be used to improve the locations when generating remarks for loops.
Patch by Florian Hahn.
Differential Revision: https://reviews.llvm.org/D25763
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286227
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Tue, 8 Nov 2016 10:00:45 +0000 (10:00 +0000)]
Fix memory leaks (coverity issues
1365586 &
1365591)
Reviewers: hfinkel
Subscribers: george.burgess.iv, malcolm.parsons, boris.ulasevich, llvm-commits
Differential Revision: https://reviews.llvm.org/D26347
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286223
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 8 Nov 2016 06:58:53 +0000 (06:58 +0000)]
[AVX-512] Add an avx512f without avx512vl command line to vec_fp_to_int.ll and regenerate. This will make a change in a future patch easier to see. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286216
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 8 Nov 2016 06:03:43 +0000 (06:03 +0000)]
IR, Bitcode: Change bitcode reader to no longer own its memory buffer.
Unique ownership is just one possible ownership pattern for the memory buffer
underlying the bitcode reader. In practice, as this patch shows, ownership can
often reside at a higher level. With the upcoming change to allow multiple
modules in a single bitcode file, it will no longer be appropriate for
modules to generally have unique ownership of their memory buffer.
The C API exposes the ownership relation via the LLVMGetBitcodeModuleInContext
and LLVMGetBitcodeModuleInContext2 functions, so we still need some way for
the module to own the memory buffer. This patch does so by adding an owned
memory buffer field to Module, and using it in a few other places where it
is convenient.
Differential Revision: https://reviews.llvm.org/D26384
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286214
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Tue, 8 Nov 2016 05:02:18 +0000 (05:02 +0000)]
cmake: Don't try to install exports if there aren't any
When using LLVM_DISTRIBUTION_COMPONENTS, it's possible for LLVM's
export list to be empty. If this happens the install(EXPORTS) command
will fail, but since there isn't anything to install anyway we really
just want to skip it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286209
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 8 Nov 2016 04:17:11 +0000 (04:17 +0000)]
Bitcode: Decouple block info block state from reader.
As proposed on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/106630.html
Move block info block state to a new class, BitstreamBlockInfo.
Clients may set the block info for a particular cursor with the
BitstreamCursor::setBlockInfo() method.
At this point BitstreamReader is not much more than a container for an
ArrayRef<uint8_t>, so remove it and replace all uses with direct uses
of memory buffers.
Differential Revision: https://reviews.llvm.org/D26259
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286207
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 8 Nov 2016 04:16:57 +0000 (04:16 +0000)]
Bitcode: Split out block info reading into a separate function.
We're about to make this more complicated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286206
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 8 Nov 2016 04:01:50 +0000 (04:01 +0000)]
Add a missing break statement. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286203
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 8 Nov 2016 01:12:17 +0000 (01:12 +0000)]
GlobalISel: improve error diagnostics when IRTranslation fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286190
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 8 Nov 2016 00:45:29 +0000 (00:45 +0000)]
GlobalISel: support selecting G_SELECT on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286185
91177308-0d34-0410-b5e6-
96231b3b80d8
Mandeep Singh Grang [Tue, 8 Nov 2016 00:45:05 +0000 (00:45 +0000)]
[CMake] Fix llvm_setup_rpath function
Summary:
Set _install_rpath to CMAKE_INSTALL_RPATH if it is defined, so that eventually
INSTALL_RPATH is set to CMAKE_INSTALL_RPATH.
The "if(NOT DEFINED CMAKE_INSTALL_RPATH)" was missing a corresponding else
clause.
This also cleans up the fix made in r285908.
Patch by Azharuddin Mohammed
Reviewers: john.brawn, sgundapa, beanz
Subscribers: chapuni, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D26289
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286184
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 8 Nov 2016 00:34:06 +0000 (00:34 +0000)]
GlobalISel: constrain PHI registers on AArch64.
Self-referencing PHI nodes need their destination operands to be constrained
because nothing else is likely to do so. For now we just pick a register class
naively.
Patch mostly by Ahmed again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286183
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 7 Nov 2016 23:43:07 +0000 (23:43 +0000)]
[LTO] Add error message on IO error in compileOptimizedToFile.
(No testcase because it's difficult to force an error here.)
Differential Revision: https://reviews.llvm.org/D26371
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286177
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 7 Nov 2016 23:13:59 +0000 (23:13 +0000)]
[AArch64] Remove dead check prefixes after r286110. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286174
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 7 Nov 2016 23:13:55 +0000 (23:13 +0000)]
[AArch64] Rename test to reflect changes after r286110. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286173
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Mon, 7 Nov 2016 23:12:13 +0000 (23:12 +0000)]
[opt-viewer] Avoid division by zero
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286172
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Mon, 7 Nov 2016 23:04:50 +0000 (23:04 +0000)]
[AMDGPU] Allow hoisting of comparisons out of a loop and eliminate condition copies
Codegen prepare sinks comparisons close to a user is we have only one register
for conditions. For AMDGPU we have many SGPRs capable to hold vector conditions.
Changed BE to report we have many condition registers. That way IR LICM pass
would hoist an invariant comparison out of a loop and codegen prepare will not
sink it.
With that done a condition is calculated in one block and used in another.
Current behavior is to store workitem's condition in a VGPR using v_cndmask
and then restore it with yet another v_cmp instruction from that v_cndmask's
result. To mitigate the issue a forward propagation of a v_cmp 64 bit result
to an user is implemented. Additional side effect of this is that we may
consume less VGPRs in a cost of more SGPRs in case if holding of multiple
conditions is needed, and that is a clear win in most cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286171
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Mon, 7 Nov 2016 22:41:13 +0000 (22:41 +0000)]
[OptDiag, opt-viewer] Save callee's location and display as link
With this we get a new field in the YAML record if the value being
streamed out has a debug location. For examples, please see the changes
to the tests.
This is then used in opt-viewer to display a link for the callee
function in the inlining remarks.
Differential Revision: https://reviews.llvm.org/D26366
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286169
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjin Sijaric [Mon, 7 Nov 2016 22:39:02 +0000 (22:39 +0000)]
[AArch64] Transfer memory operands when lowering vector load/store intrinsics
Summary:
Some vector loads and stores generated from AArch64 intrinsics alias each other
unnecessarily, preventing better scheduling. We just need to transfer memory
operands during lowering.
Reviewers: mcrosier, t.p.northover, jmolloy
Subscribers: aemerson, rengolin, llvm-commits
Differential Revision: https://reviews.llvm.org/D26313
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286168
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 7 Nov 2016 22:33:13 +0000 (22:33 +0000)]
[docs] Add a pointer to ExitOnError to the discussion of handleErrors in the
programmer's manual.
ExitOnError is often a better alternative to handleErrors for tool code. This
patch makes it easier to find the ExitOnError discussion when reading the
handleErrors section.
Thanks to Peter Collingbourne for the suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286167
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 7 Nov 2016 22:17:37 +0000 (22:17 +0000)]
[TRE] Remove dead code
Address review by Eli Friedman on rL286147.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286165
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 7 Nov 2016 22:14:09 +0000 (22:14 +0000)]
[doc] Add documentation about how to use a monorepo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286163
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 7 Nov 2016 22:13:38 +0000 (22:13 +0000)]
Add experimental support for unofficial monorepo-like directory layout
Summary:
This allows to have clang and llvm and the other subprojects
side-by-side instead of nested. This can be used with the monorepo or
multiple repos.
It will help having a single set of sources checked out but allows to
have a build directory with llvm and another one with llvm+clang.
Basically it abstracts LLVM_EXTERNAL_xxxx_SOURCE_DIR making it more
convenient by adopting a convention.
Reviewers: bogner, beanz, jlebar
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D26365
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286162
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Mon, 7 Nov 2016 22:00:48 +0000 (22:00 +0000)]
[WebAssembly] Emit a BasePointer when we have overly-aligned stack objects
Because we shift the stack pointer by an unknown amount, we need an
additional pointer. In the case where we have variable-size objects
as well, we can't reuse the frame pointer, thus three pointers.
Patch by Jacob Gravelle
Differential Revision: https://reviews.llvm.org/D26263
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286160
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Mon, 7 Nov 2016 21:59:40 +0000 (21:59 +0000)]
Reset debug loc to OldInduction in InnerLoopVectorizer::createInductionVariable. (NFC)
This is to prevent SetInsertionPoint from setting debug loc to Latch->getTerminator().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286159
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 7 Nov 2016 21:56:04 +0000 (21:56 +0000)]
[lib/Object] Rename elf_hash to hashSysV.
This is more clear, as we have also GNU hash these days..
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286157
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 7 Nov 2016 21:06:20 +0000 (21:06 +0000)]
[lit] Print negative exit codes on Windows in hex
Negative exit codes are usually exceptions. They're easier to recognize
in hex. Compare -
1073741502 to 0xc0000142.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286150
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 7 Nov 2016 21:01:49 +0000 (21:01 +0000)]
Avoid tail recursion elimination across calls with operand bundles
Summary:
In some specific scenarios with well understood operand bundle types
(like `"deopt"`) it may be possible to go ahead and convert recursion to
iteration, but TailRecursionElimination does not have that logic today
so avoid doing the right thing for now.
I need some input on whether `"funclet"` operand bundles should also
block tail recursion elimination. If not, I'll allow TRE across calls
with `"funclet"` operand bundles and add a test case.
Reviewers: rnk, majnemer, nlewycky, ahatanak
Subscribers: mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D26270
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286147
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 7 Nov 2016 21:01:42 +0000 (21:01 +0000)]
[lib/Object] Modernize. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286146
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Mon, 7 Nov 2016 21:00:10 +0000 (21:00 +0000)]
Use -fsanitize-recover instead of -mllvm -msan-keep-going.
Summary: Use -fsanitize-recover instead of -mllvm -msan-keep-going.
Reviewers: eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26352
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286145
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 7 Nov 2016 20:40:16 +0000 (20:40 +0000)]
Add tests for r286139.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286141
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 7 Nov 2016 20:35:02 +0000 (20:35 +0000)]
Fix `git-llvm` script to handle `git worktree` setups correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286140
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 7 Nov 2016 20:34:16 +0000 (20:34 +0000)]
Disallow StringRef assignment from temporary std::strings.
Similar to r283798, this prevents accidentally referring to temporary
storage that goes out of scope by the end of the statement:
someStringRef = getStringByValue();
someStringRef = (Twine("-") + otherString).str();
Note that once again the constructor still has this problem:
StringRef someStringRef = getStringByValue();
because once again we occasionally rely on this in calls:
takesStringRef(getStringByValue());
takesStringRef(Twine("-") + otherString);
Still, it's a step.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286139
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 7 Nov 2016 20:00:47 +0000 (20:00 +0000)]
Add some facilities to work with a git monorepo (experimental setup)
Add a new script in llvm/utils/git-svn/. When present in the $PATH,
it enables a `git llvm` command. It is providing at this
point only the ability to push from the git monorepo: `git llvm push`.
It is intended to evolves with more features, for instance I plan on
features like `git llvm show r284955` to help working with sequential
revision numbers.
The push feature is taken from Justin Lebar's script available here:
https://github.com/jlebar/llvm-repo-tools/
Differential Revision: https://reviews.llvm.org/D26334
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286138
91177308-0d34-0410-b5e6-
96231b3b80d8