platform/upstream/llvm.git
7 years ago[AVR] Add the AVRMCInstLower class
Dylan McKay [Fri, 7 Oct 2016 06:13:09 +0000 (06:13 +0000)]
[AVR] Add the AVRMCInstLower class

Summary:
This class deals with the lowering of CodeGen `MachineInstr` objects to
MC `MCInst` objects.

Reviewers: kparzysz, arsenm

Subscribers: wdng, beanz, japaric, mgorny

Differential Revision: https://reviews.llvm.org/D25269

llvm-svn: 283522

7 years agoAMDGPU: Change check prefix in test
Matt Arsenault [Fri, 7 Oct 2016 03:55:04 +0000 (03:55 +0000)]
AMDGPU: Change check prefix in test

llvm-svn: 283521

7 years ago[lit] Don't assume you'll find debugserver
Hal Finkel [Fri, 7 Oct 2016 02:26:41 +0000 (02:26 +0000)]
[lit] Don't assume you'll find debugserver

On Linux, there is no "debugserver" process, and the RUN-line substitution will
fail if you try to substitute '%debugserver' with None.

Fixes PR30492.

llvm-svn: 283520

7 years ago[llvm-opt-report] Left justify unrolling counts, etc.
Hal Finkel [Fri, 7 Oct 2016 02:01:03 +0000 (02:01 +0000)]
[llvm-opt-report] Left justify unrolling counts, etc.

In the left part of the reports, we have things like U<number>; if some of
these numbers use more digits than others, we don't want a space in between the
U and the start of the number. Instead, the space should come afterward. This
way it is clear that the number goes with the U and not any other optimization
indicator that might come later on the line.

Tests committed in r283518.

llvm-svn: 283519

7 years ago[llvm-opt-report] Left justify unrolling counts, etc.
Hal Finkel [Fri, 7 Oct 2016 01:57:06 +0000 (01:57 +0000)]
[llvm-opt-report] Left justify unrolling counts, etc.

In the left part of the reports, we have things like U<number>; if some of
these numbers use more digits than others, we don't want a space in between the
U and the start of the number. Instead, the space should come afterward. This
way it is clear that the number goes with the U and not any other optimization
indicator that might come later on the line.

llvm-svn: 283518

7 years ago[SimplifyCFG] Correctly test for unconditional branches in GetCaseResults
David Majnemer [Fri, 7 Oct 2016 01:38:35 +0000 (01:38 +0000)]
[SimplifyCFG] Correctly test for unconditional branches in GetCaseResults

GetCaseResults assumed that a terminator with one successor was an
unconditional branch.  This is not necessarily the case, it could be a
cleanupret.

Strengthen the check by querying whether or not the terminator is
exceptional.

llvm-svn: 283517

7 years ago[llvm-opt-report] Use -no-demangle to disable demangling
Hal Finkel [Fri, 7 Oct 2016 01:30:59 +0000 (01:30 +0000)]
[llvm-opt-report] Use -no-demangle to disable demangling

As this is intended to be a user-facing option, -no-demangle seems much better
than -demangle=0. Add testing for the option.

llvm-svn: 283516

7 years agoTarget: Remove unused patterns and transforms. NFC.
Peter Collingbourne [Fri, 7 Oct 2016 00:30:49 +0000 (00:30 +0000)]
Target: Remove unused patterns and transforms. NFC.

llvm-svn: 283515

7 years ago[Hexagon] NFC Removing 'V4_' prefix from duplex instruction names.
Colin LeMahieu [Fri, 7 Oct 2016 00:15:07 +0000 (00:15 +0000)]
[Hexagon] NFC Removing 'V4_' prefix from duplex instruction names.

llvm-svn: 283514

7 years ago[LV] Remove triples from target-independent vectorizer tests. NFC.
Michael Kuperstein [Thu, 6 Oct 2016 23:57:25 +0000 (23:57 +0000)]
[LV] Remove triples from target-independent vectorizer tests. NFC.

Vectorizer tests in the target-independent directory should not have a target
triple. If a test really needs to query a specific backend, it belongs in the
right target subdirectory (which "REQUIRES" the right backend). Otherwise, it
should not specify a triple.

llvm-svn: 283512

7 years ago[ubsan] More 0 -> nullptr conversions (NFC)
Vedant Kumar [Thu, 6 Oct 2016 23:41:57 +0000 (23:41 +0000)]
[ubsan] More 0 -> nullptr conversions (NFC)

llvm-svn: 283511

7 years agoRevert "Add a static_assert to enforce that parameters to llvm::format() are not...
Mehdi Amini [Thu, 6 Oct 2016 23:41:49 +0000 (23:41 +0000)]
Revert "Add a static_assert to enforce that parameters to llvm::format() are not totally unsafe"

This reverts commit r283509, clang is hitting the assert.

