Commit Graph

329252 Commits

Author SHA1 Message Date
David Greene 7c562f1286 [System Model] [TTI] Move default cache/prefetch implementations
Move the default implementations of cache and prefetch queries to
TargetTransformInfoImplBase and delete them from NoTIIImpl.  This brings these
interfaces in line with how other TTI interfaces work.

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

llvm-svn: 374446
2019-10-10 20:39:27 +00:00
Greg Clayton 366ada1d06 Fix a documentation warning from GSYM commit.
llvm-svn: 374445
2019-10-10 20:29:11 +00:00
Dimitry Andric a42942e0ec Fix process launch failure on FreeBSD after r365761
Summary:
After rLLDB365761, and with `LLVM_ENABLE_ABI_BREAKING_CHECKS` enabled,
launching any process on FreeBSD crashes lldb with:

```
Expected<T> must be checked before access or destruction.
Expected<T> value was in success state. (Note: Expected<T> values in success mode must still be checked prior to being destroyed).
```

This is because `m_operation_thread` and `m_monitor_thread` were wrapped
in `llvm::Expected<>`, but this requires the objects to be correctly
initialized before accessing them.

To fix the crashes, use `llvm::Optional<>` for the members (as indicated
by labath), and use local variables to store the return values of
`LaunchThread` and `StartMonitoringChildProcess`.  Then, only assign to
the member variables after checking if the return values indicated
success.

Reviewers: devnexen, emaste, MaskRay, mgorny

Reviewed By: devnexen

Subscribers: jfb, labath, krytarowski, lldb-commits

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

llvm-svn: 374444
2019-10-10 20:26:59 +00:00
Zachary Turner 79f2432966 [MSVC] Automatically add atlmfc folder to include and libpath.
Differential Revision: https://reviews.llvm.org/D68736

llvm-svn: 374443
2019-10-10 20:25:54 +00:00
Zachary Turner 02c5386811 [PDB] Fix bug when using multiple PCH header objects with the same name.
A common pattern in Windows is to have all your precompiled headers
use an object named stdafx.obj.  If you've got a project with many
different static libs, you might use a separate PCH for each one of
these.

During the final link step, a file from A might reference the PCH
object from A, but it will have the same name (stdafx.obj) as any
other PCH from another project.  The only difference will be the
path.  For example, A might be A/stdafx.obj while B is B/stdafx.obj.

The existing algorithm checks only the filename that was passed on
the command line (or stored in archive), but this is insufficient in
the case where relative paths are used, because depending on the
command line object file / library order, it might find the wrong
PCH object first resulting in a signature mismatch.

The fix here is to simply check whether the absolute path of the
PCH object (which is stored in the input obj file for the file that
references the PCH) *ends with* the full relative path of whatever
is specified on the command line (or is in the archive).

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

llvm-svn: 374442
2019-10-10 20:25:51 +00:00
Julian Lettner 3620e8fdb5 [lit] Add comment explaining the LIT_OPTS env var overrides command line options
Normally, command line options override environment variables.  Add
comment to state that we are doing the reverse on purpose.

llvm-svn: 374441
2019-10-10 20:23:28 +00:00
Jordan Rose aab67b571a ADT: Save a word in every StringSet entry
Add a specialization to StringMap (actually StringMapEntry) for a
value type of NoneType (the type of llvm::None), and use it for
StringSet. This'll save us a word from every entry in a StringSet,
used for alignment with the size_t that stores the string length.

I could have gone all the way to some kind of empty base class
optimization, but that seemed like overkill. Someone can consider
adding that in the future, though.

https://reviews.llvm.org/D68586

llvm-svn: 374440
2019-10-10 20:22:53 +00:00
Michael J. Spencer 2f56266234 [ScanDeps] clang-format, 80 cols.
llvm-svn: 374439
2019-10-10 20:19:02 +00:00
Alexey Bataev ff8a1a0705 [OPENMP]Update doc for supported constructs, NFC.
llvm-svn: 374438
2019-10-10 20:15:54 +00:00
Alexey Bataev 60e51c4803 [OPENMP50]Support for 'master taskloop' directive.
Added full support for master taskloop directive.

llvm-svn: 374437
2019-10-10 20:13:02 +00:00
Sanjay Patel 8dd16ed0c8 [x86] reduce duplicate test assertions; NFC
llvm-svn: 374436
2019-10-10 19:52:27 +00:00
Jonas Devlieghere 0a186d0f64 [test] Add timeout to API tests.
Before the reorganiziation, the API tests were inheriting the timeout
from the top-level lit file. Now that this is no longer the case, the
lldb-api test suite needs to set its own timeout.

