platform/upstream/llvm.git
4 years ago[X86] Use isInt<8> to simplify some code. NFC
Craig Topper [Wed, 7 Aug 2019 06:17:55 +0000 (06:17 +0000)]
[X86] Use isInt<8> to simplify some code. NFC

llvm-svn: 368126

4 years agoDetect HAVE_SYS_TYPES_H in lldb
Haibo Huang [Wed, 7 Aug 2019 06:15:01 +0000 (06:15 +0000)]
Detect HAVE_SYS_TYPES_H in lldb

Summary:
After rL368069 I noticed that HAVE_SYS_TYPES_H is not defined in
Platform.h, or anywhere else in lldb. This change fixes that.

Reviewers: labath

Subscribers: mgorny, lldb-commits

Tags: #lldb

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

llvm-svn: 368125

4 years ago[MachineCSE][NFC] Use 'profitable' rather than 'beneficial' to name method.
Kai Luo [Wed, 7 Aug 2019 05:40:21 +0000 (05:40 +0000)]
[MachineCSE][NFC] Use 'profitable' rather than 'beneficial' to name method.

llvm-svn: 368124

4 years ago[X86] Limit vpermil2pd/vpermil2ps immediates to 4 bits in the assembly parser.
Craig Topper [Wed, 7 Aug 2019 05:34:27 +0000 (05:34 +0000)]
[X86] Limit vpermil2pd/vpermil2ps immediates to 4 bits in the assembly parser.

The upper 4 bits of the immediate byte are used to encode a
register. We need to limit the explicit immediate to fit in the
remaining 4 bits.

Fixes PR42899.

llvm-svn: 368123

4 years agoReverts commit r368117, r368115 and r368112
Petr Hosek [Wed, 7 Aug 2019 05:15:34 +0000 (05:15 +0000)]
Reverts commit r368117, r368115 and r368112

This reverts commits:

  "Added Delta IR Reduction Tool"
  "[Bugpoint redesign] Added Pass to Remove Global Variables"
  "Added Tool as Dependency to tests & fixed warnings"

Reduce/remove-funcs.ll is failing on bots.

llvm-svn: 368122

4 years agoAppend an executable suffix to the toolchain tool paths on Windows platform.
Galina Kistanova [Wed, 7 Aug 2019 03:19:40 +0000 (03:19 +0000)]
Append an executable suffix to the toolchain tool paths on Windows platform.

Append a default CMake suffix (CMAKE_EXECUTABLE_SUFFIX) for the build host to the toolchain tool path when adding a LLVM external project.
The tool binary files should contain .exe suffix to run them properly on Windows platform when building the projects.

Patch by Vlad Vereschaka.

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

llvm-svn: 368121

4 years agoFixes failing test cases on Windows for rL368119
Alex Brachet [Wed, 7 Aug 2019 03:18:23 +0000 (03:18 +0000)]
Fixes failing test cases on Windows for rL368119

Windows test cases were failing because the executable is called yaml2obj.exe
not just yaml2obj. I removed FileCheck patterns including yaml2obj so they
start matching at the error message not the program name.

llvm-svn: 368120

