Paul Robinson [Mon, 30 Sep 2019 15:08:38 +0000 (15:08 +0000)]
[SSP] [2/3] Refactor an if/dyn_cast chain to switch on opcode. NFC
Differential Revision: https://reviews.llvm.org/D67844
llvm-svn: 373219
Teresa Johnson [Mon, 30 Sep 2019 15:05:35 +0000 (15:05 +0000)]
[Clang] Use -main-file-name for source filename if not set
-main-file-name is currently used to set the source name used in debug
information.
If the source filename is "-" and -main-file-name is set, then use the
filename also for source_filename and ModuleID of the output.
The argument is generally used outside the internal clang calls when
running clang in a wrapper like icecc which gives the source via stdin
but still wants to get a object file with the original source filename
both in debug info and IR code.
Patch by: the_jk (Joel Klinghed)
Differential Revision: https://reviews.llvm.org/D67592
llvm-svn: 373217
Paul Robinson [Mon, 30 Sep 2019 15:01:35 +0000 (15:01 +0000)]
[SSP] [1/3] Revert "StackProtector: Use PointerMayBeCaptured"
"Captured" and "relevant to Stack Protector" are not the same thing.
This reverts commit
f29366b1f594f48465c5a2754bcffac6d70fd0b1.
aka r363169.
Differential Revision: https://reviews.llvm.org/D67842
llvm-svn: 373216
Kevin P. Neal [Mon, 30 Sep 2019 14:51:59 +0000 (14:51 +0000)]
Fix breakage of sphinx builders. Sorry for leaving this broken over the
weekend!
llvm-svn: 373215
Tamas Berghammer [Mon, 30 Sep 2019 14:44:24 +0000 (14:44 +0000)]
Support MemoryLocation::UnknownSize in TargetLowering::IntrinsicInfo
Summary:
Previously IntrinsicInfo::size was an unsigned what can't represent the
64 bit value used by MemoryLocation::UnknownSize.
Reviewers: jmolloy
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68219
llvm-svn: 373214
Aaron Ballman [Mon, 30 Sep 2019 14:43:52 +0000 (14:43 +0000)]
Correct function declarations; NFC.
This header is included by C code so the functions need to have a prototype. Also, fix the function definitions so that they have C linkage rather than C++ linkage.
llvm-svn: 373213
Thomas Preud'homme [Mon, 30 Sep 2019 14:12:03 +0000 (14:12 +0000)]
[FileCheck] Remove implementation types from API
Summary:
Remove use of FileCheckPatternContext and FileCheckString concrete types
from FileCheck API to allow moving it and the other implementation only
only declarations into a private header file.
Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68186
llvm-svn: 373211
Alexey Bataev [Mon, 30 Sep 2019 14:05:26 +0000 (14:05 +0000)]
[OPENMP] Fix comment, NFC.
llvm-svn: 373210
Clement Courbet [Mon, 30 Sep 2019 13:53:50 +0000 (13:53 +0000)]
[llvm-exegesis][NFC] Move BenchmarkFailure to own file.
Summary: And rename to exegesis::Failure, as it's used everytwhere.
Reviewers: gchatelet
Subscribers: tschuett, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68217
llvm-svn: 373209
Pavel Labath [Mon, 30 Sep 2019 13:44:17 +0000 (13:44 +0000)]
Use llvm for dumping DWARF expressions
Summary:
It uses the new ability of ABI plugins to vend llvm::MCRegisterInfo
structs (which is what is needed to turn dwarf register numbers into
strings).
Reviewers: JDevlieghere, aprantl, jasonmolenda
Subscribers: tatyana-krasnukha, lldb-commits
Differential Revision: https://reviews.llvm.org/D67966
llvm-svn: 373208
Guillaume Chatelet [Mon, 30 Sep 2019 13:34:44 +0000 (13:34 +0000)]
[Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: jholewinski, arsenm, jvesely, nhaehnle, eraman, hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D68141
llvm-svn: 373207
Raphael Isemann [Mon, 30 Sep 2019 13:08:08 +0000 (13:08 +0000)]
[lldb][NFC][modern-type-lookup] Remove while(false) behind if() {}
This was originally a 'do { ... } while (false);' like in the rest
of the function, but the do was refactored into an 'if' without
also removing the trailing 'while(false);'
llvm-svn: 373206
Chen Zheng [Mon, 30 Sep 2019 12:57:53 +0000 (12:57 +0000)]
[ConstantRange] add helper function addWithNoWrap().
Differential Revision: https://reviews.llvm.org/D67339
llvm-svn: 373205
GN Sync Bot [Mon, 30 Sep 2019 12:57:04 +0000 (12:57 +0000)]
gn build: Merge r373202
llvm-svn: 373204
Clement Courbet [Mon, 30 Sep 2019 12:50:25 +0000 (12:50 +0000)]
[llvm-exegesis][NFC] Refactor snippet file reading out of tool main.
Summary: Add unit tests.
Reviewers: gchatelet
Subscribers: mgorny, tschuett, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68212
llvm-svn: 373202
Raphael Isemann [Mon, 30 Sep 2019 12:49:32 +0000 (12:49 +0000)]
[lldb] Reland 370734: Test 'frame select -r' and fix that INT32_MIN breaks the option parser
The problem with r370734 was that it removed the code for resetting the options in
OptionParsingStarting. This caused that once a 'frame select -r ...' command was executed,
we kept the relative index argument for all following 'frame select ...' invocations (even
the ones with an absolute index as they are the same command object). See rdar://
55791276.
This relands the patch but keeps the code that resets the command options before execution.
llvm-svn: 373201
Djordje Todorovic [Mon, 30 Sep 2019 11:19:11 +0000 (11:19 +0000)]
Revert "Reland "[utils] Implement the llvm-locstats tool""
This reverts commit rL373183.
llvm-svn: 373200
Guillaume Chatelet [Mon, 30 Sep 2019 11:14:00 +0000 (11:14 +0000)]
[Alignment] Fix polly build
llvm-svn: 373199
Simon Pilgrim [Mon, 30 Sep 2019 11:04:12 +0000 (11:04 +0000)]
DeclCXX/ExprCXX - silence static analyzer getAs<> null dereference warnings. NFCI.
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us.
llvm-svn: 373198
Haojian Wu [Mon, 30 Sep 2019 10:48:02 +0000 (10:48 +0000)]
[clangd] Implement a smart version of HeaderSource switch.
Summary:
This patch implements another version header-source switch by incorporating the
AST and index, it will be used:
- to improve the current header-source switch feature (layer with the
existing file heuristic);
- by the incoming define-outline code action;
Reviewers: kadircet
Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67907
llvm-svn: 373197
Guillaume Chatelet [Mon, 30 Sep 2019 09:59:31 +0000 (09:59 +0000)]
[Alignment][NFC] Adding a max function.
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68201
llvm-svn: 373196
Guillaume Chatelet [Mon, 30 Sep 2019 09:37:05 +0000 (09:37 +0000)]
[Alignment][NFC] Remove LoadInst::setAlignment(unsigned)
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet, jdoerfert
Subscribers: hiraditya, asbirlea, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D68142
llvm-svn: 373195
Raphael Isemann [Mon, 30 Sep 2019 09:00:23 +0000 (09:00 +0000)]
[lldb] Partly revert 370734: Test 'frame select -r' and fix that INT32_MIN breaks the option parser
This somehow caused that 'frame select X' ends up being interpreted as 'frame select -r 1' when 'up' or 'down'
were run before 'frame select X'. See rdar://
55791276.
Partly reverting to unbreak master. The changes that aren't reverted are the generic 'frame select -r' tests
that are obviously NFC and test existing behavior.
llvm-svn: 373194
Raphael Isemann [Mon, 30 Sep 2019 08:52:16 +0000 (08:52 +0000)]
[lldb][clang][modern-type-lookup] Use ASTImporterSharedState in ExternalASTMerger
Summary:
The ExternalASTMerger should use the ASTImporterSharedState. This allows it to
handle std::pair in LLDB (but the rest of libc++ is still work in progress).
Reviewers: martong, shafik, a.sidorin
Subscribers: rnkovacs, christof, JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68140
llvm-svn: 373193
Sam Parker [Mon, 30 Sep 2019 08:49:42 +0000 (08:49 +0000)]
[NFC][ARM][MVE] More tests
Add some loop tests that cover different float operations and types.
llvm-svn: 373192
Hans Wennborg [Mon, 30 Sep 2019 08:47:53 +0000 (08:47 +0000)]
NFC changes to SelectionDAGBuilder::visitBitTestHeader(), preparing for PR43129
llvm-svn: 373191
Hans Wennborg [Mon, 30 Sep 2019 08:47:46 +0000 (08:47 +0000)]
Pre-commit a test case for PR43129.
llvm-svn: 373190
Djordje Todorovic [Mon, 30 Sep 2019 08:43:00 +0000 (08:43 +0000)]
[llvm-locstats] Fix the test for the Hexagon target
llvm-svn: 373189
Sam Parker [Mon, 30 Sep 2019 08:03:23 +0000 (08:03 +0000)]
[ARM][MVE] Change VCTP operand
The VCTP instruction will calculate the predicate masked based upon
the number of elements that need to be processed. I had inserted the
sub before the vctp intrinsic and supplied it as the operand, but
this is incorrect as the phi should directly feed the vctp. The sub
is calculating the value for the next iteration.
Differential Revision: https://reviews.llvm.org/D67921
llvm-svn: 373188
Roger Ferrer Ibanez [Mon, 30 Sep 2019 07:58:50 +0000 (07:58 +0000)]
[TargetLowering] Simplify expansion of S{ADD,SUB}O
ISD::SADDO uses the suggested sequence described in the section ยง2.4 of
the RISCV Spec v2.2. ISD::SSUBO uses the dual approach but checking for
(non-zero) positive.
Differential Revision: https://reviews.llvm.org/D47927
llvm-svn: 373187
Sam Parker [Mon, 30 Sep 2019 07:52:10 +0000 (07:52 +0000)]
[ARM][CGP] Allow signext arguments
As we perform a zext on any arguments used in the promoted tree, it
doesn't matter if they're marked as signext. The only permitted
user(s) in the tree which would interpret the sign bits are signed
icmps. For these instructions, their promoted operands are truncated
before the icmp uses them.
Differential Revision: https://reviews.llvm.org/D68019
llvm-svn: 373186
Tim Northover [Mon, 30 Sep 2019 07:47:08 +0000 (07:47 +0000)]
Revert "Update polly test for SCEV change."
The motivating SCEV change was reverted as incorrect.
llvm-svn: 373185
Tim Northover [Mon, 30 Sep 2019 07:46:52 +0000 (07:46 +0000)]
Revert "[SCEV] add no wrap flag for SCEVAddExpr."
This reverts r366419 because the analysis performed is within the context of
the loop and it's only valid to add wrapping flags to "global" expressions if
they're always correct.
llvm-svn: 373184
Djordje Todorovic [Mon, 30 Sep 2019 07:35:17 +0000 (07:35 +0000)]
Reland "[utils] Implement the llvm-locstats tool"
The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.
Differential Revision: https://reviews.llvm.org/D66526
llvm-svn: 373183
Jonas Paulsson [Mon, 30 Sep 2019 07:29:54 +0000 (07:29 +0000)]
[SystemZ] Add SystemZPostRewrite in addPostRegAlloc() instead at -O0.
SystemZPostRewrite needs to be run before (it may emit COPYs) the Post-RA
pseudo pass also at -O0, so it should be added in addPostRegAlloc().
Review: Ulrich Weigand
llvm-svn: 373182
Craig Topper [Mon, 30 Sep 2019 06:47:03 +0000 (06:47 +0000)]
[X86] Remove some redundant isel patterns. NFCI
These are all also implemented in avx512_logical_lowering_types
with support for masking.
llvm-svn: 373181
Matt Arsenault [Mon, 30 Sep 2019 06:31:30 +0000 (06:31 +0000)]
AMDGPU/GlobalISel: Fix select for v2s16 and/or/xor
llvm-svn: 373180
Fangrui Song [Mon, 30 Sep 2019 04:45:14 +0000 (04:45 +0000)]
[test] Change llvm-readobj --arm-attributes to --arch-specific after r373125
llvm-svn: 373179
Fangrui Song [Mon, 30 Sep 2019 04:24:35 +0000 (04:24 +0000)]
[ELF][test] Change llvm-readobj --arm-attributes to --arch-specific after r373125
llvm-svn: 373178
Craig Topper [Mon, 30 Sep 2019 03:14:38 +0000 (03:14 +0000)]
[X86] Split v16i32/v8i64 bitreverse on avx512f targets without avx512bw to enable the use of vpshufb on the 256-bit halves.
llvm-svn: 373177
Aditya Kumar [Mon, 30 Sep 2019 02:46:56 +0000 (02:46 +0000)]
Undef the macros after their use
Summary:
Reviewers:
t.p.northover
Subscribers:
Differential Revision: https://reviews.llvm.org/D46378
llvm-svn: 373176
Fangrui Song [Mon, 30 Sep 2019 02:06:23 +0000 (02:06 +0000)]
[X86] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after r373174
llvm-svn: 373175
Craig Topper [Sun, 29 Sep 2019 23:32:37 +0000 (23:32 +0000)]
[X86] Remove -x86-experimental-vector-widening-legalization command line flag
This was added back to allow some performance regressions to be
investigated. The main perf issue was fixed shortly after adding
this back and no other major issues have been reported. So I
think its safe to remove this again.
llvm-svn: 373174
Richard Smith [Sun, 29 Sep 2019 20:30:13 +0000 (20:30 +0000)]
Don't crash if a variable with a constexpr destructor has a
value-dependent initializer.
llvm-svn: 373173
Craig Topper [Sun, 29 Sep 2019 18:43:08 +0000 (18:43 +0000)]
[X86] Add custom isel logic to match VPTERNLOG from 2 logic ops.
There's room from improvement here, but this is a decent
starting point.
There are a few minor regressions in the vector-rotate tests,
where we are now forming a vpternlog from an and before we get
a chance to form it for a bitselect that we were matching
previously. This results in an AND and an ANDN feeding the
vpternlog where previously we just had an AND after the
vpternlog. I think we can probably DAG combine the AND with
the bitselect to get back to similar codegen.
llvm-svn: 373172
Amaury Sechet [Sun, 29 Sep 2019 17:54:03 +0000 (17:54 +0000)]
Add test case peeking through vector concat when combining insert into shuffles. NFC
llvm-svn: 373171
Aditya Kumar [Sun, 29 Sep 2019 16:06:22 +0000 (16:06 +0000)]
[LLVM-C][Ocaml] Add MergeFunctions and DCE pass
MergeFunctions and DCE pass are missing from OCaml/C-api. This patch
adds them.
Differential Revision: https://reviews.llvm.org/D65071
Reviewers: whitequark, hiraditya, deadalnix
Reviewed By: whitequark
Subscribers: llvm-commits
Tags: #llvm
Authored by: kren1
llvm-svn: 373170
DeForest Richards [Sun, 29 Sep 2019 15:31:52 +0000 (15:31 +0000)]
[Docs] Moves article links to new pages
Moves existing article links on the Programming, Subsystem, and Reference documentation pages to new locations. Also moves Github Repository and Publications links to the sidebar.
llvm-svn: 373169
Fangrui Song [Sun, 29 Sep 2019 15:26:12 +0000 (15:26 +0000)]
[MC] Emit unused undefined symbol even if its binding is not set
For the following two cases, we currently suppress the symbols. This
patch emits them (compatible with GNU as).
* `test2_a = undef`: if `undef` is otherwise unused.
* `.hidden hidden`: if `hidden` is unused. This is the main point of the
patch, because omitting the symbol would cause a linker semantic
difference.
It causes a behavior change that is not compatible with GNU as:
.weakref foo1, bar1
When neither foo1 nor bar1 is used, we now emit bar1, which is arguably
more consistent.
Another change is that we will emit .TOC. for .TOC.@tocbase . For this
directive, suppressing .TOC. can be seen as a size optimization, but we
choose to drop it for simplicity and consistency.
llvm-svn: 373168
Roman Lebedev [Sun, 29 Sep 2019 15:25:24 +0000 (15:25 +0000)]
[DivRemPairs] Don't assert that we won't ever get expanded-form rem pairs in different BB's (PR43500)
If we happen to have the same div in two basic blocks,
and in one of those we also happen to have the rem part,
we'd match the div-rem pair, but the wrong ones.
So let's drop overly-ambiguous assert.
Fixes https://bugs.llvm.org/show_bug.cgi?id=43500
llvm-svn: 373167
Alexey Bataev [Sun, 29 Sep 2019 14:18:06 +0000 (14:18 +0000)]
[SLP] Fix for PR31847: Assertion failed: (isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant!")
Initially SLP vectorizer replaced all going-to-be-vectorized
instructions with Undef values. It may break ScalarEvaluation and may
cause a crash.
Reworked SLP vectorizer so that it does not replace vectorized
instructions by UndefValue anymore. Instead vectorized instructions are
marked for deletion inside if BoUpSLP class and deleted upon class
destruction.
Reviewers: mzolotukhin, mkuper, hfinkel, RKSimon, davide, spatel
Subscribers: RKSimon, Gerolf, anemet, hans, majnemer, llvm-commits, sanjoy
Differential Revision: https://reviews.llvm.org/D29641
llvm-svn: 373166
Paul Hoad [Sun, 29 Sep 2019 13:45:38 +0000 (13:45 +0000)]
[clang-format] Reference qualifiers in member templates causing extra indentation.
Summary:
The following code
```
struct f {
template <class T>
void bar() && noexcept {}
};
```
will be formatted to the following with LLVM style, and
`AlwaysBreakTemplateDeclarations: Yes`
```
struct f {
template <class T>
void bar() && noexcept {}
};
```
The indentation of the `void bar()` line is wrong.
Reviewers: klimek, owenpan, krasimir, timwoj, MyDeveloperDay
Reviewed By: klimek, MyDeveloperDay
Subscribers: MyDeveloperDay, ilya-biryukov, llvm-commits, cfe-commits
Patch By: AndWass
Tags: #clang-format, #clang, #llvm
Differential Revision: https://reviews.llvm.org/D68072
llvm-svn: 373165
Jinsong Ji [Sun, 29 Sep 2019 12:43:46 +0000 (12:43 +0000)]
[PowerPC] Fix conditions of assert in PPCAsmPrinter
Summary:
g++ build emits warning:
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:667:77: error: suggest parentheses around ?&&? within ?||? [-Werror=parentheses]
assert(MO.isGlobal() || MO.isCPI() || MO.isJTI() || MO.isBlockAddress() &&
~~~~~~~~~~~~~~~~~~~~^~
"Unexpected operand type for LWZtoc pseudo.");
I believe the intension is to assert all different types,
so we should add a parentheses to include all '||'.
Reviewers: #powerpc, sfertile, hubert.reinterpretcast, Xiangling_L
Reviewed By: Xiangling_L
Subscribers: wuzish, nemanjai, hiraditya, kbarton, MaskRay, shchenz, steven.zhang, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68180
llvm-svn: 373164
David Green [Sun, 29 Sep 2019 08:38:48 +0000 (08:38 +0000)]
[ARM] Cortex-M4 schedule additions
This is an attempt to fill in some of the missing instructions from the
Cortex-M4 schedule, and make it easier to do the same for other ARM cpus.
- Some instructions are marked as hasNoSchedulingInfo as they are pseudos or
otherwise do not require scheduling info
- A lot of features have been marked not supported
- Some WriteRes's have been added for cvt instructions.
- Some extra instruction latencies have been added, notably by relaxing the
regex for dsp instruction to catch more cases, and some fp instructions.
This goes a long way to get the CompleteModel working for this CPU. It does not
go far enough as to get all scheduling info for all output operands correct.
Differential Revision: https://reviews.llvm.org/D67957
llvm-svn: 373163
Richard Smith [Sun, 29 Sep 2019 07:16:13 +0000 (07:16 +0000)]
[cxx_status] Mark P0784R7 as partially complete.
llvm-svn: 373162
Richard Smith [Sun, 29 Sep 2019 06:22:54 +0000 (06:22 +0000)]
For now, disallow lifetime-extended temporaries with non-trivial (but
constexpr) destructors from being used in the values of constexpr
variables.
The standard rules here are unclear at best, so rejecting the
problematic cases seems prudent. Prior to this change, we would fail to
run the destructors for these temporaries, even if they had
side-effects, which is certainly not the right behavior.
llvm-svn: 373161
Richard Smith [Sun, 29 Sep 2019 05:58:31 +0000 (05:58 +0000)]
Fix checking for permitted results of constant expressions.
In the presence of mutable state, we need to check whether temporaries
involved in a constant expression have permissible values at the end of
the overall evaluation, rather than at the end of the evaluation of the
initializer of the temporary.
llvm-svn: 373160
Richard Smith [Sun, 29 Sep 2019 05:08:46 +0000 (05:08 +0000)]
For P0784R7: compute whether a variable has constant destruction if it
has a constexpr destructor.
For constexpr variables, reject if the variable does not have constant
destruction. In all cases, do not emit runtime calls to the destructor
for variables with constant destruction.
llvm-svn: 373159
DeForest Richards [Sun, 29 Sep 2019 02:16:38 +0000 (02:16 +0000)]
[Docs] Adds sections for Command Line and LibFuzzer articles
Adds sections for Command Line and Libfuzzer articles on Programming Documentation page.
llvm-svn: 373158
Craig Topper [Sun, 29 Sep 2019 01:24:33 +0000 (01:24 +0000)]
[X86] Enable isel to fold broadcast loads that have been bitcasted from FP into a vpternlog.
llvm-svn: 373157
Craig Topper [Sun, 29 Sep 2019 01:24:29 +0000 (01:24 +0000)]
[X86] Move bitselect matching to vpternlog into X86ISelDAGToDAG.cpp
This allows us to reduce the use count on the condition node before
the match. This enables load folding for that operand without
relying on the peephole pass. This will be improved on for
broadcast load folding in a subsequent commit.
This still requires a bunch of isel patterns for vXi16/vXi8 types
though.
llvm-svn: 373156
Craig Topper [Sun, 29 Sep 2019 01:24:22 +0000 (01:24 +0000)]
[X86] Enable canonicalizeBitSelect for AVX512 since we can use VPTERNLOG now.
llvm-svn: 373155
Craig Topper [Sun, 29 Sep 2019 01:24:16 +0000 (01:24 +0000)]
[X86] Match (or (and A, B), (andn (A, C))) to VPTERNLOG with AVX512.
This uses a similar isel pattern as we used for vpcmov with XOP.
llvm-svn: 373154
David Carlier [Sat, 28 Sep 2019 19:01:59 +0000 (19:01 +0000)]
[OpenMP] FreeBSD address check if mapped more native
/proc unless Linux layer compatibility is activated for CentOS is activated is not present
thus relying on a more native for checking the address.
Reviewers: Hahnfeld, kongyl, jdoerfert, jlpeyton, AndreyChurbanov, emaster, dim
Reviewed By: Hahnfeld
Differential Revision: https://reviews.llvm.org/D67326
llvm-svn: 373152
Aditya Kumar [Sat, 28 Sep 2019 18:13:33 +0000 (18:13 +0000)]
[NFC] Move hot cold splitting class to header file
Summary: This is to facilitate unittests
Reviewers: compnerd, vsk, tejohnson, sebpop, brzycki, SirishP
Reviewed By: tejohnson
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68079
llvm-svn: 373151
Simon Pilgrim [Sat, 28 Sep 2019 14:01:52 +0000 (14:01 +0000)]
SemaExpr - silence static analyzer getAs<> null dereference warnings. NFCI.
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us.
llvm-svn: 373150
Sanjay Patel [Sat, 28 Sep 2019 13:34:53 +0000 (13:34 +0000)]
[PowerPC] make tests immune to improved undef handling
The fma mutate test will not exercise what it was intended to test
once we simplify those ops immediately, but the test will still
pass with the existing CHECKs, so I'm leaving it in case that
still has minimal value.
llvm-svn: 373149
Aaron Puchert [Sat, 28 Sep 2019 13:28:50 +0000 (13:28 +0000)]
Don't install example analyzer plugins
Summary: Fixes PR43430.
Reviewers: hintonda, NoQ, Szelethus, lebedev.ri
Reviewed By: lebedev.ri
Differential Revision: https://reviews.llvm.org/D68172
llvm-svn: 373148
Serge Pavlov [Sat, 28 Sep 2019 12:21:06 +0000 (12:21 +0000)]
Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`
When testing clang that has been compiled with `-DDEFAULT_SYSROOT` set to some path,
some tests would fail. Override sysroot to be empty string for the tests to succeed
when clang is configured with `DEFAULT_SYSROOT`.
Differential Revision: https://reviews.llvm.org/D66834
Patch by Sergej Jaskiewicz <jaskiewiczs@icloud.com>.
llvm-svn: 373147
Martin Storsjo [Sat, 28 Sep 2019 10:25:22 +0000 (10:25 +0000)]
Revert "[LLDB] Use the llvm microsoft demangler instead of the windows dbghelp api. NFC."
This reverts SVN r373144, as it changed the demangled output a little, see
http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/9306.
llvm-svn: 373146
Martin Storsjo [Sat, 28 Sep 2019 09:51:02 +0000 (09:51 +0000)]
[LLD] [test] Add a forgotten comment. NFC.
This was requested in https://reviews.llvm.org/D68014, but I forgot
to add it before pushing the commit.
llvm-svn: 373145
Martin Storsjo [Sat, 28 Sep 2019 09:33:44 +0000 (09:33 +0000)]
[LLDB] Use the llvm microsoft demangler instead of the windows dbghelp api. NFC.
If there's any testcases that only do demangling (I didn't find any),
they could be made available for all platforms now.
Differential Revision: https://reviews.llvm.org/D68134
llvm-svn: 373144
Amara Emerson [Sat, 28 Sep 2019 07:55:42 +0000 (07:55 +0000)]
[GlobalISel Enable memcpy inlining with optsize.
We should be disabling inline for minsize, not optsize.
llvm-svn: 373143
Anton Afanasyev [Sat, 28 Sep 2019 07:14:12 +0000 (07:14 +0000)]
[TimeProfiler] Fix "OptModule" section and add new "Backend" sections
Remove unnecessary "OptModule" section. Add "PerFunctionPasses",
"PerModulePasses" and "CodeGenPasses" sections under "Backend" section.
llvm-svn: 373142
Amara Emerson [Sat, 28 Sep 2019 05:33:21 +0000 (05:33 +0000)]
Add an operand to memory intrinsics to denote the "tail" marker.
We need to propagate this information from the IR in order to be able to safely
do tail call optimizations on the intrinsics during legalization. Assuming
it's safe to do tail call opt without checking for the marker isn't safe because
the mem libcall may use allocas from the caller.
This adds an extra immediate operand to the end of the intrinsics and fixes the
legalizer to handle it.
Differential Revision: https://reviews.llvm.org/D68151
llvm-svn: 373140
Matt Arsenault [Sat, 28 Sep 2019 03:41:13 +0000 (03:41 +0000)]
AMDGPU/GlobalISel: Avoid getting MRI in every function
Store it in AMDGPUInstructionSelector to avoid boilerplate in nearly
every select function.
llvm-svn: 373139
Craig Topper [Sat, 28 Sep 2019 01:56:36 +0000 (01:56 +0000)]
[X86] Add broadcast load unfolding support for VPTESTMD/Q and VPTESTNMD/Q.
llvm-svn: 373138
Craig Topper [Sat, 28 Sep 2019 01:08:46 +0000 (01:08 +0000)]
[X86] Stop using UpdateNodeOperands in combineGatherScatter. Create new nodes like most other DAG combines.
Creating new nodes is what we usually do. Have to explicitly
check that we don't update to an existing node and having
to manually manage the worklist is unusual.
We can probably add a helper function to reduce the duplication
of having to check if we should create a gather or scatter, but
I wanted to just get the simple thing done.
llvm-svn: 373137
Craig Topper [Sat, 28 Sep 2019 01:06:58 +0000 (01:06 +0000)]
[X86] Split combineGatherScatter into a version for generic ISD nodes and another version for X86 specific nodes.
The majority of the code doesn't run on the X86 nodes today since
its gated by isBeforeLegalizeOps and we don't formm X86 nodes
until after that. Except for a couple special case in type
legalization. But I think we would probably break those if
some of the transforms fire on them.
I want to remove the hardcoded operand numbers and the unusual
use of UpdateNodeOperands. Being able to know which ISD opcodes
are present should help with that.
llvm-svn: 373136
Jim Ingham [Sat, 28 Sep 2019 00:53:45 +0000 (00:53 +0000)]
Give an error when StepUsingScriptedThreadPlan is passed a bad classname.
Differential Revision: https://reviews.llvm.org/D68173
llvm-svn: 373135
Alex Langford [Sat, 28 Sep 2019 00:27:24 +0000 (00:27 +0000)]
[Core] Remove unused dependency on clangAST
llvm-svn: 373134
Wei Mi [Fri, 27 Sep 2019 22:33:59 +0000 (22:33 +0000)]
[SampleFDO] Create a separate flag profile-accurate-for-symsinlist to handle
profile symbol list.
Currently many existing users using profile-sample-accurate want to reduce
code size as much as possible. Their use cases are different from the scenario
profile symbol list tries to handle -- the major motivation of adding profile
symbol list is to get the major memory/code size saving without introduce
performance regression. So to keep the behavior of profile-sample-accurate
unchanged, we think decoupling these two things and using a new flag to
control the handling of profile symbol list may be better.
When profile-sample-accurate and the new flag profile-accurate-for-symsinlist
are both present, since profile-sample-accurate is a user assertion we let it
have a higher precedence.
Differential Revision: https://reviews.llvm.org/D68047
llvm-svn: 373133
Alexander Shaposhnikov [Fri, 27 Sep 2019 22:33:18 +0000 (22:33 +0000)]
[llvm-lipo] Add support for -arch
Add support for -arch.
Differential revision: https://reviews.llvm.org/D68116
Test plan: make check-all
llvm-svn: 373132
Craig Topper [Fri, 27 Sep 2019 22:30:24 +0000 (22:30 +0000)]
[X86] Add test case to show missed opportunity to turn (add (zext (vXi1 X)), Y) -> (sub Y, (sext (vXi1 X))) with avx512.
With avx512, the vXi1 type is legal. And we can more easily sign
extend them to vector registers. zext requires a sign extend and
a shift.
If we can easily turn the zext into a sext we should.
llvm-svn: 373131
Mitch Phillips [Fri, 27 Sep 2019 22:04:36 +0000 (22:04 +0000)]
[libFuzzer] Dump trace and provide correct msg for overwritten input.
Summary:
Now crashes with a stacktrace and uses 'overwrites-const-input' as the error
message instead of 'out-of-memory'.
Reviewers: morehouse, Dor1s
Reviewed By: morehouse, Dor1s
Subscribers: #sanitizers, llvm-commits, metzman, Dor1s
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D68067
llvm-svn: 373130
Roman Lebedev [Fri, 27 Sep 2019 21:53:04 +0000 (21:53 +0000)]
[PatternMatch] Add m_SExtOrSelf(), m_ZExtOrSExtOrSelf() matchers + unittests
m_SExtOrSelf() is for consistency.
m_ZExtOrSExtOrSelf() is motivated by the D68103/r373106 :
sometimes it is useful to look past any extensions of the shift amount,
and m_ZExtOrSExtOrSelf() may be exactly the tool to do that.
llvm-svn: 373128
Jonas Devlieghere [Fri, 27 Sep 2019 21:26:44 +0000 (21:26 +0000)]
[debugserver] Add --version/-V command line option to debugserver.
When not running under a TTY the output is buffered and not flushed
before debugserver exits which makes it impossible to parse the version
string. This adds a -V/--version command that just prints the version to
stdout and exits with an exit code zero.
Differential revision: https://reviews.llvm.org/D68156
llvm-svn: 373127
Lawrence D'Anna [Fri, 27 Sep 2019 20:43:50 +0000 (20:43 +0000)]
refactor: move IOObject::m_should_close_fd into subclasses
Summary:
m_should_close_fd doesn't need to be in IOObject. It will be useful
for my next change to move it down into File and Socket.
Reviewers: labath, JDevlieghere, jasonmolenda
Reviewed By: JDevlieghere
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68152
llvm-svn: 373126
Yi Kong [Fri, 27 Sep 2019 20:38:18 +0000 (20:38 +0000)]
[llvm-readobj] Rename --arm-attributes to --arch-specific
This is for compatibility with GNU readobj. --arm-attributes option is
left as a hidden alias due to large number of tests using it.
Differential Revision: https://reviews.llvm.org/D68110
llvm-svn: 373125
Jonas Devlieghere [Fri, 27 Sep 2019 20:35:55 +0000 (20:35 +0000)]
[Reproducer] Use // in the unit tests
This should be a valid absolute path on both POSIX and Windows.
llvm-svn: 373124
Vedant Kumar [Fri, 27 Sep 2019 20:24:48 +0000 (20:24 +0000)]
Revert "[profile] Add a test dependency on cxx-headers"
This reverts commit
b539350f7d006b7d6f42c5c4b5715da87a52e5d8.
See: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/52140/steps/annotate/logs/stdio
The cxx-headers target doesn't exist everywhere.
llvm-svn: 373123
Richard Smith [Fri, 27 Sep 2019 20:24:36 +0000 (20:24 +0000)]
For P0784R7: add support for explicit destructor calls and
pseudo-destructor calls in constant evaluation.
llvm-svn: 373122
Vedant Kumar [Fri, 27 Sep 2019 20:12:38 +0000 (20:12 +0000)]
[profile] Mark instrprof-gcov-fork.test UNSUPPORTED on Darwin as well
This test remains flaky everywhere, I think. We should consider deleting
it and accompanying support code in GCOVProfiling: I've stopped short of
doing that now as the gcov exec* tests appear to be stable.
See the thread re: r347779.
llvm-svn: 373121
Vedant Kumar [Fri, 27 Sep 2019 20:12:35 +0000 (20:12 +0000)]
[profile] Add a test dependency on cxx-headers
This enables running profile runtime tests which #include <string>, etc.
via just `check-profile`.
llvm-svn: 373120
Sanjay Patel [Fri, 27 Sep 2019 20:09:09 +0000 (20:09 +0000)]
[InstSimplify] generalize FP folds with undef/NaN; NFC
We can reuse this logic for things like fma.
llvm-svn: 373119
Sergey Dmitriev [Fri, 27 Sep 2019 20:00:51 +0000 (20:00 +0000)]
[Clang][OpenMP Offload] Create start/end symbols for the offloading entry table with a help of a linker
Linker automatically provides __start_<section name> and __stop_<section name> symbols to satisfy unresolved references if <section name> is representable as a C identifier (see https://sourceware.org/binutils/docs/ld/Input-Section-Example.html for details). These symbols indicate the start address and end address of the output section respectively. Therefore, renaming OpenMP offload entries section name from ".omp.offloading_entries" to "omp_offloading_entries" to use this feature.
This is the first part of the patch for eliminating OpenMP linker script (please see https://reviews.llvm.org/D64943).
Differential Revision: https://reviews.llvm.org/D68070
llvm-svn: 373118
Jakub Kuderski [Fri, 27 Sep 2019 19:33:39 +0000 (19:33 +0000)]
Revert [Dominators][CodeGen] Clean up MachineDominators
This reverts r373101 (git commit
72c57ec3e6b320c31274dadb888dc16772b8e7b6)
llvm-svn: 373117
Jakub Kuderski [Fri, 27 Sep 2019 19:33:35 +0000 (19:33 +0000)]
Revert XFAIL a codegen test AArch64/tailmerging_in_mbp.ll
This reverts r373103 (git commit
a524e630a793e18e7d5fabc2262781f310eb0279)
llvm-svn: 373116
Roman Lebedev [Fri, 27 Sep 2019 19:32:43 +0000 (19:32 +0000)]
[NFC][PhaseOrdering] Add end-to-end tests for the 'two shifts by sext' problem
We start with two separate sext's, but EarlyCSE runs before InstCombine,
so when we get them, they are a single sext, and we just ignore that.
Likewise, if we had a single sext, we don't do anything there.
llvm-svn: 373115
Jonas Devlieghere [Fri, 27 Sep 2019 19:12:18 +0000 (19:12 +0000)]
[Reproducer] Update the unit tests to specify the path style.
The unit tests started failing on Windows after my recent patch that
ensured we always deal with absolute paths. This should fix that.
llvm-svn: 373114