platform/upstream/llvm.git
6 years agoFix lldb-vscode README.md
Alex Langford [Fri, 14 Sep 2018 19:41:20 +0000 (19:41 +0000)]
Fix lldb-vscode README.md

Summary: The readme was missing "-" characters to enable links

Patch by Nathan Lanza <nathan@lanza.io>

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

llvm-svn: 342266

6 years agoRevert r342183 "[DAGCombine] Fix crash when store merging created an extract_subvecto...
Reid Kleckner [Fri, 14 Sep 2018 19:39:40 +0000 (19:39 +0000)]
Revert r342183 "[DAGCombine] Fix crash when store merging created an extract_subvector with invalid index."

Causes 'isVector() && "Invalid vector type!"' assertion when building
Skia in Chrome.

llvm-svn: 342265

6 years agoFix debug info for SelectionDAG legalization of DAG nodes with two results.
Adrian Prantl [Fri, 14 Sep 2018 19:38:45 +0000 (19:38 +0000)]
Fix debug info for SelectionDAG legalization of DAG nodes with two results.

This patch fixes the debug info handling for SelectionDAG legalization
of DAG nodes with two results. When an replaced SDNode has more than
one result, transferDbgValues was always copying the SDDbgValue from
the first result and attaching them to all members. In reality
SelectionDAG::ReplaceAllUsesWith() is given an array of SDNodes
(though the type signature doesn't make this obvious (cf. the call
site code in ReplaceNode()).

rdar://problem/44162227

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

llvm-svn: 342264

6 years ago[ThinLTOCodeGenerator] Avoid Rehash StringMap in ThreadPool
Steven Wu [Fri, 14 Sep 2018 19:38:21 +0000 (19:38 +0000)]
[ThinLTOCodeGenerator] Avoid Rehash StringMap in ThreadPool

Summary:
During threaded thinLTO, it is possible that the entry for current
module doesn't exist in StringMaps (like ExportLists, ResolvedODR,
etc.). Using operator[] might trigger a rehash for the StringMap, which
might happen on multiple threads at the same time.

rdar://problem/43846199

Reviewers: tejohnson, mehdi_amini, kromanova, pcc

Reviewed By: tejohnson

Subscribers: dang, inglorion, eraman, dexonsmith, llvm-commits

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

llvm-svn: 342263

6 years ago[IRInterpreter] Fall back to JIT with 128-bit values.
Davide Italiano [Fri, 14 Sep 2018 18:55:31 +0000 (18:55 +0000)]
[IRInterpreter] Fall back to JIT with 128-bit values.

They're not that common, and falling back is definitely
better than throwing an error instead of the result. If we
feel motivated, we might end up implementing support for these,
but it's unclear whether it's worth the effort/complexity.

Fixes PR38925.

<rdar://problem/44436068>

llvm-svn: 342262

6 years ago[clangd] Work around compiler macro expansion bugs(?) in completion tests
Sam McCall [Fri, 14 Sep 2018 18:49:16 +0000 (18:49 +0000)]
[clangd] Work around compiler macro expansion bugs(?) in completion tests

llvm-svn: 342261

6 years agoRevert r342210 "[ARM] bottom-top mul support in ARMParallelDSP"
Reid Kleckner [Fri, 14 Sep 2018 18:44:37 +0000 (18:44 +0000)]
Revert r342210 "[ARM] bottom-top mul support in ARMParallelDSP"

It causes assertion failures while building Skia for Android in
Chromium:
https://ci.chromium.org/buildbot/chromium.clang/ToTAndroid/4550

Reduction forthcoming.

llvm-svn: 342260

6 years agoMake the eSearchDepthFunction searches work, add tests
Jim Ingham [Fri, 14 Sep 2018 18:41:40 +0000 (18:41 +0000)]
Make the eSearchDepthFunction searches work, add tests
using the scripted breakpoint resolver.

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

llvm-svn: 342259

6 years agoRevert a line-endings change that somehow got included with rL342257
Simon Pilgrim [Fri, 14 Sep 2018 18:35:21 +0000 (18:35 +0000)]
Revert a line-endings change that somehow got included with rL342257

llvm-svn: 342258

6 years ago[X86][SSE] Lower shuffles to permute(unpack(x,y)) (PR31151)
Simon Pilgrim [Fri, 14 Sep 2018 18:33:31 +0000 (18:33 +0000)]
[X86][SSE] Lower shuffles to permute(unpack(x,y)) (PR31151)

Attempt to lower a shuffle as an unpack of elements from two inputs followed by a single-input (wider) permutation.

As long as the permutation is wider this is a win - there may be some circumstances where same size permutations would also be useful but I've left that for future work.

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

llvm-svn: 342257

6 years ago[X86] Re-generate test checks using current version of the script. NFC
Craig Topper [Fri, 14 Sep 2018 18:27:09 +0000 (18:27 +0000)]
[X86] Re-generate test checks using current version of the script. NFC

The regular expression used for stack accesses is different today.

llvm-svn: 342256

6 years ago[libFuzzer] Disable value-profile-strncmp.test on aarch64.
Matt Morehouse [Fri, 14 Sep 2018 18:24:02 +0000 (18:24 +0000)]
[libFuzzer] Disable value-profile-strncmp.test on aarch64.

Test no longer finds the BINGO on clang-cmake-aarch64-full bot, and I
can't reproduce on our ARM machine.

llvm-svn: 342255

6 years ago[InstCombine] rename test file to better describe the fold; NFC
Sanjay Patel [Fri, 14 Sep 2018 18:12:30 +0000 (18:12 +0000)]
[InstCombine] rename test file to better describe the fold; NFC

The folds are not limited to zext, and the real goal is width
reduction of a math op. D52075 is proposing to extend this to
subtracts.

llvm-svn: 342254

6 years ago[InstCombine] remove unnecessary target constraints for tests; NFC
Sanjay Patel [Fri, 14 Sep 2018 18:06:36 +0000 (18:06 +0000)]
[InstCombine] remove unnecessary target constraints for tests; NFC

These are universal folds.

llvm-svn: 342253

