Commit Graph

326716 Commits

Author SHA1 Message Date
Vitaly Buka 6e8c21857e [compiler-rt] Run cpplint only for check-sanitizer
llvm-svn: 371703
2019-09-12 01:35:11 +00:00
Vitaly Buka a3cd67c007 [compiler-rt] Better lint output for .inc files
llvm-svn: 371702
2019-09-12 01:35:09 +00:00
Nico Weber 52f6131cc7 gn build: Merge r371700
llvm-svn: 371701
2019-09-12 01:25:34 +00:00
David Blaikie 5adb3d2ac0 Reapply llvm-reduce: Add pass to reduce parameters""
Fixing a couple of asan-identified bugs
* use of an invalid "Use" iterator after the element was removed
* use of StringRef to Function name after the Function was erased

This reapplies r371567, which was reverted in r371580.

llvm-svn: 371700
2019-09-12 01:20:48 +00:00
Jan Korous b51a285c4c [clang-scan-deps] Add dependency targets
Differential Revision: https://reviews.llvm.org/D67475

llvm-svn: 371697
2019-09-12 00:48:45 +00:00
David Blaikie aaef97a55e PR43278: llvm-reduce: Use temporary file names (and ToolOutputFile) rather than unique ones - to ensure they're cleaned up
This modifies the tool somewhat to only create files when about to run
the "interestingness" test, and delete them immediately after - this
means some more files will be created sometimes (when "double checking"
work - which should probably be fixed/avoided anyway).

This now creates temporary files, rather than only unique ones, and also
uses ToolOutputFile (without ever calling "keep") to ensure the files
are deleted as soon as the interestingness test is run.

llvm-svn: 371696
2019-09-12 00:31:57 +00:00
Craig Topper 635d383fad [X86] Enable -mprefer-vector-width=256 by default for Skylake-avx512 and later Intel CPUs.
AVX512 instructions can cause a frequency drop on these CPUs. This
can negate the performance gains from using wider vectors. Enabling
prefer-vector-width=256 will prevent generation of zmm registers
unless explicit 512 bit operations are used in the original source
code.

I believe gcc and icc both do something similar to this by default.

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

llvm-svn: 371694
2019-09-11 23:54:36 +00:00
Amara Emerson 55d86f04c7 [AArch64][GlobalISel] Fall back on attempts to allocate split types on the stack.
First we were asserting that the ValNo of a VA was the wrong value. It doesn't actually
make a difference for us in CallLowering but fix that anyway to silence the assert.

The bigger issue was that after fixing the assert we were generating invalid MIR
because the merging/unmerging of values split across multiple registers wasn't
also implemented for memory locs. This happens when we run out of registers and
have to pass the split types like i128 -> i64 x 2 on the stack. This is do-able, but
for now just fall back.

llvm-svn: 371693
2019-09-11 23:53:23 +00:00
Jessica Paquette e297ad1bd9 [GlobalISel][AArch64] Check caller for swifterror params in tailcall eligibility
Before, we only checked the callee for swifterror. However, we should also be
checking the caller to see if it has a swifterror parameter.

Since we don't currently handle outgoing arguments, this didn't show up in the
swifterror.ll testcase.

Also, remove the swifterror checks from call-translator-tail-call.ll, since
they are covered by the existing swifterror testing. Better to have it all in
one place.

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

llvm-svn: 371692
2019-09-11 23:44:16 +00:00
Vitaly Buka 33f01663f7 [dfsan] Revert dfsan_set_label removal
It's part of interface, maybe it is used in external code.

llvm-svn: 371691
2019-09-11 23:43:23 +00:00
Jonas Devlieghere 4a491ec491 [Reproducer] Move the command loader into the reproducer (NFC)
This just moves the CommandLoader utility into the reproducer namespace
and makes it accessible outside the API layer. This is setting things up
for a bigger change.

llvm-svn: 371689
2019-09-11 23:27:12 +00:00
Jonas Devlieghere d9aec34b97 [NFC] Reformat SBDebugger before making changes
llvm-svn: 371688
2019-09-11 23:27:09 +00:00
Vitaly Buka c0fa632236 Remove NOLINTs from compiler-rt
llvm-svn: 371687
2019-09-11 23:19:48 +00:00
Jonas Devlieghere bcc24e46ba [Reproducer] Move GDB Remote Provider into Reproducer (NFC)
Originally the idea was for providers to be defined close to where they
are used. While this helped designing the providers in such a way that
they don't depend on each other, it also means that it's not possible to
access them from a central place. This proved to be a problem for some
providers and resulted in them living in the reproducer class.