4 years ago[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests
Alex Brachet [Wed, 7 Aug 2019 02:44:49 +0000 (02:44 +0000)]
[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests

Reviewers: jhenderson, rupprecht, MaskRay, grimar, labath

Reviewed By: rupprecht

Subscribers: gribozavr, mgrang, seiya, mgorny, sbc100, hiraditya, aheejin, jakehehrlich, llvm-commits

Tags: #llvm

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

llvm-svn: 368119

4 years agoUpstream a few small Apple changes to debugserver - arm64_32, Catalyst
Jason Molenda [Wed, 7 Aug 2019 02:06:06 +0000 (02:06 +0000)]
Upstream a few small Apple changes to debugserver - arm64_32, Catalyst

Adrian's changes to support Catalyst processes and my
changes to support debugserver running on an arm64_32
device (Apple Watch Series 4, which uses an IPL32 model
on arm64 cpus).

llvm-svn: 368118

4 years agoAdded Tool as Dependency to tests & fixed warnings
Diego Trevino Ferrer [Wed, 7 Aug 2019 01:51:56 +0000 (01:51 +0000)]
Added Tool as Dependency to tests & fixed warnings

Summary: Fixes http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/14002 and http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/35392/steps/build_Lld/logs/stdio

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 368117

4 years ago[Gardening] Remove more dead code from IOHandler
Jonas Devlieghere [Wed, 7 Aug 2019 01:50:03 +0000 (01:50 +0000)]
[Gardening] Remove more dead code from IOHandler

Remove more dead code and reformat the file.

llvm-svn: 368116

4 years ago[Bugpoint redesign] Added Pass to Remove Global Variables
Diego Trevino Ferrer [Wed, 7 Aug 2019 00:42:50 +0000 (00:42 +0000)]
[Bugpoint redesign] Added Pass to Remove Global Variables

Summary:
This pass tries to remove Global Variables, as well as their derived uses. For example if a variable `@x` is used by `%call1` and `%call2`, both these uses and the definition of `@x` are deleted. Moreover if `%call1` or `%call2` are used elsewhere those uses are also deleted, and so on recursively.

I'm still uncertain if this pass should remove derived uses, I'm open to suggestions.

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 368115

4 years agoTLI: darwin does not support _bcmp
Alex Lorenz [Wed, 7 Aug 2019 00:03:37 +0000 (00:03 +0000)]
TLI: darwin does not support _bcmp

Not all Darwin targets support _bcmp in all circumstances.

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

llvm-svn: 368113

4 years agoAdded Delta IR Reduction Tool
Diego Trevino Ferrer [Wed, 7 Aug 2019 00:00:52 +0000 (00:00 +0000)]
Added Delta IR Reduction Tool

Summary: Tool parses input IR file, and runs the delta debugging algorithm to reduce the functions inside the input file.

Reviewers: alexshap, chandlerc

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

> llvm-svn: 368071

llvm-svn: 368112

4 years agoRequire lld for hwasan tests.
Peter Collingbourne [Tue, 6 Aug 2019 23:43:20 +0000 (23:43 +0000)]
Require lld for hwasan tests.

We're using relocations that are unsupported by the version of gold on the
bot, so force the use of lld. One of the tests is already using lld,
so this should be safe.

llvm-svn: 368111

4 years agoRegenerate mmx-arith.ll.
Mitch Phillips [Tue, 6 Aug 2019 23:39:07 +0000 (23:39 +0000)]
Regenerate mmx-arith.ll.

This test golden file has become out of date since the rollback of
rL368081. Update the test to have the correct values.

llvm-svn: 368110

4 years agoRevert "[X86] Add more extract subvector cost model tests for smaller element sizes...
Mitch Phillips [Tue, 6 Aug 2019 23:38:14 +0000 (23:38 +0000)]
Revert "[X86] Add more extract subvector cost model tests for smaller element sizes and smaller than 128-bit vectors."

This reverts commit fc33e33776b7a7ce22e539f0ec2e3bfdb09ad361.

This commit depends on the rolled back commit rL367901, and thus needs
to be rolled back.

llvm-svn: 368109

4 years ago[clang][DirectoryWatcher][NFC] Swapping asserts for llvm fatal_error in create
Puyan Lotfi [Tue, 6 Aug 2019 23:25:34 +0000 (23:25 +0000)]
[clang][DirectoryWatcher][NFC] Swapping asserts for llvm fatal_error in create

I also have replaced all the instances of
"auto DW = DirectoryWatcher::create" with
llvm::Expected<std::unique_ptr<DirectoryWatcher>> DW = DirectoryWatcher::create
to make it more clear that DirectoryWatcher::create is returning an Expected.

I've also allowed for logAllUnhandledErrors to consume errors in the case were
DirectoryWatcher::create produces them.

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

llvm-svn: 368108

4 years agoRevert "[X86] Enable -x86-experimental-vector-widening-legalization by default."
Mitch Phillips [Tue, 6 Aug 2019 23:00:43 +0000 (23:00 +0000)]
Revert "[X86] Enable -x86-experimental-vector-widening-legalization by default."

This reverts commit 3de33245d2c992c9e0af60372043540b60f3a810.

This commit broke the MSan buildbots. See
https://reviews.llvm.org/rL367901 for more information.

llvm-svn: 368107

4 years agoRevert "[X86] Remove uses of the -x86-experimental-vector-widening-legalization flag...
Mitch Phillips [Tue, 6 Aug 2019 23:00:30 +0000 (23:00 +0000)]
Revert "[X86] Remove uses of the -x86-experimental-vector-widening-legalization flag from test/CodeGen/X86/"

This reverts commit 3f572c7b8405f36993ec8a226dcddd57283a7c1e.

The MSan sanitizer buildbot was broken by rL367901. This commit
(rL368079) depends on the broken commit that need to be reverted, and
thus itself is being reverted.

See https://reviews.llvm.org/rL367901 for more information.

llvm-svn: 368106

4 years agoUse parenthses to silence warning.
Bill Wendling [Tue, 6 Aug 2019 22:47:47 +0000 (22:47 +0000)]
Use parenthses to silence warning.

llvm-svn: 368105

4 years agoDelay diagnosing asm constraints that require immediates until after inlining
Bill Wendling [Tue, 6 Aug 2019 22:41:22 +0000 (22:41 +0000)]
Delay diagnosing asm constraints that require immediates until after inlining

Summary:
An inline asm call may result in an immediate input value after inlining.
Therefore, don't emit a diagnostic here if the input isn't an immediate.

Reviewers: joerg, eli.friedman, rsmith

Subscribers: asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, s.egerton, krytarowski, mgorny, riccibruno, eraman, cfe-commits

Tags: #clang

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

llvm-svn: 368104

4 years ago[TSAN] Fix tsan on FreeBSD after D54889
Alexander Richardson [Tue, 6 Aug 2019 22:30:48 +0000 (22:30 +0000)]
[TSAN] Fix tsan on FreeBSD after D54889

Summary:
It appears that since https://reviews.llvm.org/D54889, BackgroundThread()
crashes immediately because cur_thread()-> will return a null pointer
which is then dereferenced. I'm not sure why I only see this issue on
FreeBSD and not Linux since it should also be unintialized on other platforms.

Reviewers: yuri, dvyukov, dim, emaste

Subscribers: kubamracek, krytarowski, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 368103

4 years agohwasan: Instrument globals.
Peter Collingbourne [Tue, 6 Aug 2019 22:07:29 +0000 (22:07 +0000)]
hwasan: Instrument globals.

Globals are instrumented by adding a pointer tag to their symbol values
and emitting metadata into a special section that allows the runtime to tag
their memory when the library is loaded.

Due to order of initialization issues explained in more detail in the comments,
shadow initialization cannot happen during regular global initialization.
Instead, the location of the global section is marked using an ELF note,
and we require libc support for calling a function provided by the HWASAN
runtime when libraries are loaded and unloaded.

Based on ideas discussed with @evgeny777 in D56672.

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

llvm-svn: 368102

4 years ago[WebAssembly] Lower ASan constructor priority on Emscripten
Guanzhong Chen [Tue, 6 Aug 2019 21:52:58 +0000 (21:52 +0000)]
[WebAssembly] Lower ASan constructor priority on Emscripten

Summary:
This change gives Emscripten the ability to use more than one constructor
priorities that runs before ASan. By convention, constructor priorites 0-100
are reserved for use by the system. ASan on Emscripten now uses priority 50,
leaving plenty of room for use by Emscripten before and after ASan.

This change is done in response to:
https://github.com/emscripten-core/emscripten/pull/9076#discussion_r310323723

Reviewers: kripken, tlively, aheejin

Reviewed By: tlively

Subscribers: cfe-commits, dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm, #clang

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

llvm-svn: 368101

4 years ago[NFC][ScopBuilder] Move buildDomains and its callees to ScopBuilder.
Dominik Adamski [Tue, 6 Aug 2019 21:51:18 +0000 (21:51 +0000)]
[NFC][ScopBuilder] Move buildDomains and its callees to ScopBuilder.

Scope of changes:

1) Moved buildDomains function to ScopBuilder class.
2) Moved buildDomainsWithBranchConstraints function to ScopBuilder class.
3) Moved propagateDomainConstraints to ScopBuilder class.
4) Moved propagateDomainConstraintsToRegionExit to ScopBuilder class.
5) Moved propagateInvalidStmtDomains to ScopBuilder class.
6) Moved getPredecessorDomainConstraints function to ScopBuilder class.
7) Moved addLoopBoundsToHeaderDomain function to ScopBuilder class.
8) Moved getPwAff function to ScopBuilder class.
9) Moved buildConditionSets functions to ScopBuilder class.
10) Added updateMaxLoopDepth, notifyErrorBlock, getOrInitEmptyDomain, isDomainDefined, setDomain functions to Scop class. They are used by ScopBuilder.
11) Moved helper functions: getRegionNodeBasicBlock, getRegionNodeSuccessor, containsErrorBlock, createNextIterationMap, collectBoundedParts, partitionSetParts, buildConditionSet to ScopBuilder.cpp file.

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