6 years ago[modernize-use-transparent-functors] TypeLocs can be implicitly created, don't crash...
Benjamin Kramer [Fri, 14 Sep 2018 18:05:30 +0000 (18:05 +0000)]
[modernize-use-transparent-functors] TypeLocs can be implicitly created, don't crash when encountering those.

llvm-svn: 342252

6 years ago[InstCombine] move test next to related tests; NFC
Sanjay Patel [Fri, 14 Sep 2018 18:05:14 +0000 (18:05 +0000)]
[InstCombine] move test next to related tests; NFC

llvm-svn: 342251

6 years ago[InstCombine] remove stall comment from test file; NFC
Sanjay Patel [Fri, 14 Sep 2018 18:02:17 +0000 (18:02 +0000)]
[InstCombine] remove stall comment from test file; NFC

llvm-svn: 342250

6 years ago[InstCombine] regenerate test checks; NFC
Sanjay Patel [Fri, 14 Sep 2018 17:53:44 +0000 (17:53 +0000)]
[InstCombine] regenerate test checks; NFC

There was a bug in a check line regex that could cause the test to fail
with a naming difference. The auto-gen script seems to work as expected now.

llvm-svn: 342249

6 years agoIntroduce explicit add_unittest_with_input_files target for tests that use llvm:...
Nico Weber [Fri, 14 Sep 2018 17:34:46 +0000 (17:34 +0000)]
Introduce explicit add_unittest_with_input_files target for tests that use llvm::getInputFileDirectory()

Using llvm::getInputFileDirectory() in unit tests is discouraged, so require an explicit opt-in.
This way, cmake also writes ~60 fewer unused files to disk.

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

llvm-svn: 342248

6 years agofix noasserts build
Adrian Prantl [Fri, 14 Sep 2018 17:32:52 +0000 (17:32 +0000)]
fix noasserts build

llvm-svn: 342247

6 years agoRemove PseudoConstantAnalysis
Shuai Wang [Fri, 14 Sep 2018 17:27:27 +0000 (17:27 +0000)]
Remove PseudoConstantAnalysis

Summary: It's not used anywhere for years. The last usage is removed in https://reviews.llvm.org/rL198476 in 2014.

Subscribers: mgorny, cfe-commits

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

llvm-svn: 342246

6 years agoSelectionDAG: Add compact SDDbgValue representation to -dag-dump-verbose output
Adrian Prantl [Fri, 14 Sep 2018 17:08:02 +0000 (17:08 +0000)]
SelectionDAG: Add compact SDDbgValue representation to -dag-dump-verbose output

llvm-svn: 342245

6 years agoRevert r342233.
James Henderson [Fri, 14 Sep 2018 16:48:47 +0000 (16:48 +0000)]
Revert r342233.

This caused LLD test failures, which I've been unable to reproduce.

Reverting to allow for further investigation next week.

llvm-svn: 342244

6 years agofix typos
Adrian Prantl [Fri, 14 Sep 2018 16:12:14 +0000 (16:12 +0000)]
fix typos

llvm-svn: 342241

6 years ago[clang-cl] Fix PR38934: failing to dllexport class template member w/ explicit instan...
Hans Wennborg [Fri, 14 Sep 2018 15:18:30 +0000 (15:18 +0000)]
[clang-cl] Fix PR38934: failing to dllexport class template member w/ explicit instantiation and PCH

The code in ASTContext::DeclMustBeEmitted was supposed to handle this,
but didn't take into account that synthesized members such as operator=
might not get marked as template specializations, because they're
synthesized on the instantiation directly when handling the class-level
dllexport attribute.

llvm-svn: 342240

6 years agolld: add -z interpose support
Ed Maste [Fri, 14 Sep 2018 14:25:37 +0000 (14:25 +0000)]
lld: add -z interpose support

-z interpose sets the DF_1_INTERPOSE flag, marking the object as an
interposer.

Via FreeBSD PR 230604, linking Valgrind with lld failed.

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

llvm-svn: 342239

6 years ago[clang] Make sure attributes on member classes are applied properly
Louis Dionne [Fri, 14 Sep 2018 14:07:16 +0000 (14:07 +0000)]
[clang] Make sure attributes on member classes are applied properly

Summary:
Attributes on member classes of class templates and member class templates
of class templates are not currently instantiated. This was discovered by
Richard Smith here:

  http://lists.llvm.org/pipermail/cfe-dev/2018-September/059291.html

This commit makes sure that attributes are instantiated properly. This
commit does not fix the broken behavior for member partial and explicit
specializations of class templates.

PR38913

Reviewers: rsmith

Subscribers: dexonsmith, cfe-commits

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

llvm-svn: 342238

6 years ago[InstCombine] add more tests for x86 blendv (PR38814); NFC
Sanjay Patel [Fri, 14 Sep 2018 13:47:33 +0000 (13:47 +0000)]
[InstCombine] add more tests for x86 blendv (PR38814); NFC

llvm-svn: 342237

6 years ago[asan] Fix test case failure on SystemZ
Ulrich Weigand [Fri, 14 Sep 2018 13:36:55 +0000 (13:36 +0000)]
[asan] Fix test case failure on SystemZ

Since we changed our inlining parameters, this test case was failing
on SystemZ, as the two tests were now both inlined into the main
function, which the test didn't expect.  Fixed by adding a few more
noinline attributes.

llvm-svn: 342236

6 years ago[X86][BMI1] Fix BLSI/BLSMSK/BLSR BMI1 scheduling on btver2
Simon Pilgrim [Fri, 14 Sep 2018 13:31:14 +0000 (13:31 +0000)]
[X86][BMI1] Fix BLSI/BLSMSK/BLSR BMI1 scheduling on btver2

These have the same behaviour as tzcnt on btver2 - confirmed with AMD 16h SOG, Agner and instlatx64.

llvm-svn: 342235

6 years ago[X86][BMI1] Add scheduler class for BLSI/BLSMSK/BLSR BMI1 instructions
Simon Pilgrim [Fri, 14 Sep 2018 13:09:56 +0000 (13:09 +0000)]
[X86][BMI1] Add scheduler class for BLSI/BLSMSK/BLSR BMI1 instructions

llvm-svn: 342234

