platform/upstream/llvm.git
5 years ago[FPEnv] Add constrained CEIL/FLOOR/ROUND/TRUNC intrinsics
Cameron McInally [Mon, 5 Nov 2018 15:59:49 +0000 (15:59 +0000)]
[FPEnv] Add constrained CEIL/FLOOR/ROUND/TRUNC intrinsics

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

llvm-svn: 346141

5 years ago[ThinLTO] Add an option to disable (thin)lto internalization.
Xin Tong [Mon, 5 Nov 2018 15:49:46 +0000 (15:49 +0000)]
[ThinLTO] Add an option to disable (thin)lto internalization.

Summary:
LTO and ThinLTO optimizes the IR differently.

One source of differences is the amount of internalizations that
can happen.

Add an option to enable/disable internalization so that other
differences can be studied in isolation. e.g. inlining.

There are other things lto and thinlto do differently, I will add
flags to enable/disable them as needed.

Reviewers: tejohnson, pcc, steven_wu

Subscribers: mehdi_amini, inglorion, steven_wu, dexonsmith, dang, llvm-commits

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

llvm-svn: 346140

5 years ago[TargetLowering] Begin generalizing TargetLowering::expandFP_TO_SINT support. NFCI.
Simon Pilgrim [Mon, 5 Nov 2018 15:49:09 +0000 (15:49 +0000)]
[TargetLowering] Begin generalizing TargetLowering::expandFP_TO_SINT support. NFCI.

Prior to initial work to add vector expansion support, remove assumptions that we're working on scalar types.

llvm-svn: 346139

5 years ago[InstCombine] add/adjust tests for select with fsub identity op; NFC
Sanjay Patel [Mon, 5 Nov 2018 15:45:01 +0000 (15:45 +0000)]
[InstCombine] add/adjust tests for select with fsub identity op; NFC

llvm-svn: 346138

5 years ago[NFCI][FPEnv] Split constrained intrinsic tests
Cameron McInally [Mon, 5 Nov 2018 15:28:10 +0000 (15:28 +0000)]
[NFCI][FPEnv] Split constrained intrinsic tests

The constrained intrinsic tests have grown in number. Split off
the FMA tests into their own file to reduce double coverage.

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

llvm-svn: 346137

5 years ago[InstCombine] add tests for select with FP identity op; NFC
Sanjay Patel [Mon, 5 Nov 2018 15:08:36 +0000 (15:08 +0000)]
[InstCombine] add tests for select with FP identity op; NFC

llvm-svn: 346136

5 years ago[Tooling] Correct the total number of files being processed when `filter` is provided.
Haojian Wu [Mon, 5 Nov 2018 15:08:00 +0000 (15:08 +0000)]
[Tooling] Correct the total number of files being processed when `filter` is provided.

Reviewers: ioeric

Subscribers: cfe-commits

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

llvm-svn: 346135

5 years ago[Inliner] Penalise inlining of calls with loops at Oz
David Green [Mon, 5 Nov 2018 14:54:34 +0000 (14:54 +0000)]
[Inliner] Penalise inlining of calls with loops at Oz

We currently seem to underestimate the size of functions with loops in them,
both in terms of absolute code size and in the difficulties of dealing with
such code. (Calls, for example, can be tail merged to further reduce
codesize). At -Oz, we can then increase code size by inlining small loops
multiple times.

This attempts to penalise functions with loops at -Oz by adding a CallPenalty
for each top level loop in the function. It uses LI (and hence DT) to calculate
the number of loops. As we are dealing with minsize, the inline threshold is
small and functions at this point should be relatively small, making the
construction of these cheap.

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

llvm-svn: 346134

5 years ago[Mips] Supplement long branch pseudo instructions
Stefan Maksimovic [Mon, 5 Nov 2018 14:37:41 +0000 (14:37 +0000)]
[Mips] Supplement long branch pseudo instructions

Expand on LONG_BRANCH_LUi and LONG_BRANCH_(D)ADDiu pseudo
instructions by creating variants which support
less operands/accept GPR64Opnds as their operand in order
to appease the machine verifier pass.

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

llvm-svn: 346133

5 years ago[NFC][ARM] Adding extra test for ARM CGP
Sam Parker [Mon, 5 Nov 2018 14:17:27 +0000 (14:17 +0000)]
[NFC][ARM] Adding extra test for ARM CGP

Added a reproducer that I received a while ago.

llvm-svn: 346132

5 years ago[Tooling] Add "-filter" option to AllTUsExecution
Haojian Wu [Mon, 5 Nov 2018 13:42:05 +0000 (13:42 +0000)]
[Tooling] Add "-filter" option to AllTUsExecution

Summary: We can run the tools on a subset files of compilation database.

Reviewers: ioeric

Subscribers: cfe-commits

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

llvm-svn: 346131

5 years agoReapply "Fix regression in behavior of clang -x c++-header -fmodule-name=XXX"
Benjamin Kramer [Mon, 5 Nov 2018 12:46:02 +0000 (12:46 +0000)]
Reapply "Fix regression in behavior of clang -x c++-header -fmodule-name=XXX"

This reverts commit r345963. We have a path forward now.

Original commit message:
The driver accidentally stopped passing the input filenames on to -cc1
in this mode due to confusion over what action was being requested.

This change also fixes a couple of crashes I encountered when passing
multiple files to such a -cc1 invocation.

llvm-svn: 346130

5 years agoFix build on sparc64-linux-gnu.
Martin Liska [Mon, 5 Nov 2018 12:27:43 +0000 (12:27 +0000)]
Fix build on sparc64-linux-gnu.

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

llvm-svn: 346129

5 years ago[AMDGPU] Fix the new atomic optimizer in pixel shaders.
Neil Henning [Mon, 5 Nov 2018 12:04:48 +0000 (12:04 +0000)]
[AMDGPU] Fix the new atomic optimizer in pixel shaders.

The new atomic optimizer I previously added in D51969 did not work
correctly when a pixel shader was using derivatives, and had helper
lanes active.

To fix this we add an llvm.amdgcn.ps.live call that guards a branch
around the entire atomic operation - ensuring that all helper lanes are
inactive within the wavefront when we compute our atomic results.

