Commit Graph

287322 Commits

Author SHA1 Message Date
Yunlian Jiang bd200b9ff6 Enable debug fission for thinLTO linked via gold-plugin
Summary: This enables debug fission on implicit ThinLTO when linked with gold. It will put the .dwo files in a directory specified by user. 

Reviewers: tejohnson, pcc, dblaikie

Reviewed By: pcc

Subscribers: JDevlieghere, mehdi_amini, inglorion

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

llvm-svn: 329988
2018-04-13 05:03:28 +00:00
Xin Tong d83c883d29 [CallSiteSplit] Fix comment. NFC
llvm-svn: 329987
2018-04-13 04:35:38 +00:00
Erik Pilkington 6fc7b2119b Fix another bot failure from r329951.
llvm-svn: 329986
2018-04-13 02:53:26 +00:00
Dean Michael Berris 488f7c2b67 [XRay][clang] Add flag to choose instrumentation bundles
Summary:
This change addresses http://llvm.org/PR36926 by allowing users to pick
which instrumentation bundles to use, when instrumenting with XRay. In
particular, the flag `-fxray-instrumentation-bundle=` has four valid
values:

- `all`: the default, emits all instrumentation kinds
- `none`: equivalent to -fnoxray-instrument
- `function`: emits the entry/exit instrumentation
- `custom`: emits the custom event instrumentation

These can be combined either as comma-separated values, or as
repeated flag values.

Reviewers: echristo, kpw, eizan, pelikan

Reviewed By: pelikan

Subscribers: mgorny, cfe-commits

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

llvm-svn: 329985
2018-04-13 02:31:58 +00:00
Petr Hosek 35ad9ee3cb [CMake][Fuchsia] Don't specify libc++ ABI version for Fuchsia
This is now set automatically in libc++ config header.

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

llvm-svn: 329984
2018-04-13 02:02:13 +00:00
Petr Hosek de2b464504 [CMake] Set the default ABI version for Fuchsia in CMake as well
This is neeeded since the CMake value is used for the SOVERSION.

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

llvm-svn: 329983
2018-04-13 01:59:15 +00:00
Kuba Mracek 296ce3bd23 [tsan] Add interceptors for objc_sync_enter and objc_sync_exit
Objective-C's @synchronize synchronization primitive uses calls to objc_sync_enter and objc_sync_exit runtime functions. In most cases, they end up just calling pthread_mutex_lock/pthread_mutex_unlock, but there are some cases where the synchronization from pthread_mutex_lock/pthread_mutex_unlock interceptors isn't enough. Let's add explicit interceptors for objc_sync_enter and objc_sync_exit to handle all cases.

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

llvm-svn: 329982
2018-04-13 01:05:29 +00:00
Tony Tye 223f4c7c99 [AMDGPU] Update relocation record description
Document which relocation records are static and dynamic.

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

llvm-svn: 329981
2018-04-13 01:01:27 +00:00
Kuba Mracek 0fb14e944c [asan] Reduce flakiness in stack-overflow detection
IsStackOverflow only treats accesses within 512 bytes of SP as stack-overflow. This should really be the size of a page instead.

The scariness_score_test.cc triggers stack overflow with frames that are even larger than a page, which can also trigger a fault that will not be recognized as stack-overflow. Let's just use smaller frames.

llvm-svn: 329980
2018-04-13 00:29:24 +00:00
Stephan T. Lavavej 8fc5b84349 [libcxx] [test] Use TEST_IGNORE_NODISCARD.
Fixes D45595.

llvm-svn: 329979
2018-04-13 00:07:48 +00:00
Stephan T. Lavavej ad9545eb30 [libcxx] [test] Fix whitespace, NFC.
test/std almost always uses spaces; now it is entirely tab-free.

llvm-svn: 329978
2018-04-12 23:56:22 +00:00
Stephan T. Lavavej 9e5283f27f [libcxx] [test] Use TEST_COMPILER_C1XX.
Also TEST_COMPILER_CLANG in one place. (More could be changed.)

llvm-svn: 329977
2018-04-12 23:56:17 +00:00
Stephan T. Lavavej 23e82831e5 [libcxx] [test] Silence MSVC warning C4146.
This test code triggers the MSVC warning:

"unary minus operator applied to unsigned type, result still unsigned"

Although it would be possible to change the test code to avoid
this warning, I have chosen to simply silence it.

Fixes D45594.