llvm-svn: 368100

4 years agogn build: Merge r368065.
Peter Collingbourne [Tue, 6 Aug 2019 21:48:06 +0000 (21:48 +0000)]
gn build: Merge r368065.

llvm-svn: 368099

4 years agogn build: Merge r368052.
Peter Collingbourne [Tue, 6 Aug 2019 21:47:55 +0000 (21:47 +0000)]
gn build: Merge r368052.

llvm-svn: 368098

4 years agogn build: Merge r368054.
Peter Collingbourne [Tue, 6 Aug 2019 21:47:46 +0000 (21:47 +0000)]
gn build: Merge r368054.

llvm-svn: 368097

4 years agogn build: Merge r368086.
Peter Collingbourne [Tue, 6 Aug 2019 21:47:37 +0000 (21:47 +0000)]
gn build: Merge r368086.

llvm-svn: 368096

4 years agogn build: Merge r368070.
Peter Collingbourne [Tue, 6 Aug 2019 21:47:27 +0000 (21:47 +0000)]
gn build: Merge r368070.

llvm-svn: 368095

4 years agoIR: Disable verifier check for GlobalValues with private linkage named after a comdat...
Peter Collingbourne [Tue, 6 Aug 2019 21:47:18 +0000 (21:47 +0000)]
IR: Disable verifier check for GlobalValues with private linkage named after a comdat for non-COFF.

This check is only meaningful for COFF and it is perfectly valid to create
such a GlobalValue in ELF.

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

llvm-svn: 368094

4 years ago[Sanitizer] little typo
David Carlier [Tue, 6 Aug 2019 21:46:01 +0000 (21:46 +0000)]
[Sanitizer] little typo

llvm-svn: 368093

4 years agofix clang-scan-deps test to match filepaths on Windows
Alex Lorenz [Tue, 6 Aug 2019 21:45:43 +0000 (21:45 +0000)]
fix clang-scan-deps test to match filepaths on Windows

llvm-svn: 368092

4 years ago[X86] Don't allow combineSIntToFP to create v2i32 vectors after type legalization.
Craig Topper [Tue, 6 Aug 2019 21:43:15 +0000 (21:43 +0000)]
[X86] Don't allow combineSIntToFP to create v2i32 vectors after type legalization.

If we're after type legalization we should only be trying to turn
v2i64 into v2i32. So bitcast to v4i32, shuffle the even elements
together. Then use X86ISD::CVTSI2P. The alternative is to leave
the v2i64 type alone and let it scalarized. Hopefully keeping
it packed is better.

Fixes PR42905.

llvm-svn: 368091

4 years ago[Sanitizer] Linux explicitally migrate shadow mapping to Transparent Huge Page
David Carlier [Tue, 6 Aug 2019 21:30:03 +0000 (21:30 +0000)]
[Sanitizer] Linux explicitally migrate shadow mapping to Transparent Huge Page

in madvise mode, the shadow pages will be migrated only via madvise explicit calls.

Reviewers: vitalybuka

Reviewed By: vitalybuka

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

llvm-svn: 368090

4 years ago[NFC][ScopBuilder] Move addUserAssumptions to ScopBuilder
Dominik Adamski [Tue, 6 Aug 2019 21:25:35 +0000 (21:25 +0000)]
[NFC][ScopBuilder] Move addUserAssumptions to ScopBuilder

Scope of changes:
1) Moved addUserAssumptions function to ScopBuilder class.
2) Moved buildConditionSets functions to polly namespace.
3) Moved getRepresentingInvariantLoadSCEV to public section of the Scop class

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

llvm-svn: 368089

4 years ago[pstl][libc++] Provide uglified header names for interface headers
Louis Dionne [Tue, 6 Aug 2019 21:11:24 +0000 (21:11 +0000)]
[pstl][libc++] Provide uglified header names for interface headers

For the few (currently four) headers that make up the PSTL's interface
to other Standard Libraries, provide a stable uglified header file that
can be included by those Standard Libraries.

We can then more easily change the internal organization of the PSTL
without having to change the integration with Standard Libraries.

llvm-svn: 368088

4 years ago[clang-doc] Fix paths of js in import tags
Diego Astiazaran [Tue, 6 Aug 2019 20:59:14 +0000 (20:59 +0000)]
[clang-doc] Fix paths of js in import tags

HTML requires posix-style paths.

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

llvm-svn: 368087

4 years ago[clang-scan-deps] Implementation of dependency scanner over minimized sources
Alex Lorenz [Tue, 6 Aug 2019 20:43:25 +0000 (20:43 +0000)]
[clang-scan-deps] Implementation of dependency scanner over minimized sources

This commit implements the fast dependency scanning mode in clang-scan-deps: the
preprocessing is done on files that are minimized using the dependency directives source minimizer.

A shared file system cache is used to ensure that the file system requests and source minimization
is performed only once. The cache assumes that the underlying filesystem won't change during the course
of the scan (or if it will, it will not affect the output), and it can't be evicted. This means that the
service and workers can be used for a single run of a dependency scanner, and can't be reused across multiple,
incremental runs. This is something that we'll most likely support in the future though.
Note that the driver still utilizes the underlying real filesystem.

