Commit Graph

311277 Commits

Author SHA1 Message Date
Dmitri Gribenko 8a3b7d390c [ASTMatchers] Improved formatting in a documentation comment
llvm-svn: 355395
2019-03-05 12:38:18 +00:00
Carl Ritson 9e3f7d8ad0 [AMDGPU] Fix DPP operand order in atomic optimizer
Summary:
Ensure order of operands in DPP atomic optimizer final WWM step is appropriate for sub instructions.

Change-Id: I631d050e1c00a3b4bc7c11a90437064403c4cf30

Reviewers: sheredom, tpr

Reviewed By: sheredom

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

Tags: #llvm

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

llvm-svn: 355394
2019-03-05 12:21:44 +00:00
David Green 4511f3fa86 [SCEV] Ensure that isHighCostExpansion takes into account what is being divided
A SCEV is not low-cost just because you can divide it by a power of 2. We need to also
check what we are dividing to make sure it too is not a high-code expansion. This helps
to not expand the exit value of certain loops, helping not to bloat the code.

The change in no-iv-rewrite.ll is reverting back to what it was testing before rL194116,
and looks a lot like the other tests in replace-loop-exit-folds.ll.

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

llvm-svn: 355393
2019-03-05 12:12:18 +00:00
Alexander Kornienko 7523f743b4 [lldb] Fix linux host build after r355342
llvm-svn: 355392
2019-03-05 12:05:35 +00:00
George Rimar 1e93080ca8 [llvm-objcopy] - Report "no zlib available" error properly when --compress-debug-sections is used.
If zlib is not available, and --compress-debug-sections is passed, 
we want to report an error. Currently, it is only reported for
--compress_debug_sections= form of the option.

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

I do not think there is a way to write a test for this.

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

llvm-svn: 355391
2019-03-05 11:32:14 +00:00
Gabor Marton 41e38925ab [ASTImporter] Fix redecl failures of Class and ClassTemplate
Summary:
Redecl chains of classes and class templates are not handled well
currently. We want to handle them similarly to functions, i.e. try to
keep the structure of the original AST as much as possible. The aim is
to not squash a prototype with a definition, rather we create both and
put them in a redecl chain.

Reviewers: a_sidorin, shafik, a.sidorin

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

Tags: #clang

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

llvm-svn: 355390
2019-03-05 11:23:24 +00:00
David Green 3bcb0aa7f9 [SCEV] Add some extra tests for IndVarSimplifys loop exit values. NFC.
Add some tests for various loops of the form:
  while(S >= 32) {
    S -= 32;
    something();
  };
  return S;

llvm-svn: 355389
2019-03-05 11:18:55 +00:00
Tatyana Krasnukha b30c1d571b Fix embedded Python initialization according to changes in version 3.7
Differential Revision: https://reviews.llvm.org/D58833