I've added a test case that can cause derivatives, and exposes the
problem.

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

llvm-svn: 346128

5 years ago[CMake] Expose opt-remark tooling through libOptRemarks.dylib
Francis Visoiu Mistrih [Mon, 5 Nov 2018 11:57:44 +0000 (11:57 +0000)]
[CMake] Expose opt-remark tooling through libOptRemarks.dylib

* Create an install target for it
* Add it under tools/opt-remarks
* Add an export file for the dylib
* Install the llvm-c/OptRemarks.h header
* Add an API to query its version

rdar://45458839

llvm-svn: 346127

5 years ago[ARM] Turn assert into condition in ARMCGP
Sam Parker [Mon, 5 Nov 2018 11:26:04 +0000 (11:26 +0000)]
[ARM] Turn assert into condition in ARMCGP

Turn the assert in PrepareConstants into a conditon so that we can
handle mul instructions with negative immediates.

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

llvm-svn: 346126

5 years ago[ARM][ARMCGP] Remove unecessary zexts and truncs
Sam Parker [Mon, 5 Nov 2018 10:58:37 +0000 (10:58 +0000)]
[ARM][ARMCGP] Remove unecessary zexts and truncs

r345840 slightly changed the way promotion happens which could
result in zext and truncs having the same source and destination
types. This fixes that issue.

We can now also remove the zext and trunc in the following case:
(zext (trunc (promoted op)), i32)

This means that we can no longer treat a value, that is only used by
a sink, to be safe to promote.

I've also added in some extra asserts and replaced a cast for a
dyn_cast.

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

llvm-svn: 346125

5 years ago[mips][msa] Fix broken test
Aleksandar Beserminji [Mon, 5 Nov 2018 10:22:51 +0000 (10:22 +0000)]
[mips][msa] Fix broken test

Test builtins-mips-msa-error.c wasn't reporting errors.
This patch fixes the test, so further test cases can be added.

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

llvm-svn: 346124

5 years agoFix breakage on FrontendTest by initializing new field on constructor
Kadir Cetinkaya [Mon, 5 Nov 2018 10:01:34 +0000 (10:01 +0000)]
Fix breakage on FrontendTest by initializing new field on constructor

llvm-svn: 346123

5 years agoExclude wasm target from Windows packaging due to PR39448
Hans Wennborg [Mon, 5 Nov 2018 09:31:43 +0000 (09:31 +0000)]
Exclude wasm target from Windows packaging due to PR39448

llvm-svn: 346122

5 years ago[NFC][x86][AArch64] extract-bits.ll: add test with 'ashr'.
Roman Lebedev [Mon, 5 Nov 2018 09:20:08 +0000 (09:20 +0000)]
[NFC][x86][AArch64] extract-bits.ll: add test with 'ashr'.

llvm-svn: 346121

5 years ago[hwasan] Fix stack-uar.c after rCRT345110
Fangrui Song [Mon, 5 Nov 2018 07:16:25 +0000 (07:16 +0000)]
[hwasan] Fix stack-uar.c after rCRT345110

Set -fno-discard-value-names so that the frame description string contains the variable name.

llvm-svn: 346120

5 years ago[DAGCombiner] Use tryFoldToZero to simplify some code and make it work correctly...
Craig Topper [Mon, 5 Nov 2018 05:53:06 +0000 (05:53 +0000)]
[DAGCombiner] Use tryFoldToZero to simplify some code and make it work correctly between LegalTypes and LegalOperations.

The original code avoided creating a zero vector after type legalization, but if we're after type legalization the type we have is legal. The real hazard we need to avoid is creating a build vector after op legalization. tryFoldToZero takes care of checking for this.

llvm-svn: 346119

5 years ago[DAGCombiner] Remove an unused argument from tryFoldToZero. NFC
Craig Topper [Mon, 5 Nov 2018 05:53:03 +0000 (05:53 +0000)]
[DAGCombiner] Remove an unused argument from tryFoldToZero. NFC

llvm-svn: 346118

5 years ago[AVR] Fix a backend bug that left extraneous operands after expansion
Dylan McKay [Mon, 5 Nov 2018 05:49:04 +0000 (05:49 +0000)]
[AVR] Fix a backend bug that left extraneous operands after expansion

This patch fixes a bug in the AVR FRMIDX expansion logic.

The expansion would leave a leftover operand from the original FRMIDX,
but now attached to a MOVWRdRr instruction. The MOVWRdRr instruction
did not expect this operand and so LLVM rejected the machine
instruction.

This would trigger an assertion:

    Assertion failed: ((isImpReg || Op.isRegMask() || MCID->isVariadic() ||
                        OpNo < MCID->getNumOperands() || isMetaDataOp) &&
                        "Trying to add an operand to a machine instr that is already done!"),
    function addOperand, file llvm/lib/CodeGen/MachineInstr.cpp

Tim fixed this so that now the FRMIDX is expanded correctly into
a well-formed MOVWRdRr.

Patch by Tim Neumann

llvm-svn: 346117

5 years ago[XRay] Update TSC math to handle wraparound
Dean Michael Berris [Mon, 5 Nov 2018 05:43:22 +0000 (05:43 +0000)]
[XRay] Update TSC math to handle wraparound

Summary:
Prior to this change, we can run into situations where the TSC we're
getting when exiting a function is less than the TSC we got when
entering it. This would sometimes cause the counter for cumulative call
times overflow, which was erroneously also being stored as a signed
64-bit integer.

This change addresses both these issues while adding provisions for
tracking CPU migrations. We do this because moving from one CPU to
another doesn't guarantee that the timestamp counter for some
architectures aren't guaranteed to be synchronised. For the moment, we
leave the provisions there until we can update the data format to
include the counting of CPU migrations we can catch.

We update the necessary tests as well, ensuring that our expectations
for the cycle accounting to be met in case of counter wraparound.

Reviewers: mboerger

Subscribers: llvm-commits

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

llvm-svn: 346116

5 years ago[X86] Custom type legalize v2i8/v2i16/v2i32 mul to use to pmuludq.
Craig Topper [Mon, 5 Nov 2018 05:02:12 +0000 (05:02 +0000)]
[X86] Custom type legalize v2i8/v2i16/v2i32 mul to use to pmuludq.