This commit is also still missing the fast skipped PP block skipping optimization that I mentioned at EuroLLVM talk.
Additionally, the file manager is still not reused by the threads as well.

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

llvm-svn: 368086

4 years agoRevert [InstCombine] Shift amount reassociation: shl-trunc-shl pattern
Reid Kleckner [Tue, 6 Aug 2019 20:32:07 +0000 (20:32 +0000)]
Revert [InstCombine] Shift amount reassociation: shl-trunc-shl pattern

This reverts r368059 (git commit 0f957109761913c563922f1afd4ceb29ef21bbd0)

This caused Clang to assert while self-hosting and compiling
SystemZInstrInfo.cpp. Reduction is running.

llvm-svn: 368084

4 years ago[clangd] Unfold SourceLocation flattening from findNameLoc in preparation for adding...
Sam McCall [Tue, 6 Aug 2019 20:25:59 +0000 (20:25 +0000)]
[clangd] Unfold SourceLocation flattening from findNameLoc in preparation for adding more overloads. NFC

llvm-svn: 368083

4 years ago[lldb][NFC] Minor refactorings to (Clang)ExpressionSourceCode
Raphael Isemann [Tue, 6 Aug 2019 20:25:02 +0000 (20:25 +0000)]
[lldb][NFC] Minor refactorings to (Clang)ExpressionSourceCode

llvm-svn: 368082

4 years ago[X86] Add more extract subvector cost model tests for smaller element sizes and small...
Craig Topper [Tue, 6 Aug 2019 20:12:41 +0000 (20:12 +0000)]
[X86] Add more extract subvector cost model tests for smaller element sizes and smaller than 128-bit vectors.

With the switch to widening legalization, we need to a better
job of costing extractions of less than 128-bits.

llvm-svn: 368081

4 years ago[X86] Remove tests for -x86-experimental-vector-widening-legalization from test/Analy...
Craig Topper [Tue, 6 Aug 2019 20:12:34 +0000 (20:12 +0000)]
[X86] Remove tests for -x86-experimental-vector-widening-legalization from test/Analysis/CostModel/X86/

This flag is now the default behavior so we don't need separate
tests.

llvm-svn: 368080

4 years ago[X86] Remove uses of the -x86-experimental-vector-widening-legalization flag from...
Craig Topper [Tue, 6 Aug 2019 20:12:20 +0000 (20:12 +0000)]
[X86] Remove uses of the -x86-experimental-vector-widening-legalization flag from test/CodeGen/X86/

This flag is now the default behavior so we no longer need to
set it in tests.

Some redundant tests have been removed after verifying we have
an equivalent test that didn't use the flag.

llvm-svn: 368079

4 years ago[WebAssembly] Fix null pointer in createInitTLSFunction
Guanzhong Chen [Tue, 6 Aug 2019 20:09:04 +0000 (20:09 +0000)]
[WebAssembly] Fix null pointer in createInitTLSFunction

Summary:
`createSyntheticSymbols`, which creates `WasmSym::InitTLS`, is only called
when `!config->relocatable`, but this condition is not checked when calling
`createInitTLSFunction`.

This diff checks `!config->relocatable` before calling `createInitTLSFunction`.

Fixes https://github.com/emscripten-core/emscripten/issues/9155.

Reviewers: tlively, aheejin, kripken, sbc100

Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits

Tags: #llvm

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

llvm-svn: 368078

4 years ago[libc++] Use the monorepo for the back-deployment testing scripts
Louis Dionne [Tue, 6 Aug 2019 20:01:28 +0000 (20:01 +0000)]
[libc++] Use the monorepo for the back-deployment testing scripts

llvm-svn: 368077

4 years ago[Attributor][modulemap] Revert r368064 but fix the build
Kristina Brooks [Tue, 6 Aug 2019 19:53:19 +0000 (19:53 +0000)]
[Attributor][modulemap] Revert r368064 but fix the build

Commit r368064 was necessary after r367953 (D65712) broke the module
build. That happened, apparently, because the template class IRAttribute
defined in the header had a virtual method defined in the corresponding
source file (IRAttribute::manifest). To unbreak the situation this patch
introduces a helper function IRAttributeManifest::manifestAttrs which
is used to implement IRAttribute::manifest in the header. The deifnition
of the helper function is still in the source file.

Patch by jdoerfert (Johannes Doerfert)

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

llvm-svn: 368076

4 years ago[SymbolFile] Remove commented out method
Alex Langford [Tue, 6 Aug 2019 19:47:08 +0000 (19:47 +0000)]
[SymbolFile] Remove commented out method

llvm-svn: 368075

4 years agoAdd order-dependencies to object libraries
Chris Bieneman [Tue, 6 Aug 2019 19:41:23 +0000 (19:41 +0000)]
Add order-dependencies to object libraries

Summary: If you are generating an object library that depends on table-gen generate sources, you need the object library to depend on the tablgen target. Currently llvm_add_library doesn't add dependencies for object libraries at all, which is clearly problematic.

Reviewers: compnerd, hintonda, smeenai

Reviewed By: smeenai

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 368074

4 years agoRevert "Added Delta IR Reduction Tool"
Dmitri Gribenko [Tue, 6 Aug 2019 19:40:37 +0000 (19:40 +0000)]
Revert "Added Delta IR Reduction Tool"

This reverts commit r368071, it broke buildbots.

llvm-svn: 368073

4 years agoTeach some warnings to respect gsl::Pointer and gsl::Owner attributes
Gabor Horvath [Tue, 6 Aug 2019 19:13:29 +0000 (19:13 +0000)]
Teach some warnings to respect gsl::Pointer and gsl::Owner attributes

This patch extends some existing warnings to utilize the knowledge about the gsl::Pointer and gsl::Owner attributes.

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

llvm-svn: 368072

4 years agoAdded Delta IR Reduction Tool
Diego Trevino Ferrer [Tue, 6 Aug 2019 18:59:11 +0000 (18:59 +0000)]
Added Delta IR Reduction Tool

Summary: Tool parses input IR file, and runs the delta debugging algorithm to reduce the functions inside the input file.

Reviewers: alexshap, chandlerc

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 368071

4 years ago[clang-doc] Add index in each info html file
Diego Astiazaran [Tue, 6 Aug 2019 18:31:46 +0000 (18:31 +0000)]
[clang-doc] Add index in each info html file