llvm-svn: 283510

7 years agoAdd a static_assert to enforce that parameters to llvm::format() are not totally...
Mehdi Amini [Thu, 6 Oct 2016 23:26:29 +0000 (23:26 +0000)]
Add a static_assert to enforce that parameters to llvm::format() are not totally unsafe

Summary:
I had for the second time today a bug where llvm::format("%s", Str)
was called with Str being a StringRef. The Linux and MacOS bots were
fine, but windows having different calling convention, it printed
garbage.

Instead we can catch this at compile-time: it is never expected to
call a C vararg printf-like function with non scalar type I believe.

Reviewers: bogner, Bigcheese, dexonsmith

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25266

llvm-svn: 283509

7 years agoPR25890: Fix incoherent error handling in PerformImplicitConversion and
Richard Smith [Thu, 6 Oct 2016 23:12:58 +0000 (23:12 +0000)]
PR25890: Fix incoherent error handling in PerformImplicitConversion and
CheckSingleAssignmentConstraints. These no longer produce ExprError() when they
have not emitted an error, and reliably inform the caller when they *have*
emitted an error.

This fixes some serious issues where we would fail to emit any diagnostic for
invalid code and then attempt to emit code for an invalid AST, and conversely
some issues where we would emit two diagnostics for the same problem.

llvm-svn: 283508

7 years ago[Hexagon] NFC. Canonicalizing absolute address instruction names.
Colin LeMahieu [Thu, 6 Oct 2016 23:02:11 +0000 (23:02 +0000)]
[Hexagon] NFC. Canonicalizing absolute address instruction names.

llvm-svn: 283507

7 years ago[ubsan] 0 -> nullptr (NFC)
Vedant Kumar [Thu, 6 Oct 2016 22:58:45 +0000 (22:58 +0000)]
[ubsan] 0 -> nullptr (NFC)

llvm-svn: 283506

7 years agoDelete some dead code in SelectionDAG (NFC)
Vedant Kumar [Thu, 6 Oct 2016 22:53:43 +0000 (22:53 +0000)]
Delete some dead code in SelectionDAG (NFC)

Differential Revision: https://reviews.llvm.org/D24435

llvm-svn: 283505

7 years agoAdd an empty DBI stream.
Rui Ueyama [Thu, 6 Oct 2016 22:52:01 +0000 (22:52 +0000)]
Add an empty DBI stream.

llvm-svn: 283504

7 years ago[WebAssemby] Implement block signatures.
Dan Gohman [Thu, 6 Oct 2016 22:29:32 +0000 (22:29 +0000)]
[WebAssemby] Implement block signatures.

Per spec changes, this implements block signatures, and adds just enough
logic to produce correct block signatures at the ends of functions.

Differential Revision: https://reviews.llvm.org/D25144

llvm-svn: 283503

7 years ago[WebAssembly] Remove loop's bottom label.
Dan Gohman [Thu, 6 Oct 2016 22:10:23 +0000 (22:10 +0000)]
[WebAssembly] Remove loop's bottom label.

Per spec changes, loop constructs no longer have a bottom label.

https://reviews.llvm.org/D25118

llvm-svn: 283502

7 years ago[WebAssembly] Remove the output operand from stores.
Dan Gohman [Thu, 6 Oct 2016 22:08:28 +0000 (22:08 +0000)]
[WebAssembly] Remove the output operand from stores.

Per spec changes, store instructions in WebAssembly no longer have a return
value. Update the instruction descriptions.

Differential Revision: https://reviews.llvm.org/D25122

llvm-svn: 283501

7 years agoPreserve the debug location when CodeGenPrepare sinks a compare instruction into the
Wolfgang Pieb [Thu, 6 Oct 2016 21:43:45 +0000 (21:43 +0000)]
Preserve the debug location when CodeGenPrepare sinks a compare instruction into the
basic block of a user.

Patch by Andrea DiBiagio.

Differential Revision: https://reviews.llvm.org/D24632

llvm-svn: 283500

7 years ago[analyzer] Add explanation why analyzer report is not generated (fix for PR12421).
Anton Yartsev [Thu, 6 Oct 2016 21:42:21 +0000 (21:42 +0000)]
[analyzer] Add explanation why analyzer report is not generated (fix for PR12421).

Currently if the path diagnostic consumer (e.g HTMLDiagnostics and PlistDiagnostics) do not support cross file diagnostics then the path diagnostic report is silently omitted in the case of cross file diagnostics. The patch adds a little verbosity to Clang in this case.
The patch also adds help entry for the "--analyzer-output" driver option.

llvm-svn: 283499

7 years agoAdd another .def file to module map to fix modules buildbot's displeasure.
Richard Smith [Thu, 6 Oct 2016 21:31:04 +0000 (21:31 +0000)]
Add another .def file to module map to fix modules buildbot's displeasure.