6 years ago[ThinLTO]Allow setting of maximum cache size with 64-bit number
James Henderson [Fri, 14 Sep 2018 12:51:19 +0000 (12:51 +0000)]
[ThinLTO]Allow setting of maximum cache size with 64-bit number

Also added a C-interface function for large values, and updated
llvm-lto's --thinlto-cache-max-size-bytes switch to take a type larger
than int.

The maximum cache size in terms of bytes is a 64-bit number. However,
the methods to set it only took unsigned previously, which meant that
the maximum cache size could not be specified above 4GB. That's quite
small compared to the output of some projects, so it makes sense to
provide the ability to set larger values in that field.

We also needed a C-interface function that provides a greater range
than the existing thinlto_codegen_set_cache_size_bytes, which also only
takes an unsigned, so this change also adds
hinlto_codegen_set_cache_size_megabytes.

Reviewed by: mehdi_amini, tejohnson, steven_wu

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

llvm-svn: 342233

6 years ago[VFS] vfs::directory_iterator yields path and file type instead of full Status
Sam McCall [Fri, 14 Sep 2018 12:47:38 +0000 (12:47 +0000)]
[VFS] vfs::directory_iterator yields path and file type instead of full Status

Summary:
Most callers I can find are using only `getName()`. Type is used by the
recursive iterator.

Now we don't have to call stat() on every listed file (on most platforms).
Exceptions are e.g. Solaris where readdir() doesn't include type information.
On those platforms we'll still stat() - see D51918.

The result is significantly faster (stat() can be slow).
My motivation: this may allow us to improve clang IO on large TUs with long
include search paths. Caching readdir() results may allow us to skip many stat()
and open() operations on nonexistent files.

Reviewers: bkramer

Subscribers: fedor.sergeev, cfe-commits

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

llvm-svn: 342232

6 years ago[Driver] Fix missing MultiArch include dir on powerpcspe
Kristina Brooks [Fri, 14 Sep 2018 12:42:13 +0000 (12:42 +0000)]
[Driver] Fix missing MultiArch include dir on powerpcspe

On powerpc-linux-gnuspe, the header files are located in their
own include directory named /usr/lib/powerpc-linux-gnuspe,
so add this directory to PPCMultiarchIncludeDirs.

Patch by glaubitz (John Paul Adrian Glaubitz)

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

llvm-svn: 342231

6 years ago[clangd] Don't override the preamble while completing inside it, it doesn't work.
Sam McCall [Fri, 14 Sep 2018 12:36:06 +0000 (12:36 +0000)]
[clangd] Don't override the preamble while completing inside it, it doesn't work.

Summary:
To stay fast, enable single-file-mode instead. This is fine since completions
in the preamble are simple.

The net effect for now is to suppress the spurious TopLevel completions when
completing inside the preamble.
Once Sema has include directive completion, this will be more important.

Reviewers: ilya-biryukov

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

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

llvm-svn: 342230

6 years ago[clangd] Don't double-infer compile commands after r342228
Sam McCall [Fri, 14 Sep 2018 12:32:08 +0000 (12:32 +0000)]
[clangd] Don't double-infer compile commands after r342228

llvm-svn: 342229

6 years ago[Tooling] JSONCompilationDatabasePlugin infers compile commands for missing files
Sam McCall [Fri, 14 Sep 2018 12:24:09 +0000 (12:24 +0000)]
[Tooling] JSONCompilationDatabasePlugin infers compile commands for missing files

Summary:
See the existing InterpolatingCompilationDatabase for details on how this works.
We've been using this in clangd for a while, the heuristics seem to work well.

Reviewers: bkramer

Subscribers: ilya-biryukov, ioeric, kadircet, cfe-commits

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

llvm-svn: 342228

6 years ago[clangd] NFC: Fix IndexBenchmark CLI arguments handling
Kirill Bobyrev [Fri, 14 Sep 2018 12:21:09 +0000 (12:21 +0000)]
[clangd] NFC: Fix IndexBenchmark CLI arguments handling

llvm-svn: 342227

6 years ago[clangd] Update IndexerMain.cpp file comment after rename. NFC
Ilya Biryukov [Fri, 14 Sep 2018 11:39:05 +0000 (11:39 +0000)]
[clangd] Update IndexerMain.cpp file comment after rename. NFC

llvm-svn: 342226

6 years ago[analyzer] Restore final on NeedsCastLocField. NFC
Ilya Biryukov [Fri, 14 Sep 2018 11:28:48 +0000 (11:28 +0000)]
[analyzer] Restore final on NeedsCastLocField. NFC

To fix compiler warning about non-virtual dtor introduced in r342221.

llvm-svn: 342225

6 years ago[analyzer] Attempt to make a windows buildbot happy.
Kristof Umann [Fri, 14 Sep 2018 11:20:16 +0000 (11:20 +0000)]
[analyzer] Attempt to make a windows buildbot happy.

Got an error that a cast is happening from a pointer type to long, which is
smaller.

llvm-svn: 342223

6 years ago[AMDGPU] Ensure trig range reduction only used for subtargets that require it
David Stuttard [Fri, 14 Sep 2018 10:27:19 +0000 (10:27 +0000)]
[AMDGPU] Ensure trig range reduction only used for subtargets that require it

Summary:
GFX9 and above support sin/cos instructions with a greater range and thus don't
require a fract instruction prior to invocation.

Added a subtarget feature to reflect this and added code to take advantage of
expanded range on GFX9+

Also updated the tests to check correct behaviour

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, llvm-commits

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

Change-Id: I1c1f1d3726a5ae32116646ca5cfa1ab4ef69e5b0
llvm-svn: 342222

6 years ago[analyzer][UninitializedObjectChecker] Support for nonloc::LocAsInteger
Kristof Umann [Fri, 14 Sep 2018 10:18:26 +0000 (10:18 +0000)]
[analyzer][UninitializedObjectChecker] Support for nonloc::LocAsInteger

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

llvm-svn: 342221

6 years ago[analyzer][UninitializedObjectChecker] New flag to ignore records based on it's fields
Kristof Umann [Fri, 14 Sep 2018 10:10:09 +0000 (10:10 +0000)]
[analyzer][UninitializedObjectChecker] New flag to ignore records based on it's fields