llvm-svn: 374435
2019-10-10 19:51:50 +00:00
Jonas Devlieghere 7cc1fac8c9 [test] Cleanup top-level lit.cfg.py
llvm-svn: 374434
2019-10-10 19:51:47 +00:00
Julian Lettner b858895c85 [lit] Bring back `--threads` option alias
Bring back `--threads` option which was lost in the move of the
command line argument parsing code to cl_arguments.py.  Update docs
since `--workers` is preferred.

llvm-svn: 374432
2019-10-10 19:43:57 +00:00
Craig Topper 0e561437c5 [X86] Use packusdw+vpmovuswb to implement v16i32->V16i8 that clamps signed inputs to be between 0 and 255 when zmm registers are disabled on SKX.
If we've disable zmm registers, the v16i32 will need to be split. This split will propagate through min/max the truncate. This creates two sequences that need to be concatenated back to v16i8. We can instead use packusdw to do part of the clamping, truncating, and concatenating all at once. Then we can use a vpmovuswb to finish off the clamp.

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

llvm-svn: 374431
2019-10-10 19:40:44 +00:00
Jonas Devlieghere ff5640caea [Docs] Update testing documentaton
Update the test documentation after the directory reorganization.

llvm-svn: 374430
2019-10-10 19:35:20 +00:00
Joel E. Denny a71511feb5 Revert r374388: "[lit] Make internal diff work in pipelines"
This breaks a Windows bot.

llvm-svn: 374429
2019-10-10 19:25:39 +00:00
Jinsong Ji 26cd5c9370 [PowerPC][docs] Update IBM official docs in Compiler Writers Info page
Summary:
Just realized that most of the links in this page are deprecated.
So update some important reference here:
* adding PowerISA 3.0B/2.7B
* adding P8/P9 User Manual
* ELFv2 ABI and errata

Move deprecated ones into "Other documents..".

Reviewers: #powerpc, hfinkel, nemanjai

Reviewed By: hfinkel

Subscribers: shchenz, llvm-commits

Tags: #llvm

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

llvm-svn: 374428
2019-10-10 19:25:30 +00:00
Joel E. Denny 3e0b23d154 Revert r374389: "[lit] Clean up internal diff's encoding handling"
This breaks a Windows bot.

llvm-svn: 374427
2019-10-10 19:25:24 +00:00
Joel E. Denny bdbeccb387 Revert r374390: "[lit] Extend internal diff to support `-` argument"
This breaks a Windows bot.

llvm-svn: 374426
2019-10-10 19:25:11 +00:00
Joel E. Denny b5af1335be Revert r374392: "[lit] Extend internal diff to support -U"
This breaks a Windows bot.

llvm-svn: 374425
2019-10-10 19:24:57 +00:00
Lawrence D'Anna ab1cd65f19 update TestRunCommandInterpreterAPI to use SBFile
Summary:
If you look at what this test is doing, it's actually quite
mysterious why it works at all.   It sets the input file
inside a "with open".   As soon as the with block ends,
that file will be closed.   And yet somehow LLDB reads
commands from it anyway.    What's actually happening is that
the file descriptor gets dup'd when something inside LLDB
calls File::GetStream().   I think it's fair to say that
what this test is doing is illegal and it has no right
to expect it to work.

This patch updates the test with two cases.  One uses
the SBFile api, and actually transfers ownership of
the original file descriptor to the debugger.   The other
just uses the old FILE* API, but in a sane way.

I also set NO_DEBUG_INFO_TESTCASE, because this test doesn't
use any debug info and doesn't need to run three times.

Reviewers: JDevlieghere, jasonmolenda, labath

Reviewed By: labath

Subscribers: aprantl, lldb-commits

Tags: #lldb

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

llvm-svn: 374424
2019-10-10 19:24:07 +00:00
Lawrence D'Anna c040b30ffc update SBDebugger::SetInputFile() etc to work on native Files
Summary:
This patch adds FileSP versions of SetInputFile(),
SetOutputFile, and SetErrorFile().   SWIG will convert native
python file objects into FileSP.

Reviewers: JDevlieghere, jasonmolenda, labath

Reviewed By: labath

Subscribers: clayborg, lldb-commits