v2i8/v2i16/v2i32 are promoted to v2i64. pmuludq takes a v2i64 input and produces a v2i64 output. Since we don't about the upper bits of the type legalized multiply we can use the pmuludq to produce the multiply result for the bits we do care about.

llvm-svn: 346115

5 years ago[AVR] Disallow the LDDWRdPtrQ instruction with Z as the destination
Dylan McKay [Mon, 5 Nov 2018 05:00:44 +0000 (05:00 +0000)]
[AVR] Disallow the LDDWRdPtrQ instruction with Z as the destination

This is an AVR-specific workaround for a limitation of the register
allocator that only exposes itself on targets with high register
contention like AVR, which only has three pointer registers.

The three pointer registers are X, Y, and Z.
In most nontrivial functions, Y is reserved for the frame pointer,
as per the calling convention. This leaves X and Z. Some instructions,
such as LPM ("load program memory"), are only defined for the Z
register. Sometimes this just leaves X.

When the backend generates a LDDWRdPtrQ instruction with Z as the
destination pointer, it usually trips up the register allocator
with this error message:

  LLVM ERROR: ran out of registers during register allocation

This patch is a hacky workaround. We ban the LDDWRdPtrQ instruction
from ever using the Z register as an operand. This gives the
register allocator a bit more space to allocate, fixing the
regalloc exhaustion error.

Here is a description from the patch author Peter Nimmervoll

  As far as I understand the problem occurs when LDDWRdPtrQ uses
  the ptrdispregs register class as target register. This should work, but
  the allocator can't deal with this for some reason. So from my testing,
  it seams like (and I might be totally wrong on this) the allocator reserves
  the Z register for the ICALL instruction and then the register class
  ptrdispregs only has 1 register left and we can't use Y for source and
  destination. Removing the Z register from DREGS fixes the problem but
  removing Y register does not.

More information about the bug can be found on the avr-rust issue
tracker at https://github.com/avr-rust/rust/issues/37.

A bug has raised to track the removal of this workaround and a proper
fix; PR39553 at https://bugs.llvm.org/show_bug.cgi?id=39553.

Patch by Peter Nimmervoll

llvm-svn: 346114

5 years ago[analyzer] Restrict AnalyzerOptions' interface so that non-checker objects have to...
Kristof Umann [Mon, 5 Nov 2018 03:50:37 +0000 (03:50 +0000)]
[analyzer] Restrict AnalyzerOptions' interface so that non-checker objects have to be registered

One of the reasons why AnalyzerOptions is so chaotic is that options can be
retrieved from the command line whenever and wherever. This allowed for some
options to be forgotten for a looooooong time. Have you ever heard of
"region-store-small-struct-limit"? In order to prevent this in the future, I'm
proposing to restrict AnalyzerOptions' interface so that only checker options
can be retrieved without special getters. I would like to make every option be
accessible only through a getter, but checkers from plugins are a thing, so I'll
have to figure something out for that.

This also forces developers who'd like to add a new option to register it
properly in the .def file.

This is done by

* making the third checker pointer parameter non-optional, and checked by an
  assert to be non-null.
* I added new, but private non-checkers option initializers, meant only for
  internal use,
* Renamed these methods accordingly (mind the consistent name for once with
  getBooleanOption!):
  - getOptionAsString -> getCheckerStringOption,
  - getOptionAsInteger -> getCheckerIntegerOption
* The 3 functions meant for initializing data members (with the not very
  descriptive getBooleanOption, getOptionAsString and getOptionAsUInt names)
  were renamed to be overloads of the getAndInitOption function name.
* All options were in some way retrieved via getCheckerOption. I removed it, and
  moved the logic to getStringOption and getCheckerStringOption. This did cause
  some code duplication, but that's the only way I could do it, now that checker
  and non-checker options are separated. Note that the non-checker version
  inserts the new option to the ConfigTable with the default value, but the
  checker version only attempts to find already existing entries. This is how
  it always worked, but this is clunky and I might end reworking that too, so we
  can eventually get a ConfigTable that contains the entire configuration of the
  analyzer.

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

llvm-svn: 346113

5 years agoEnsure the correct order of evaluation in part 2. of PlistMacroExpansion
Kristof Umann [Mon, 5 Nov 2018 02:37:29 +0000 (02:37 +0000)]
Ensure the correct order of evaluation in part 2. of PlistMacroExpansion

Windows buildbots break with the previous commit '[analyzer][PlistMacroExpansion]
Part 2.: Retrieving the macro name and primitive expansion'. This patch attempts
to solve this issue.

llvm-svn: 346112

5 years agoReland '[analyzer][PlistMacroExpansion] Part 2.: Retrieving the macro name and primit...
Kristof Umann [Mon, 5 Nov 2018 02:14:36 +0000 (02:14 +0000)]
Reland '[analyzer][PlistMacroExpansion] Part 2.: Retrieving the macro name and primitive expansion'

llvm-svn: 346111

5 years ago[X86] Fix typo in test comment. NFC
Craig Topper [Mon, 5 Nov 2018 01:21:52 +0000 (01:21 +0000)]
[X86] Fix typo in test comment. NFC

llvm-svn: 346110

5 years ago[LLDB] Fix FreeBSD/Darwin build
David Carlier [Sun, 4 Nov 2018 23:19:25 +0000 (23:19 +0000)]
[LLDB] Fix FreeBSD/Darwin build

Reviewers: JDevlieghere, tatyana-krasnukha

Reviwed By: tatyana-krasnukha

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

llvm-svn: 346109

5 years ago[HotColdSplitting] Use TTI to inform outlining threshold
Vedant Kumar [Sun, 4 Nov 2018 23:11:57 +0000 (23:11 +0000)]
[HotColdSplitting] Use TTI to inform outlining threshold

Using TargetTransformInfo allows the splitting pass to factor in the
code size cost of instructions as it decides whether or not outlining is
profitable.

This did not regress the overall amount of outlining seen on the handful
of internal frameworks I tested.

Thanks to Jun Bum Lim for suggesting this!

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