An index structure is created while generating the output file for each
info. This structure is parsed to JSON and written to a file in the
output directory. The html for the index is not rendered by clang-doc. A
Javascript file is included in the output directory, this will the JSON
file and insert HTML elements into the file.

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

llvm-svn: 368070

4 years agoVarious build fixes for lldb on MinGW
Haibo Huang [Tue, 6 Aug 2019 18:20:43 +0000 (18:20 +0000)]
Various build fixes for lldb on MinGW

Subscribers: mstorsjo, lldb-commits

Tags: #lldb

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

llvm-svn: 368069

4 years ago[OPENMP][OFFLOADING]Fix the test, NFC.
Alexey Bataev [Tue, 6 Aug 2019 18:13:39 +0000 (18:13 +0000)]
[OPENMP][OFFLOADING]Fix the test, NFC.

llvm-svn: 368068

4 years ago[GISel]: Fix trivial build breakage
Aditya Nandakumar [Tue, 6 Aug 2019 17:53:04 +0000 (17:53 +0000)]
[GISel]: Fix trivial build breakage

llvm-svn: 368067

4 years ago[lldb][CMake] Generating Xcode projects
Stefan Granitz [Tue, 6 Aug 2019 17:21:34 +0000 (17:21 +0000)]
[lldb][CMake] Generating Xcode projects

Summary:
Print a warning if the wrong cache script is used when generating a Xcode project, because it's too easy to confuse with Apple-lldb-macOS.cmake

```
  When building with Xcode, we recommend using the corresponding cache
  script.  If this was a mistake, clean your build directory and re-run
  CMake with:

    -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-Xcode.cmake

  See: https://lldb.llvm.org/resources/build.html#cmakegeneratedxcodeproject
```

Also set the generator inside the cache script.

Reviewers: JDevlieghere, jingham, clayborg

Reviewed By: JDevlieghere

Subscribers: mgorny, lldb-commits, #lldb

Tags: #lldb

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

llvm-svn: 368066

4 years ago[GISel]: Add GISelKnownBits analysis
Aditya Nandakumar [Tue, 6 Aug 2019 17:18:29 +0000 (17:18 +0000)]
[GISel]: Add GISelKnownBits analysis

https://reviews.llvm.org/D65698

This adds a KnownBits analysis pass for GISel. This was done as a
pass (compared to static functions) so that we can add other features
such as caching queries(within a pass and across passes) in the future.
This patch only adds the basic pass boiler plate, and implements a lazy
non caching knownbits implementation (ported from SelectionDAG). I've
also hooked up the AArch64PreLegalizerCombiner pass to use this - there
should be no compile time regression as the analysis is lazy.

llvm-svn: 368065

4 years ago[modulemap] exclude a non-module friendly header
Kristina Brooks [Tue, 6 Aug 2019 17:16:56 +0000 (17:16 +0000)]
[modulemap] exclude a non-module friendly header

Exclude Attributor.h from LLVM_Transforms to avoid
a link failure when building modular LLVM.

llvm-svn: 368064

4 years ago[globalisel] Allow SrcOp to convert an APInt and render it as an immediate operand...
Daniel Sanders [Tue, 6 Aug 2019 17:16:27 +0000 (17:16 +0000)]
[globalisel] Allow SrcOp to convert an APInt and render it as an immediate operand (MO.isImm() == true)

Summary:
This is tested by D61289 but has been pulled into a separate patch at
a reviewers request.

Reviewers: bogner, aditya_nandakumar, volkan, aemerson, paquette, arsenm, rovka

Reviewed By: arsenm

Subscribers: javed.absar, hiraditya, wdng, kristof.beyls, Petar.Avramovic, llvm-commits

Tags: #llvm

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

llvm-svn: 368063

4 years ago[Syntax] Do not add a node for 'eof' into the tree
Ilya Biryukov [Tue, 6 Aug 2019 17:07:58 +0000 (17:07 +0000)]
[Syntax] Do not add a node for 'eof' into the tree

Summary:
While useful as a sentinel value when iterating over tokens, having
'eof' in the tree, seems to do more harm than good.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: javed.absar, kristof.beyls, cfe-commits

Tags: #clang

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

llvm-svn: 368062

4 years ago[X86] Move CPU features for Barcelona/K10 out of line
Roman Lebedev [Tue, 6 Aug 2019 17:04:02 +0000 (17:04 +0000)]
[X86] Move CPU features for Barcelona/K10 out of line

Summary:
Cleans X86.td's Barcelona entry to be more like the others,
by moving the features out of the `Proc<>`, thus potentially
making it possible to inherit from them.
Split off from D63628

Reviewers: craig.topper, RKSimon

Reviewed By: craig.topper

Subscribers: hiraditya, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 368061

4 years ago[TableGen] FieldInit: improve assertion message
Roman Lebedev [Tue, 6 Aug 2019 17:03:50 +0000 (17:03 +0000)]
[TableGen] FieldInit: improve assertion message

Summary:
When fiddling with sched profiles, especially creating new ones, it's amazingly easy
to end up with malformed .td that crashes tablegen, without explanation of the bug.
This changes the most common assertion i have encountered to dump enough information
to be able to fix the .td

Split of from D63628

Reviewers: RKSimon, craig.topper, nhaehnle

Reviewed By: craig.topper

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 368060

4 years ago[InstCombine] Shift amount reassociation: shl-trunc-shl pattern
Roman Lebedev [Tue, 6 Aug 2019 17:03:40 +0000 (17:03 +0000)]
[InstCombine] Shift amount reassociation: shl-trunc-shl pattern

Summary:
Currently `reassociateShiftAmtsOfTwoSameDirectionShifts()` only handles
two shifts one after another. If the shifts are `shl`, we still can
easily perform the fold, with no extra legality checks:
https://rise4fun.com/Alive/OQbM

If we have right-shift however, we won't be able to make it
any simpler than it already is.

After this the only thing missing here is constant-folding: (`NewShAmt >= bitwidth(X)`)
* If it's a logical shift, then constant-fold to `0` (not `undef`)
* If it's a `ashr`, then a splat of original signbit
https://rise4fun.com/Alive/E1K
https://rise4fun.com/Alive/i0V