Based on a suggestion from @george.karpenkov.

In some cases, structs are used as unions with a help of a tag/kind field.
This patch adds a new string flag (a pattern), that is matched against the
fields of a record, and should a match be found, the entire record is ignored.

For more info refer to http://lists.llvm.org/pipermail/cfe-dev/2018-August/058906.html
and to the responses to that, especially http://lists.llvm.org/pipermail/cfe-dev/2018-August/059215.html.

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

llvm-svn: 342220

6 years ago[analyzer][UninitializedObjectChecker] Refactored checker options
Kristof Umann [Fri, 14 Sep 2018 09:39:26 +0000 (09:39 +0000)]
[analyzer][UninitializedObjectChecker] Refactored checker options

Since I plan to add a number of new flags, it made sense to encapsulate
them in a new struct, in order not to pollute FindUninitializedFields's
constructor with new boolean options with super long names.

This revision practically reverts D50508, since FindUninitializedFields
now accesses the pedantic flag anyways.

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

llvm-svn: 342219

6 years ago[DWARF] reposting r342048, which was reverted in r342056 due to buildbot
Wolfgang Pieb [Fri, 14 Sep 2018 09:14:10 +0000 (09:14 +0000)]
[DWARF] reposting r342048, which was reverted in r342056 due to buildbot
errors.
Adjusted 2 test cases for ARM and darwin and fixed a bug with the original
change in dsymutil.

llvm-svn: 342218

6 years ago[analyzer][UninitializedObjectChecker] Correct dynamic type is acquired for record...
Kristof Umann [Fri, 14 Sep 2018 09:13:36 +0000 (09:13 +0000)]
[analyzer][UninitializedObjectChecker] Correct dynamic type is acquired for record pointees

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

llvm-svn: 342217

6 years agoUse Chrome and Firefox as example of success for clang
Sylvestre Ledru [Fri, 14 Sep 2018 09:08:21 +0000 (09:08 +0000)]
Use Chrome and Firefox as example of success for clang

llvm-svn: 342216

6 years ago[analyzer][UninitializedObjectChecker] Updated comments
Kristof Umann [Fri, 14 Sep 2018 09:07:40 +0000 (09:07 +0000)]
[analyzer][UninitializedObjectChecker] Updated comments

Some of the comments are incorrect, imprecise, or simply nonexistent.
Since I have a better grasp on how the analyzer works, it makes sense
to update most of them in a single swoop.

I tried not to flood the code with comments too much, this amount
feels just right to me.

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

llvm-svn: 342215

6 years agoremove 11 years old videos from the homepage. if you have a suggestion, please drop...
Sylvestre Ledru [Fri, 14 Sep 2018 09:00:48 +0000 (09:00 +0000)]
remove 11 years old videos from the homepage. if you have a suggestion, please drop me an email

llvm-svn: 342214

6 years ago[analyzer][UninitializedObjectChecker] Fixed dereferencing
Kristof Umann [Fri, 14 Sep 2018 08:58:21 +0000 (08:58 +0000)]
[analyzer][UninitializedObjectChecker] Fixed dereferencing

iThis patch aims to fix derefencing, which has been debated for months now.

Instead of working with SVals, the function now relies on TypedValueRegion.

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

llvm-svn: 342213

6 years agoupdate the doc to compare with gcc 4.9 instead of 4.2
Sylvestre Ledru [Fri, 14 Sep 2018 08:55:09 +0000 (08:55 +0000)]
update the doc to compare with gcc 4.9 instead of 4.2

llvm-svn: 342212

6 years agogcc is now returning the same output on this example, removing this example
Sylvestre Ledru [Fri, 14 Sep 2018 08:52:18 +0000 (08:52 +0000)]
gcc is now returning the same output on this example, removing this example

llvm-svn: 342211

6 years ago[ARM] bottom-top mul support in ARMParallelDSP
Sam Parker [Fri, 14 Sep 2018 08:09:09 +0000 (08:09 +0000)]
[ARM] bottom-top mul support in ARMParallelDSP

On failing to find sequences that can be converted into dual macs,
try to find sequential 16-bit loads that are used by muls which we
can then use smultb, smulbt, smultt with a wide load.

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

llvm-svn: 342210

6 years ago[LoopInterchange] Preserve ScalarEvolution, by forgetting about interchanged loops.
Florian Hahn [Fri, 14 Sep 2018 07:50:20 +0000 (07:50 +0000)]
[LoopInterchange] Preserve ScalarEvolution, by forgetting about interchanged loops.

As preparation for LoopInterchange becoming a loop pass, it needs to
preserve ScalarEvolution. Even though interchanging should not change
the trip count of the loop, it modifies loop entry, latch and exit
blocks.

I added -verify-scev to some loop interchange tests, but the verification does
not catch problems caused by missing invalidation of SE in loop interchange, as
the trip counts themselves do not change. So there might be potential to
make the SE verification covering more stuff in the future.

Reviewers: mkazantsev, efriedma, karthikthecool

Reviewed By: efriedma

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

llvm-svn: 342209

6 years ago[PDB] Use the raw PDB symbol interface more accurately
Aleksandr Urakov [Fri, 14 Sep 2018 07:46:06 +0000 (07:46 +0000)]
[PDB] Use the raw PDB symbol interface more accurately

Summary:
This patch adds some symbol tag checks before using the `IPDBRawSymbol`
interface to improve safety and readability.

Reviewers: zturner

Reviewed By: zturner

Subscribers: lldb-commits, stella.stamenova

Tags: #lldb

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

llvm-svn: 342208

6 years ago[SystemZ] Adjust cost functions for subtargets that use LI + LOC instead of IPM
Jonas Paulsson [Fri, 14 Sep 2018 06:46:55 +0000 (06:46 +0000)]
[SystemZ] Adjust cost functions for subtargets that use LI + LOC instead of IPM

After recent improvements which makes better use of LOC instead of IPM, the
TTI cost functions also needs to be updated to reflect this.

This involves sext, zext and xor of i1.

The tests were updated so that for z13 the new costs are expected, while the
old costs are still checked for on zEC12.

Review: Ulrich Weigand
https://reviews.llvm.org/D51339