llvm-svn: 346108

5 years ago[Driver] Use -Bstatic/dynamic for libc++ on Fuchsia
Petr Hosek [Sun, 4 Nov 2018 22:38:47 +0000 (22:38 +0000)]
[Driver] Use -Bstatic/dynamic for libc++ on Fuchsia

-static relies on lld's behavior, but -Bstatic/dynamic is supported
across all linkers.

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

llvm-svn: 346107

5 years ago[X86] Add nounwind to some tests to remove cfi directives from checks. NFC
Craig Topper [Sun, 4 Nov 2018 21:37:45 +0000 (21:37 +0000)]
[X86] Add nounwind to some tests to remove cfi directives from checks. NFC

llvm-svn: 346106

5 years ago[X86] Regenerate test checks to merge 32 and 64 bit. Remove stale check prefixes...
Craig Topper [Sun, 4 Nov 2018 21:37:43 +0000 (21:37 +0000)]
[X86] Regenerate test checks to merge 32 and 64 bit. Remove stale check prefixes. NFC

llvm-svn: 346105

5 years agoFix the test for partition_copy so it is not ridiculously slow. Also, detab.
Marshall Clow [Sun, 4 Nov 2018 17:57:25 +0000 (17:57 +0000)]
Fix the test for partition_copy so it is not ridiculously slow. Also, detab.

llvm-svn: 346104

5 years agoAdd support of the next Ubuntu (Ubuntu 19.04 - Disco Dingo)
Sylvestre Ledru [Sun, 4 Nov 2018 17:41:41 +0000 (17:41 +0000)]
Add support of the next Ubuntu (Ubuntu 19.04 - Disco Dingo)

llvm-svn: 346103

5 years ago[X86] Add vector shift by immediate to SimplifyDemandedBitsForTargetNode.
Craig Topper [Sun, 4 Nov 2018 17:31:27 +0000 (17:31 +0000)]
[X86] Add vector shift by immediate to SimplifyDemandedBitsForTargetNode.

Summary: This also enables some constant folding from KnownBits propagation. This helps on some cases vXi64 case in 32-bit mode where constant vectors appear as vXi32 and a bitcast. This can prevent getNode from constant folding sra/shl/srl.

Reviewers: RKSimon, spatel

Reviewed By: spatel

Subscribers: llvm-commits

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

llvm-svn: 346102

5 years agoUpdate our URLs in clang doc to use https
Sylvestre Ledru [Sun, 4 Nov 2018 17:02:00 +0000 (17:02 +0000)]
Update our URLs in clang doc to use https

llvm-svn: 346101

5 years agoFix NetBSD build after "Move path resolution logic out of FileSpec"
Kamil Rytarowski [Sun, 4 Nov 2018 16:53:16 +0000 (16:53 +0000)]
Fix NetBSD build after "Move path resolution logic out of FileSpec"

D53915

llvm-svn: 346100

5 years agoUpdate framework-header-fix to force system sed
Dave Lee [Sun, 4 Nov 2018 15:55:28 +0000 (15:55 +0000)]
Update framework-header-fix to force system sed

Summary:
There are 2 changes here:

1. Use system sed instead of the sed found in the user's path. This
     fixes this script in the case the user has gnu-sed in their $PATH before
     bsd sed since `-i ''` isn't compatible and you need `-i` instead.

2. `set -e` in this script so it fails as soon as one of these commands
     fail instead of throwing errors for each file if they fail

Since this is only ran on macOS, and we're already using this
absolute path below, this seems like a safe addition

Reviewers: kastiglione, beanz

Reviewed By: kastiglione

Subscribers: lldb-commits

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

llvm-svn: 346099

5 years agoDisable recursive interception for tzset in MSan
Kamil Rytarowski [Sun, 4 Nov 2018 15:30:38 +0000 (15:30 +0000)]
Disable recursive interception for tzset in MSan

This fixes sanitization of this library call on NetBSD.
Extracted as a part of D42050.

llvm-svn: 346098

5 years ago[ValueTracking] determine sign of 0.0 from select when matching min/max FP
Sanjay Patel [Sun, 4 Nov 2018 14:28:48 +0000 (14:28 +0000)]
[ValueTracking] determine sign of 0.0 from select when matching min/max FP

In PR39475:
https://bugs.llvm.org/show_bug.cgi?id=39475
..we may fail to recognize/simplify fabs() in some cases because we do not
canonicalize fcmp with a -0.0 operand.

Adding that canonicalization can cause regressions on min/max FP tests, so
that's this patch: for the purpose of determining whether something is min/max,
let the value returned by the select determine how we treat a 0.0 operand in the fcmp.

This patch doesn't actually change the -0.0 to +0.0. It just changes the analysis, so
we don't fail to recognize equivalent min/max patterns that only differ in the
signbit of 0.0.

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

llvm-svn: 346097

5 years agoRevert '[analyzer][PlistMacroExpansion] Part 2.: Retrieving the macro name and primit...
Kristof Umann [Sun, 4 Nov 2018 14:18:37 +0000 (14:18 +0000)]
Revert '[analyzer][PlistMacroExpansion] Part 2.: Retrieving the macro name and primitive expansion'

llvm-svn: 346096

5 years ago[analyzer][PlistMacroExpansion] Part 2.: Retrieving the macro name and primitive...
Kristof Umann [Sun, 4 Nov 2018 13:59:44 +0000 (13:59 +0000)]
[analyzer][PlistMacroExpansion] Part 2.: Retrieving the macro name and primitive expansion

This patch adds a couple new functions to acquire the macro's name, and also
expands it, although it doesn't expand the arguments, as seen from the test files

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

llvm-svn: 346095

5 years agoFix log statement in r346093
Pavel Labath [Sun, 4 Nov 2018 12:54:29 +0000 (12:54 +0000)]
Fix log statement in r346093

Thanks to Dávid Bolvanský for pointing that out.

llvm-svn: 346094

5 years agoNativeProcessProtocol: Simplify breakpoint setting code
Pavel Labath [Sun, 4 Nov 2018 10:58:08 +0000 (10:58 +0000)]
NativeProcessProtocol: Simplify breakpoint setting code