llvm-svn: 329976
2018-04-12 23:56:14 +00:00
Stephan T. Lavavej cf017f0451 [libcxx] [test] Fix nodiscard warnings.
MSVC's STL has marked to_bytes/from_bytes as nodiscard.

Fixes D45595.

llvm-svn: 329975
2018-04-12 23:56:12 +00:00
Stephan T. Lavavej 3ed719bb63 [libcxx] [test] Avoid unary_function.
Replace unary_function inheritance (which was never required,
even in C++98) with argument_type and result_type typedefs.
This increases portability, as unary_function was removed in C++17
and MSVC has implemented that removal.

Fixes D45596.

llvm-svn: 329974
2018-04-12 23:56:10 +00:00
Stephan T. Lavavej 0f66190aef [libcxx] [test] Avoid MSVC truncation warnings.
MSVC emits "warning C4244: 'initializing': conversion from 'int'
to 'short', possible loss of data" when it sees pair<Whatever, short>
constructed from (whatever, 4), because int is being truncated to
short within pair's constructor. (The compiler doesn't take into
account the fact that 4 is a literal at the callsite; it generates
this warning when the constructor is instantiated, because it might
be called with a runtime-valued int that would actually truncate.)

Instead of static_cast<short>, we can simply change short to int
in these tests, without affecting the pair operations that they're
trying to test: move assignment, convert copy construction, and
convert move construction.

Fixes D45016.

llvm-svn: 329973
2018-04-12 23:56:07 +00:00
Aaron Smith 0c8ee891a7 [lit] Remove duplicate to_string method
There are two versions of to_string used by TestRunner.py. The one defined 
in TestRunner.py and the one defined in utils/lit/lit/util.py. The util.py
version is superior to the TestRunner.py version.

This change removes the duplicate to_string in TestRunner.py in favor of
always using the version from util.py. Beside removing duplicate code, this
makes it easier to debug TestRunner.py since only one version of to_string
is used.

Patch by Stella Stamenova!

llvm-svn: 329972
2018-04-12 23:45:15 +00:00
Aaron Smith b35c113718 [docs] Add LLDB_TEST_USE_CUSTOM_C_COMPILER and LLDB_TEST_USE_CUSTOM_CXX_COMPILER to the build and test hmtl pages
llvm-svn: 329971
2018-04-12 23:29:49 +00:00
Simon Pilgrim 1f070c334c [X86] Remove unused MoveLoadStoreItins/ShiftOpndItins schedule class wrappers.
Was being used to move around empty/unused itineraries...

llvm-svn: 329970
2018-04-12 22:57:34 +00:00
Erik Pilkington b5757ef0dd Free a pointer, fix a bot.
llvm-svn: 329969
2018-04-12 22:54:47 +00:00
Eli Friedman 29fd52da50 Fix test failure caused by r329965.
"-mllvm" options get parsed slightly earlier, and -arm-restrict-it is
only available if the ARM target is compiled in. Invoke "clang -cc1"
directly to avoid the issue.

llvm-svn: 329968
2018-04-12 22:50:50 +00:00
Simon Pilgrim 6551d405dc [X86] Remove x86 InstrItinClass entries (PR37093)
This removes the last of the x86 schedule itineraries, I'm intending to cleanup the remaining uses of NoItinerary/OpndItins/etc. before resolving PR37093.

llvm-svn: 329967
2018-04-12 22:44:47 +00:00
Fangrui Song 6cf69128a1 [CachePruning] Clarify the per-directory entry limit on Linux ext4.
Summary:
508   root node entries (root_limit)
510   internal node entries (node_limit)

For a filename with 40 bytes, its sizeof(ext4_dir_entry_2) = 48, a linear directory can contain at most floor(4096/48)=85 of them.
The real per-directory entry limit should be 508*510*85 = 22021800
The limit varies with the average length of filenames.

However, the Linux ext4 code does not try rebalancing the htree, so we will not be able to create filenames in a full leaf node. This is demonstrated with the following example, certain filenames cannot be used while others can:

  % touch d/0000000000000000000000000000000000816a6f
  touch: cannot touch 'd/0000000000000000000000000000000000816a6f': No
  space left on device
  % touch d/0000000000000000000000000000000000816a70
  # succeeded

Reviewers: pcc

Subscribers: llvm-commits

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

llvm-svn: 329966
2018-04-12 22:27:38 +00:00
Eli Friedman 01d349bab1 Remove -cc1 option "-backend-option".
It means the same thing as -mllvm; there isn't any reason to have two
options which do the same thing.

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