llvm-svn: 342207

6 years ago[COFF] Allow embedded directives to be separated by null bytes
Martin Storsjo [Fri, 14 Sep 2018 06:08:56 +0000 (06:08 +0000)]
[COFF] Allow embedded directives to be separated by null bytes

The PE spec says that they will be separated by spaces, but link.exe
handles it just fine if they are separated by null bytes as well.

This adds tests to the lld repo, with the actual functional change
in LLVM in SVN r342204.

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

llvm-svn: 342206

6 years ago[COFF] Avoid copying of chunk vectors. NFC.
Martin Storsjo [Fri, 14 Sep 2018 06:08:51 +0000 (06:08 +0000)]
[COFF] Avoid copying of chunk vectors. NFC.

When declaring the pair variable as "auto Pair : Map", it is
effectively declared as
std::pair<std::pair<StringRef, uint32_t>, std::vector<Chunk *>>.
This effectively does a full, shallow copy of the Chunk vector,
just to be thrown away after each iteration.

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

llvm-svn: 342205

6 years ago[Support] Treat null bytes as separator in windows command line strings
Martin Storsjo [Fri, 14 Sep 2018 06:08:01 +0000 (06:08 +0000)]
[Support] Treat null bytes as separator in windows command line strings

When reading directives from a .drectve section, the directives are
tokenized as a normal windows command line. However in these cases,
link.exe allows the directives to be separated by null bytes, not only by
spaces.

A test case for this change will be added in the lld repo.

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

llvm-svn: 342204