Summary:
A fairly simple operation as setting a breakpoint (writing a breakpoint
opcode) at a given address was going through three classes:
NativeProcessProtocol which called NativeBreakpointList, which then
called SoftwareBrekpoint, only to end up again in NativeProcessProtocol
to do the actual writing itself. This is unnecessarily complex and can
be simplified by moving all of the logic into NativeProcessProtocol
class itself, removing a lot of boilerplate.

One of the reeasons for this complexity was that (it seems)
NativeBreakpointList class was meant to hold both software and hardware
breakpoints. However, that never materialized, and hardware breakpoints
are stored in a separate map holding only hardware breakpoints.
Essentially, this patch makes software breakpoints follow that approach
by replacing the heavy SoftwareBraekpoint with a light struct of the
same name, which holds only the data necessary to describe one
breakpoint. The rest of the logic is in the main class. As, at the
lldb-server level, handling software and hardware breakpoints is very
different, this seems like a reasonable state of things.

Reviewers: krytarowski, zturner, clayborg

Subscribers: mgorny, lldb-commits

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

llvm-svn: 346093

5 years ago[DAGCombiner] Remove 'else' after return. NFC
Craig Topper [Sun, 4 Nov 2018 06:56:32 +0000 (06:56 +0000)]
[DAGCombiner] Remove 'else' after return. NFC

This makes this code consistent with the nearly identical code in visitZERO_EXTEND.

llvm-svn: 346090

5 years agoFix duplicate testcase filename
Jan Kratochvil [Sun, 4 Nov 2018 06:13:09 +0000 (06:13 +0000)]
Fix duplicate testcase filename

dotest.py started reporting:
Exception: Found multiple tests with the name TestSampleTest.py
After the commit of:
https://reviews.llvm.org/D54056

llvm-svn: 346089

5 years ago[Driver] Always match resource dir in Fuchsia driver tests
Petr Hosek [Sun, 4 Nov 2018 03:53:07 +0000 (03:53 +0000)]
[Driver] Always match resource dir in Fuchsia driver tests

This makes the tests stricter by not only matching the runtime file
name, but the entire path into the resource directory.

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

llvm-svn: 346088

5 years ago[SelectionDAG] Remove special methods for creating *_EXTEND_VECTOR_INREG nodes. Move...
Craig Topper [Sun, 4 Nov 2018 02:10:18 +0000 (02:10 +0000)]
[SelectionDAG] Remove special methods for creating *_EXTEND_VECTOR_INREG nodes. Move asserts into getNode.

These methods were just wrappers around getNode with additional asserts (identical and repeated 3 times). But getNode already has a switch that can be used to hold these asserts that allows them to be shared for all 3 opcodes. This also enables checking on the places that create these nodes without using the wrappers.

The rest of the patch is just changing all callers to use getNode directly.

llvm-svn: 346087

5 years agoRemove redundant OVERRRIDES file
Jan Vesely [Sun, 4 Nov 2018 00:54:46 +0000 (00:54 +0000)]
Remove redundant OVERRRIDES file

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346086

5 years agoconfigure: Provide symlink for amdgcn-mesa3d instead of configure hack
Jan Vesely [Sun, 4 Nov 2018 00:54:45 +0000 (00:54 +0000)]
configure: Provide symlink for amdgcn-mesa3d instead of configure hack

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346085

5 years agotravis: Check tahiti-amdgcn-mesa-mesa3d.bc
Jan Vesely [Sun, 4 Nov 2018 00:54:43 +0000 (00:54 +0000)]
travis: Check tahiti-amdgcn-mesa-mesa3d.bc

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346084

5 years agoamdgcn-amdhsa: Convert get_{global,local}_size to clc for all llvm versions
Jan Vesely [Sun, 4 Nov 2018 00:39:30 +0000 (00:39 +0000)]
amdgcn-amdhsa: Convert get_{global,local}_size to clc for all llvm versions

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346083

5 years agoamdgcn: Move __clc_amdgcn_s_waitcnt definition to clc file
Jan Vesely [Sun, 4 Nov 2018 00:39:27 +0000 (00:39 +0000)]
amdgcn: Move __clc_amdgcn_s_waitcnt definition to clc file

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346082

5 years agoamdgcn: Convert get_num_groups to clc
Jan Vesely [Sun, 4 Nov 2018 00:39:25 +0000 (00:39 +0000)]
amdgcn: Convert get_num_groups to clc

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346081

5 years agoamdgcn: Convert get_global_size to clc
Jan Vesely [Sun, 4 Nov 2018 00:39:20 +0000 (00:39 +0000)]
amdgcn: Convert get_global_size to clc

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346080

5 years agoamdgcn: Convert get_local_size to clc
Jan Vesely [Sun, 4 Nov 2018 00:39:16 +0000 (00:39 +0000)]
amdgcn: Convert get_local_size to clc

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346079

5 years agor600: Convert barrier to clc
Jan Vesely [Sun, 4 Nov 2018 00:35:15 +0000 (00:35 +0000)]
r600: Convert barrier to clc

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry
llvm-svn: 346078

5 years agor600: Convert get_num_groups to clc
Jan Vesely [Sun, 4 Nov 2018 00:35:12 +0000 (00:35 +0000)]
r600: Convert get_num_groups to clc

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry
llvm-svn: 346077

5 years agor600: Convert get_global_size to clc
Jan Vesely [Sun, 4 Nov 2018 00:35:08 +0000 (00:35 +0000)]
r600: Convert get_global_size to clc

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry
llvm-svn: 346076

5 years agor600: Convert get_local_size to clc
Jan Vesely [Sun, 4 Nov 2018 00:35:03 +0000 (00:35 +0000)]
r600: Convert get_local_size to clc

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry
llvm-svn: 346075

5 years ago[coroutines] Fix fallthrough warning on try/catch
Brian Gesiak [Sat, 3 Nov 2018 22:35:17 +0000 (22:35 +0000)]
[coroutines] Fix fallthrough warning on try/catch

Summary:
The test case added in this diff would incorrectly warn that control
flow may fall through without returning. Here's a standalone example:
https://godbolt.org/z/dCwXEi