Tags: #lldb

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

llvm-svn: 374422
2019-10-10 19:10:59 +00:00
Nico Weber d496003205 win: Move Parallel.h off concrt to cross-platform code
r179397 added Parallel.h and implemented it terms of concrt in 2013.

In 2015, a cross-platform implementation of the functions has appeared
and is in use everywhere but on Windows (r232419).  r246219 hints that
<thread> had issues in MSVC2013, but r296906 suggests they've been fixed
now that we require 2015+.

So remove the concrt code. It's less code, and it sounds like concrt has
conceptual and performance issues, see PR41198.

I built blink_core.dll in a debug component build with full symbols and
in a release component build without any symbols.  I couldn't measure a
performance difference for linking blink_core.dll before and after this
patch.

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

llvm-svn: 374421
2019-10-10 18:57:23 +00:00
Xiangling Liao 13bd3ef40d [NFC][PowerPC]Clean up PPCAsmPrinter for TOC related pseudo opcode
Add a helper function getMCSymbolForTOCPseudoMO to clean up PPCAsmPrinter
a little bit.

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

llvm-svn: 374420
2019-10-10 18:56:42 +00:00
Eli Friedman 30a96d3fcb [ARM] Fix arm_neon.h with -flax-vector-conversions=none, part 2.
Just running -fsyntax-only over arm_neon.h doesn't cover some intrinsics
which are defined using macros.  Add more test coverage for that.

arm-neon-header.c wasn't checking the full set of available NEON target
features; change the target architecture of the test to account for
that.

Fix the generator for arm_neon.h to generate casts in more cases where
they are necessary.

Fix VFMLAL_LOW etc. to express their signatures differently, so the
builtins have the expected type. Maybe the TableGen backend should
detect intrinsics that are defined the wrong way, and produce an error.
The rules here are sort of strange.

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

llvm-svn: 374419
2019-10-10 18:45:34 +00:00
Reid Kleckner 377fcf61b6 Fix one more clang test which didn't have \5C in it
llvm-svn: 374418
2019-10-10 18:42:06 +00:00
Lawrence D'Anna 4faec5e01a TestFileHandle.py: fix for Python 3.6
Summary:
Python 3.6 stringifies exceptions as `ExceptionClass("foo",)` instead
of `ExceptionClass("foo")`.   This patch makes the test assertions a
little more flexible so the test passes anyway.

Reviewers: JDevlieghere, jasonmolenda, labath

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 374417
2019-10-10 18:38:23 +00:00
Reid Kleckner 63bb6737ce Update clang tests for new LLVM IR backslash printing in r374415
llvm-svn: 374416
2019-10-10 18:36:41 +00:00
Reid Kleckner 67d440b949 Print quoted backslashes in LLVM IR as \\ instead of \5C
This improves readability of Windows path string literals in LLVM IR.
The LLVM assembler has supported \\ in IR strings for a long time, but
the lexer doesn't tolerate escaped quotes, so they have to be printed as
\22 for now.

llvm-svn: 374415
2019-10-10 18:31:57 +00:00
Adrian Prantl e9529a942a Remove merge marker :-)
llvm-svn: 374414
2019-10-10 18:30:47 +00:00
Nico Weber cae2662104 Fix Windows build after r374381
llvm-svn: 374413
2019-10-10 18:20:16 +00:00
Jim Ingham b895f778e2 Die, TABS, die, die, die, die...
Not sure how tabs got into this file, but they don't belong there.

llvm-svn: 374412
2019-10-10 18:19:27 +00:00
Reid Kleckner f05ed6601f Remove strings.h include to fix GSYM Windows build
Fifth time's the charm.

llvm-svn: 374411
2019-10-10 18:17:24 +00:00
Greg Clayton 4ae13e2a7a Unbreak buildbots.
llvm-svn: 374410
2019-10-10 18:13:13 +00:00
Greg Clayton d665bfcf7c Fix buildbots by using memset instead of bzero.
llvm-svn: 374409
2019-10-10 18:11:49 +00:00
Casey Carter ffc83995de [libc++][test] Change IsSmallObject's calculation for std::any's small object buffer
`sizeof(std::any) - sizeof(void*)` is correct for both libc++ and the MSVC standard library.

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

llvm-svn: 374407
2019-10-10 18:07:12 +00:00
Michael Liao a121891a55 Fix build by adding the missing dependency.
llvm-svn: 374406
2019-10-10 18:04:52 +00:00
Julian Lettner 822946ceaa [lit] Leverage argparse features to remove some code
Reviewed By: rnk, serge-sans-paille

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