The ProcessGDBRemote provider is the last remaining exception. This
patch makes things consistent and moves it into the reproducer like the
other providers.

llvm-svn: 371685
2019-09-11 23:15:12 +00:00
Reid Kleckner e78a7a0ecd [TableGen] Skip CRLF conversion when writing output
Doing the CRLF translation while writing the file defeats our
optimization to not update the file if it hasn't changed.

Fixes PR43271.

llvm-svn: 371683
2019-09-11 22:33:50 +00:00
Sanjay Patel 2bfb955c51 [InstCombine] rename variable for readability; NFC
There's more that can be done here, but "OpI"
doesn't convey that we casted to BinaryOperator.

llvm-svn: 371682
2019-09-11 22:31:34 +00:00
David Blaikie ffe5466c79 Add some missing changes to GSYM that was addressing a gcc compilation error due to a type and variable with the same name
llvm-svn: 371681
2019-09-11 22:24:45 +00:00
Vitaly Buka 92002bd75b Fix mac build
llvm-svn: 371680
2019-09-11 22:19:18 +00:00
David Blaikie d79cc14822 PR43278: Temporarily disable llvm-reduce tests due to exhausting temp files
llvm-svn: 371679
2019-09-11 22:15:16 +00:00
Reid Kleckner ff45955fc8 [X86] Fix latent bugs in 32-bit CMPXCHG8B inserter
I found three issues:
1. the loop over E[ABCD]X copies run over BB start
2. the direct address of cmpxchg8b could be a frame index
3. the displacement of cmpxchg8b could be a global instead of an
   immediate

These were all introduced together in r287875, and should be fixed with
this change.

Issue reported by Zachary Turner.

llvm-svn: 371678
2019-09-11 21:56:17 +00:00
Evandro Menezes ed5f452645 [ConstantFolding] Refactor math functions to use LLVM ones (NFC)
When possible, replace calls to library routines on the host with equivalent
ones in LLVM.

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

llvm-svn: 371677
2019-09-11 21:46:57 +00:00
Cyndy Ishida bc40836a43 Revert [llvm-nm] Add tapi file support
This reverts r371576 (git commit f88f46358d)

llvm-svn: 371676
2019-09-11 21:35:28 +00:00
Vitaly Buka 48eb4a27d1 Update compiler-rt cpplint.py
adb3500107

llvm-svn: 371675
2019-09-11 21:33:06 +00:00
Cyndy Ishida aeeb9e3895 Revert [Object][TextAPI] NFC, fix tapi lit tests
This reverts r371577 (git commit b2b0ccab2f)

llvm-svn: 371674
2019-09-11 21:32:55 +00:00
Craig Topper 5278b0a04e [X86] Add test case for v16i64->v16i32 truncate on min-legal-vector-width=256.
I think this case would crash before I added back the -x86-experimental-vector-widening command line option. Adding this test case to prevent breaking it again when we remove the option.

llvm-svn: 371673
2019-09-11 21:30:42 +00:00
Craig Topper 08474ca091 [X86] Move x86_64 fp128 conversion to libcalls from type legalization to DAG legalization
fp128 is considered a legal type for a register, but has almost no legal operations so everything needs to be converted to a libcall. Previously this was implemented by tricking type legalization into softening the operations with various checks for "is legal in hardware register" to change the behavior to still use f128 as the resulting type instead of converting to i128.

This patch abandons this approach and instead moves the libcall conversions to LegalizeDAG. This is the approach taken by AArch64 where they also have a legal fp128 type, but no legal operations. I think this is more in spirit with how SelectionDAG's phases are supposed to work.

I had to make some hacks for STRICT_FP_ROUND because some of the strict FP handling checks if ISD::FP_ROUND is Legal for a given result type, but I had to make ISD::FP_ROUND Custom to allow making a libcall when the input is f128. For all other types the Custom handler just returns the original node. These hacks are incomplete and don't work for a strict truncate from f128, but I don't think it worked before either since LegalizeFloatTypes doesn't know about strict ops yet. I've also raised PR43209 against AArch64 which currently crashes on a strict ftrunc from f64->f32 because of FP_ROUND being marked Custom for the same reason there.

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