Reviewers: spatel, nikic, xbolva00

Reviewed By: spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 368059

4 years agoFixed toHalfOpenFileRange assertion fail
Shaurya Gupta [Tue, 6 Aug 2019 17:01:12 +0000 (17:01 +0000)]
Fixed toHalfOpenFileRange assertion fail

Summary:
- Added new function that gets Expansion range with both ends in the same file.
- Fixes the crash at https://github.com/clangd/clangd/issues/113

Subscribers: ilya-biryukov, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 368058

4 years ago[ELF][PPC] Don't relax ifunc toc-indirect accesses to toc-relative
Fangrui Song [Tue, 6 Aug 2019 16:57:54 +0000 (16:57 +0000)]
[ELF][PPC] Don't relax ifunc toc-indirect accesses to toc-relative

Fixes PR42759.

```
// If ifunc is taken address in -fPIC code, it may have a toc entry
.section .toc,"aw",@progbits
  .quad ifunc

// ifunc may be defined as STT_GNU_IFUNC in another object file
.type ifunc, %gnu_indirect_function
```

If ifunc is non-preemptable (e.g. when linking an executable), the toc
entry will be relocated by R_PPC64_IRELATIVE.

R_*_IRELATIVE represents the symbolic value of a
non-preemptable ifunc (not associated with a canonical PLT) in a writable location. It has an unknown value at
link time, so we cannot apply toc-indirect to toc-relative relaxation.

Reviewed By: luporl, sfertile

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

llvm-svn: 368057

4 years ago[NFC][EarlyCSE] Pre-commit unary FNeg tests.
Cameron McInally [Tue, 6 Aug 2019 16:41:30 +0000 (16:41 +0000)]
[NFC][EarlyCSE] Pre-commit unary FNeg tests.

llvm-svn: 368056

4 years agoRe-land D65760/r367944
Diego Caballero [Tue, 6 Aug 2019 16:24:17 +0000 (16:24 +0000)]
Re-land D65760/r367944

Fixed most vexing parse ambiguation.

llvm-svn: 368055

4 years ago[compiler-rt] Rename FuzzedDataProvider.h to .hpp and other minor changes.
Max Moroz [Tue, 6 Aug 2019 16:02:39 +0000 (16:02 +0000)]
[compiler-rt] Rename FuzzedDataProvider.h to .hpp and other minor changes.

Summary:
.hpp makes more sense for this header as it's C++ only, plus it
contains the actual implementation.

Reviewers: Dor1s

Reviewed By: Dor1s

Subscribers: kubamracek, dberris, mgorny, delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 368054

4 years ago[Path] Fix bug in make_absolute logic
Jonas Devlieghere [Tue, 6 Aug 2019 15:46:45 +0000 (15:46 +0000)]
[Path] Fix bug in make_absolute logic

This fixes a bug for making path with a //net style root absolute. I
discovered the bug while writing a test case for the VFS, which uses
these paths because they're both legal absolute paths on Windows and
Unix.

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

llvm-svn: 368053

4 years ago[AST] Traverse attributes inside DEF_TRAVERSE_DECL macro
Ilya Biryukov [Tue, 6 Aug 2019 15:46:12 +0000 (15:46 +0000)]
[AST] Traverse attributes inside DEF_TRAVERSE_DECL macro

Summary:
Instead of traversing inside the TraverseDecl() function.
Previously the attributes were traversed after Travese(Some)Decl
returns.

Logically attributes are properties of particular Decls and should be
traversed alongside other "child" nodes.

None of the tests relied on this behavior, hopefully this is an indication
that the change is relatively safe.

This change started with a discussion on cfe-dev, for details see:
https://lists.llvm.org/pipermail/cfe-dev/2019-July/062899.html

Reviewers: rsmith, gribozavr

Reviewed By: gribozavr

Subscribers: mgorny, cfe-commits

Tags: #clang

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

llvm-svn: 368052

4 years ago[libc++] Use the monorepo in the macos-trunk CI script
Louis Dionne [Tue, 6 Aug 2019 15:28:34 +0000 (15:28 +0000)]
[libc++] Use the monorepo in the macos-trunk CI script

llvm-svn: 368051

4 years ago[CMake] Add mapping for IBM XL -qnoeh and -qnortti
Hubert Tong [Tue, 6 Aug 2019 15:08:13 +0000 (15:08 +0000)]
[CMake] Add mapping for IBM XL -qnoeh and -qnortti

Summary:
This patch maps in the `-qnoeh` and `-qnortti` options for building with
IBM XL compilers.

Reviewers: daltenty, xingxue, jasonliu

Reviewed By: daltenty

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 368050

4 years ago[AArch64] NFC: Generalize emitFrameOffset to support more than byte offsets.
Sander de Smalen [Tue, 6 Aug 2019 15:06:31 +0000 (15:06 +0000)]
[AArch64] NFC: Generalize emitFrameOffset to support more than byte offsets.

Refactor emitFrameOffset to accept a StackOffset struct as its offset argument.
This method currently only supports byte offsets (MVT::i8) but will be extended
in a later patch to support scalable offsets (MVT::nxv1i8) as well.

Reviewers: thegameg, rovka, t.p.northover, efriedma, greened

Reviewed By: efriedma

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

llvm-svn: 368049

4 years ago[XCOFF][MC] report_fatal_error before dereferencing NULL
Hubert Tong [Tue, 6 Aug 2019 15:05:20 +0000 (15:05 +0000)]
[XCOFF][MC] report_fatal_error before dereferencing NULL

This patch replaces a TODO comment with a call to `report_fatal_error`.
The path that reaches the added call to `report_fatal_error` manifestly
dereferences a null pointer.

llvm-svn: 368048

4 years ago[test/Object] - Cleanup the Object\obj2yaml.test a bit.
George Rimar [Tue, 6 Aug 2019 14:34:39 +0000 (14:34 +0000)]
[test/Object] - Cleanup the Object\obj2yaml.test a bit.

This makes 2 changes:

1) Removes unwind-section.elf-x86-64 object and the corresponding test case,
because SHT_X86_64_UNWIND is already tested here:
https://github.com/llvm-mirror/llvm/blob/master/test/tools/obj2yaml/section-type.yaml

2) Removes/partially moves "No such file or directory" test, because we already have a similar test here:
https://github.com/llvm-mirror/llvm/blob/master/test/tools/obj2yaml/invalid_input_file.test

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

llvm-svn: 368044

4 years ago[TargetLowering] SimplifyMultipleUseDemandedBits - return UNDEF for undemanded ops
Simon Pilgrim [Tue, 6 Aug 2019 14:30:42 +0000 (14:30 +0000)]
[TargetLowering] SimplifyMultipleUseDemandedBits - return UNDEF for undemanded ops

If we demand no bits/elts from an Op, just return UNDEF

llvm-svn: 368043

4 years ago[StructurizeCFG] Enable -structurizecfg-relaxed-uniform-regions by default
Tim Renouf [Tue, 6 Aug 2019 14:30:19 +0000 (14:30 +0000)]
[StructurizeCFG] Enable -structurizecfg-relaxed-uniform-regions by default

D62198 introduced an option to relax the checks for
hasOnlyUniformBranches. This commit turns the option on by default, for
better code generation in some cases in AMDGPU.

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

Change-Id: I9cbff002a1e74d3b7eb96b4192dc8129936d537d
llvm-svn: 368042

4 years ago[ELF][ARM] Fix /DISCARD/ of section with .ARM.exidx section
Peter Smith [Tue, 6 Aug 2019 14:13:38 +0000 (14:13 +0000)]
[ELF][ARM] Fix /DISCARD/ of section with .ARM.exidx section

The combineEhSections runs, by design, before processSectionCommands so
that input exception sections like .ARM.exidx and .eh_frame are not assigned
to OutputSections. Unfortunately if /DISCARD/ removes InputSections that
have associated .ARM.exidx sections without discarding the .ARM.exidx
synthetic section then we will end up crashing when trying to sort the
InputSections in ascending address order.

We fix this by filtering out the sections that have been discarded prior
to processing the InputSections in finalizeContents().

fixes pr42890

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

llvm-svn: 368041

4 years ago[ELF] Make binding (weak or non-weak) logic consistent for Undefined and SharedSymbol
Fangrui Song [Tue, 6 Aug 2019 14:03:45 +0000 (14:03 +0000)]
[ELF] Make binding (weak or non-weak) logic consistent for Undefined and SharedSymbol

This is a case missed by D64136. If %t1.o has a weak reference on foo,
and %t2.so has a non-weak reference on foo:

```
0. ld.lld %t1.o %t2.so          # ok; STB_WEAK; accepted since D64136
1. ld.lld %t2.so %t1.o          # undefined symbol: foo; STB_GLOBAL
2. gold %t1.o %t2.so            # ok; STB_WEAK
3. gold %t2.so %t1.o            # undefined reference to 'foo'; STB_GLOBAL
4. ld.bfd %t1.o %t2.so          # undefined reference to `foo'; STB_WEAK
5. ld.bfd %t2.so %t1.o          # undefined reference to `foo'; STB_WEAK
```

It can be argued that in both cases, the binding of the undefined foo
should be set to STB_WEAK, because the binding should not be affected by
referenced from shared objects.

--allow-shlib-undefined doesn't suppress errors (3,4,5), but -shared or
--noinhibit-exec allows ld.bfd/gold to produce a binary:

```
3. gold -shared %t2.so %t1.o    # ok; STB_GLOBAL
4. ld.bfd -shared %t2.so %t1.o  # ok; STB_WEAK
5. ld.bfd -shared %t1.o %t1.o   # ok; STB_WEAK
```

If %t2.so has DT_NEEDED entries, ld.bfd will load them (lld/gold don't
have the behavior). If one of the DSO defines foo and it is in the
link-time search path (e.g. DT_NEEDED entry is an absolute path, via
-rpath=, via -rpath-link=, etc),
`ld.bfd %t1.o %t2.so` and `ld.bfd %t1.o %t2.so` will not error.

In this patch, we make Undefined and SharedSymbol share the same binding
computing logic. Case 1 will be allowed:

```
0. ld.lld %t1.o %t2.so          # ok; STB_WEAK; accepted since D64136
1. ld.lld %t2.so %t1.o          # ok; STB_WEAK; changed by this patch
```

In the future, we can explore the option that turns both (0,1) into
errors if --no-allow-shlib-undefined (default when linking an
executable) is in action.

Reviewed By: ruiu

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

llvm-svn: 368038

4 years agoRevert "Fixed failing test cases"
Dmitri Gribenko [Tue, 6 Aug 2019 13:50:28 +0000 (13:50 +0000)]
Revert "Fixed failing test cases"

This reverts commit r368030, which depends on r368021 that I reverted.

llvm-svn: 368036

4 years agoRevert "[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests"
Dmitri Gribenko [Tue, 6 Aug 2019 13:39:50 +0000 (13:39 +0000)]
Revert "[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests"

This reverts commit r368021, it broke tests.

llvm-svn: 368035

4 years agoRevert "gn build: Merge r368021"
Dmitri Gribenko [Tue, 6 Aug 2019 13:39:27 +0000 (13:39 +0000)]
Revert "gn build: Merge r368021"

This reverts commit r368025, which depends on r368021, which needs to be
reverted.

llvm-svn: 368034

4 years agoUpdate LLDB to follow changes in llvm::DWARFDebugNames::NameIndex (4/5)
Igor Kudrin [Tue, 6 Aug 2019 13:38:27 +0000 (13:38 +0000)]
Update LLDB to follow changes in llvm::DWARFDebugNames::NameIndex (4/5)

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

llvm-svn: 368033

4 years ago[MachO] Update LLD to use 64-bit offsets with DataExtractor (3/5)
Igor Kudrin [Tue, 6 Aug 2019 13:37:34 +0000 (13:37 +0000)]
[MachO] Update LLD to use 64-bit offsets with DataExtractor (3/5)

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

llvm-svn: 368032

4 years agoAArch64: bail instead of asserting on unexpected type in G_CONSTANT 0.
Tim Northover [Tue, 6 Aug 2019 13:34:08 +0000 (13:34 +0000)]
AArch64: bail instead of asserting on unexpected type in G_CONSTANT 0.

llvm-svn: 368031

4 years agoFixed failing test cases
Alex Brachet [Tue, 6 Aug 2019 13:29:55 +0000 (13:29 +0000)]
Fixed failing test cases

llvm-svn: 368030

4 years agoImprove MSVC visualizations so the parser shows where we are in the code
Mike Spertus [Tue, 6 Aug 2019 13:29:35 +0000 (13:29 +0000)]
Improve MSVC visualizations so the parser shows where we are in the code

Also provide a visualizer for lambda introducers

llvm-svn: 368029

4 years ago[InstCombine] add tests for binop with FMF with select operands; NFC
Sanjay Patel [Tue, 6 Aug 2019 13:19:13 +0000 (13:19 +0000)]
[InstCombine] add tests for binop with FMF with select operands; NFC

Baseline coverage for D65658.

llvm-svn: 368028

4 years agogn build: Merge r368024
Nico Weber [Tue, 6 Aug 2019 13:12:26 +0000 (13:12 +0000)]
gn build: Merge r368024

llvm-svn: 368027

4 years ago[X86][SSE] Call SimplifyMultipleUseDemandedBits on PACKSS/PACKUS arguments.
Simon Pilgrim [Tue, 6 Aug 2019 13:10:42 +0000 (13:10 +0000)]
[X86][SSE] Call SimplifyMultipleUseDemandedBits on PACKSS/PACKUS arguments.

This mainly helps to replace unused arguments with UNDEF in the case where they have multiple users.

llvm-svn: 368026

4 years agogn build: Merge r368021
Nico Weber [Tue, 6 Aug 2019 13:08:54 +0000 (13:08 +0000)]
gn build: Merge r368021

llvm-svn: 368025

4 years ago[AArch64] NFC: Add generic StackOffset to describe scalable offsets.
Sander de Smalen [Tue, 6 Aug 2019 13:06:40 +0000 (13:06 +0000)]
[AArch64] NFC: Add generic StackOffset to describe scalable offsets.

To support spilling/filling of scalable vectors we need a more generic
representation of a stack offset than simply 'int'.

For this we introduce the StackOffset struct, which comprises multiple
offsets sized by their respective MVTs. Byte-offsets will thus be a simple
tuple such as { offset, MVT::i8 }. Adding two byte-offsets will result in a
byte offset { offsetA + offsetB, MVT::i8 }. When two offsets have different
types, we can canonicalise them to use the same MVT, as long as their
runtime sizes are guaranteed to have the same size-ratio as they would have
at compile-time.

When we have both scalable- and fixed-size objects on the stack, we can
create an offset that is:

  ({ offset_fixed, MVT::i8 } + { offset_scalable, MVT::nxv1i8 })

The struct also contains a getForFrameOffset() method that is specific to
AArch64 and decomposes the frame-offset to be used directly in instructions
that operate on the stack or index into the stack.

Note: This patch adds StackOffset as an AArch64-only concept, but we would
like to make this a generic concept/struct that is supported by all
interfaces that take or return stack offsets (currently as 'int'). Since
that would be a bigger change that is currently pending on D32530 landing,
we thought it makes sense to first show/prove the concept in the AArch64
target before proposing to roll this out further.

Reviewers: thegameg, rovka, t.p.northover, efriedma, greened

Reviewed By: rovka, greened

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

llvm-svn: 368024

4 years ago[llvm/test/Object] Remove redundant test case. NFC
Simon Atanasyan [Tue, 6 Aug 2019 12:41:43 +0000 (12:41 +0000)]
[llvm/test/Object] Remove redundant test case. NFC

Remove redundant `yaml2obj-elf-file-headers-with-e_flags.yaml` test
case. The same functionality is checked by the `Mips/elf-flags.yaml`.

llvm-svn: 368023

4 years ago[X86] SimplifyMultipleUseDemandedBits - target shuffles might not be identity
Simon Pilgrim [Tue, 6 Aug 2019 12:41:29 +0000 (12:41 +0000)]
[X86] SimplifyMultipleUseDemandedBits - target shuffles might not be identity

If we don't demand any non-undef shuffle elements then the assert will fail as all shuffle inputs would still be flagged as 'identity' safe.

Exposed by an incoming patch.

llvm-svn: 368022

4 years ago[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests
Alex Brachet [Tue, 6 Aug 2019 12:15:18 +0000 (12:15 +0000)]
[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests

Reviewers: jhenderson, rupprecht, MaskRay, grimar, labath

Reviewed By: rupprecht

Subscribers: seiya, mgorny, sbc100, hiraditya, aheejin, jakehehrlich, llvm-commits

Tags: #llvm

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

llvm-svn: 368021

4 years ago[CrossTU] Handle case when no USR could be generated during Decl search.
Balazs Keri [Tue, 6 Aug 2019 12:10:16 +0000 (12:10 +0000)]
[CrossTU] Handle case when no USR could be generated during Decl search.

Summary:
When searching for a declaration to be loaded the "lookup name" for every
other Decl is computed. If the USR can not be determined here should be
not an assert, instead skip this Decl.

Reviewers: martong

Reviewed By: martong

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

Tags: #clang

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

llvm-svn: 368020

4 years ago[clangd] Compute scopes eagerly in IncludeFixer
Ilya Biryukov [Tue, 6 Aug 2019 11:37:50 +0000 (11:37 +0000)]
[clangd] Compute scopes eagerly in IncludeFixer

Summary:
Computing lazily leads to crashes. In particular, computing scopes may
produce diagnostics (from inside template instantiations) and we
currently do it when processing another diagnostic, which leads to
crashes.

Moreover, we remember and access 'Scope*' when computing scopes. This
might lead to invalid memory access if the Scope is deleted by the time
we run the delayed computation. We did not actually construct an example
when this happens, though.

From the VCS and review history, it seems the optimization was
introduced in the initial version without a mention of any performance
benchmarks justifying the performance gains. This led me to a
conclusion that the optimization was premature, so removing it to avoid
crashes seems like the right trade-off at that point.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 368019