llvm-svn: 283498

7 years agodisable TSAN tests on macOS i386
Todd Fiala [Thu, 6 Oct 2016 21:30:33 +0000 (21:30 +0000)]
disable TSAN tests on macOS i386

These are erroring out on macOS i386.

Tracked by:
rdar://28659145

llvm-svn: 283497

7 years agoHandle *_EXTEND_VECTOR_INREG during Integer Legalization
Pirama Arumuga Nainar [Thu, 6 Oct 2016 21:27:05 +0000 (21:27 +0000)]
Handle *_EXTEND_VECTOR_INREG during Integer Legalization

Summary:
These nodes need legalization for 3-element vectors.  This commit
handles the legalization and adds tests for zext and sext.

This fixes PR30614.

Reviewers: RKSimon, srhines

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25268

llvm-svn: 283496

7 years ago[coroutines] Fix co_return statement for initializer list arguments
Eric Fiselier [Thu, 6 Oct 2016 21:23:38 +0000 (21:23 +0000)]
[coroutines] Fix co_return statement for initializer list arguments

Summary:
Previously the statement `co_return {42}` would be transformed into `P.return_void()`, since the type of `{42}` is represented as `void` by Clang.

This patch fixes the bug by checking for `InitListExpr` arguments and transforming them accordingly.

Reviewers: majnemer, GorNishanov, rsmith

Subscribers: mehdi_amini, cfe-commits

Differential Revision: https://reviews.llvm.org/D25296

llvm-svn: 283495

7 years agoConvert UniqueCStringMap to use StringRef.
Zachary Turner [Thu, 6 Oct 2016 21:22:44 +0000 (21:22 +0000)]
Convert UniqueCStringMap to use StringRef.

llvm-svn: 283494

7 years agoxfail TestReportData.py on i386
Todd Fiala [Thu, 6 Oct 2016 21:16:37 +0000 (21:16 +0000)]
xfail TestReportData.py on i386

Tracked by:
rdar://28658860

llvm-svn: 283493

7 years agoxfail TestQueues on macOS
Todd Fiala [Thu, 6 Oct 2016 21:07:45 +0000 (21:07 +0000)]
xfail TestQueues on macOS

This test is failing on CI.  I cannot get it to fail on my
local setup.

Tracked by:
rdar://28658529

llvm-svn: 283492

7 years agoFix GetDisplayName when only a demangled name is available
Francis Ricci [Thu, 6 Oct 2016 20:41:11 +0000 (20:41 +0000)]
Fix GetDisplayName when only a demangled name is available

Summary:
GetDisplayDemangledName will already return a ConstString() when
there is neither a mangled name or a demangled name, so we don't need to special
case here. This will fix GetDisplayName in cases where m_mangled contains
only a demangled name and not a mangled name.

Reviewers: clayborg, granata.enrico, sas

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D25201

llvm-svn: 283491

7 years ago[PGO] Create weak alias for the renamed Comdat function
Rong Xu [Thu, 6 Oct 2016 20:38:13 +0000 (20:38 +0000)]
[PGO] Create weak alias for the renamed Comdat function

Add a weak alias to the renamed Comdat function in IR level instrumentation,
using it's original name. This ensures the same behavior w/ and w/o IR
instrumentation, even for non standard conforming code.

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

llvm-svn: 283490

7 years ago[modules] Be sure to emit local specializations of imported templates, even if
Richard Smith [Thu, 6 Oct 2016 20:30:51 +0000 (20:30 +0000)]
[modules] Be sure to emit local specializations of imported templates, even if
the resulting specialization is not referenced by the rest of the AST. This
both avoids performing unnecessary reinstantiations in downstream users of the
AST file and fixes a bug (breaking modules self-host right now) where we would
sometimes fail to emit a definition of a class template specialization if we
imported just a declaration of it from elsewhere (see new testcase for reduced
example).

llvm-svn: 283489

7 years agoRemove useless function.
Rui Ueyama [Thu, 6 Oct 2016 20:04:54 +0000 (20:04 +0000)]
Remove useless function.

llvm-svn: 283488

7 years ago[Sema] Replace smart quote with "'" in comment.
Justin Lebar [Thu, 6 Oct 2016 19:47:56 +0000 (19:47 +0000)]
[Sema] Replace smart quote with "'" in comment.

Looks like the smart quote was copy/pasted from the C++ standard.

The smart quote was not encoded as valid UTF-8 (?), even though vim was
detecting the file as UTF-8.  This broke the clang-format Python script,
which tried to read the file using the same encoding as vim detected.

llvm-svn: 283487

7 years ago[X86] Preserve BasePtr for LEA64_32r
Michael Kuperstein [Thu, 6 Oct 2016 19:31:27 +0000 (19:31 +0000)]
[X86] Preserve BasePtr for LEA64_32r