llvm-svn: 329965
2018-04-12 22:21:36 +00:00
Sanjay Patel a54e7d1a6d [DAGCombiner] simplify code; NFC
llvm-svn: 329964
2018-04-12 22:14:58 +00:00
Sanjay Patel 9adb386a8e [PowerPC] add fsub-fneg test; NFC
This is a test for a transform that was suggested in the post-commit
mailing list thread for rL329821. The target in question is not in
trunk, so PPC gets to stand in for it because it's the only in-tree
target that sets 'isFPExtFree()' to 'true'.

llvm-svn: 329963
2018-04-12 22:14:23 +00:00
Evgeniy Stepanov 366ea7115d [asan] Remove malloc_context_size=0 from asan_device_setup.
This line was added in
  r243679 - [asan] Support arm64 devices in asan_device_setup
without any good reason.

llvm-svn: 329962
2018-04-12 22:06:18 +00:00
Eli Friedman e1938cbc87 Don't call skipModule for CFI lowering passes.
opt-bisect shouldn't skip these passes; they lower intrinsics which
no other pass can handle.

llvm-svn: 329961
2018-04-12 22:04:11 +00:00
Rui Ueyama 039d248778 Do not keep shared symbols created from garbage-collected eliminated DSOs.
If all references to a DSO happen to be weak, and if the DSO is
specified with --as-needed, the DSO is not added to DT_NEEDED.
If that happens, we also need to eliminate shared symbols created
from the DSO. Otherwise, they become dangling references that point
to non-exsitent DSO.

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

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

llvm-svn: 329960
2018-04-12 21:57:04 +00:00
George Burgess IV 1615da6f4e [ProfileSummary] Remove repeated cutoffs; NFCI
I'm told the repeat of "500000, 600000," is accidental, and should be
removed.

llvm-svn: 329959
2018-04-12 21:38:43 +00:00
Jan Korous 6269d34404 [clangd][nfc] Simplify readDelimitedMessage()
istream::eof() is always false after successful getline()

llvm-svn: 329958
2018-04-12 21:33:24 +00:00
Brian Gesiak d0d2ce9425 Let llvm-diff correctly deal with Undef/ConstantAggregateZero/ConstantVector/IndirectBr
Summary:
llvm-diff incorrectly reports that there's a diff when input IR contains undef/zeroinitializer/constantvector/indirectbr.
(This happens even if two identical files are given, e.g. `llvm-diff x.ll x.ll`)

This is fix to the bug report https://bugs.llvm.org/show_bug.cgi?id=33623 .



Reviewers: dexonsmith, rjmccall

Reviewed By: rjmccall

Subscribers: chenwj, mgrang, llvm-commits

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

llvm-svn: 329957
2018-04-12 21:28:04 +00:00
Peter Collingbourne 00db326b0d AArch64: Introduce a DAG combine for folding offsets into addresses.
This is a code size win in code that takes offseted addresses
frequently, such as C++ constructors that typically need to compute
an offseted address of a vtable. This reduces the size of Chromium
for Android's .text section by 108KB.

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

llvm-svn: 329956
2018-04-12 21:23:55 +00:00
Vedant Kumar 65b0d4df20 [DebugInfo] Create merged locations for instructions other than calls
This lifts a restriction on DILocation::getMergedLocation(), allowing it
to create merged locations for instructions other than calls.

Instruction::applyMergedLocation() now defaults to creating merged
locations for all instructions.

The default behavior of getMergedLocation() is unchanged: callers which
invoke it directly are unaffected.

This change will enable a follow-up Mem2Reg fix which improves crash
reporting.

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

llvm-svn: 329955
2018-04-12 20:58:24 +00:00
George Burgess IV 49331246b6 [ProfileSummary] Move a vector we're about to destroy anyway; NFC
llvm-svn: 329954
2018-04-12 20:54:05 +00:00
Simon Pilgrim 0e45634f4e [X86] Remove InstrItinClass entries from all x86 instruction defs (PR37093)
llvm-svn: 329953
2018-04-12 20:47:34 +00:00
Erich Keane cf3c4a9f24 [NFC] Fix terrible formatting of CGRecordLower constructor.
llvm-svn: 329952
2018-04-12 20:46:31 +00:00
Erik Pilkington 67d82d6edd [demangler] Add a partial demangling API for LLDB.
This parses a mangled name into an AST (typically an intermediate stage in
itaniumDemangle) and provides some functions to query certain properties or
print certain parts of the demangled name.

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