The same program, but using `return` instead of `co_return`, does not
produce a warning: https://godbolt.org/z/mVldqQ

The issue was in how Clang analysis would structure its representation
of the control-flow graph. Specifically, when constructing the CFG,
`CFGBuilder::Visit` had special handling of a `ReturnStmt`, in which it
would place object destructors in the same CFG block as a `return` statement,
immediately after it. Doing so would allow the logic in
`lib/Sema/AnalysisBasedWarning.cpp` `CheckFallThrough` to work properly in the
program that used `return`, correctly determining that no "plain edges" preceded
the exit block of the function.

Because a `co_return` statement would not enjoy the same treatment when
it was being built into the control-flow graph, object destructors
would not be placed in the same CFG block as the `co_return`, thus
resulting in a "plain edge" preceding the exit block of the function,
and so the warning logic would be triggered.

Add special casing for `co_return` to Clang analysis, thereby
remedying the mistaken warning.

Test Plan: `check-clang`

Reviewers: GorNishanov, tks2103, rsmith

Reviewed By: GorNishanov

Subscribers: EricWF, lewissbaker, cfe-commits

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

llvm-svn: 346074

5 years ago[X86] Update comment I forgot to change in r346043. NFC
Craig Topper [Sat, 3 Nov 2018 19:49:13 +0000 (19:49 +0000)]
[X86] Update comment I forgot to change in r346043. NFC

llvm-svn: 346073

5 years ago[NFC] Fix incorrect comment in std::list
Louis Dionne [Sat, 3 Nov 2018 17:51:09 +0000 (17:51 +0000)]
[NFC] Fix incorrect comment in std::list

llvm-svn: 346072

5 years ago[ValueTracking] peek through 2-input shuffles in ComputeNumSignBits
Sanjay Patel [Sat, 3 Nov 2018 13:18:55 +0000 (13:18 +0000)]
[ValueTracking] peek through 2-input shuffles in ComputeNumSignBits

This patch gives the IR ComputeNumSignBits the same functionality as the
DAG version (the code is derived from the existing code).

This an extension of the single input shuffle analysis added with D53659.

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

llvm-svn: 346071

5 years agoFix test on Windows.
Douglas Yung [Sat, 3 Nov 2018 08:51:27 +0000 (08:51 +0000)]
Fix test on Windows.

This test checks the entire output of a help option, the problem
is that on Windows, the line break occurs in a different place
causing the CHECK to fail because it is not expecting a line break.

llvm-svn: 346070

5 years agoAdd /Zc:DllexportInlines option to clang-cl
Takuto Ikuta [Sat, 3 Nov 2018 06:45:00 +0000 (06:45 +0000)]
Add /Zc:DllexportInlines option to clang-cl

Summary:
This CL adds /Zc:DllexportInlines flag to clang-cl.
When Zc:DllexportInlines- is specified, inline class member function is not exported if the function does not have local static variables.

By not exporting inline function, code for those functions are not generated and that reduces both compile time and obj size. Also this flag does not import inline functions from dllimported class if the function does not have local static variables.

On my 24C48T windows10 machine, build performance of chrome target in chromium repository is like below.
These stats are come with 'target_cpu="x86" enable_nacl = false is_component_build=true dcheck_always_on=true` build config and applied
* https://chromium-review.googlesource.com/c/chromium/src/+/1212379
* https://chromium-review.googlesource.com/c/v8/v8/+/1186017

Below stats were taken with this patch applied on https://github.com/llvm-project/llvm-project-20170507/commit/a05115cd4c57ff76b0f529e38118765b58ed7f2e

| config                          | build time | speedup | build dir size |
| with patch, PCH on, debug       | 1h10m0s    | x1.13   | 35.6GB         |
| without patch, PCH on, debug    | 1h19m17s   |         | 49.0GB         |
| with patch, PCH off, debug      | 1h15m45s   | x1.16   | 33.7GB         |
| without patch, PCH off, debug   | 1h28m10s   |         | 52.3GB         |
| with patch, PCH on, release     | 1h13m13s   | x1.22   | 26.2GB         |
| without patch, PCH on, release  | 1h29m57s   |         | 37.5GB         |
| with patch, PCH off, release    | 1h23m38s   | x1.32   | 23.7GB         |
| without patch, PCH off, release | 1h50m50s   |         | 38.7GB         |

This patch reduced obj size and the number of exported symbols largely, that improved link time too.
e.g. link time stats of blink_core.dll become like below
|                              | cold disk cache | warm disk cache |
| with patch, PCH on, debug    | 71s             | 30s             |
| without patch, PCH on, debug | 111s            | 48s             |

This patch's implementation is based on Nico Weber's patch. I modified to support static local variable, added tests and took stats.

Bug: https://bugs.llvm.org/show_bug.cgi?id=33628

Reviewers: hans, thakis, rnk, javed.absar

Reviewed By: hans

Subscribers: kristof.beyls, smeenai, dschuff, probinson, cfe-commits, eraman

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

llvm-svn: 346069

5 years agoHandle OUTPUT_FORMAT arguments in quotation marks
Galina Kistanova [Sat, 3 Nov 2018 05:25:49 +0000 (05:25 +0000)]
Handle OUTPUT_FORMAT arguments in quotation marks

llvm-svn: 346068

5 years agoTest commit
Nathan Lanza [Sat, 3 Nov 2018 05:12:15 +0000 (05:12 +0000)]
Test commit

llvm-svn: 346067

5 years ago[debuginfo-tests] commands.getoutput -> subprocess.check_output
Fangrui Song [Sat, 3 Nov 2018 04:52:32 +0000 (04:52 +0000)]
[debuginfo-tests] commands.getoutput -> subprocess.check_output

We should also make Darwin Python3 happy after r346059
The output has an extra newline but it is fine in this particular case.

llvm-svn: 346066

5 years agoRevert r345562: "PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of...
Richard Smith [Sat, 3 Nov 2018 02:23:33 +0000 (02:23 +0000)]
Revert r345562: "PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type"

This exposes a (known) CodeGen bug: it can't cope with emitting lvalue
expressions that denote non-odr-used but usable-in-constant-expression
variables. See PR39528 for a testcase.