When replacing FrameIndex with BasePtr, we must preserve BasePtr for
LEA64_32r since BasePtr is used later for stack adjustment if it is
the same as StackPtr.

Patch by H.J Lu <hjl.tools@gmail.com>

Differential Revision: https://reviews.llvm.org/D23575

llvm-svn: 283486

7 years ago[X86][SSE] Add f16/f80/f128 vector sitofp test cases
Simon Pilgrim [Thu, 6 Oct 2016 19:29:25 +0000 (19:29 +0000)]
[X86][SSE] Add f16/f80/f128 vector sitofp test cases

As discussed on D23808

llvm-svn: 283485

7 years agoxfail TestSBTypeTypeClass.py on macOS i386
Todd Fiala [Thu, 6 Oct 2016 19:23:29 +0000 (19:23 +0000)]
xfail TestSBTypeTypeClass.py on macOS i386

Tracked by:
rdar://28656677

llvm-svn: 283484

7 years agoxfail TestDataFormatterNSIndexPath.py on macOS i386
Todd Fiala [Thu, 6 Oct 2016 19:18:48 +0000 (19:18 +0000)]
xfail TestDataFormatterNSIndexPath.py on macOS i386

Tracked by:
rdar://28656605

llvm-svn: 283483

7 years agoxfail TestExec.py on macOS i386
Todd Fiala [Thu, 6 Oct 2016 19:12:05 +0000 (19:12 +0000)]
xfail TestExec.py on macOS i386

Tracked by:
rdar://28656532

llvm-svn: 283482

7 years agoxfail TestDiagnoseDereferenceFunctionReturn.py on macOS i386
Todd Fiala [Thu, 6 Oct 2016 19:04:58 +0000 (19:04 +0000)]
xfail TestDiagnoseDereferenceFunctionReturn.py on macOS i386

Tracked by:
rdar://28656408

llvm-svn: 283481

7 years ago[DAG] Generalize build_vector -> vector_shuffle combine for more than 2 inputs
Michael Kuperstein [Thu, 6 Oct 2016 18:58:24 +0000 (18:58 +0000)]
[DAG] Generalize build_vector -> vector_shuffle combine for more than 2 inputs

This generalizes the build_vector -> vector_shuffle combine to support any
number of inputs. The idea is to create a binary tree of shuffles, where
the first layer performs pairwise shuffles of the input vectors placing each
input element into the correct lane, and the rest of the tree blends these
shuffles together.

This doesn't try to be smart and create any sort of "optimal" shuffles.
The assumption is that even a "poor" shuffle sequence is better than extracting
and inserting the elements one by one.

Differential Revision: https://reviews.llvm.org/D24683

llvm-svn: 283480

7 years agoStringRef::front asserts on empty strings, causing "break modify -c ''" to assert.
Jim Ingham [Thu, 6 Oct 2016 18:57:30 +0000 (18:57 +0000)]
StringRef::front asserts on empty strings, causing "break modify -c ''" to assert.

Added a check for empty at the point where we were going to crash.

<rdar://problem/28654032>

llvm-svn: 283479

7 years agoRevert "Add -strip-nonlinetable-debuginfo capability"
Michael Ilseman [Thu, 6 Oct 2016 18:30:26 +0000 (18:30 +0000)]
Revert "Add -strip-nonlinetable-debuginfo capability"

This reverts commit r283473.

Reverted until review is completed.

llvm-svn: 283478

7 years agoxfail TestDarwinLogBasic.py for i386 macOS
Todd Fiala [Thu, 6 Oct 2016 18:25:54 +0000 (18:25 +0000)]
xfail TestDarwinLogBasic.py for i386 macOS

Tracked by:
rdar://28655626

llvm-svn: 283477

7 years agoAMDGPU: Don't fold undef uses or copies with implicit uses
Matt Arsenault [Thu, 6 Oct 2016 18:12:13 +0000 (18:12 +0000)]
AMDGPU: Don't fold undef uses or copies with implicit uses

llvm-svn: 283476

7 years agoAMDGPU: Remove scheduling info from si_mask_branch
Matt Arsenault [Thu, 6 Oct 2016 18:12:07 +0000 (18:12 +0000)]
AMDGPU: Remove scheduling info from si_mask_branch

llvm-svn: 283475