llvm-svn: 355388
2019-03-05 11:18:45 +00:00
Heejin Ahn c7397613d2 [WebAssembly] Rename a variable in LateEHPrepare (NFC)
llvm-svn: 355387
2019-03-05 11:11:34 +00:00
Simon Pilgrim f509fe4655 Add wildcard support to all update_*_test_checks.py scripts (PR37500)
We can already update multiple files in each update call, this extends it to work with wildcards as well in the same way as update_mca_test_checks.py (to support shells that won't do this for us - windows command prompt etc.)

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

llvm-svn: 355386
2019-03-05 10:44:37 +00:00
Oliver Stannard 4a9086b537 [ARM] Fix select_cc lowering for fp16
When lowering a select_cc node where the true and false values are of type f16,
we can't use a general conditional move because the FP16 instructions do not
support conditional execution. Instead, we must ensure that the condition code
is one of the four supported by the VSEL instruction.

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

llvm-svn: 355385
2019-03-05 10:42:34 +00:00
David Stuttard 81eec58a0d [AMDGPU] Omit KILL instructions from hazard recognizer
Summary:
In some cases the KILL was causing a hazard to be introduced as these were
scheduled into hazard slots, but don't result in an instruction.

KILL shouldn't be considered for hazard recognition.

Change-Id: Ib6d2a2160f8c94cd0ce611ab198c7e4f46aeffcf

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

Tags: #llvm

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

llvm-svn: 355384
2019-03-05 10:25:16 +00:00
Fangrui Song 5eaa55f616 [ELF][test] chmod u+w to prevent annoying rm prompt
If the permission does not permit writing and the standard input is a
terminal, rm gives an annoying prompt. chmod u+w to make the output
directory easier to delete.

llvm-svn: 355382
2019-03-05 09:56:50 +00:00
Vitaly Buka 816e7b43dc [NFC] Simplify BufferedStackTrace::UnwindImpl
llvm-svn: 355381
2019-03-05 05:52:34 +00:00
Vitaly Buka 1ac22bfef0 [NFC] Move isUnwinding check into ScopedUnwinding
llvm-svn: 355380
2019-03-05 05:40:05 +00:00
Craig Topper 7a091ae580 [LangRef] Add 'callbr' instruction to the 'blockaddress' section.
llvm-svn: 355379
2019-03-05 05:23:37 +00:00
Chen Zheng 9cfe7e81f1 [PowerPC] fix killed/dead flag after convert x-form to d-form tranformation.
Differential Revision: https://reviews.llvm.org/D58428

llvm-svn: 355378
2019-03-05 04:56:54 +00:00
Vitaly Buka 7cbb408850 [NFC] Move ScopedUnwinding from .h to .cc
llvm-svn: 355377
2019-03-05 04:36:56 +00:00
Vitaly Buka 4d9d2251ab [NFC] Reorder ifs in BufferedStackTrace::UnwindImpl
llvm-svn: 355376
2019-03-05 04:36:49 +00:00
Alex Langford 81dbc02671 [Expression] Remove unused parameter from Evaluate
llvm-svn: 355375
2019-03-05 03:33:34 +00:00
Xing GUO 013e17f50e [ARM][MC] Update one test case in 'test/MC/Disassembler/ARM/invalid-armv7.txt'
Summary:
Instruction `[0xfe 0xf0 0x20 0xe3]` is a valid instruction on ARM-v7, which is `dbg #14`. See: 
https://www.cl.cam.ac.uk/research/srg/han/ACS-P35/zynq/ARMv7-A-R-manual.pdf 
(Page: 377)

```
Encoding A1:
DBG<c> #<option>

|31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16|15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00|
|      cond | 0  0  1  1  0| 0| 1  0| 0  0  0  0| 1  1  1  1| 0  0  0  0| 1  1  1  1|    option |
```

Reviewers: fhahn, efriedma

Reviewed By: efriedma

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

Tags: #llvm

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

llvm-svn: 355374
2019-03-05 03:07:56 +00:00
Scott Linder efec1396ac [AMDGPU] Implement AMDGPUMCInstrAnalysis
Implement MCInstrAnalysis for AMDGPU, with default implementations save
for `evaluateBranch`.

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

llvm-svn: 355373
2019-03-05 03:02:00 +00:00
Vitaly Buka 3d7e9c843b [NFC] Return on SANITIZER_MIPS && !IsValidFrame
llvm-svn: 355372
2019-03-05 02:51:04 +00:00
Vitaly Buka b214bd4b71 [NFC] Put bp into Unwind(.. false) for consistency
It's not used there anyway

llvm-svn: 355371
2019-03-05 02:50:57 +00:00
Vitaly Buka 3eb19449f9 [NFC] Move asan_inited and size reset on top of ::UnwindImpl
llvm-svn: 355370
2019-03-05 02:50:49 +00:00
Vitaly Buka 0d973a5311 Revert "[NFC][Sanitizer] Cleanup ASan's GetStackTrace implementation"
I've missed that UnwindSlow was removed from ScopedUnwinding.

This reverts commit 4ce918e394.

llvm-svn: 355369
2019-03-05 02:35:49 +00:00
Harlan Haskins 06f64d53ae Replace clang::FileData with llvm::vfs::Status
Summary:
FileData was only ever used as a container for the values in
llvm::vfs::Status, so they might as well be consolidated.

The `InPCH` member was also always set to false, and unused.

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 355368
2019-03-05 02:27:12 +00:00
Eric Fiselier 1c014d75b4 Fix -fsanitize=vptr badness in <__debug>
Summary:

This patch fixes a lifetime bug when inserting a new container into the debug database. It is
diagnosed by UBSAN when debug mode is enabled. This patch corrects how nodes are constructed
during insertion.

The fix requires unconditionally breaking the debug mode ABI. Users should not expect ABI
stability from debug mode.

Reviewers: ldionne, serge-sans-paille, EricWF

Reviewed By: EricWF

Subscribers: mclow.lists, christof, libcxx-commits

Tags: #libc

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

llvm-svn: 355367
2019-03-05 02:10:31 +00:00
Eric Fiselier e69290dc7f Make VCRuntime ABI configuration a first-class option.
Summary:
On Windows we currently provide two separate ABI configurations. One which defers to `vcruntime` to provide the C++ runtime and another which doesn't.
Using `vcruntime` allows interoperability which programs compiled against the MSVC STL, and should be preferred whenever possible.

When deferring to `vcruntime` much of the ABI we provide changes. Including the layout of `<stdexcept>` types, their vtables, and how the linkage of their members.

This patch introduces the `_LIBCPP_ABI_VCRUNTIME` macro to denote this configuration. It also cleans up the existing configuration for using `vcruntime`.

This cleanup lays the groundwork for fixing a number of ABI and interoperability bugs in  `<stdexcept>`.


Reviewers: thomasanderson, ldionne, smeenai

Reviewed By: smeenai

Subscribers: jdoerfert, libcxx-commits, #libc

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

llvm-svn: 355366
2019-03-05 01:57:01 +00:00
Jan Korous 3fd4a968ad [clang-format][docs][NFC] Fix example for Allman brace breaking style
I assume the example is wrong as it's clearly missing line-breaks before
braces.

I just ran the example through clang-format with .clang-format like
this:
BreakBeforeBraces: Allman

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

llvm-svn: 355365
2019-03-05 01:45:31 +00:00
Davide Italiano 814ad73452 Revert "[testsuite] Port crashlog and dependencies to Python 3."
This revert the commit because it broke the bots. I need to find
a way that works with both versions.

llvm-svn: 355364
2019-03-05 01:34:47 +00:00
Manman Ren ff4bb36d7c Revert compiler-rt diffs for order file instrumentation to get bot green!
This caused issues on Linux/Windows and other platforms.

r355343 355350 355350

llvm-svn: 355363
2019-03-05 01:21:40 +00:00
Sanjoy Das 719e78631d PHI nodes are not `FPMathOperator` s
Reviewers: chandlerc, arsenm

Reviewed By: arsenm

Subscribers: wdng, arsenm, mcrosier, jlebar, bixia, llvm-commits

Tags: #llvm

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

llvm-svn: 355362
2019-03-05 01:15:08 +00:00
Craig Topper 6a6ce5be84 [X86] Reduce some patterns by using FP instructions for integer types even when AVX2 is available and execution domain fixing will do the right thing
We have quite a few cases of using FP instructions for integer operations when only AVX1 is available. Then we switch to integer instructions with AVX2. In a lot of these cases execution domain fixing will take care of turning FP instructions into integer if its profitable.

With this patch we just keep on using the FP instructions even with AVX2. I've only handled some cases that don't require messing with patterns that are defined in the instruction definition. Those will require more subtle multiclass work possibly involving null_frag, hasSideEffects = 0, etc.

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

llvm-svn: 355361
2019-03-05 01:14:25 +00:00
Yonghong Song d82247cb80 [BPF] Do not generate BTF sections unnecessarily
If There is no types/non-empty strings, do not generate
.BTF section. If there is no func_info/line_info, do
not generate .BTF.ext section.

Signed-off-by: Yonghong Song <yhs@fb.com>

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

llvm-svn: 355360
2019-03-05 01:01:21 +00:00
Davide Italiano fc188448fa [testsuite] Port crashlog and dependencies to Python 3.
Fixes three tests in the testsuite.

llvm-svn: 355359
2019-03-05 00:53:38 +00:00
Jim Ingham 3fc1a73a79 Fix the Xcode project for UserIDResolver.
llvm-svn: 355358
2019-03-05 00:52:12 +00:00
Manman Ren 31b31e5111 Attemp to fix windows profile-rt build breakage.
Followup to D57530.

llvm-svn: 355357
2019-03-05 00:52:00 +00:00
Davide Italiano 8800d30360 [lldbtest] Check against the correct name for libcxxabi (macOS).
llvm-svn: 355356
2019-03-05 00:47:15 +00:00
Julian Lettner 4ce918e394 [NFC][Sanitizer] Cleanup ASan's GetStackTrace implementation
Cleanup ASan's  __sanitizer::BufferedStackTrace::UnwindImpl (formerly
GetStackTrace) implementation. Start with ASan because it is the most
complex implementation.