Reverted for now until that issue can be fixed.

llvm-svn: 346065

5 years ago[Driver] Use -push-/-pop-state and -as-needed for libc++ on Fuchsia
Petr Hosek [Sat, 3 Nov 2018 01:43:25 +0000 (01:43 +0000)]
[Driver] Use -push-/-pop-state and -as-needed for libc++ on Fuchsia

This avoids introducing unnecessary DT_NEEDED entries when using
C++ driver for linking C code or C++ code that doesn't use C++
standard library.

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

llvm-svn: 346064

5 years ago[compiler-rt] Support for passing through linker flags to libc++ build
Petr Hosek [Sat, 3 Nov 2018 01:38:26 +0000 (01:38 +0000)]
[compiler-rt] Support for passing through linker flags to libc++ build

This may be needed when cross-compiling to certain platforms.

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

llvm-svn: 346063

5 years ago[codeview] Let the X86 backend tell us the VFRAME offset adjustment
Reid Kleckner [Sat, 3 Nov 2018 00:41:52 +0000 (00:41 +0000)]
[codeview] Let the X86 backend tell us the VFRAME offset adjustment

Use MachineFrameInfo's OffsetAdjustment field to pass this information
from the target to CodeViewDebug.cpp. The X86 backend doesn't use it for
any other purpose.

This fixes PR38857 in the case where there is a non-aligned quantity of
CSRs and a non-aligned quantity of locals.

llvm-svn: 346062

5 years ago[DWARF v5] Verifier: Add checks for DW_FORM_strx* forms.
Wolfgang Pieb [Sat, 3 Nov 2018 00:27:35 +0000 (00:27 +0000)]
[DWARF v5] Verifier: Add checks for DW_FORM_strx* forms.

Adding functionality to the DWARF verifier for DWARF v5 strx* forms which
index into the string offsets table.

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

llvm-svn: 346061

5 years agoUpdate debuginfo tests lit for r341135
Reid Kleckner [Sat, 3 Nov 2018 00:22:03 +0000 (00:22 +0000)]
Update debuginfo tests lit for r341135

llvm-svn: 346060

5 years ago[debuginfo-tests] Avoid "import commands" which was deprecated in Py3
Reid Kleckner [Sat, 3 Nov 2018 00:16:23 +0000 (00:16 +0000)]
[debuginfo-tests] Avoid "import commands" which was deprecated in Py3

llvm-svn: 346059

5 years agoFix some windows-specific fallout from the FileSpec change.
Zachary Turner [Sat, 3 Nov 2018 00:07:03 +0000 (00:07 +0000)]
Fix some windows-specific fallout from the FileSpec change.

llvm-svn: 346058

5 years agoMake sure to have lit load the configured site config first.
Zachary Turner [Sat, 3 Nov 2018 00:06:37 +0000 (00:06 +0000)]
Make sure to have lit load the configured site config first.

For the lldb unit test suite, we forgot to add the mapping from
site config to main config, so when it found the main config in
the source tree, it wasn't going and loading the configured version
in the build tree first, so the required properties weren't getting
set up properly.

llvm-svn: 346057

5 years ago[CMake][Fuchsia] Set -fuse-ld=lld explicitly for Linux runtimes
Petr Hosek [Fri, 2 Nov 2018 23:49:36 +0000 (23:49 +0000)]
[CMake][Fuchsia] Set -fuse-ld=lld explicitly for Linux runtimes

We set lld as the default linker on non-Darwin platforms, but we still
need to set -fuse-ld=lld explicitly in to support cross-compiling Linux
runtimes on Darwin.

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

llvm-svn: 346056

5 years ago[LTO] Fix a crash caused by accessing an empty ValueInfo
Teresa Johnson [Fri, 2 Nov 2018 23:49:21 +0000 (23:49 +0000)]
[LTO] Fix a crash caused by accessing an empty ValueInfo

ModuleSummaryIndex::exportToDot crashes when linking the Linux kernel
under ThinLTO using LLVMgold.so. This is due to the exportToDot
function trying to get the GUID of an empty ValueInfo. The root cause
related to the fact that we attempt to get the GUID of an aliasee
via its OriginalGUID recorded in the aliasee summary, and that is not
always possible. Specifically, we cannot do this mapping when the value
is internal linkage and there were other internal linkage symbols with
the same name.

There are 2 fixes for the problem included here.

1) In all cases where we can currently print the dot file from the
command line (which is only via save-temps), we have a valid AliaseeGUID
in the AliasSummary. Use that when it is available, so that we can get
the correct aliasee GUID whenever possible.

2) However, if we were to invoke exportToDot from the debugger right
after it is built during the initial analysis step (i.e. the per-module
summary), we won't have the AliaseeGUID field populated. In that case,
we have a fallback fix that will simply print "@"+GUID when we aren't
able to get the GUID from the OriginalGUID. It simply checks if the VI
is valid or not before attempting to get the name. Additionally, since
getAliaseeGUID will assert that the AliaseeGUID is non-zero, guard the
earlier fix #1 by a new function hasAliaseeGUID().

Reviewers: pcc, tmroeder

Subscribers: evgeny777, mehdi_amini, inglorion, dexonsmith, arphaman, llvm-commits

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

llvm-svn: 346055

5 years ago[clangd] don't buffer the input-mirror stream, it's used to diagnose crashes
Sam McCall [Fri, 2 Nov 2018 23:47:55 +0000 (23:47 +0000)]
[clangd] don't buffer the input-mirror stream, it's used to diagnose crashes

llvm-svn: 346054

5 years agoAdd an SBExpressionOptions setting mirroring the "exec" command's --allow-jit.
Jim Ingham [Fri, 2 Nov 2018 23:42:40 +0000 (23:42 +0000)]
Add an SBExpressionOptions setting mirroring the "exec" command's --allow-jit.

<rdar://problem/44809176>

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

llvm-svn: 346053

5 years ago[compiler-rt][Fuzzer] Fix the fuzzer test build
Petr Hosek [Fri, 2 Nov 2018 23:29:13 +0000 (23:29 +0000)]
[compiler-rt][Fuzzer] Fix the fuzzer test build