6 years ago[InstCombine] Add some test cases for (add (sext x), (sext y)) --> (sext (add int...
Craig Topper [Fri, 14 Sep 2018 05:16:58 +0000 (05:16 +0000)]
[InstCombine] Add some test cases for (add (sext x), (sext y)) --> (sext (add int x, y)) and (mul (sext x), (sext y)) --> (sext (mul x, y)). NFC

llvm-svn: 342203

6 years ago[NFC] Remove meaningless code from GVN
Max Kazantsev [Fri, 14 Sep 2018 04:50:38 +0000 (04:50 +0000)]
[NFC] Remove meaningless code from GVN

llvm-svn: 342202

6 years agoFix for the buildbot failure http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux...
Hideki Saito [Fri, 14 Sep 2018 02:02:57 +0000 (02:02 +0000)]
Fix for the buildbot failure lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/23635
from the commit (r342197) of https://reviews.llvm.org/D50820.

llvm-svn: 342201

6 years ago[XRay][clang] Emit "never-instrument" attribute
Dean Michael Berris [Fri, 14 Sep 2018 01:59:12 +0000 (01:59 +0000)]
[XRay][clang] Emit "never-instrument" attribute

Summary:
Before this change, we only emit the XRay attributes in LLVM IR when the
-fxray-instrument flag is provided. This may cause issues with thinlto
when the final binary is being built/linked with -fxray-instrument, and
the constitutent LLVM IR gets re-lowered with xray instrumentation.

With this change, we can honour the "never-instrument "attributes
provided in the source code and preserve those in the IR. This way, even
in thinlto builds, we retain the attributes which say whether functions
should never be XRay instrumented.

This change addresses llvm.org/PR38922.

Reviewers: mboerger, eizan

Subscribers: mehdi_amini, dexonsmith, cfe-commits, llvm-commits

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

llvm-svn: 342200

6 years ago[ODRHash] Fix early exit that skipped code.
Richard Trieu [Fri, 14 Sep 2018 01:15:28 +0000 (01:15 +0000)]
[ODRHash] Fix early exit that skipped code.

There is a bit of code at the end of AddDeclaration that should be run on
every exit of the function.  However, there was an early exit beforehand
that could be triggered, which causes a small amount of data to skip the
hashing, leading to false positive mismatch.  Use a separate function so
that this code is always run.

llvm-svn: 342199

6 years ago[clangd] Fix TUScheduler typos
Fangrui Song [Fri, 14 Sep 2018 00:56:11 +0000 (00:56 +0000)]
[clangd] Fix TUScheduler typos

llvm-svn: 342198

6 years ago[VPlan] Implement initial vector code generation support for simple outer loops.
Hideki Saito [Fri, 14 Sep 2018 00:36:00 +0000 (00:36 +0000)]
[VPlan] Implement initial vector code generation support for simple outer loops.

Summary:
[VPlan] Implement vector code generation support for simple outer loops.

Context: Patch Series #1 for outer loop vectorization support in LV  using VPlan. (RFC: http://lists.llvm.org/pipermail/llvm-dev/2017-December/119523.html).

This patch introduces vector code generation support for simple outer loops that are currently supported in the VPlanNativePath. Changes here essentially do the following:

  - force vector code generation using explicit vectorize_width

  - add conservative early returns in cost model and other places for VPlanNativePath

  - add code for setting up outer loop inductions

  - support for widening non-induction PHIs that can result from inner loops and uniform conditional branches

  - support for generating uniform inner branches

We plan to add a handful C outer loop executable tests once the initial code generation support is committed. This patch is expected to be NFC for the inner loop vectorizer path. Since we are moving in the direction of supporting outer loop vectorization in LV, it may also be time to rename classes such as InnerLoopVectorizer.

Reviewers: fhahn, rengolin, hsaito, dcaballe, mkuper, hfinkel, Ayal

Reviewed By: fhahn, hsaito

Subscribers: dmgreen, bollu, tschuett, rkruppe, rogfer01, llvm-commits

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

llvm-svn: 342197

6 years agoRelax alignment assumptions in a test after r342194
Vedant Kumar [Fri, 14 Sep 2018 00:16:37 +0000 (00:16 +0000)]
Relax alignment assumptions in a test after r342194

Don't hardcode align 8.

Fixes a bot failure:
http://lab.llvm.org:8011/builders/clang-cmake-armv8-full/builds/6373

llvm-svn: 342196

6 years agoUpdate a clang-tidy test for r342194
Vedant Kumar [Thu, 13 Sep 2018 23:50:20 +0000 (23:50 +0000)]
Update a clang-tidy test for r342194

The location of implicit captures has changed. Update a use-after-move
checker test to reflect that.

This fixes a bot failure:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/36500

llvm-svn: 342195

6 years ago[Sema] Remove location from implicit capture init expr
Vedant Kumar [Thu, 13 Sep 2018 23:28:25 +0000 (23:28 +0000)]
[Sema] Remove location from implicit capture init expr

A lambda's closure is initialized when the lambda is declared. For
implicit captures, the initialization code emitted from EmitLambdaExpr
references source locations *within the lambda body* in the function
containing the lambda. This results in a poor debugging experience: we
step to the line containing the lambda, then into lambda, out again,
over and over, until every capture's field is initialized.

To improve stepping behavior, assign the starting location of the lambda
to expressions which initialize an implicit capture within it.

rdar://39807527

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

llvm-svn: 342194

6 years ago[NFC] Link LLVMCore into LLVMExegesisARMTests.
Richard Diamond [Thu, 13 Sep 2018 23:18:33 +0000 (23:18 +0000)]
[NFC] Link LLVMCore into LLVMExegesisARMTests.

Fixes missing `llvm::LLVMContext::~LLVMContext()` symbols w/
`BUILD_SHARED_LIBS`.

llvm-svn: 342193

6 years agoFix crash on call to __builtin_memcpy with a null pointer to an
Richard Smith [Thu, 13 Sep 2018 22:47:33 +0000 (22:47 +0000)]
Fix crash on call to __builtin_memcpy with a null pointer to an
incomplete type.

Also improve the diagnostics for similar situations.

llvm-svn: 342192

6 years agoCOFF: Add support for /force:multiple option
Rui Ueyama [Thu, 13 Sep 2018 22:05:10 +0000 (22:05 +0000)]
COFF: Add support for /force:multiple option

Patch by Thomas Roughton.

This patch adds support for linking with multiple definitions to LLD's
COFF driver, in line with link.exe's /force:multiple option.

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

llvm-svn: 342191

6 years agosvn add the new files...
Jim Ingham [Thu, 13 Sep 2018 21:59:16 +0000 (21:59 +0000)]
svn add the new files...

I started from a clean slate to do the checkin, but forgot to svn add the new files.
Do that now.

Also add the one new source file to CMakeLists.txt

llvm-svn: 342190

6 years ago[AMDGPU] Removed unused method
Tim Renouf [Thu, 13 Sep 2018 21:56:25 +0000 (21:56 +0000)]
[AMDGPU] Removed unused method

Summary:
I accidentally left this behind in D50306, and it causes a build warning
when I build with gcc7.

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, t-tye, llvm-commits

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

Change-Id: I30f7a47047e9d9d841f652da66d2fea19e74842c
llvm-svn: 342189

6 years agoRemember to sort the Xcode project file. NFC.
Jim Ingham [Thu, 13 Sep 2018 21:55:00 +0000 (21:55 +0000)]
Remember to sort the Xcode project file.  NFC.

llvm-svn: 342188

6 years ago[SanitizerCoverage] Create comdat for global arrays.
Matt Morehouse [Thu, 13 Sep 2018 21:45:55 +0000 (21:45 +0000)]
[SanitizerCoverage] Create comdat for global arrays.

Summary:
Place global arrays in comdat sections with their associated functions.
This makes sure they are stripped along with the functions they
reference, even on the BFD linker.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: eraman, hiraditya, llvm-commits

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

llvm-svn: 342186

6 years agoAdd a "scripted" breakpoint type to lldb.
Jim Ingham [Thu, 13 Sep 2018 21:35:32 +0000 (21:35 +0000)]
Add a "scripted" breakpoint type to lldb.

This change allows you to write a new breakpoint type where the
logic for setting breakpoints is determined by a Python callback
written using the SB API's.

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

llvm-svn: 342185

6 years ago[NFC][InstCombine] PR38708 - inefficient pattern for high-bits checking 3.
Roman Lebedev [Thu, 13 Sep 2018 21:34:47 +0000 (21:34 +0000)]
[NFC][InstCombine] PR38708 - inefficient pattern for high-bits checking 3.

The last, non-canonical variant:
https://godbolt.org/z/aCMsPk
https://rise4fun.com/Alive/I6f

It can only happen due to the extra use on the inner shift.
But here it is ok.

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

llvm-svn: 342184

6 years ago[DAGCombine] Fix crash when store merging created an extract_subvector with invalid...
Amara Emerson [Thu, 13 Sep 2018 21:28:58 +0000 (21:28 +0000)]
[DAGCombine] Fix crash when store merging created an extract_subvector with invalid index.

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

llvm-svn: 342183

6 years agoLLVMExegesisX86Tests: link to LLVMCore, too.
Roman Lebedev [Thu, 13 Sep 2018 21:26:09 +0000 (21:26 +0000)]
LLVMExegesisX86Tests: link to LLVMCore, too.

Fixes build for me.
Refs. D52054

[215/217] Linking CXX executable unittests/tools/llvm-exegesis/X86/LLVMExegesisX86Tests
FAILED: unittests/tools/llvm-exegesis/X86/LLVMExegesisX86Tests
: && /usr/bin/g++  -pipe -O2 -g0 -UNDEBUG -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -pipe -O2 -g0 -UNDEBUG  -fuse-ld=lld -Wl,--color-diagnostics -Wl,-allow-shlib-undefined     -Wl,-O3 -Wl,--gc-sections unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/AssemblerTest.cpp.o unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/AnalysisTest.cpp.o unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/SnippetGeneratorTest.cpp.o unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/RegisterAliasingTest.cpp.o unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/TargetTest.cpp.o  -o unittests/tools/llvm-exegesis/X86/LLVMExegesisX86Tests  -Wl,-rpath,/build/llvm-build-GCC-release/lib lib/libLLVMMC.so.8svn lib/libLLVMMCParser.so.8svn lib/libLLVMObject.so.8svn lib/libLLVMSymbolize.so.8svn lib/libLLVMX86CodeGen.so.8svn lib/libLLVMX86AsmParser.so.8svn lib/libLLVMX86AsmPrinter.so.8svn lib/libLLVMX86Desc.so.8svn lib/libLLVMX86Disassembler.so.8svn lib/libLLVMX86Info.so.8svn lib/libLLVMX86Utils.so.8svn lib/libLLVMSupport.so.8svn -lpthread lib/libgtest_main.so.8svn lib/libgtest.so.8svn -lpthread lib/libLLVMExegesis.so.8svn lib/libLLVMExegesisX86.so.8svn && :
ld.lld: error: undefined symbol: llvm::LLVMContext::~LLVMContext()
>>> referenced by AssemblerTest.cpp
>>>               unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/AssemblerTest.cpp.o:(exegesis::(anonymous namespace)::X86MachineFunctionGeneratorTest_DISABLED_JitFunction_Test::TestBody())

ld.lld: error: undefined symbol: llvm::LLVMContext::~LLVMContext()
>>> referenced by AssemblerTest.cpp
>>>               unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/AssemblerTest.cpp.o:(exegesis::(anonymous namespace)::X86MachineFunctionGeneratorTest_DISABLED_JitFunctionXOR32rr_Default_Test::TestBody())

ld.lld: error: undefined symbol: llvm::LLVMContext::~LLVMContext()
>>> referenced by AssemblerTest.cpp
>>>               unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/AssemblerTest.cpp.o:(void exegesis::MachineFunctionGeneratorBaseTest::Check<int, int, int, int, int, int, int, int>(exegesis::ExegesisTarget const&, llvm::ArrayRef<unsigned int>, llvm::MCInst, int, int, int, int, int, int, int, int))

ld.lld: error: undefined symbol: llvm::LLVMContext::~LLVMContext()
>>> referenced by AssemblerTest.cpp
>>>               unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/AssemblerTest.cpp.o:(exegesis::(anonymous namespace)::X86MachineFunctionGeneratorTest_DISABLED_JitFunctionMOV32ri_Test::TestBody())
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

llvm-svn: 342182

6 years agoAdd support for descriptions with command completions.
Raphael Isemann [Thu, 13 Sep 2018 21:26:00 +0000 (21:26 +0000)]
Add support for descriptions with command completions.

Summary:
This patch adds a framework for adding descriptions to the command completions we provide.
It also adds descriptions for completed top-level commands so that we can test this code.

Completions are in general supposed to be displayed alongside the completion itself. The descriptions
can be used to provide additional information about the completion to the user. Examples for descriptions
are function signatures when completing function calls in the expression command or the binary name
when providing completion for a symbol.

There is still some boilerplate code from the old completion API left in LLDB (mostly because the respective
APIs are reused for non-completion related purposes, so the CompletionRequest doesn't make sense to be
used), so that's why I still had to change some function signatures. Also, as the old API only passes around a
list of matches, and the descriptions are for these functions just another list, I had to add some code that
essentially just ensures that both lists are always the same side (e.g. all the manual calls to
`descriptions->AddString(X)` below a `matches->AddString(Y)` call).

The initial command descriptions that come with this patch are just reusing the existing
short help that is already added in LLDB.

An example completion with descriptions looks like this:
```
(lldb) pl
Available completions:
        platform -- Commands to manage and create platforms.
        plugin   -- Commands for managing LLDB plugins.
```

Reviewers: #lldb, jingham

Reviewed By: #lldb, jingham

Subscribers: jingham, JDevlieghere, lldb-commits

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

llvm-svn: 342181

6 years ago[llvm-exegesis] Add missing MC dependency to CMakeLists.txt
Sam Clegg [Thu, 13 Sep 2018 21:17:16 +0000 (21:17 +0000)]
[llvm-exegesis] Add missing MC dependency to CMakeLists.txt

See rL342148

This probably only shows up in BUILD_SHARED_LIBS=ON builds
which might explain how it crept in.

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

llvm-svn: 342180

6 years ago[bindings/go] Add DebugLoc parameter to InsertXXXAtEnd()
Peter Collingbourne [Thu, 13 Sep 2018 21:16:39 +0000 (21:16 +0000)]
[bindings/go] Add DebugLoc parameter to InsertXXXAtEnd()

These functions previously passed nil for the location, which always resulted in a crash.

This is a signature breaking change, but I cannot see how they could have been used before.

Patch by Ben Clayton!

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

llvm-svn: 342179

6 years agoAdd dependency on new llvm-cxxmap tool to check-llvm.
Richard Smith [Thu, 13 Sep 2018 21:15:34 +0000 (21:15 +0000)]
Add dependency on new llvm-cxxmap tool to check-llvm.

llvm-svn: 342178

6 years agoDiagnose likely typos in #include directives.
Richard Smith [Thu, 13 Sep 2018 21:10:08 +0000 (21:10 +0000)]
Diagnose likely typos in #include directives.

Summary:
When someone writes

  #include "<some_file>"

or

  #include " some_file "

the compiler returns "file not fuond..." with fonts and quotes that may
make it hard to see there are excess quotes or surprising bytes in the
filename.  Assuming that files are usually logically named and start and
end with an alphanumeric character, we can check for the file's
existence by stripping the non-alphanumeric leading or trailing
characters.  If the file is found, emit a non-fatal error with a
FixItHint.

Patch by Christy Lee!

Reviewers: aaron.ballman, erikjv, rsmith

Reviewed By: rsmith

Subscribers: lebedev.ri, xbolva00, sammccall, modocache, erikjv, aaron.ballman, cfe-commits

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

llvm-svn: 342177

6 years ago[MachineInstr] In addRegisterKilled and addRegisterDead, don't remove operands from...
Craig Topper [Thu, 13 Sep 2018 20:51:27 +0000 (20:51 +0000)]
[MachineInstr] In addRegisterKilled and addRegisterDead, don't remove operands from inline assembly instructions if they have an associated flag operand.

INLINEASM instructions use extra operands to carry flags. If a register operand is removed without removing the flag operand, then the flags will no longer make sense.

This patch fixes this by preventing the removal when a flag operand is present.

The included test case was generated by MS inline assembly. Longer term maybe we should fix the inline assembly parsing to not generate redundant operands.

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

llvm-svn: 342176

6 years ago[X86] Fix register resizings for inline assembly register operands.
Nirav Dave [Thu, 13 Sep 2018 20:33:56 +0000 (20:33 +0000)]
[X86] Fix register resizings for inline assembly register operands.

When replacing a named register input to the appropriately sized
sub/super-register. In the case of a 64-bit value being assigned to a
register in 32-bit mode, match GCC's assignment.

Reviewers: eli.friedman, craig.topper

Subscribers: nickdesaulniers, llvm-commits, hiraditya

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

llvm-svn: 342175

6 years ago[X86] Cleanup pair returns. NFCI.
Nirav Dave [Thu, 13 Sep 2018 20:33:27 +0000 (20:33 +0000)]
[X86] Cleanup pair returns. NFCI.

llvm-svn: 342174

6 years ago[InstCombine] Inefficient pattern for high-bits checking 2 (PR38708)
Roman Lebedev [Thu, 13 Sep 2018 20:33:12 +0000 (20:33 +0000)]
[InstCombine] Inefficient pattern for high-bits checking 2 (PR38708)

Summary:
It is sometimes important to check that some newly-computed value
is non-negative and only n bits wide (where n is a variable.)
There are many ways to check that:
https://godbolt.org/z/o4RB8D
The last variant seems best?
(I'm sure there are some other variations i haven't thought of..)

More complicated, canonical pattern:
https://rise4fun.com/Alive/uhA

We do need to have two `switch()`'es like this,
to not mismatch the swappable predicates.

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

Reviewers: spatel, craig.topper, RKSimon

Reviewed By: spatel

Subscribers: llvm-commits

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

llvm-svn: 342173

6 years ago[PartiallyInlineLibCalls] Add DebugCounter support
George Burgess IV [Thu, 13 Sep 2018 20:33:04 +0000 (20:33 +0000)]
[PartiallyInlineLibCalls] Add DebugCounter support

This adds DebugCounter support to the PartiallyInlineLibCalls pass,
which should make debugging/automated bisection easier in the future.

Patch by Zhizhou Yang!

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

llvm-svn: 342172

6 years ago[NFC][InstCombine] Test what happens if 'unefficient high bit check' pattern is on...
Roman Lebedev [Thu, 13 Sep 2018 20:33:02 +0000 (20:33 +0000)]
[NFC][InstCombine] Test what happens if 'unefficient high bit check' pattern is on both sides.

Came up in https://reviews.llvm.org/D52001#1233827
While we don't do a good job here, we at least want to make
sure that we don't have any inf-loops.

llvm-svn: 342171

6 years ago[DCE] Add DebugCounter support
George Burgess IV [Thu, 13 Sep 2018 20:29:50 +0000 (20:29 +0000)]
[DCE] Add DebugCounter support

Patch by Zhizhou Yang!

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

llvm-svn: 342170

6 years agoRevert "[cmake] Fix a unittest when `LLVM_LINK_LLVM_DYLIB` is requested."
Volodymyr Sapsai [Thu, 13 Sep 2018 20:24:36 +0000 (20:24 +0000)]
Revert "[cmake] Fix a unittest when `LLVM_LINK_LLVM_DYLIB` is requested."

This reverts commit r342150 as it caused test failure

    LLVM-Unit :: Passes/./PluginsTests/PluginsTests.LoadPlugin

on multiple bots.

llvm-svn: 342169

6 years agoAdd flag to llvm-profdata to allow symbols in profile data to be remapped, and
Richard Smith [Thu, 13 Sep 2018 20:22:02 +0000 (20:22 +0000)]
Add flag to llvm-profdata to allow symbols in profile data to be remapped, and
add a tool to generate symbol remapping files.

Summary:
The new tool llvm-cxxmap builds a symbol mapping table from a file containing
a description of partial equivalences to apply to mangled names and files
containing old and new symbol tables.

Reviewers: davidxl

Subscribers: mgorny, llvm-commits

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

llvm-svn: 342168

6 years agoNativeProcessProtocol: Sink ReadMemoryWithoutTrap into base class
Pavel Labath [Thu, 13 Sep 2018 20:17:40 +0000 (20:17 +0000)]
NativeProcessProtocol: Sink ReadMemoryWithoutTrap into base class

The two existing implementations have the function implemented
identically, and there's no reason to believe that this would be
different for other implementations.

llvm-svn: 342167

6 years agoFix a couple of mangling canonicalizer corner case bugs.
Richard Smith [Thu, 13 Sep 2018 20:00:21 +0000 (20:00 +0000)]
Fix a couple of mangling canonicalizer corner case bugs.

Summary:
The hash computed for an ArrayType was different when first constructed
versus when later profiled due to the constructor default argument, and
we were not tracking constructor / destructor variant as part of the
mangled name AST, leading to incorrect equivalences.

Reviewers: erik.pilkington

Subscribers: llvm-commits

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

llvm-svn: 342166

6 years agoSupport -fno-omit-frame-pointer with -pg.
Stephen Hines [Thu, 13 Sep 2018 19:50:02 +0000 (19:50 +0000)]
Support -fno-omit-frame-pointer with -pg.

Summary:
Previously, any instance of -fomit-frame-pointer would make it such that
-pg was an invalid flag combination. If -fno-omit-frame-pointer is
passed later on the command line (such that it actually takes effect),
-pg should be allowed.

Reviewers: nickdesaulniers

Reviewed By: nickdesaulniers

Subscribers: manojgupta, nickdesaulniers, cfe-commits, kongyi, chh, pirama

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

llvm-svn: 342165

6 years ago[hwasan] use a single Printf per line when printing a report (more friendly to androi...
Kostya Serebryany [Thu, 13 Sep 2018 19:14:22 +0000 (19:14 +0000)]
[hwasan] use a single Printf per line when printing a report (more friendly to android logging)

llvm-svn: 342164

6 years ago[InstCombine] Fold (xor (min/max X, Y), -1) -> (max/min ~X, ~Y) when X and Y are...
Craig Topper [Thu, 13 Sep 2018 18:52:58 +0000 (18:52 +0000)]
[InstCombine] Fold (xor (min/max X, Y), -1) -> (max/min ~X, ~Y) when X and Y are freely invertible.

This allows the xor to be removed completely.

This might help with recomitting r341674, but seems good regardless.

Coincidentally fixes PR38915.

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

llvm-svn: 342163