llvm-svn: 371672
2019-09-11 21:30:09 +00:00
Austin Kerbow 666af6714c AMDGPU: Move m0 initializations earlier
Summary:
After hoisting and merging m0 initializations schedule them as early as
possible in the MBB. This helps the scheduler avoid hazards in some
cases.

Reviewers: rampitec, arsenm

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, arphaman, llvm-commits

Tags: #llvm

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

llvm-svn: 371671
2019-09-11 21:28:41 +00:00
Nico Weber 9769a5e7d5 gn build: Merge r371661
llvm-svn: 371670
2019-09-11 21:24:15 +00:00
Nico Weber efbd7371a0 gn build: Merge r371657
llvm-svn: 371669
2019-09-11 21:24:11 +00:00
Vedant Kumar 21d417dc18 [DWARF] Evaluate DW_OP_entry_value
Add support for evaluating DW_OP_entry_value. This involves parsing
DW_TAG_call_site_parameter and wiring the information through to the expression
evaluator.

rdar://54496008

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

llvm-svn: 371668
2019-09-11 21:23:45 +00:00
Vedant Kumar bb58118525 [Status] Add a LLDB_ERRORF macro for error reporting (similar to LLDB_LOGF)
llvm-svn: 371667
2019-09-11 21:23:42 +00:00
Vedant Kumar 0b91333d59 [DWARF] Emit call site parameter info when tuning for lldb
Emit debug entry values using standard DWARF5 opcodes when the debugger
tuning is set to lldb.

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

llvm-svn: 371666
2019-09-11 21:23:39 +00:00
Volodymyr Sapsai fdb83b5055 Fix up a test updated in r371655 - require case-insensitive file system.
On case-sensitive file systems include with wrong case is not found instead of
showing a warning.

llvm-svn: 371665
2019-09-11 21:19:27 +00:00
Alex Lorenz 428d92832c [clang-scan-deps] cast Result to ErrorOr<unique_ptr<vfs::File>> explicitly to avoid s390x-linux buildbot failure
llvm-svn: 371664
2019-09-11 21:00:13 +00:00
Reid Kleckner a685f5161d Start porting ivfsoverlay tests to Windows
Part of PR43272, the changes are:

1. Use @ as the sed pattern delimiter instead of : so that the drive
letter in lit substitutions isn't an issue.

2. Use the %/t and %/S substitutions to get paths with forward slashes
to work around string quoting issues in the yaml file.

3. Replace REQUIRES:shell with XFAIL:windows. These tests should pass on
Windows, but do not for reasons that are not yet understood. We would
like to know if they pass unexpectedly.

I was able to remove the XFAILs from two tests, since they already pass
with my sed fix:
  clang/test/VFS/module_missing_vfs.m
  clang/test/VFS/test_nonmodular.c

Reviewers: amccarth

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

llvm-svn: 371663
2019-09-11 20:56:25 +00:00
Chris Bieneman 393b4eac49 All Errors must be checked
Summary: If an error is ever returned from any of the functions called here, the error must be joined with the Result Error before being returned otherwise the Result Error will assert on destruction.

Reviewers: lhames

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 371662
2019-09-11 20:54:38 +00:00
Artem Dergachev f0bb45fac3 [analyzer] NFC: Move PathDiagnostic classes to libAnalysis.
At this point the PathDiagnostic, PathDiagnosticLocation, PathDiagnosticPiece
structures no longer rely on anything specific to Static Analyzer, so we can
move them out of it for everybody to use.

PathDiagnosticConsumers are still to be handed off.

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

llvm-svn: 371661
2019-09-11 20:54:27 +00:00
Artem Dergachev 2bce23a4f8 [analyzer] NFC: Move resetDiagnosticLocationToMainFile() to BugReporter.
This method of PathDiagnostic is a part of Static Analyzer's particular
path diagnostic construction scheme. As such, it doesn't belong to
the PathDiagnostic class, but to the Analyzer.

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

llvm-svn: 371660
2019-09-11 20:54:24 +00:00
Artem Dergachev 6b85f8e99b [analyzer] NFC: Move getStmt() and createEndOfPath() out of PathDiagnostic.
These static functions deal with ExplodedNodes which is something we don't want
the PathDiagnostic interface to know anything about, as it's planned to be
moved out of libStaticAnalyzerCore.

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