This fixes the issue introduced in r345765 which changed the way in
which the embedded libc++ is being built but omitted tests.

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

llvm-svn: 346052

5 years agoWorkaround using new Clang with an old NDK.
Dan Albert [Fri, 2 Nov 2018 22:57:04 +0000 (22:57 +0000)]
Workaround using new Clang with an old NDK.

We're using an old NDK and a new Clang. New Clangs default to
`-stdlib=libc++` for Android, but those libraries cannot be found by
default with an old NDK. Use an explicit `-stdlib=libstdc++` in the
cxx_mode_flags.

llvm-svn: 346051

5 years ago[X86] In LowerEXTEND_VECTOR_INREG, emit a vector shuffle instead of directly using...
Craig Topper [Fri, 2 Nov 2018 22:48:02 +0000 (22:48 +0000)]
[X86] In LowerEXTEND_VECTOR_INREG, emit a vector shuffle instead of directly using X86ISD::UNPCKL

The majority of the changes are because the rest of shuffle lowering/combining prefers to replace the undef input with the other operand. Using UNPCKL directly seemed to avoid this and just grabbed a randomish register for the undef which can create false dependencies.

llvm-svn: 346050

5 years ago[FileSystem] Open File instances through the FileSystem.
Jonas Devlieghere [Fri, 2 Nov 2018 22:34:51 +0000 (22:34 +0000)]
[FileSystem] Open File instances through the FileSystem.

This patch modifies how we open File instances in LLDB. Rather than
passing a path or FileSpec to the constructor, we now go through the
virtual file system. This is needed in order to make things work with
the VFS in the future.

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

llvm-svn: 346049

5 years agoAdd an explicit -std=c++14 to this test.
Adrian Prantl [Fri, 2 Nov 2018 22:19:02 +0000 (22:19 +0000)]
Add an explicit -std=c++14 to this test.

rdar://problem/45642490

llvm-svn: 346048

5 years ago[WebAssembly] Parsing missing directives to produce valid .o
Wouter van Oortmerssen [Fri, 2 Nov 2018 22:04:33 +0000 (22:04 +0000)]
[WebAssembly] Parsing missing directives to produce valid .o

Summary:
The assembler was able to assemble and then dump back to .s, but
was failing to parse certain directives necessary for valid .o
output:
- .type directives are now recognized to distinguish function symbols
  and others.
- .size is now parsed to provide function size.
- .globaltype (introduced in https://reviews.llvm.org/D54012) is now
  recognized to ensure symbols like __stack_pointer have a proper type
  set for both .s and .o output.

Also added tests for the above.

Reviewers: sbc100, dschuff

Subscribers: jgravelle-google, aheejin, dexonsmith, kristina, llvm-commits, sunfish

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

llvm-svn: 346047

5 years agoFix the lit test suite.
Zachary Turner [Fri, 2 Nov 2018 22:02:09 +0000 (22:02 +0000)]
Fix the lit test suite.

This change was accidentally missed from the original changeset.

llvm-svn: 346046

5 years agoRevert "[Symbol] Search symbols with name and type in a symbol file"
Davide Italiano [Fri, 2 Nov 2018 21:59:14 +0000 (21:59 +0000)]
Revert "[Symbol] Search symbols with name and type in a symbol file"

It broke MacOS buildbots.

llvm-svn: 346045

5 years ago[COFF, ARM64] Implement InterlockedExchange*_* builtins
Mandeep Singh Grang [Fri, 2 Nov 2018 21:18:23 +0000 (21:18 +0000)]
[COFF, ARM64] Implement InterlockedExchange*_* builtins

Summary: Windows SDK needs these intrinsics to be proper builtins.  This is second in a series of patches to move intrinsic defintions out of intrin.h.

Reviewers: rnk, mstorsjo, efriedma, TomTan

Reviewed By: rnk, efriedma

Subscribers: javed.absar, kristof.beyls, chrib, jfb, kristina, cfe-commits

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

llvm-svn: 346044

5 years ago[X86] Don't emit *_extend_vector_inreg nodes when both the input and output types...
Craig Topper [Fri, 2 Nov 2018 21:09:49 +0000 (21:09 +0000)]
[X86] Don't emit *_extend_vector_inreg nodes when both the input and output types are legal with AVX1

We already have custom lowering for the AVX case in LegalizeVectorOps. So its better to keep the regular extend op around as long as possible.

I had to qualify one place in DAG combine that created illegal vector extending load operations. This change by itself had no effect on any tests which is why its included here.

I've made a few cleanups to the custom lowering. The sign extend code no longer creates an identity shuffle with undef elements. The zero extend code now emits a zero_extend_vector_inreg instead of an unpckl with a zero vector.

For the high half of the custom lowering of zero_extend/any_extend, we're now using an unpckh with a zero vector or undef. Previously we used used a pshufd to move the upper 64-bits to the lower 64-bits and then used a zero_extend_vector_inreg. I think the zero vector should require less execution resources and be smaller code size.

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

llvm-svn: 346043

5 years agoTry to unbreak the build of sanitizers on !NetBSD
Kamil Rytarowski [Fri, 2 Nov 2018 21:06:05 +0000 (21:06 +0000)]
Try to unbreak the build of sanitizers on !NetBSD

Include the build of unpoison_passwd() and unpoison_group() for
SANITIZER_INTERCEPT_FGETPWENT_R and SANITIZER_INTERCEPT_FGETGRENT_R.
 static void unpoison_passwd(

llvm-svn: 346042

5 years agoDiagnose parameter names that shadow the names of inherited fields under -Wshadow...
Aaron Ballman [Fri, 2 Nov 2018 21:04:44 +0000 (21:04 +0000)]
Diagnose parameter names that shadow the names of inherited fields under -Wshadow-field.

This addresses PR34120. Note, unlike GCC, we take into account the accessibility of the field when deciding whether to warn or not.

llvm-svn: 346041

5 years ago[DWARF] Fix typo, .gnu_index -> .gdb_index
Fangrui Song [Fri, 2 Nov 2018 20:34:42 +0000 (20:34 +0000)]
[DWARF] Fix typo, .gnu_index -> .gdb_index

llvm-svn: 346040