llvm-svn: 374405
2019-10-10 18:03:37 +00:00
Reid Kleckner e80a2616c8 Fix test to avoid check-not matching the temp file absolute path
Fix for PR43636

llvm-svn: 374404
2019-10-10 18:01:27 +00:00
Reid Kleckner 9d4806a387 Re-land "Use -fdebug-compilation-dir to form absolute paths in coverage mappings"
This reverts r374324 (git commit 62808631ac)

I changed the test to not rely on finding the sequence "clang, test,
CoverageMapping" in the CWD used to run the test. Instead it makes its
own internal directory hierarchy of foo/bar/baz and looks for that.

llvm-svn: 374403
2019-10-10 18:01:20 +00:00
Adrian Prantl 6a07b99c90 Remove CC autodetection from Makefile.rules
Auto-detecting CC in Makefile.rules is no longer useful. Ever since
out-of-tree builds we are better off just running lldb-dotest which
sets it directly. This also makes it harder to accidentally unset CC
in a Makefile.

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

llvm-svn: 374402
2019-10-10 17:59:18 +00:00
Adrian Prantl 418893d8f2 Speed up accelerator table lookups
When debugging a large program like clang and doing "frame variable
*this", the ValueObject pretty printer is doing hundreds of scoped
FindTypes lookups. The ones that take longest are the ones where the
DWARFDeclContext ends in something like ::Iterator which produces many
false positives that need to be filtered out *after* extracting the
DIEs. This patch demonstrates a way to filter out false positives at
the accerator table lookup step.

With this patch
  lldb clang-10 -o "b EmitFunctionStart" -o r -o "f 2" -o "fr v *this" -b -- ...
goes (in user time) from 5.6s -> 4.8s
or (in wall clock) from 6.9s -> 6.0s.

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

llvm-svn: 374401
2019-10-10 17:59:15 +00:00
Julian Lettner 715bfa4ef8 [lit] Move argument parsing/validation to separate file
Reviewed By: serge-sans-paille

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

llvm-svn: 374400
2019-10-10 17:58:38 +00:00
Paul Hoad 3b4c8f6807 [clang-format] throws an incorrect assertion in consumeToken() formatting the MSVC stl
Summary:
An incorrect assertion is thrown when clang-formatting MSVC's STL library

```
Assertion failed: !Line.startsWith(tok::hash), file C:/llvm/llvm-project/clang/lib/Format/TokenAnnotator.cpp, line 847
Stack dump:
0.      Program arguments: C:\llvm\build\bin\clang-format.exe -i -n ./stl/inc/xkeycheck.h
```

```
Enable warning C4005 to find the forbidden define.
```

Reviewers: mitchell-stellar, STL_MSFT, klimek, krasimir

Reviewed By: mitchell-stellar

Subscribers: cfe-commits

Tags: #clang-format, #clang-tools-extra, #clang

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

llvm-svn: 374399
2019-10-10 17:54:47 +00:00
Greg Clayton 4c145df6a7 Unbreak llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast buildbot.
llvm-svn: 374398
2019-10-10 17:52:33 +00:00
Sanjay Patel 7b904ce724 [DAGCombiner] fold select-of-constants to shift
This reverses the scalar canonicalization proposed in D63382.

Pre: isPowerOf2(C1)
%r = select i1 %cond, i32 C1, i32 0
=>
%z = zext i1 %cond to i32
%r = shl i32 %z, log2(C1)

https://rise4fun.com/Alive/Z50

x86 already tries to fold this pattern, but it isn't done
uniformly, so we still see a diff. AArch64 probably should
enable the TLI hook to benefit too, but that's a follow-on.

llvm-svn: 374397
2019-10-10 17:52:02 +00:00
Greg Clayton 6a2eff1e68 Unbreak windows buildbots.
llvm-svn: 374396
2019-10-10 17:49:33 +00:00
Nico Weber 5ff60e160a gn build: restore tablegen restat optimization after r373664
llvm-svn: 374395
2019-10-10 17:47:18 +00:00
Jim Ingham 47b33dcc0d Implement serializing scripted breakpoints and their extra args.
Differential Revision: https://reviews.llvm.org/D68750

llvm-svn: 374394
2019-10-10 17:44:50 +00:00