Simon Pilgrim [Wed, 14 Mar 2018 12:04:51 +0000 (12:04 +0000)]
Fix 'not all control paths return a value' MSVC warning. NFCI.
llvm-svn: 327502
Jonas Devlieghere [Wed, 14 Mar 2018 11:50:10 +0000 (11:50 +0000)]
Update selected thread after loading mach core
The OS plugins might have updated the thread list after a core file has
been loaded. The physical thread in the core file may no longer be the
one that should be selected. Hence we should run the thread selection
logic after loading the core.
Differential revision: https://reviews.llvm.org/D44139
llvm-svn: 327501
Pavel Labath [Wed, 14 Mar 2018 11:31:17 +0000 (11:31 +0000)]
Fix msvc compiler error in r327498
msvc reports an "illegal indirection" error here. Attempt to appease it
with a different initialization syntax.
llvm-svn: 327500
Alexander Ivchenko [Wed, 14 Mar 2018 11:23:57 +0000 (11:23 +0000)]
[GlobalISel][X86] Support G_LSHR/G_ASHR/G_SHL
Support G_LSHR/G_ASHR/G_SHL. We have 3 variance for
shift instructions : shift gpr, shift imm, shift 1.
Currently GlobalIsel TableGen generate patterns for
shift imm and shift 1, but with shiftCount i8.
In G_LSHR/G_ASHR/G_SHL like LLVM-IR both arguments
has the same type, so for now only shift i8 can use
auto generated TableGen patterns.
The support of G_SHL/G_ASHR enables tryCombineSExt
from LegalizationArtifactCombiner.h to hit, which
results in different legalization for the following tests:
LLVM :: CodeGen/X86/GlobalISel/ext-x86-64.ll
LLVM :: CodeGen/X86/GlobalISel/gep.ll
LLVM :: CodeGen/X86/GlobalISel/legalize-ext-x86-64.mir
-; X64-NEXT: movsbl %dil, %eax
+; X64-NEXT: movl $24, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: shll %cl, %edi
+; X64-NEXT: movl $24, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: sarl %cl, %edi
+; X64-NEXT: movl %edi, %eax
..which is not optimal and should be addressed later.
Rework of the patch by igorb
Reviewed By: igorb
Differential Revision: https://reviews.llvm.org/D44395
llvm-svn: 327499
Pavel Labath [Wed, 14 Mar 2018 11:14:43 +0000 (11:14 +0000)]
Explicitly initialize dwarf::FormParams in DIEInteger::SizeOf
This could end up inititialized if someone called the function with a
null AsmPrinter. Right now this only happens in DIEHash unit tests,
presumably because it was hard to create an AsmPrinter in the context of
unit tests. This only worked before r327486 because those tests did not
use any dwarf forms whose size actually depended on the dwarf version
(otherwise, they would have crashed due to null dereference).
I fix the uninitialized error, by explicitly initializing FormParams to
an invalid value, which will cause getFixedFormByteSize to return None
if called with a form with version-dependent size. A more principled
solution might be to fix the DIEHash tests to always pass in a valid
AsmPrinter.
llvm-svn: 327498
Nicolai Haehnle [Wed, 14 Mar 2018 11:01:01 +0000 (11:01 +0000)]
TableGen: Explicitly forbid some nestings of class, multiclass, and foreach
These previously all failed one way or another, but now we produce a more
helpful error message.
Change-Id: I8ffd2e87c8e35a5134c3be289e0a1fecaa2bb8ca
Differential revision: https://reviews.llvm.org/D44115
llvm-svn: 327497
Nicolai Haehnle [Wed, 14 Mar 2018 11:00:57 +0000 (11:00 +0000)]
TableGen: Add !ne, !le, !lt, !ge, and !gt comparisons
Change-Id: I8e2ece677268972d578a787467f7ef52a1f33a71
Differential revision: https://reviews.llvm.org/D44114
llvm-svn: 327496
Nicolai Haehnle [Wed, 14 Mar 2018 11:00:48 +0000 (11:00 +0000)]
TableGen: Allow dag operators to be resolved late
Change-Id: I51bb80fd5c48c8ac441ab11e43d43c1b91b4b590
Differential revision: https://reviews.llvm.org/D44113
llvm-svn: 327495
Nicolai Haehnle [Wed, 14 Mar 2018 11:00:43 +0000 (11:00 +0000)]
TableGen: Type-check BinOps
Additionally, allow more than two operands to !con, !add, !and, !or
in the same way as is already allowed for !listconcat and !strconcat.
Change-Id: I9659411f554201b90cd8ed7c7e004d381a66fa93
Differential revision: https://reviews.llvm.org/D44112
llvm-svn: 327494
Nicolai Haehnle [Wed, 14 Mar 2018 11:00:33 +0000 (11:00 +0000)]
TableGen: Allow ? in lists
This makes using !dag more convenient in some cases.
Change-Id: I0a8c35e15ccd1ecec778fd1c8d64eee38d74517c
Differential revision: https://reviews.llvm.org/D44111
llvm-svn: 327493
Nicolai Haehnle [Wed, 14 Mar 2018 11:00:26 +0000 (11:00 +0000)]
TableGen: Add !dag function for construction
This allows constructing DAG nodes with programmatically determined
names, and can simplify constructing DAG nodes in other cases as
well.
Also, add documentation and some very simple tests for the already
existing !con.
Change-Id: Ida61cd82e99752548d7109ce8da34d29da56a5f7
Differential revision: https://reviews.llvm.org/D44110
llvm-svn: 327492
Pavel Labath [Wed, 14 Mar 2018 10:16:40 +0000 (10:16 +0000)]
StaticAnalyzer: fix compiler warning. NFC
My compiler (clang-3.8) complains that the RCC variable is unused.
That's not really true, as it's checked by the if-declaration, but it's
also kinda true, because we don't need to declaration if we only check
it in the if statement.
In reality, all this means that the dyn_cast<> can be replaced by isa<>,
so that's what I do here.
llvm-svn: 327491
Pavel Labath [Wed, 14 Mar 2018 10:08:21 +0000 (10:08 +0000)]
[cmake] Fix standalone+LLVM_LINK_LLVM_DYLIB builds (pr36687)
Summary:
To make this build work, I needed to add detection code for the pthread
library. This is necessary, because we have direct calls to these
libraries (instead of going through llvm) and in the standalone build we
cannot rely on llvm to detect these for us. In a standalone non-dylib
build this was accidentaly working because these libraries were pulled
in as an interface dependency of the .a files, but in a dylib build
these are no longer part of the link interface, and so we need to add
them explicitly.
Reviewers: krytarowski, zturner
Subscribers: lldb-commits, mgorny
Differential Revision: https://reviews.llvm.org/D44379
llvm-svn: 327490
Pavel Labath [Wed, 14 Mar 2018 09:57:52 +0000 (09:57 +0000)]
Fix build broken by llvm r327486
llvm::DWARFFormParams moved to llvm::dwarf::FormParams.
llvm-svn: 327489
Alexander Timofeev [Wed, 14 Mar 2018 09:48:51 +0000 (09:48 +0000)]
[AMDGPU] Fix for DAGCombiner infinite loop in OCLtst
Differential revision: https://reviews.llvm.org/D44417
llvm-svn: 327488
Eric Liu [Wed, 14 Mar 2018 09:48:05 +0000 (09:48 +0000)]
[clangd] Add an interface that finds symbol by SymbolID in SymbolIndex.
Summary:
Potential use case: argument go-to-definition result with symbol
information (e.g. function definition in cc file) that might not be in the AST.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits
Differential Revision: https://reviews.llvm.org/D44305
llvm-svn: 327487
Pavel Labath [Wed, 14 Mar 2018 09:39:54 +0000 (09:39 +0000)]
DWARF: Unify form size handling code
Summary:
This patch replaces the two switches which are deducing the size of
various forms with a single implementation. I have put the new
implementation into BinaryFormat, to avoid introducing dependencies
between the two independent libraries (DebugInfo and CodeGen) that need
this functionality.
Reviewers: aprantl, JDevlieghere, dblaikie
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D44418
llvm-svn: 327486
Jonas Devlieghere [Wed, 14 Mar 2018 09:34:54 +0000 (09:34 +0000)]
[dsymutil] Print architecture in warning
Make the architecture part of the warning in the DebugMapParser. This
makes things consistent with the Apple's internal version of dsymutil.
llvm-svn: 327485
Pavel Labath [Wed, 14 Mar 2018 09:28:38 +0000 (09:28 +0000)]
Export LLVM_DYLIB_COMPONENTS in LLVMConfig.cmake
Summary:
This is needed so that external projects (e.g. a standalone build of
lldb) can link to the LLVM shared library via the USE_SHARED argument of
llvm_config. Without this, llvm_config would add LLVM to the link list,
but then also add the constituent static libraries, resulting in
multiply defined symbols.
Reviewers: beanz, mgorny
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D44391
llvm-svn: 327484
Pavel Labath [Wed, 14 Mar 2018 09:13:33 +0000 (09:13 +0000)]
Skip TestWatchedVarHitWhenInScope.py everywhere
The expression-hits tracking logic is not available on any platform. The
reason this tests happens to pass on some platforms is that the test is
written poorly -- it relies on the fact that post-main cleanup code will
write to the stack memory once occupied by the watched variable, but
this is not the case everywhere (e.g. linux glibc does not seem to do
this, but android's bionic library does).
llvm-svn: 327483
Alexander Ivchenko [Wed, 14 Mar 2018 09:11:23 +0000 (09:11 +0000)]
[GlobalIsel][X86] Support for G_ZEXT instruction
Reviewed By: igorb
Differential Revision: https://reviews.llvm.org/D44378
llvm-svn: 327482
George Rimar [Wed, 14 Mar 2018 08:52:39 +0000 (08:52 +0000)]
[ELF] - Never create .gnu_hash with NBuckets == 0.
Currently, we can end up with NBuckets==0 and android loader
does not like it (PR36537).
Seems we can go with a minimal amount of changes here for simplicity
and be consistent with gold and so just always use >= 1 value for NBuckets.
Differential revision: https://reviews.llvm.org/D44422
llvm-svn: 327481
George Rimar [Wed, 14 Mar 2018 07:44:23 +0000 (07:44 +0000)]
[ELF] - Convert overlapping-sections.s testcase to x86 and cleanup.
Patch do the following changes:
* Test case was converted from MIPS to x86.
* Removed part of the test checking we are able to produce a valid output.
Since we do that already in other tests, this one's intention should be
only to check we are still able to report overlaps and/or produce
broken output with overlaps.
Differential revision: https://reviews.llvm.org/D44438
llvm-svn: 327480
Robert Widmann [Wed, 14 Mar 2018 06:45:51 +0000 (06:45 +0000)]
[LLVM-C] Redo unnamed_address attribute bindings
Summary:
The old bindings should have used an enum instead of a boolean. This
deprecates LLVMHasUnnamedAddr and LLVMSetUnnamedAddr , replacing them
with LLVMGetUnnamedAddress and LLVMSetUnnamedAddress respectively that do.
Though it is unlikely LLVM will gain more supported global value linker
hints, the new API can scale to accommodate this.
Reviewers: deadalnix, whitequark
Reviewed By: whitequark
Subscribers: llvm-commits, harlanhaskins
Differential Revision: https://reviews.llvm.org/D43448
llvm-svn: 327479
Lang Hames [Wed, 14 Mar 2018 06:39:49 +0000 (06:39 +0000)]
[RuntimeDyld] Silence a compiler error.
This should fix the error at
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/19008
llvm-svn: 327478
Lang Hames [Wed, 14 Mar 2018 06:25:08 +0000 (06:25 +0000)]
[ORC] Fix a data race in the lookup function.
The Error locals need to be protected by a mutex. (This could be fixed by
having the promises / futures contain Expected and Error values, but
MSVC's future implementation does not support this yet).
Hopefully this will fix some of the errors seen on the builders due to
r327474.
llvm-svn: 327477
Lang Hames [Wed, 14 Mar 2018 06:25:07 +0000 (06:25 +0000)]
[ExecutionEngine] Add a getSymbolTable method to RuntimeDyld.
This can be used to extract the symbol table from a RuntimeDyld instance prior
to disposing of it.
This patch also updates RTDyldObjectLinkingLayer to use the new method, rather
than requesting symbols one at a time via getSymbol.
llvm-svn: 327476
Lang Hames [Wed, 14 Mar 2018 05:23:56 +0000 (05:23 +0000)]
[ORC] Silence a compiler error.
This should fix the builder error at
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/19006
llvm-svn: 327475
Lang Hames [Wed, 14 Mar 2018 04:18:04 +0000 (04:18 +0000)]
[ORC] Add a 'lookup' convenience function for finding symbols in a list of VSOs.
The lookup function takes a list of VSOs, a set of symbol names (or just one
symbol name) and a materialization function object. It returns an
Expected<SymbolMap> (if given a set of names) or an Expected<JITEvaluatedSymbol>
(if given just one name). The lookup method constructs an
AsynchronousSymbolQuery for the given names, applies that query to each VSO in
the list in turn, and then blocks waiting for the query to complete. If
threading is enabled then the materialization function object can be used to
execute the materialization on different threads. If threading is disabled the
MaterializeOnCurrentThread utility must be used.
llvm-svn: 327474
Aaron Smith [Wed, 14 Mar 2018 04:05:27 +0000 (04:05 +0000)]
[SymbolFilePDB] Rewrite ParseTypes method
Summary:
The types for the compiland's children are parsed when parsing types for a PDB compiland. Global types also need to be parsed but unfortunately PDBs do not have compiland information about each global type. So we parse them all on the first call to ParseTypes.
If a sc.function is provided then parse the types for that function. Otherwise parse the types for the overall sc.comp_unit.
The ParseTypes method can be very slow if a program has a long list of compile units containing needed modules. Debugging clang-cl with lldb will show the problem.
Reviewers: zturner, rnk, lldb-commits
Reviewed By: zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D44253
llvm-svn: 327473
Eugene Zemtsov [Wed, 14 Mar 2018 02:10:07 +0000 (02:10 +0000)]
Disable test debuglineinfo-path on powerpc
llvm-svn: 327472
Kostya Serebryany [Wed, 14 Mar 2018 01:55:49 +0000 (01:55 +0000)]
[hwasan] update docs
llvm-svn: 327471
Eugene Zemtsov [Wed, 14 Mar 2018 01:07:18 +0000 (01:07 +0000)]
grep for global functions only
llvm-svn: 327469
Sam Clegg [Wed, 14 Mar 2018 00:53:34 +0000 (00:53 +0000)]
[WebAssembly] Fix expected contents of relocations with addends
This fixes issues found on the wasm waterfall related to relocations
with addends. Undefined symbols, even those with addends should
always have a provisional value of zero. At least this is what llvm
emits (and I believe this is true for ELF too).
Differential Revision: https://reviews.llvm.org/D44451
llvm-svn: 327468
Matt Arsenault [Wed, 14 Mar 2018 00:36:23 +0000 (00:36 +0000)]
TargetMachine: Add address space to getPointerSize
llvm-svn: 327467
Eugene Zemtsov [Wed, 14 Mar 2018 00:15:16 +0000 (00:15 +0000)]
Add extra output/check to debug clang-ppc64be-linux test failure
llvm-svn: 327466
Teresa Johnson [Tue, 13 Mar 2018 23:55:34 +0000 (23:55 +0000)]
Revert "[LTO/gold] Support --wrap"
This reverts commit r327459. The new gold plugin interface is not
available with older gold installations, leading to compile failures:
http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/9109/steps/build-stage2-LLVMgold.so/logs/stdio
llvm-svn: 327465
Akira Hatanaka [Tue, 13 Mar 2018 23:37:51 +0000 (23:37 +0000)]
Check that a field is not annotated with attribute "unavailable" before
setting the NonTrivialToPrimitive* flags of a record.
Union fields that have non-trivial Objective-C ownership qualifications
are normally not legal, but if the union is declared in a system header,
the fields are annotated with attribute "unavailable".
rdar://problem/
38431072
llvm-svn: 327464
Vedant Kumar [Tue, 13 Mar 2018 23:37:11 +0000 (23:37 +0000)]
[test] Replace some references to Apple-internal bugs
This removes around 10 references to Apple-internal radars. I've filed
fresh bugs on bugs.llvm.org as appropriate for open issues.
llvm-svn: 327463
Craig Topper [Tue, 13 Mar 2018 23:31:48 +0000 (23:31 +0000)]
[X86] Re-generate test to get proper capitalization of its CHECK lines. NFC
llvm-svn: 327462
Aditya Nandakumar [Tue, 13 Mar 2018 23:21:13 +0000 (23:21 +0000)]
[GISel]: Fix incorrect type used in Pattern Match for ICst
getConstantVRegVal() returns int64_t but we use uint64_t.
llvm-svn: 327461
Gheorghe-Teodor Bercea [Tue, 13 Mar 2018 23:19:52 +0000 (23:19 +0000)]
[OpenMP] Add flag for linking runtime bitcode library
Summary: This patch adds an additional flag to the OpenMP device offloading toolchain to link in the runtime library bitcode.
Reviewers: Hahnfeld, ABataev, carlo.bertolli, caomhin, grokos, hfinkel
Reviewed By: ABataev, grokos
Subscribers: jholewinski, guansong, cfe-commits
Differential Revision: https://reviews.llvm.org/D43197
llvm-svn: 327460
Teresa Johnson [Tue, 13 Mar 2018 23:06:19 +0000 (23:06 +0000)]
[LTO/gold] Support --wrap
Summary:
Utilize new gold plugin api interface for obtaining --wrap option
arguments, and LTO API handling (added for --wrap support in lld LTO),
to mark symbols so that LTO does not optimize them inappropriately.
Note the test cases will be in a new gold test subdirectory that
is dependent on the next release of gold which will contain the new
interfaces.
Reviewers: pcc, tmsriram
Subscribers: mehdi_amini, llvm-commits, inglorion
Differential Revision: https://reviews.llvm.org/D44235
llvm-svn: 327459
Eugene Zemtsov [Tue, 13 Mar 2018 22:48:39 +0000 (22:48 +0000)]
Disable optimizations in debuglineinfo-path test
llvm-svn: 327458
Craig Topper [Tue, 13 Mar 2018 22:36:07 +0000 (22:36 +0000)]
[X86] Simplify the LowerAVXCONCAT_VECTORS code a little by creating a single path for insert_subvector handling.
We now only create recursive concats if we have more than two non-zero values. This keeps our subvector broadcast DAG combine functioning.
llvm-svn: 327457
Joel E. Denny [Tue, 13 Mar 2018 22:18:29 +0000 (22:18 +0000)]
[Attr] Merge two dependent tests from different directories
Suggested at: https://reviews.llvm.org/D43248
llvm-svn: 327456
Sjoerd Meijer [Tue, 13 Mar 2018 22:11:06 +0000 (22:11 +0000)]
[ARM] ACLE FP16 feature test macros
This is a partial recommit of r327189 that was reverted
due to test issues. I.e., this recommits minimal functional
change, the FP16 feature test macros, and adds tests that
were missing in the original commit.
llvm-svn: 327455
Craig Topper [Tue, 13 Mar 2018 22:05:25 +0000 (22:05 +0000)]
[X86] Rewrite LowerAVXCONCAT_VECTORS similar to how we handle vXi1 concats.
This better able to detect undef and zeros pieces in the concat. Or cases when only one subvector is non-zero. This allows us to avoid silly things like double inserts into progressively larger undefs.
This still builds 512 bit concats of 128 bits by building up through 256 bits first. But I don't know if that's best.
We probably want to merge this with the vXi1 concat code since they are very similar.
llvm-svn: 327454
Eugene Zelenko [Tue, 13 Mar 2018 21:32:01 +0000 (21:32 +0000)]
[Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 327453
Julie Hockett [Tue, 13 Mar 2018 21:24:08 +0000 (21:24 +0000)]
[clang-tidy] Fixing incorrect comment
llvm-svn: 327452
Zachary Turner [Tue, 13 Mar 2018 21:18:00 +0000 (21:18 +0000)]
Disable PDB injected sources test temporarily.
llvm-svn: 327451
Hiroshi Yamauchi [Tue, 13 Mar 2018 21:13:18 +0000 (21:13 +0000)]
Simplify more cases of logical ops of masked icmps.
Summary:
For example,
((X & 255) != 0) && ((X & 15) == 8) -> ((X & 15) == 8).
((X & 7) != 0) && ((X & 15) == 8) -> false.
Reviewers: davidxl
Reviewed By: davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D43835
llvm-svn: 327450
Eugene Zemtsov [Tue, 13 Mar 2018 21:10:15 +0000 (21:10 +0000)]
Remove explicit triple and data layout from the test
llvm-svn: 327449
Jim Ingham [Tue, 13 Mar 2018 21:06:05 +0000 (21:06 +0000)]
Add a missing return in SBPlatform::IsConnected and test
for the behavior - using the fact that the Host platform
is always present & connected.
llvm-svn: 327448
Gheorghe-Teodor Bercea [Tue, 13 Mar 2018 20:50:12 +0000 (20:50 +0000)]
Revert revision 327438.
llvm-svn: 327447
Craig Topper [Tue, 13 Mar 2018 20:36:28 +0000 (20:36 +0000)]
[DAGCombiner] Allow visitEXTRACT_SUBVECTOR to combine with BUILD_VECTORS between LegalizeVectorOps and LegalizeDAG.
BUILD_VECTORs aren't themselves legalized until LegalizeDAG so we should still be able to create an "illegal" one before that. This helps combine with BUILD_VECTORS that are introduced during LegalizeVectorOps due to unrolling.
llvm-svn: 327446
Davide Italiano [Tue, 13 Mar 2018 20:26:38 +0000 (20:26 +0000)]
[DataFormatter] Remove dead code for the NSDictionary formatter.
I'm going to make changes in this area soon, so I figured I
could clean things a bit while I was around.
llvm-svn: 327445
Zachary Turner [Tue, 13 Mar 2018 20:16:37 +0000 (20:16 +0000)]
Update modulemap to exclude new DIA headers.
llvm-svn: 327444
Eugene Zemtsov [Tue, 13 Mar 2018 20:06:33 +0000 (20:06 +0000)]
Fix debuglineinfo-path.ll
This fix is based on an assumption that some build bots are missing 'echo
-n'
llvm-svn: 327443
Francis Visoiu Mistrih [Tue, 13 Mar 2018 19:53:16 +0000 (19:53 +0000)]
[MIR] Allow frame-setup and frame-destroy on the same instruction
Nothing prevents us from having both frame-setup and frame-destroy on
the same instruction.
When merging:
* frame-setup OPCODE1
* frame-destroy OPCODE2
into
* frame-setup frame-destroy OPCODE3
we want to be able to print and parse both flags.
llvm-svn: 327442
Eugene Zemtsov [Tue, 13 Mar 2018 19:48:31 +0000 (19:48 +0000)]
Temporary disable debuglineinfo-path.ll to fix build
llvm-svn: 327441
Gheorghe-Teodor Bercea [Tue, 13 Mar 2018 19:44:53 +0000 (19:44 +0000)]
[OpenMP][libomptarget] Add global memory data sharing support for master-worker sharing.
Summary:
This patch adds support for the sharing of variables from the master thread of a team to the worker threads of the team.
The runtime uses a stack structure implemented as a doubly-linked list of slots with each slot having the exact same size as the size requested. This implementation leverages existing data structures. The runtime functions are added as separate functions to avoid interfering with the current interface.
Limitations to be addressed in future patches:
- This current patch only employs global memory. In a future patch we will enable to usage for shared memory as an optimization.
- Allow the allocation of several requested sizes in the same slot.
Reviewers: ABataev, grokos, caomhin, carlo.bertolli
Reviewed By: grokos
Subscribers: Hahnfeld, guansong, openmp-commits
Differential Revision: https://reviews.llvm.org/D44260
llvm-svn: 327440
Gheorghe-Teodor Bercea [Tue, 13 Mar 2018 19:39:19 +0000 (19:39 +0000)]
[OpenMP] Add flag for linking runtime bitcode library
Summary: This patch adds an additional flag to the OpenMP device offloading toolchain to link in the runtime library bitcode.
Reviewers: Hahnfeld, ABataev, carlo.bertolli, caomhin, grokos, hfinkel
Reviewed By: ABataev, grokos
Subscribers: jholewinski, guansong, cfe-commits
Differential Revision: https://reviews.llvm.org/D43197
llvm-svn: 327438
Sjoerd Meijer [Tue, 13 Mar 2018 19:38:56 +0000 (19:38 +0000)]
This reverts "r327189 - [ARM] Add ARMv8.2-A FP16 vector intrinsic"
This is causing problems in testing, and PR36683 was raised.
Reverting it until we have sorted out how to pass f16 vectors.
llvm-svn: 327437
Anna Thomas [Tue, 13 Mar 2018 19:38:45 +0000 (19:38 +0000)]
Test Commit NFC. Updated comment
llvm-svn: 327436
Sanjay Patel [Tue, 13 Mar 2018 19:20:01 +0000 (19:20 +0000)]
[x86] add test for WriteZero sched class instructions; NFC
Nops should have zero latency because there is no result.
Idioms like 'xorps xmm0, xmm0' may have zero latency because
they are handled without using an execution unit.
llvm-svn: 327435
Akira Hatanaka [Tue, 13 Mar 2018 18:58:25 +0000 (18:58 +0000)]
Serialize the NonTrivialToPrimitive* flags I added in r326307.
rdar://problem/
38421774
llvm-svn: 327434
Haicheng Wu [Tue, 13 Mar 2018 18:44:19 +0000 (18:44 +0000)]
[SLP] clean some formats
llvm-svn: 327433
Brian M. Rzycki [Tue, 13 Mar 2018 18:14:10 +0000 (18:14 +0000)]
[LazyValueInfo] PR33357 prevent infinite recursion on BinaryOperator
Summary:
It is possible for LVI to encounter instructions that are not in valid
SSA form and reference themselves. One example is the following:
%tmp4 = and i1 %tmp4, undef
Before this patch LVI would recurse until running out of stack memory
and crashed. This patch marks these self-referential instructions as
Overdefined and aborts analysis on the instruction.
Fixes https://bugs.llvm.org/show_bug.cgi?id=33357
Reviewers: craig.topper, anna, efriedma, dberlin, sebpop, kuhar
Reviewed by: dberlin
Subscribers: uabelho, spatel, a.elovikov, fhahn, eli.friedman, mzolotukhin, spop, evandro, davide, llvm-commits
Differential Revision: https://reviews.llvm.org/D34135
llvm-svn: 327432
Zachary Turner [Tue, 13 Mar 2018 17:58:28 +0000 (17:58 +0000)]
Implement pure virtual method to fix build.
llvm-svn: 327431
Eugene Zemtsov [Tue, 13 Mar 2018 17:54:29 +0000 (17:54 +0000)]
Handle mixed-OS paths in DWARF reader
Make sure that DWARF line information generated by Windows can be properly read by Posix OS and vice versa.
Differential Revision: https://reviews.llvm.org/D44290
llvm-svn: 327430
Sanjay Patel [Tue, 13 Mar 2018 17:50:27 +0000 (17:50 +0000)]
[MC] fix documentation comments; NFC
llvm-svn: 327429
Zachary Turner [Tue, 13 Mar 2018 17:46:06 +0000 (17:46 +0000)]
[PDB] Support dumping injected sources via the DIA reader.
Injected sources are basically a way to add actual source file content
to your PDB. Presumably you could use this for shipping your source code
with your debug information, but in practice I can only find this being
used for embedding natvis files inside of PDBs.
In order to effectively test LLVM's natvis file injection, we need a way
to dump the injected sources of a PDB in a way that is authoritative
(i.e. based on Microsoft's understanding of the PDB format, and not
LLVM's). To this end, I've added support for dumping injected sources
via DIA. I made a PDB file that used the /natvis option to generate a
test case.
Differential Revision: https://reviews.llvm.org/D44405
llvm-svn: 327428
Simon Dardis [Tue, 13 Mar 2018 17:31:11 +0000 (17:31 +0000)]
Revert "[mips] Guard traps for microMIPS correctly"
This appears to have broken the expensive checks bot in
a strange fashion. Reverting until I can investigate.
This reverts r327409.
llvm-svn: 327427
George Karpenkov [Tue, 13 Mar 2018 17:27:01 +0000 (17:27 +0000)]
[analyzer] Fix the matcher for GCDAntipattern to look for "signal" call in all parameters
rdar://
38405904
llvm-svn: 327426
Andrea Di Biagio [Tue, 13 Mar 2018 17:24:32 +0000 (17:24 +0000)]
[llvm-mca] Remove the logic that computes the reciprocal throughput, and make the SummaryView independent from the Backend. NFCI
Since r327420, the tool can query the MCSchedModel interface to obtain the
reciprocal throughput information.
As a consequence, method `ResourceManager::getRThroughput`, and
method `Backend::getRThroughput` are no longer needed.
This patch simplifies the code by removing the custom RThroughput computation.
This patch also refactors class SummaryView by removing the dependency with
the Backend object.
No functional change intended.
llvm-svn: 327425
Simon Pilgrim [Tue, 13 Mar 2018 17:17:15 +0000 (17:17 +0000)]
[DAGCombine] visitREM - Don't assume that one divrem isn't driving another
Under some circumstances the divrems won't have been combined together before getting to this code.
So replace the assertion with a if() guard to not expand to X-((X/C)*C) to give the other combine chance to happen.
Reduced from OSS-Fuzz #6883
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6883
llvm-svn: 327424
Azharuddin Mohammed [Tue, 13 Mar 2018 17:04:33 +0000 (17:04 +0000)]
Build system changes for RISCV
Summary: Build system changes for RISCV. Makes it possible to build just the RISCV target alone.
Reviewers: asb, apazos, mgrang, beanz
Reviewed By: asb
Subscribers: mgorny, kito-cheng, shiva0217, llvm-commits
Differential Revision: https://reviews.llvm.org/D44153
llvm-svn: 327423
Brian Homerding [Tue, 13 Mar 2018 16:37:59 +0000 (16:37 +0000)]
[lit] - Allow 1 test to report multiple micro-test results to provide support for microbenchmarks.
Summary:
These changes are to allow to a Result object to have nested Result objects in
order to support microbenchmarks. Currently lit is restricted to reporting one
result object for one test, this change provides support tests that want to
report individual timings for individual kernels.
This revision is the result of the discussions in
https://reviews.llvm.org/D32272#794759,
https://reviews.llvm.org/D37421#
f8003b27 and https://reviews.llvm.org/D38496.
It is a separation of the changes purposed in https://reviews.llvm.org/D40077.
This change will enable adding LCALS (Livermore Compiler Analysis Loop Suite)
collection of loop kernels to the llvm test suite using the google benchmark
library (https://reviews.llvm.org/D43319) with tracking of individual kernel
timings.
Previously microbenchmarks had been handled by using macros to section groups
of microbenchmarks together and build many executables while still getting a
grouped timing (MultiSource/TSVC). Recently the google benchmark library was
added to the test suite and utilized with a litsupport plugin. However the
limitation of 1 test 1 result limited its use to passing a runtime option to
run only 1 microbenchmark with several hand written tests
(MicroBenchmarks/XRay). This runs the same executable many times with different
hand-written tests. I will update the litsupport plugin to utilize the new
functionality (https://reviews.llvm.org/D43316).
These changes allow lit to report micro test results if desired in order to get
many precise timing results from 1 run of 1 test executable.
Reviewers: MatzeB, hfinkel, rengolin, delcypher
Differential Revision: https://reviews.llvm.org/D43314
llvm-svn: 327422
Daniel Neilson [Tue, 13 Mar 2018 16:31:19 +0000 (16:31 +0000)]
[SelectionDAGBuilder] Replace deprecated calls to MemoryIntrinsic::getAlignment() (NFCI)
Summary:
This change is part of step five in the series of changes to remove alignment argument from
memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the
SelectionDAGBuilder to cease using the old getAlignment() API of MemoryIntrinsic in favour of getting
source & dest specific alignments through the new API.
Steps:
Step 1) Remove alignment parameter and create alignment parameter attributes for
memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
source and dest alignments. ( rL323597 )
Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
Step 4) Update Polly to use the new IRBuilder API. ( rL323618 )
Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
and [get|set]SourceAlignment() instead. ( rL323886, rL323891, rL324148, rL324273, rL324278,
rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654, rL324773, rL324774,
rL324781, rL324784, rL324955, rL324960, rL325816, rL327398 )
Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
MemIntrinsicInst::[get|set]Alignment() methods.
Reference
http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20151109/312083.html
llvm-svn: 327421
Andrea Di Biagio [Tue, 13 Mar 2018 16:28:55 +0000 (16:28 +0000)]
[MC] Move the reciprocal throughput computation from TargetSchedModel to MCSchedModel.
The goal is to make the reciprocal throughput computation accessible through the
MCSchedModel interface. This is particularly important for llvm-mca because it
can only query the MCSchedModel interface.
No functional change intended.
Differential Revision: https://reviews.llvm.org/D44392
llvm-svn: 327420
George Rimar [Tue, 13 Mar 2018 16:23:48 +0000 (16:23 +0000)]
[ELF} - Fix build bots.
llvm-svn: 327419
Craig Topper [Tue, 13 Mar 2018 16:23:27 +0000 (16:23 +0000)]
[X86] Remove SplitBinaryOpsAndApply and use SplitOpsAndApply by adding curly braces around the ops.
Summary: Unless you were intentionally avoiding this syntax? I saw you mentioned makeArrayRef in your commit that added SplitOpsAndApply.
Reviewers: RKSimon
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D44403
llvm-svn: 327418
George Rimar [Tue, 13 Mar 2018 16:11:02 +0000 (16:11 +0000)]
[ELF] - Fix mistype in comment. NFC.
llvm-svn: 327417
George Rimar [Tue, 13 Mar 2018 16:02:45 +0000 (16:02 +0000)]
[ELF] - Rename test cases to *.test.
This is a follow-up for r327410.
llvm-svn: 327416
Andrea Di Biagio [Tue, 13 Mar 2018 15:59:59 +0000 (15:59 +0000)]
[llvm-mca] Simplify code that computes the latency of an instruction in
InstrBuilder. NFCI
This was possible because of r327406, which added function`computeInstrLatency`
to MCSchedModel.
llvm-svn: 327415
Brock Wyma [Tue, 13 Mar 2018 15:56:20 +0000 (15:56 +0000)]
Revert r327397 [CodeView] Omit forward references for unnamed structs and ...
This reverts commit r327397 to investigate a buildbot failure.
llvm-svn: 327414
Pavel Labath [Tue, 13 Mar 2018 15:55:00 +0000 (15:55 +0000)]
include locale.h in IOHandler.cpp
This is needed for the setlocale() call, and it seems that it is not
transitively pulled in for some build configurations.
llvm-svn: 327413
Zaara Syeda [Tue, 13 Mar 2018 15:49:05 +0000 (15:49 +0000)]
test commit: fix formatting of a comment
This is a simple change to do the test commit.
llvm-svn: 327412
Jonas Devlieghere [Tue, 13 Mar 2018 15:47:38 +0000 (15:47 +0000)]
[dsymutil] Unify error handling outside DwarfLinker.
This is a follow-up to r327137 where we unified error handling for the
DwarfLinker. This replaces calls to errs() and outs() with the
appropriate ostream wrapper everywhere in dsymutil.
llvm-svn: 327411
George Rimar [Tue, 13 Mar 2018 15:47:14 +0000 (15:47 +0000)]
[ELF] - Represent tests as linker scripts instead of asm.
This follows recently started direction and sometimes
allows to fully get rid from `echo` calls.
I'll rename changed files to *.test in a follow-up.
llvm-svn: 327410
Simon Dardis [Tue, 13 Mar 2018 15:46:58 +0000 (15:46 +0000)]
[mips] Guard traps for microMIPS correctly
This is part of fixing the instruction predicates for MIPS.
Reviewers: atanasyan, abeserminji
Differential Revision: https://reviews.llvm.org/D44212
llvm-svn: 327409
Rafael Espindola [Tue, 13 Mar 2018 15:24:51 +0000 (15:24 +0000)]
[ThinLTO] Clear dllimport when setting dso_local.
This is PR36686.
If a user of a library is LTOed with that library we take the
opportunity to set dso_local, but we don't clear dllimport, which
creates an invalid IR.
llvm-svn: 327408
Simon Pilgrim [Tue, 13 Mar 2018 15:22:24 +0000 (15:22 +0000)]
[X86][Btver2] Split i8/i16/i32/i64 div/idiv costs
We were assuming a mixture of 32/64 division costs.
llvm-svn: 327407
Andrea Di Biagio [Tue, 13 Mar 2018 15:22:13 +0000 (15:22 +0000)]
[MC] Move the instruction latency computation from TargetSchedModel to MCSchedModel.
The goal is to make the latency information accessible through the MCSchedModel
interface. This is particularly important for tools like llvm-mca that only have
access to the MCSchedModel API.
This partially fixes PR36676.
No functional change intended.
Differential Revision: https://reviews.llvm.org/D44383
llvm-svn: 327406
Joel E. Denny [Tue, 13 Mar 2018 14:51:22 +0000 (14:51 +0000)]
Reland "[Attr] Fix parameter indexing for several attributes"
Relands r326602 (reverted in r326862) with new test and fix for
PR36620.
Differential Revision: https://reviews.llvm.org/D43248
llvm-svn: 327405
Sanjay Patel [Tue, 13 Mar 2018 14:46:32 +0000 (14:46 +0000)]
[InstCombine] fix fmul reassociation to avoid creating an extra fdiv
This was supposed to be an NFC refactoring that will eventually allow
eliminating the isFast() predicate, but there's a rare possibility
that we would pessimize the code as shown in the test case because
we failed to check 'hasOneUse()' properly. This version also removes
an inefficiency of the old code; we would look for:
(X * C) * C1 --> X * (C * C1)
...but that pattern is always handled by
SimplifyAssociativeOrCommutative().
llvm-svn: 327404
Simon Dardis [Tue, 13 Mar 2018 14:39:44 +0000 (14:39 +0000)]
[mips] Fix the definitions of the EVA instructions
Correct their availability to their respective ISAs.
Reviewers: atanasyan
Differential Revision: https://reviews.llvm.org/D44209
llvm-svn: 327403
Sylvestre Ledru [Tue, 13 Mar 2018 14:35:10 +0000 (14:35 +0000)]
fix some user facing typos / in the comments
llvm-svn: 327402
Haojian Wu [Tue, 13 Mar 2018 14:31:31 +0000 (14:31 +0000)]
[clangd] Use the macro name range as the definition range.
Summary: This also aligns with the behavior of declarations.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits
Differential Revision: https://reviews.llvm.org/D44423
llvm-svn: 327401