GetStackTrace implementations seem to have started out as exact copies
of the original implementation in ASan, but have diverged in subtle
ways. My goal is to parameterize this algorithm (via templating or
callbacks) so we can share the implementation and get rid of the
inversed dependency (sanitizer_common depends on concrete
implementations in asan, ubsan, etc.). This should also help us to avoid
those pesky linker errors caused by undefined, duplicate, and weak
symbols on Windows.

Reviewed By: vitalybuka

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

llvm-svn: 355355
2019-03-05 00:41:15 +00:00
Shoaib Meenai c2b3f62315 [cmake] Create exports for umbrella library targets
When using the umbrella llvm-libraries and clang-libraries targets, we
should export all library targets, otherwise they'll be part of our
distribution but not usable from the CMake package.

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

llvm-svn: 355354
2019-03-05 00:38:32 +00:00
Davide Italiano e94add2f64 [Host] Fix the build (and the modules build).
-> Add a missing include to find the base class.
-> Add a missing out-of-line declaration for a member function.

llvm-svn: 355353
2019-03-05 00:37:40 +00:00
Shafik Yaghmour 6ed191093d Revert "[DataFormatters] Fix regression in libc++ std::atomic formatter caused by https://reviews.llvm.org/D56913"
This reverts commit r355351.

llvm-svn: 355352
2019-03-05 00:29:58 +00:00
Shafik Yaghmour d38e41ec60 [DataFormatters] Fix regression in libc++ std::atomic formatter caused by https://reviews.llvm.org/D56913
rdar://problem/48568543