llvm-svn: 329951
2018-04-12 20:41:38 +00:00
Erik Pilkington f2a9b0fdda [demangler] NFC: Some refactoring to support partial demangling.
I'm committing this to libcxxabi too so that the two demanglers remain as
simular as possible.

llvm-svn: 329950
2018-04-12 20:41:06 +00:00
Zinovy Nis 5ef2b52e5b Revert "[clang-tidy] [modernize-use-auto] Get only a length of token, not the token itself"
This reverts r329873 as getting only a single token length is wrong for multi-token type names,
like 'unsigned long int'.

llvm-svn: 329949
2018-04-12 20:33:24 +00:00
Sam Clegg 225c4697b4 [WebAssembly] Match llvm change to custom section size
Summary:
The content of custome sections no longer includes the
name itself.

See: https://reviews.llvm.org/D45579

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

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

llvm-svn: 329948
2018-04-12 20:31:35 +00:00
Sam Clegg 9745afa674 [WebAssembly] libObject: Don't include the name the size of custom sections
Differential Revision: https://reviews.llvm.org/D45579

llvm-svn: 329947
2018-04-12 20:31:12 +00:00
Martin Storsjo acd9ca34d8 [MinGW] Look for libc++ headers in a triplet prefixed path as well
This makes it consistent with libstdc++ and the other default
include directories.

If these headers are found in both locations and one isn't a
symlink to the other, this will cause errors due to libc++ headers
having wrapper headers for some standard C headers, wrappers that
do #include_next the actual one.

If the same libc++ standard C wrapper header exists in more than one
include directory before the real system one, the header include
guard will stop it from doing another #include_next to pick up the
real one, breaking things.

As this is a rather uncommon situation, this should be acceptable
and toolchain maintainers can adapt accordingly if necessary.

Also simplify some of the existing code with a local variable.

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

llvm-svn: 329946
2018-04-12 20:07:38 +00:00
Simon Pilgrim e9376b9fdc [X86] Remove InstrItinClass entries from SSE/AVX instructions defs (PR37093)
llvm-svn: 329945
2018-04-12 19:59:35 +00:00
Lang Hames e7c4502a87 [ORC] Use insert rather than emplace.
Hopefully this will fix the build failure at
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/9028

llvm-svn: 329944
2018-04-12 19:54:41 +00:00
George Burgess IV 85fc4c327a Simplify; NFCI
llvm-svn: 329943
2018-04-12 19:48:05 +00:00
Vlad Tsyrklevich 8b74db9cc7 Fix doc typo
llvm-svn: 329942
2018-04-12 19:35:39 +00:00
Mandeep Singh Grang 0c5300a93f [RISCV] Fix logic to check if frame pointer should be used
Summary: The logic was broken for Linux triples as it returns true in the switch for Triple.isOSLinux().

Reviewers: asb, apazos

Reviewed By: asb

Subscribers: kito-cheng, shiva0217, cfe-commits

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

llvm-svn: 329941
2018-04-12 19:31:37 +00:00
Simon Pilgrim 577ae24feb [X86] Remove explicit SSE/AVX schedule itineraries from defs (PR37093)
llvm-svn: 329940
2018-04-12 19:25:07 +00:00
Sameer AbuAsal e8b7ff30e2 [RISCV] Add c.mv rs1, rs2 pattern for addi rs1, rs2, 0
Summary:
GCC compresses the pseudo instruction "mv rd, rs",  which is an alias of
"addi rd, rs, 0", to "c.mv rd, rs".

In LLVM we rely on the canonical MC instruction (MCInst) to do our compression
checks and since there is no rule to compress "addi rd, rs, 0" --> "c.mv
rd, rs" we lose this compression opportunity to gcc.

 In this patch we fix that by adding an addi to c.mv compression pattern, the
 instruction "mv rd, rs" will be compressed to "c.mv rd, rs" just like
 gcc does.

Patch by Zhaoshi Zheng (zzheng) and Sameer (sabuasal).

Reviewers: asb, apazos, zzheng, mgrang, shiva0217

Reviewed By: asb

Subscribers: rbar, johnrusso, simoncook, jordy.potman.lists, niosHD, kito-cheng, llvm-commits

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

llvm-svn: 329939
2018-04-12 19:22:40 +00:00