llvm-svn: 371659
2019-09-11 20:54:21 +00:00
Artem Dergachev 8535b8ecf2 [analyzer] NFC: Re-implement stack hints as a side map in BugReport.
That's one of the few random entities in the PathDiagnostic interface that
are specific to the Static Analyzer. By moving them out we could let
everybody use path diagnostics without linking against Static Analyzer.

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

llvm-svn: 371658
2019-09-11 20:54:17 +00:00
Greg Clayton 7fcc2c2b5a Add a LineTable class to GSYM and test it.
This patch adds the ability to create a gsym::LineTable object, populate it, encode and decode it and test all functionality.

The full format of the LineTable encoding is specified in the header file LineTable.h.

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

llvm-svn: 371657
2019-09-11 20:51:03 +00:00
Alex Lorenz ca6e60971e [clang-scan-deps] add skip excluded conditional preprocessor block preprocessing optimization
This commit adds an optimization to clang-scan-deps and clang's preprocessor that skips excluded preprocessor
blocks by bumping the lexer pointer, and not lexing the tokens until reaching appropriate #else/#endif directive.
The skip positions and lexer offsets are computed when the file is minimized, directly from the minimized tokens.

On an 18-core iMacPro with macOS Catalina Beta I got 10-15% speed-up from this optimization when running clang-scan-deps on
the compilation database for a recent LLVM and Clang (3511 files).

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

llvm-svn: 371656
2019-09-11 20:40:31 +00:00
Volodymyr Sapsai 2f84361684 Fix -Wnonportable-include-path suppression for header maps with absolute paths.
In `DirectoryLookup::LookupFile` parameter `HasBeenMapped` doesn't cover
the case when clang finds a file through a header map but doesn't remap
the lookup filename because the target path is an absolute path. As a
result, -Wnonportable-include-path suppression for header maps
introduced in r301592 wasn't triggered.

Change parameter `HasBeenMapped` to `IsInHeaderMap` and use parameter
`MappedName` to track the filename remapping. This way we can handle
both relative and absolute paths in header maps, and account for their
specific properties, like filename remapping being a property preserved
across lookups in multiple directories.

rdar://problem/39516483

Reviewers: dexonsmith, bruno

Reviewed By: dexonsmith

Subscribers: jkorous, cfe-commits, ributzka

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

llvm-svn: 371655
2019-09-11 20:39:04 +00:00
Alex Langford 1b385a1802 [Plugins/Process] Remove direct use of ClangASTContext from InferiorCallPOSIX
Summary:
InferiorCallPOSIX directly grabs a ClangASTContext from the Target it
has and does no error checking. I don't think these functions have a
reason to know about clang specifically. Additionally, using
`GetScratchTypeSystemForLanguage` forces us to do error checking since
it returns an Expected.

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

llvm-svn: 371654
2019-09-11 20:36:28 +00:00
Reid Kleckner 6d5f0029fc [llvm-reduce] Fix a bug, improve error handling when running test
llvm::sys::ExecuteAndWait can report errors, so let's make use of that.

Second, while iterating uses of functions to remove, a call can appear
multiple times. Use a SetVector so we don't attempt to erase such a call
twice.

llvm-svn: 371653
2019-09-11 20:29:22 +00:00
Adrian Prantl 09f320ad34 Update link to the DWARF spec.
llvm-svn: 371650
2019-09-11 19:57:29 +00:00
Michael Liao 7957d4c015 [AMDGPU] Fix crash in phi-elimination hook.
Summary: - Pre-check in case there's just a single PHI insn.

Reviewers: alex-t, rampitec, arsenm

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

Tags: #llvm

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

llvm-svn: 371649
2019-09-11 19:55:20 +00:00
Adrian Prantl 4a5dd4a881 Update documentation.
llvm-svn: 371648
2019-09-11 19:49:38 +00:00
Max Moroz aff633f68d [libFuzzer] Remove hardcoded number of new features in merge_two_step.test.
Summary:
The number of features can be different on different platforms.

This should fixed broken builders, e.g.
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/7946

Reviewers: Dor1s

Reviewed By: Dor1s

Subscribers: kristof.beyls, delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 371647
2019-09-11 19:43:03 +00:00
David Bolvansky 82d9e0e122 [NFC] Added triple to test file to avoid arm buildbots failures
llvm-svn: 371646
2019-09-11 18:55:56 +00:00