llvm-svn: 355351
2019-03-05 00:17:18 +00:00
Manman Ren 03d5348132 Attemp to fix build brokage due to D57530.
By adding implementations for __llvm_profile_begin_orderfile for non-Darwin platforms.

llvm-svn: 355350
2019-03-04 23:41:57 +00:00
Florian Hahn fd2d89f98b Fix invalid target triples in tests. (NFC)
llvm-svn: 355349
2019-03-04 23:37:41 +00:00
Evgeniy Stepanov 53d7c5cd44 [msan] Instrument x86 BMI intrinsics.
Summary:
They simply shuffle bits. MSan needs to do the same with shadow bits,
after making sure that the shuffle mask is fully initialized.

Reviewers: pcc, vitalybuka

Subscribers: hiraditya, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 355348
2019-03-04 22:58:20 +00:00
Evgeniy Stepanov 8cee2e8539 [sanitizer] Intercept bzero.
Summary:
Intercept bzero and enable existing __bzero interceptor in Linux.
bzero is deprecated but still used occasionally.

Reviewers: vitalybuka

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

Tags: #sanitizers, #llvm

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

llvm-svn: 355347
2019-03-04 22:58:11 +00:00
Jordan Rupprecht 090683b85e [NFC] Fix PGO link error in shared libs build
llvm-svn: 355346
2019-03-04 22:54:44 +00:00
Sanjay Patel 3b2d0bc7c2 [CodeGenPrepare] avoid crashing on non-canonical/degenerate code
The test is reduced from an example in the post-commit thread for:
rL354746
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190304/632396.html

While we must avoid dying here, the real question should be:
Why is non-canonical and/or degenerate code making it to CGP when
using the new pass manager?

llvm-svn: 355345
2019-03-04 22:47:13 +00:00