7 years agoAdd bound violation handling for Intel(R) Memory Protection Extensions (Intel(R)...
Valentina Giusti [Thu, 6 Oct 2016 18:05:12 +0000 (18:05 +0000)]
Add bound violation handling for Intel(R) Memory Protection Extensions (Intel(R) MPX)

Summary:
This patch adds support for handling the SIGSEGV signal with 'si_code ==
SEGV_BNDERR', which is thrown when a bound violation is caught by the
Intel(R) MPX technology.

Differential Revision: https://reviews.llvm.org/D25329

llvm-svn: 283474

7 years agoAdd -strip-nonlinetable-debuginfo capability
Michael Ilseman [Thu, 6 Oct 2016 17:58:38 +0000 (17:58 +0000)]
Add -strip-nonlinetable-debuginfo capability

This adds a new function to DebugInfo.cpp that takes an llvm::Module
as input and removes all debug info metadata that is not directly
needed for line tables, thus effectively stripping all type and
variable information from the module.

The primary motivation for this feature was the bitcode work flow
(cf. http://lists.llvm.org/pipermail/llvm-dev/2016-June/100643.html
for more background). This is not wired up yet, but will be in
subsequent patches.  For testing, the new functionality is exposed to
opt with a -strip-nonlinetable-debuginfo option.

The secondary use-case (and one that works right now!) is as a
reduction pass in bugpoint. I added two new bugpoint options
(-disable-strip-debuginfo and -disable-strip-debug-types) to control
the new features. By default it will first attempt to remove all debug
information, then only the type info, and then proceed to hack at any
remaining MDNodes.

llvm-svn: 283473

7 years agoMatch printf field width arg and type
Ed Maste [Thu, 6 Oct 2016 17:55:22 +0000 (17:55 +0000)]
Match printf field width arg and type

A '*' as a field width or precision specifies that the field width or
precision is supplied by an int argument.

llvm-svn: 283472

7 years agoAMDGPU: Remove leftover implicit operands when folding immediates
Matt Arsenault [Thu, 6 Oct 2016 17:54:30 +0000 (17:54 +0000)]
AMDGPU: Remove leftover implicit operands when folding immediates

When constant folding an operation to a copy or an immediate
mov, the implicit uses/defs of the old instruction were left behind,
e.g. replacing v_or_b32 left the implicit exec use on the new copy.

llvm-svn: 283471

7 years agoReapply "AMDGPU: Support using tablegened MC pseudo expansions"
Matt Arsenault [Thu, 6 Oct 2016 17:19:11 +0000 (17:19 +0000)]
Reapply "AMDGPU: Support using tablegened MC pseudo expansions"

Fix bad merge

llvm-svn: 283470

7 years agoRevert "AMDGPU: Support using tablegened MC pseudo expansions"
Matt Arsenault [Thu, 6 Oct 2016 17:08:01 +0000 (17:08 +0000)]
Revert "AMDGPU: Support using tablegened MC pseudo expansions"

llvm-svn: 283469

7 years agoThese test cases don't test different debug info formats.
Jim Ingham [Thu, 6 Oct 2016 17:01:00 +0000 (17:01 +0000)]
These test cases don't test different debug info formats.

llvm-svn: 283468

7 years agoAMDGPU: Support using tablegened MC pseudo expansions
Matt Arsenault [Thu, 6 Oct 2016 16:56:41 +0000 (16:56 +0000)]
AMDGPU: Support using tablegened MC pseudo expansions

Make the necessary refactorings to make use of PseudoInstExpansion

llvm-svn: 283467

7 years ago[ubsan] Turn on 'Has CXXABI' to enable support for -fsanitize=vptr on Darwin
Vedant Kumar [Thu, 6 Oct 2016 16:45:40 +0000 (16:45 +0000)]
[ubsan] Turn on 'Has CXXABI' to enable support for -fsanitize=vptr on Darwin

Differential Revision: https://reviews.llvm.org/D24990

llvm-svn: 283466

7 years ago[docs] Add PR to Lexicon
Brian Gesiak [Thu, 6 Oct 2016 16:39:22 +0000 (16:39 +0000)]
[docs] Add PR to Lexicon

Summary:
The acronym PR could be ambiguous to some users, especially those who
are used to interpreting it as GitHub's "pull request".

Reviewers: ddunbar, jordan_rose, void, beanz

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25331

llvm-svn: 283465

7 years agoBranchRelaxation: Support expanding unconditional branches
Matt Arsenault [Thu, 6 Oct 2016 16:20:41 +0000 (16:20 +0000)]
BranchRelaxation: Support expanding unconditional branches

AMDGPU needs to expand unconditional branches in a new
block with an indirect branch.

llvm-svn: 283464

7 years ago[Hexagon] Avoid replacing full regs with subregisters in tied operands
Krzysztof Parzyszek [Thu, 6 Oct 2016 16:18:04 +0000 (16:18 +0000)]
[Hexagon] Avoid replacing full regs with subregisters in tied operands

Doing so will result in the two-address pass generating incorrect code.

llvm-svn: 283463

7 years agoBranchRelaxation: Account for function alignment
Matt Arsenault [Thu, 6 Oct 2016 16:00:58 +0000 (16:00 +0000)]
BranchRelaxation: Account for function alignment

llvm-svn: 283462

7 years agoImprove test for Intel(R) MPX registers.
Valentina Giusti [Thu, 6 Oct 2016 15:49:10 +0000 (15:49 +0000)]
Improve test for Intel(R) MPX registers.

Summary:
Let the inferior test code determine if CPU and kernel support Intel(R)
MPX and cleanup test script.

Differential Revision: https://reviews.llvm.org/D25328

llvm-svn: 283461

7 years ago[OpenMP] Check if the template specialization is mappable instead of specialized...
David Sheinkman [Thu, 6 Oct 2016 15:47:36 +0000 (15:47 +0000)]
[OpenMP] Check if the template specialization is mappable instead of specialized template Differential Revision: https://reviews.llvm.org/D25252

llvm-svn: 283460

7 years agoMove AArch64BranchRelaxation to generic code
Matt Arsenault [Thu, 6 Oct 2016 15:38:53 +0000 (15:38 +0000)]
Move AArch64BranchRelaxation to generic code

llvm-svn: 283459

7 years agoAArch64: Move remaining target specific BranchRelaxation bits to TII
Matt Arsenault [Thu, 6 Oct 2016 15:38:09 +0000 (15:38 +0000)]
AArch64: Move remaining target specific BranchRelaxation bits to TII

llvm-svn: 283458

7 years ago[X86] Fix intel syntax push parsing bug
Nirav Dave [Thu, 6 Oct 2016 15:28:08 +0000 (15:28 +0000)]
[X86] Fix intel syntax push parsing bug

Change erroneous parsing of push immediate instructions in intel syntax
to default to pointer size by rewriting into the ATT style for matching.

This fixes PR22028.

Reviewers: majnemer, rnk

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25288

llvm-svn: 283457

7 years agoRevert "Use StringRef in LTOModule implementation (NFC)"
Mehdi Amini [Thu, 6 Oct 2016 15:12:22 +0000 (15:12 +0000)]
Revert "Use StringRef in LTOModule implementation (NFC)"

This reverts commit r282997, a windows bot is asserting in
one test apparently.

llvm-svn: 283456

7 years agoCentralize sh_entsize checking.
Rafael Espindola [Thu, 6 Oct 2016 15:08:10 +0000 (15:08 +0000)]
Centralize sh_entsize checking.

llvm-svn: 283455

7 years agoRefactor to use getSectionContentsAsArray.
Rafael Espindola [Thu, 6 Oct 2016 14:47:04 +0000 (14:47 +0000)]
Refactor to use getSectionContentsAsArray.

This centralizes quite a bit of error checking.

llvm-svn: 283454

7 years agoRefactor duplicated typedefs. NFC.
Rafael Espindola [Thu, 6 Oct 2016 14:07:26 +0000 (14:07 +0000)]
Refactor duplicated typedefs. NFC.

llvm-svn: 283453

7 years agoMark issues 2514, 2519, 2536 and 2475 as done
Marshall Clow [Thu, 6 Oct 2016 13:59:18 +0000 (13:59 +0000)]
Mark issues 2514, 2519, 2536 and 2475 as done

llvm-svn: 283452

7 years agoGlobalISel: fix misuse of using declaration in test.
Tim Northover [Thu, 6 Oct 2016 13:57:31 +0000 (13:57 +0000)]
GlobalISel: fix misuse of using declaration in test.

Clang didn't diagnose it before. Oops.

llvm-svn: 283451

7 years ago[AMDGPU] Disassembler: print label names in branch instructions
Sam Kolton [Thu, 6 Oct 2016 13:46:08 +0000 (13:46 +0000)]
[AMDGPU] Disassembler: print label names in branch instructions

Summary: Add AMDGPUSymbolizer for finding names for labels from ELF symbol table.
Initialize MCObjectFileInfo with some default values.

Reviewers: vpykhtin, artem.tamazov, tstellarAMD

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye

Differential Revision: https://reviews.llvm.org/D24802

llvm-svn: 283450

7 years ago[RS4GC] Fix comment to show TODO. NFC
Anna Thomas [Thu, 6 Oct 2016 13:24:20 +0000 (13:24 +0000)]
[RS4GC] Fix comment to show TODO. NFC

llvm-svn: 283449

7 years agoAllocate after the early exit checks. NFC.
Vassil Vassilev [Thu, 6 Oct 2016 13:18:06 +0000 (13:18 +0000)]
Allocate after the early exit checks. NFC.

llvm-svn: 283448

7 years agoUse range loop. NFC.
Rafael Espindola [Thu, 6 Oct 2016 13:11:12 +0000 (13:11 +0000)]
Use range loop. NFC.

llvm-svn: 283447

7 years ago[RDF] Replace some expensive copies with references in range-based loops
Krzysztof Parzyszek [Thu, 6 Oct 2016 13:05:46 +0000 (13:05 +0000)]
[RDF] Replace some expensive copies with references in range-based loops

llvm-svn: 283446

7 years ago[RDF] Replace potentially unclear autos with real types
Krzysztof Parzyszek [Thu, 6 Oct 2016 13:05:13 +0000 (13:05 +0000)]
[RDF] Replace potentially unclear autos with real types

llvm-svn: 283445

7 years ago[modules] Allow VarDecls with initializers to use special var abbrev.
Vassil Vassilev [Thu, 6 Oct 2016 13:04:54 +0000 (13:04 +0000)]
[modules] Allow VarDecls with initializers to use special var abbrev.

Update storage sizes to fit the (past) changes in the VarDecl's data model.
Update some comments.

Patch partially reviewed by Richard Smith as part of https://reviews.llvm.org/D24508

llvm-svn: 283444

7 years ago[llvm-opt-report] Record VF, etc. correctly for multiple opts on one line
Hal Finkel [Thu, 6 Oct 2016 11:58:52 +0000 (11:58 +0000)]
[llvm-opt-report] Record VF, etc. correctly for multiple opts on one line

When there are multiple optimizations on one line, record the vectorization
factors, etc. correctly (instead of incorrectly substituting default values).

llvm-svn: 283443

7 years agoRevert "[ARM] Use __rt_div functions for divrem on Windows"
Diana Picus [Thu, 6 Oct 2016 11:24:29 +0000 (11:24 +0000)]
Revert "[ARM] Use __rt_div functions for divrem on Windows"

This reverts commit r283383 because it broke some of the bots:
undefined reference to ` __aeabi_uldivmod'

It affected (at least) clang-cmake-armv7-a15-selfhost,
clang-cmake-armv7-a15-selfhost and clang-native-arm-lnt.

llvm-svn: 283442

7 years ago[libcxx] Recover no-exceptions XFAILs - I
Asiri Rathnayake [Thu, 6 Oct 2016 11:15:41 +0000 (11:15 +0000)]
[libcxx] Recover no-exceptions XFAILs - I

First batch of changes to get some of these XFAILs working in the
no-exceptions libc++ variant.

Changed some XFAILs to UNSUPPORTED where the test is all about exception
handling. In other cases, used the test macros TEST_THROW and
TEST_HAS_NO_EXCEPTIONS to conditionally exclude those parts of the test
that concerns exception handling behaviour.

Reviewers: EricWF, mclow.lists

Differential revision: https://reviews.llvm.org/D24562

llvm-svn: 283441

7 years ago[llvm-opt-report] Print line numbers starting from 1
Hal Finkel [Thu, 6 Oct 2016 11:11:11 +0000 (11:11 +0000)]
[llvm-opt-report] Print line numbers starting from 1

Line numbers should start from 1, not 2.

llvm-svn: 283440

7 years agoTest commit access (NFC)
Henric Karlsson [Thu, 6 Oct 2016 10:58:41 +0000 (10:58 +0000)]
Test commit access (NFC)

llvm-svn: 283439

7 years ago[ESan] [MIPS] Fix workingset-signal-posix.cpp on MIPS
Sagar Thakur [Thu, 6 Oct 2016 10:21:42 +0000 (10:21 +0000)]
[ESan] [MIPS] Fix workingset-signal-posix.cpp on MIPS

Used uptr for __sanitizer_kernel_sigset_t.sig to avoid byte order issues on big endian systems

Reviewd by bruening.
Differential: D24332

llvm-svn: 283438

7 years agoAMDGPU: Partially fix reported code size for some instructions
Matt Arsenault [Thu, 6 Oct 2016 10:13:23 +0000 (10:13 +0000)]
AMDGPU: Partially fix reported code size for some instructions

These ones need to have the size on the pseudo instruction set for
getInstSizeInBytes to work correctly. These also have a statically
known size.

llvm-svn: 283437

7 years agoAdd test-cases which demontrate pr30561
Zvi Rackover [Thu, 6 Oct 2016 10:04:00 +0000 (10:04 +0000)]
Add test-cases which demontrate pr30561

llvm-svn: 283436

7 years ago[ESan][MIPS] Adds support for MIPS64
Sagar Thakur [Thu, 6 Oct 2016 09:58:11 +0000 (09:58 +0000)]
[ESan][MIPS] Adds support for MIPS64

With this patch 12 out of 13 tests are passing.

Reviewed by zhaoqin.
Differential: D23799

llvm-svn: 283435

7 years ago[ValueTracking] Teach computeKnownBits and ComputeNumSignBits to look through Extract...
Bjorn Pettersson [Thu, 6 Oct 2016 09:56:21 +0000 (09:56 +0000)]
[ValueTracking] Teach computeKnownBits and ComputeNumSignBits to look through ExtractElement.

Summary:
The computeKnownBits and ComputeNumSignBits functions in ValueTracking can now do a simple look-through of ExtractElement.

Reviewers: majnemer, spatel

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D24955

llvm-svn: 283434

7 years ago[EfficiencySanitizer] Adds shadow memory parameters for 40-bit virtual memory address.
Sagar Thakur [Thu, 6 Oct 2016 09:52:06 +0000 (09:52 +0000)]
[EfficiencySanitizer] Adds shadow memory parameters for 40-bit virtual memory address.

Adding 40-bit shadow memory parameters because MIPS64 uses 40-bit virtual memory addresses.

Reviewed by rengolin.
Differential: https://reviews.llvm.org/D23801

llvm-svn: 283433

7 years ago[Sema] Fix PR30520: Handle incomplete field types in transparent_union unions
Alex Lorenz [Thu, 6 Oct 2016 09:47:29 +0000 (09:47 +0000)]
[Sema] Fix PR30520: Handle incomplete field types in transparent_union unions

This commit fixes a crash that happens when clang is analyzing a
transparent_union attribute on a union which has a field with incomplete type.

rdar://28630028

Differential Revision: https://reviews.llvm.org/D25273

llvm-svn: 283432

7 years ago[ELF] Don't fail if undefined symbol is not used
Eugene Leviant [Thu, 6 Oct 2016 09:45:04 +0000 (09:45 +0000)]
[ELF] Don't fail if undefined symbol is not used

Differential revision: https://reviews.llvm.org/D25240

llvm-svn: 283431

7 years agoAdd missing -no-canonical-prefixes.
Benjamin Kramer [Thu, 6 Oct 2016 09:40:37 +0000 (09:40 +0000)]
Add missing -no-canonical-prefixes.

llvm-svn: 283430

7 years ago[ELF] Linker script: implement LOADADDR
Eugene Leviant [Thu, 6 Oct 2016 09:39:28 +0000 (09:39 +0000)]
[ELF] Linker script: implement LOADADDR

Differential revision: https://reviews.llvm.org/D24298

llvm-svn: 283429

7 years agoFix PR30440: Initialize FunctionTypeDepth in CXXNameMangler
Alex Lorenz [Thu, 6 Oct 2016 09:37:15 +0000 (09:37 +0000)]
Fix PR30440: Initialize FunctionTypeDepth in CXXNameMangler

This commit fixes PR 30440 by initializing CXXNameMangler's FunctionTypeDepth
in the two constructors added in r274222 (The commit that caused this
regression).

rdar://28455269

Differential Revision: https://reviews.llvm.org/D24932

llvm-svn: 283428

7 years agofix build on cygwin
Nuno Lopes [Thu, 6 Oct 2016 09:32:16 +0000 (09:32 +0000)]
fix build on cygwin
Cygwin has dlfcn.h, but no Dl_info

llvm-svn: 283427

7 years ago[ELF] - Make checks in ObjectFile<ELFT>::getSection() stricter.
George Rimar [Thu, 6 Oct 2016 09:17:55 +0000 (09:17 +0000)]
[ELF] - Make checks in ObjectFile<ELFT>::getSection() stricter.

This patch makes the check for null section stricter,
so it is only allowed for STT_SECTION symbols now.

Differential revision: https://reviews.llvm.org/D25231

llvm-svn: 283426

7 years ago[clang-move] Move comments which are associated with the moved class.
Haojian Wu [Thu, 6 Oct 2016 08:59:24 +0000 (08:59 +0000)]
[clang-move] Move comments which are associated with the moved class.

Reviewers: ioeric

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D25227

llvm-svn: 283425

7 years ago[clang-move] Cleanup around replacements.
Haojian Wu [Thu, 6 Oct 2016 08:29:32 +0000 (08:29 +0000)]
[clang-move] Cleanup around replacements.

Summary:
cleanup the remaining empty namespace after moving out the
class defintitions.

Reviewers: ioeric

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D25282

llvm-svn: 283424

7 years ago[ARM] Constant pool promotion - fix alignment calculation
James Molloy [Thu, 6 Oct 2016 07:56:00 +0000 (07:56 +0000)]
[ARM] Constant pool promotion - fix alignment calculation

Global variables are GlobalValues, so they have explicit alignment. Querying
DataLayout for the alignment was incorrect.

Testcase added.

llvm-svn: 283423

7 years ago[ARM] Improve testcase for r283323
James Molloy [Thu, 6 Oct 2016 07:44:05 +0000 (07:44 +0000)]
[ARM] Improve testcase for r283323

We can work around a shortcoming of FileCheck by using {{\[}} to match a square
bracket before a [[ sequence.

Thanks to Eli Friedman for the heads up!

llvm-svn: 283422