Artem Belevich [Thu, 21 Sep 2017 18:44:49 +0000 (18:44 +0000)]
[NVPTX] Implemented bar.warp.sync, barrier.sync, and vote{.sync} instructions/intrinsics/builtins.
Differential Revision: https://reviews.llvm.org/D38148
llvm-svn: 313898
Volodymyr Sapsai [Thu, 21 Sep 2017 17:58:27 +0000 (17:58 +0000)]
[Sema] Fix using old initializer during switch statement transformation.
It fixes a crash in CodeGen when we are trying to generate code for
initializer expression created before template instantiation, like
CallExpr '<dependent type>'
|-UnresolvedLookupExpr '<overloaded function type>' lvalue (ADL) = 'parse'
`-DeclRefExpr 'Buffer<N>' lvalue ParmVar 'buffer' 'Buffer<N>'
rdar://problem/
33888545
Reviewers: rsmith, ahatanak
Reviewed By: ahatanak
Subscribers: aemerson, kristof.beyls, cfe-commits
Differential Revision: https://reviews.llvm.org/D38009
llvm-svn: 313896
Rafael Espindola [Thu, 21 Sep 2017 17:51:07 +0000 (17:51 +0000)]
Use ArrayRef. NFC.
llvm-svn: 313895
Volodymyr Sapsai [Thu, 21 Sep 2017 17:41:30 +0000 (17:41 +0000)]
[fixup][Sema] Allow in C to define tags inside enumerations.
Fix for too aggressive error err_type_defined_in_enum introduced in
r313386. Defining tags inside enumerations is prohibited in C++ but
allowed in C.
Reviewers: aaron.ballman, rnk, doug.gregor
Reviewed By: rnk
Subscribers: alberto_magni, cfe-commits
Differential Revision: https://reviews.llvm.org/D38109
llvm-svn: 313894
Sanjay Patel [Thu, 21 Sep 2017 17:40:58 +0000 (17:40 +0000)]
[x86] add more tests for node-level FMF; NFC
llvm-svn: 313893
Zachary Turner [Thu, 21 Sep 2017 17:38:13 +0000 (17:38 +0000)]
[lit] Rename lld and clang lit configs to end in .py
This follows in line with a previous patch of renaming LLVM's.
Working on these files is difficult in certain operating systems
and/or environments that don't like handling python code with a
non .py file extension.
llvm-svn: 313892
Craig Topper [Thu, 21 Sep 2017 17:30:02 +0000 (17:30 +0000)]
[DAGCombiner] Remove duplicate code from visitZERO_EXTEND
This exact block of code exists right below.
Differential Revision: https://reviews.llvm.org/D38122
llvm-svn: 313891
Zaara Syeda [Thu, 21 Sep 2017 17:05:47 +0000 (17:05 +0000)]
Fix buildbot failures, add mtriple to gpr-vsr-spill.ll
llvm-svn: 313890
Zachary Turner [Thu, 21 Sep 2017 17:02:08 +0000 (17:02 +0000)]
[lit] Don't norm case when inserting into the config map.
This makes all paths lowercase on Windows, which seemed like a
good idea at the time, but it means that tests can't properly
use FileCheck to match expected path names.
llvm-svn: 313889
Adrian Prantl [Thu, 21 Sep 2017 16:26:18 +0000 (16:26 +0000)]
llvm-dwarfdump: Add support for the --arch command line option.
llvm-svn: 313888
Zachary Turner [Thu, 21 Sep 2017 16:18:28 +0000 (16:18 +0000)]
[lit] Add a test for the builtin config map.
Config map is not exposed through the command line, so testing this
is somewhat tricky. But basically we need a test that if a custom
driver builds a config map and passes it to main, it gets respected.
A config map allows config files in the source tree to be mapped
to alternate config files in the build tree. This particular test
works by having two config files in separate directories, and
setting up a config map to have that redirects A/lit.site.cfg
to B/altconfig. Then, we print a message in A/lit.site.cfg
and B/altconfig and check that we do see the output from B
but don't see the output from A. Additionally we test that
the test suite specified by A's config map is properly discovered.
Differential Revision: https://reviews.llvm.org/D38105
llvm-svn: 313887
Zaara Syeda [Thu, 21 Sep 2017 16:12:33 +0000 (16:12 +0000)]
[Power9] Spill gprs to vector registers rather than stack
This patch updates register allocation to enable spilling gprs to
volatile vector registers rather than the stack. It can be enabled
for Power9 with option -ppc-enable-gpr-to-vsr-spills.
Differential Revision: https://reviews.llvm.org/D34815
llvm-svn: 313886
Benjamin Kramer [Thu, 21 Sep 2017 15:32:05 +0000 (15:32 +0000)]
Add missing file from r313884.
llvm-svn: 313885
Benjamin Kramer [Thu, 21 Sep 2017 15:27:45 +0000 (15:27 +0000)]
[DWARF] Shrink AttributeSpec from 24 to 16 bytes.
This is a bit ugly because we can't put Optional into a union. Hide all
of that behind a set of accessors and make accesses safer using asserts.
llvm-svn: 313884
Simon Pilgrim [Thu, 21 Sep 2017 15:11:51 +0000 (15:11 +0000)]
[X86][SSE] Add PSHUFLW/PSHUFHW tests inspired by PR34686
llvm-svn: 313883
Simon Atanasyan [Thu, 21 Sep 2017 14:40:32 +0000 (14:40 +0000)]
[MIPS] Explicitly list supported relocations for MIPS target. NFC
This is change is inspired by the D28611 patch. New supported
relocations have been added to the switch statement.
llvm-svn: 313882
Michael Kruse [Thu, 21 Sep 2017 14:23:11 +0000 (14:23 +0000)]
[ScopInfo] Use map for value def/PHI read accesses.
Before this patch, ScopInfo::getValueDef(SAI) used
getStmtFor(Instruction*) to find the MemoryAccess that writes a
MemoryKind::Value. In cases where the value is synthesizable within the
statement that defines, the instruction is not added to the statement's
instruction list, which means getStmtFor() won't return anything.
If the synthesiable instruction is not synthesiable in a different
statement (due to being defined in a loop that and ScalarEvolution
cannot derive its escape value), we still need a MemoryKind::Value
and a write to it that makes it available in the other statements.
Introduce a separate map for this purpose.
This fixes MultiSource/Benchmarks/MallocBench/cfrac where
-polly-simplify could not find the writing MemoryAccess for a use. The
write was not marked as required and consequently was removed.
Because this could in principle happen as well for PHI scalars,
add such a map for PHI reads as well.
llvm-svn: 313881
Alexey Bataev [Thu, 21 Sep 2017 14:06:59 +0000 (14:06 +0000)]
[OPENMP] Use canonical declarations for redeclarations checks.
If the captured variable has some redeclarations we may run into the
situation where the redeclaration is used instead of the canonical
declaration and we may consider this variable as one not captured
before.
llvm-svn: 313880
Simon Atanasyan [Thu, 21 Sep 2017 14:04:53 +0000 (14:04 +0000)]
[mips] Implement generation of relocations "chains" used by N32 ABI
In case of using a "nested" relocation expressions like this
`%hi(%neg(%gp_rel()))`, N32 ABI requires generation of three consecutive
relocations. That differs from the N64 ABI case where all relocations
are packed into the single relocation record.
llvm-svn: 313879
Simon Atanasyan [Thu, 21 Sep 2017 14:04:47 +0000 (14:04 +0000)]
[mips] Do not pass redundant IsN64 flag to MCELFObjectTargetWriter. NFC
Now we pass the 'Is64_' flag to the MCELFObjectTargetWriter ctor iif
when we make deal with N64 ABI. So it is redundant to pass additional
'IsN64' flag.
llvm-svn: 313878
Jonas Paulsson [Thu, 21 Sep 2017 13:52:24 +0000 (13:52 +0000)]
[SystemZ] Improve optimizeCompareZero()
More conversions to load-and-test can be made with this patch by adding a
forward search in optimizeCompareZero().
Review: Ulrich Weigand
https://reviews.llvm.org/D38076
llvm-svn: 313877
Daniel Jasper [Thu, 21 Sep 2017 12:07:33 +0000 (12:07 +0000)]
Revert r313825: "[IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare"
.. as well as the two subsequent changes r313826 and r313875.
This leads to segfaults in combination with ASAN. Will forward repro
instructions to the original author (rnk).
llvm-svn: 313876
Mikael Holmen [Thu, 21 Sep 2017 11:14:27 +0000 (11:14 +0000)]
[SROA] Really remove associated dbg.declare when removing dead alloca
Summary:
There already was code that tried to remove the dbg.declare, but that code
was placed after we had called
I->replaceAllUsesWith(UndefValue::get(I->getType()));
on the alloca, so when we searched for the relevant dbg.declare, we
couldn't find it.
Now we do the search before we call RAUW so there is a chance to find it.
An existing testcase needed update due to this. Two dbg.declare with undef
were removed and then suddenly one of the two CHECKS failed.
Before this patch we got
call void @llvm.dbg.declare(metadata i24* undef, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 24)), !dbg !15
call void @llvm.dbg.declare(metadata %struct.prog_src_register* undef, metadata !14, metadata !DIExpression()), !dbg !15
call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32)), !dbg !15
call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 24)), !dbg !15
and with it we get
call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32)), !dbg !15
call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 24)), !dbg !15
However, the CHECKs in the testcase checked things in a silly order, so
they only passed since they found things in the first dbg.declare. Now
we changed the order of the checks and the test passes.
Reviewers: rnk
Reviewed By: rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D37900
llvm-svn: 313875
Javed Absar [Thu, 21 Sep 2017 10:51:47 +0000 (10:51 +0000)]
[TableGen] Tidy up CodeGenRegisters
Replacing range loops.
Reviewed by: @MatzeB
Differential Revision: https://reviews.llvm.org/D38091
llvm-svn: 313874
Simon Atanasyan [Thu, 21 Sep 2017 10:44:26 +0000 (10:44 +0000)]
[mips] Fix relocation record format and ELF header for N32 ABI
The N32 ABI uses RELA relocation format, do not use 3-in-1 relocation's
encoding, and uses ELFCLASS32. This change passes the `IsN32` flag
to the `MCAsmBackend` to distinguish usage of N32 ABI.
We still do not handle some cases like providing the `-target-abi=o32`
command line option with the `mips64` target triple. That's why
elf_header.s contains some "FIXME" strings. This case will be fixed in
a separate patch.
Differential revision: https://reviews.llvm.org/D37960
llvm-svn: 313873
Jonas Devlieghere [Thu, 21 Sep 2017 10:28:33 +0000 (10:28 +0000)]
[dsymutil] Don't resolve DIE reference to NULL DIE.
This patch prevents dsymutil from resolving a reference to a NULL DIE
when a bogus reference happens to be coincidentally referencing a NULL
DIE. Now this is detected as an invalid reference and a warning is
printed.
Fixes: https://bugs.llvm.org/show_bug.cgi?id=33873
Differential revision: https://reviews.llvm.org/D38078
llvm-svn: 313872
Dean Michael Berris [Thu, 21 Sep 2017 10:16:56 +0000 (10:16 +0000)]
[XRay][compiler-rt] Remove non-trivial globals from xray_log_interface.cc
Summary:
Remove dependency on std::unique_ptr<...> for the global representing
the installed XRay implementation.
Reviewers: dblaikie, kpw, pelikan
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D38121
llvm-svn: 313871
Strahinja Petrovic [Thu, 21 Sep 2017 10:04:02 +0000 (10:04 +0000)]
Fixed reverted commit rL312318
This patch contains fix for reverted commit
rL312318 which was causing failure due to use
of unchecked dyn_cast to CIInit.
Patch by: Nikola Prica.
llvm-svn: 313870
Jatin Bhateja [Thu, 21 Sep 2017 09:53:21 +0000 (09:53 +0000)]
[X86] Adding a testpoint for fast-math flags propagation.
Reviewers: jbhateja
Reviewed By: jbhateja
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D38127
llvm-svn: 313869
George Rimar [Thu, 21 Sep 2017 08:25:59 +0000 (08:25 +0000)]
[yaml2obj] - Don't crash on one more invalid document.
This fixes one more crash I faced.
Testcase contains minimal reduced case.
Differential revision: https://reviews.llvm.org/D38082
llvm-svn: 313868
Gabor Horvath [Thu, 21 Sep 2017 08:18:59 +0000 (08:18 +0000)]
[analyzer] Fix an assertion fail in VirtualCallChecker
Differential Revision: https://reviews.llvm.org/D37978
llvm-svn: 313866
Matt Arsenault [Thu, 21 Sep 2017 07:00:48 +0000 (07:00 +0000)]
AMDGPU: Add option to stress calls
This inverts the behavior of the AlwaysInline pass to mark
every function not already marked alwaysinline as noinline.
llvm-svn: 313865
Simon Atanasyan [Thu, 21 Sep 2017 04:55:27 +0000 (04:55 +0000)]
[MIPS] Restore checking of the disassembler output. NFC
llvm-svn: 313864
Craig Topper [Thu, 21 Sep 2017 04:55:08 +0000 (04:55 +0000)]
[X86] Remove execute permissions from a couple files.
llvm-svn: 313863
Craig Topper [Thu, 21 Sep 2017 04:55:07 +0000 (04:55 +0000)]
[X86] Remove windows line endings.
llvm-svn: 313862
Craig Topper [Thu, 21 Sep 2017 04:55:06 +0000 (04:55 +0000)]
[X86] Remove unused tablegen class.
llvm-svn: 313861
Craig Topper [Thu, 21 Sep 2017 04:55:04 +0000 (04:55 +0000)]
[TableGen] Use CHAR_BIT instead of hardcoded 8 with sizeof. NFC
llvm-svn: 313860
Craig Topper [Thu, 21 Sep 2017 04:55:03 +0000 (04:55 +0000)]
[TableGen] Include StringMap.h instead of StringSet.h since that's the data structure we use.
llvm-svn: 313859
Craig Topper [Thu, 21 Sep 2017 04:54:59 +0000 (04:54 +0000)]
Revert r313782 "[TableGen] Add a DenseMapInfo for MachineValueType."
We aren't making a DenseSet/DenseMap of MVT anywhere. This was added due to an earlier revision of D37957.
llvm-svn: 313858
Serguei Katkov [Thu, 21 Sep 2017 04:50:41 +0000 (04:50 +0000)]
Revert "Re-enable "[IRCE] Identify loops with latch comparison against current IV value""
Revert the patch causing the functional failures.
The patch owner is notified with test cases which fail.
Test case has been provided to Maxim offline.
llvm-svn: 313857
Vitaly Buka [Thu, 21 Sep 2017 02:51:56 +0000 (02:51 +0000)]
Revert "Give external linkage and mangling to lambdas inside inline variables and variable templates."
To fix: runtime error: load of value 15, which is not a valid value for type 'clang::LVComputationKind'
This reverts commit r313827.
llvm-svn: 313856
David L. Jones [Thu, 21 Sep 2017 01:26:16 +0000 (01:26 +0000)]
[lit/Win] Check if a path was found before attempting to use it.
Summary:
This appears to break some bots, when getToolsPath fails to find some or
all of the tools (for example, an incomplete GnuWin32 installation).
Reviewers: zturner, modocache
Subscribers: sanjoy, llvm-commits
Differential Revision: https://reviews.llvm.org/D38115
llvm-svn: 313854
Vedant Kumar [Thu, 21 Sep 2017 01:11:30 +0000 (01:11 +0000)]
[llvm-cov] Improve error messaging for function mismatches
Passing "-dump" to llvm-cov will now print more detailed information
about function hash and counter mismatches. This should make it easier
to debug *.profdata files which contain incorrect records, and to debug
other scenarios where coverage goes missing due to mismatch issues.
llvm-svn: 313853
Matt Arsenault [Thu, 21 Sep 2017 00:45:59 +0000 (00:45 +0000)]
AMDGPU: Fix crash on immediate operand
We can have a v_mac with an immediate src0.
We can still fold if it's an inline immediate,
otherwise it already uses the constant bus.
llvm-svn: 313852
Vitaly Buka [Thu, 21 Sep 2017 00:35:22 +0000 (00:35 +0000)]
[ubsan] Split ubsan_init_standalone
Summary:
On Linux we may need preinit_array in static lib and
ubsan_standalone_initializer in shared lib.
Reviewers: eugenis
Subscribers: kubamracek, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D38013
llvm-svn: 313851
Davide Italiano [Thu, 21 Sep 2017 00:26:28 +0000 (00:26 +0000)]
[AArch64] Properly check alignment for AARCH64_LD_PREL_LO19.
Follow-up suggested by Peter Smith.
llvm-svn: 313850
Zachary Turner [Thu, 21 Sep 2017 00:24:52 +0000 (00:24 +0000)]
[lit] Make lit support config files with .py extension.
Many editors and Python-related diagnostics tools such as
debuggers break or fail in mysterious ways when python files
don't end in .py. This is especially true on Windows, but
still exists on other platforms. I don't want to be too heavy
handed in changing everything across the board, but I do want
to at least *allow* lit configs to have .py extensions. This
patch makes the discovery process first look for a config file
with a .py extension, and if one is not found, then looks for
a config file using the old method. So for existing users, there
should be no functional change.
Differential Revision: https://reviews.llvm.org/D37838
llvm-svn: 313849
Craig Topper [Thu, 21 Sep 2017 00:18:48 +0000 (00:18 +0000)]
[X86] Replace a condition that can never be true with an assert.
llvm-svn: 313848
Craig Topper [Thu, 21 Sep 2017 00:18:46 +0000 (00:18 +0000)]
[SelectionDAG] Replace a flag that can never be true with an assert.
llvm-svn: 313847
Davide Italiano [Thu, 21 Sep 2017 00:16:29 +0000 (00:16 +0000)]
[AArch64] Include test for out of range LD_PREL_LO19.
llvm-svn: 313846
Vitaly Buka [Thu, 21 Sep 2017 00:14:17 +0000 (00:14 +0000)]
[asan] Remove trailing spaces
llvm-svn: 313845
Vitaly Buka [Thu, 21 Sep 2017 00:11:30 +0000 (00:11 +0000)]
[asan] Remove "COLLISION" workaround for datarace in asan
"nested bug in the same thread" is not expected in case like this and was caused
by https://github.com/google/sanitizers/issues/858
llvm-svn: 313844
Vitaly Buka [Thu, 21 Sep 2017 00:06:08 +0000 (00:06 +0000)]
[asan] Remove "rm -f" in tests where it was needed only because of >>
llvm-svn: 313843
Michael Kruse [Thu, 21 Sep 2017 00:01:13 +0000 (00:01 +0000)]
Check whether IslAstInfo and DependenceInfo were computed for the same Scop.
Since -polly-codegen reports itself to preserve DependenceInfo and IslAstInfo,
we might get those analysis that were computed by a different ScopInfo for a
different Scop structure. This would be unfortunate because DependenceInfo and
IslAstInfo hold references to resources allocated by
ScopInfo/ScopBuilder/Scop (e.g. isl_id). If -polly-codegen and
DependenceInfo/IslAstInfo do not agree on which Scop to use, unpredictable
things can happen.
When the ScopInfo/Scop object is freed, there is a high probability that the
new ScopInfo/Scop object will be created at the same heap position with the
same address. Comparing whether the Scop or ScopInfo address is the expected
therefore is unreliable.
Instead, we compare the address of the isl_ctx object. Both, DependenceInfo
and IslAstInfo must hold a reference to the isl_ctx object to ensure it is
not freed before the destruction of those analyses which might happen after
the destruction of the Scop/ScopInfo they refer to. Hence, the isl_ctx
will not be freed and its address not reused as long there is a
DependenceInfo or IslAstInfo around.
This fixes llvm.org/PR34441
llvm-svn: 313842
Davide Italiano [Wed, 20 Sep 2017 23:49:50 +0000 (23:49 +0000)]
[AArch64] Implement R_AARCH64_ LD_PREL_LO19.
Fixes PR34660.
Differential Revision: https://reviews.llvm.org/D38053
llvm-svn: 313841
Craig Topper [Wed, 20 Sep 2017 23:48:58 +0000 (23:48 +0000)]
[InstCombine] Teach getDemandedBitsLHSMask to handle constant splat vectors
This replaces a ConstantInt dyn_cast with m_APInt
Differential Revision: https://reviews.llvm.org/D38100
llvm-svn: 313840
Craig Topper [Wed, 20 Sep 2017 23:48:56 +0000 (23:48 +0000)]
[SelectionDAG] Use APInt::getActivebits instead of Bitwidth - leading zeros.
llvm-svn: 313839
Sam Clegg [Wed, 20 Sep 2017 23:39:44 +0000 (23:39 +0000)]
[WebAssembly] Weak symbols should be defined in SF_Global
Summary:
This manifested itself in lld since it meant that weak
symbols were not appearing in archive symbol tables.
Subscribers: jfb, dschuff, jgravelle-google, aheejin
Differential Revision: https://reviews.llvm.org/D38111
llvm-svn: 313838
Adrian Prantl [Wed, 20 Sep 2017 23:29:47 +0000 (23:29 +0000)]
typo
llvm-svn: 313837
Adrian Prantl [Wed, 20 Sep 2017 23:29:31 +0000 (23:29 +0000)]
llvm-dwarfdump: move -eh-frame into the right section in the help output.
llvm-svn: 313836
Vitaly Buka [Wed, 20 Sep 2017 23:27:38 +0000 (23:27 +0000)]
[asan] Fix nested error detection
Summary: Fixes https://github.com/google/sanitizers/issues/858
Reviewers: eugenis, dvyukov
Subscribers: kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D38019
llvm-svn: 313835
Marek Sokolowski [Wed, 20 Sep 2017 23:26:05 +0000 (23:26 +0000)]
[llvm-readobj] Fix 'Teach readobj to dump .res files', pt 3.
Fix (r313790) missing ulittle{}_t error on some buildbots.
llvm-svn: 313834
Marek Sokolowski [Wed, 20 Sep 2017 23:07:39 +0000 (23:07 +0000)]
[llvm-readobj] Fix 'Teach readobj to dump .res files', pt 2.
Another fix-up for r313790. Big-endian hosts swapped byte order in
UTF16 words.
llvm-svn: 313833
Rafael Espindola [Wed, 20 Sep 2017 22:59:50 +0000 (22:59 +0000)]
Include thin --whole-archive members in --reproduce.
We were only including the thin archive members used via a lazy symbol
before.
llvm-svn: 313832
Matt Morehouse [Wed, 20 Sep 2017 22:53:08 +0000 (22:53 +0000)]
[MSan] Disable sanitization for __sanitizer_dtor_callback.
Summary:
Eliminate unnecessary instrumentation at __sanitizer_dtor_callback
call sites. Fixes https://github.com/google/sanitizers/issues/861.
Reviewers: eugenis, kcc
Reviewed By: eugenis
Subscribers: vitalybuka, llvm-commits, cfe-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D38063
llvm-svn: 313831
Dave Lee [Wed, 20 Sep 2017 22:41:34 +0000 (22:41 +0000)]
Remove references to response file argument in CommandLine.rst
Summary:
The documentation refers to a boolean that controls whether response files are
handled, but this is incorrect. Since r165535, response files are always
enabled.
Reviewers: compnerd, rafael
Reviewed By: compnerd
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D38095
llvm-svn: 313830
Sanjay Patel [Wed, 20 Sep 2017 22:31:35 +0000 (22:31 +0000)]
[SimplifyCFG] don't create a no-op subtract
I noticed this inefficiency while investigating PR34603:
https://bugs.llvm.org/show_bug.cgi?id=34603
This fix will likely push another bug (we don't maintain state of 'LateSimplifyCFG')
into hiding, but I'll try to clean that up with a follow-up patch anyway.
llvm-svn: 313829
Erich Keane [Wed, 20 Sep 2017 22:28:24 +0000 (22:28 +0000)]
[MS Compat]Allow __interfaces to have properties.
__interface types are allowed in MSVC to have "property" data members
(marked with declspec property). This patch alters Sema to allow property
data members.
Differential Revision: https://reviews.llvm.org/D38092
llvm-svn: 313828
Richard Smith [Wed, 20 Sep 2017 22:17:55 +0000 (22:17 +0000)]
Give external linkage and mangling to lambdas inside inline variables and variable templates.
This implements the proposed approach in https://github.com/itanium-cxx-abi/cxx-abi/issues/33
llvm-svn: 313827
Reid Kleckner [Wed, 20 Sep 2017 21:56:21 +0000 (21:56 +0000)]
Commit local changes that missed llvm.dbg.addr
llvm-svn: 313826
Reid Kleckner [Wed, 20 Sep 2017 21:52:33 +0000 (21:52 +0000)]
[IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare
Summary:
This implements the design discussed on llvm-dev for better tracking of
variables that live in memory through optimizations:
http://lists.llvm.org/pipermail/llvm-dev/2017-September/117222.html
This is tracked as PR34136
llvm.dbg.addr is intended to be produced and used in almost precisely
the same way as llvm.dbg.declare is today, with the exception that it is
control-dependent. That means that dbg.addr should always have a
position in the instruction stream, and it will allow passes that
optimize memory operations on local variables to insert llvm.dbg.value
calls to reflect deleted stores. See SourceLevelDebugging.rst for more
details.
The main drawback to generating DBG_VALUE machine instrs is that they
usually cause LLVM to emit a location list for DW_AT_location. The next
step will be to teach DwarfDebug.cpp how to recognize more DBG_VALUE
ranges as not needing a location list, and possibly start setting
DW_AT_start_offset for variables whose lifetimes begin mid-scope.
Reviewers: aprantl, dblaikie, probinson
Subscribers: eraman, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D37768
llvm-svn: 313825
Vedant Kumar [Wed, 20 Sep 2017 21:52:09 +0000 (21:52 +0000)]
[docs] llvm-cov: Document -show-instantiation-summary
llvm-svn: 313824
Eugene Zelenko [Wed, 20 Sep 2017 21:35:51 +0000 (21:35 +0000)]
[ARM] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 313823
Saleem Abdulrasool [Wed, 20 Sep 2017 21:32:44 +0000 (21:32 +0000)]
Revert "Revert "ExecutionEngine: add R_AARCH64_ABS{16,32}""
This reverts commit SVN r313668. The original test case attempted to
write a pointer value into 16-bits, although the value may exceed the
range representable in 16-bits. Ensure that the symbol is located in
the address space such that its absolute address is representable in
16-bits. This should fix the assertion failure that was seen on the
Windows hosts.
llvm-svn: 313822
Sanjay Patel [Wed, 20 Sep 2017 21:25:02 +0000 (21:25 +0000)]
[SimplifyCFG] auto-generate full checks; NFC
llvm-svn: 313821
Artem Belevich [Wed, 20 Sep 2017 21:23:07 +0000 (21:23 +0000)]
[NVPTX] Implemented shfl.sync instruction and supporting intrinsics/builtins.
Differential Revision: https://reviews.llvm.org/D38090
llvm-svn: 313820
Craig Topper [Wed, 20 Sep 2017 21:18:17 +0000 (21:18 +0000)]
[InstCombine] Handle (X & C2) < C1 --> (X & C2) == 0
We already did (X & C2) > C1 --> (X & C2) != 0, if any bit set in (X & C2) will produce a result greater than C1. But there is an equivalent inverse condition with <= C1 (which will be canonicalized to < C1+1)
Differential Revision: https://reviews.llvm.org/D38065
llvm-svn: 313819
Craig Topper [Wed, 20 Sep 2017 21:18:12 +0000 (21:18 +0000)]
[InstCombine] Pre-commit test cases for D38065.
llvm-svn: 313818
Sam Clegg [Wed, 20 Sep 2017 21:17:04 +0000 (21:17 +0000)]
[WebAssembly] Add support for local symbol bindings
Differential Revision: https://reviews.llvm.org/D38096
llvm-svn: 313817
Marek Sokolowski [Wed, 20 Sep 2017 21:03:37 +0000 (21:03 +0000)]
[llvm-readobj] Fix 'Teach readobj to dump .res files'.
Fix-up for r313790. Some buildbots couldn't convert size_t to
uint{}_t; do it manually.
llvm-svn: 313816
Simon Atanasyan [Wed, 20 Sep 2017 21:01:30 +0000 (21:01 +0000)]
[mips] Fix calculation of a branch instruction offset to escape left shift of negative value
llvm-svn: 313815
Matt Arsenault [Wed, 20 Sep 2017 21:01:24 +0000 (21:01 +0000)]
AMDGPU: Start selecting v_mad_mixhi_f16
llvm-svn: 313814
Saleem Abdulrasool [Wed, 20 Sep 2017 21:00:40 +0000 (21:00 +0000)]
X86: treat SwiftCC as Win64_CC on Win64
The Swift CC is identical to Win64 CC with the exception of swift error
being passed in r12 which is a CSR. However, since this calling
convention is only used in swift -> swift code, it does not impact
interoperability and can be treated entirely as Win64 CC. We would
previously incorrectly lower the frame setup as we did not treat the
frame as conforming to Win64 specifications.
llvm-svn: 313813
Matt Arsenault [Wed, 20 Sep 2017 20:53:49 +0000 (20:53 +0000)]
AMDGPU: Add tied operands to v_mad_mix{lo|hi}_f16
These write to the low and high half of the destination
register and leave the other 16-bits unchanged. This is true
for most 16-bit instructions on gfx9, but we don't use that
now.
llvm-svn: 313812
Jan Vesely [Wed, 20 Sep 2017 20:42:19 +0000 (20:42 +0000)]
Implement cl_khr_int64_extended_atomics builtins
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 313811
Jan Vesely [Wed, 20 Sep 2017 20:42:14 +0000 (20:42 +0000)]
Implement cl_khr_int64_base_atomics builtins
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 313810
Vlad Tsyrklevich [Wed, 20 Sep 2017 20:38:14 +0000 (20:38 +0000)]
Introduce the llvm-cfi-verify tool (resubmission of D37937).
Summary: Resubmission of D37937. Fixed i386 target building (conversion from std::size_t& to uint64_t& failed). Fixed documentation warning failure about docs/CFIVerify.rst not being in the tree.
Reviewers: vlad.tsyrklevich
Reviewed By: vlad.tsyrklevich
Patch by Mitch Phillips
Subscribers: sbc100, mgorny, pcc, llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D38089
llvm-svn: 313809
Eric Christopher [Wed, 20 Sep 2017 20:32:23 +0000 (20:32 +0000)]
Remove the default subtarget from the new Nios2 port. It's unused and deprecated.
llvm-svn: 313808
Zachary Turner [Wed, 20 Sep 2017 20:31:24 +0000 (20:31 +0000)]
[lit] Undo the patch to stop writing pyc files.
The problems on the bots appear to be resolved and this was
determined to not be the culprit. Removing this.
llvm-svn: 313807
Matt Arsenault [Wed, 20 Sep 2017 20:28:39 +0000 (20:28 +0000)]
AMDGPU: Start selecting v_mad_mixlo_f16
Also add some tests that should be able to use v_mad_mixhi_f16,
but do not yet. This is trickier because we don't really model
the partial update of the register done by 16-bit instructions.
llvm-svn: 313806
Alexey Bataev [Wed, 20 Sep 2017 20:11:31 +0000 (20:11 +0000)]
[OPENMP] Support for re-declarations when checking captured variables.
Need to check for variables re-declarations when checking that the
variable was already captured in the captured region.
llvm-svn: 313805
Vlad Tsyrklevich [Wed, 20 Sep 2017 19:46:02 +0000 (19:46 +0000)]
Revert "Introduce the llvm-cfi-verify tool (resubmission of D37937)."
This reverts commit r313798, it's causing buildbot failures.
llvm-svn: 313804
Marshall Clow [Wed, 20 Sep 2017 19:38:43 +0000 (19:38 +0000)]
Revert 313789 because gcc doesn't like it
llvm-svn: 313803
Cameron Desrochers [Wed, 20 Sep 2017 19:37:37 +0000 (19:37 +0000)]
Fixed unused variable warning introduced in r313796 causing build failure
llvm-svn: 313802
Ilya Biryukov [Wed, 20 Sep 2017 19:32:06 +0000 (19:32 +0000)]
[clangd] Fixed crash on MacOS.
Caused by invalid order of members in ClangdServer.
DiagnosticsMutex was used after destruction.
llvm-svn: 313801
Rafael Espindola [Wed, 20 Sep 2017 19:24:57 +0000 (19:24 +0000)]
Consider ForceAbsolute again in moveAbsRight.
This patch goes back to considering ForceAbsolute in moveAbsRight, but
only if the second argument is not already absolute.
With this we can handle "foo + ABSOLUTE(foo)" and "ABSOLUTE(foo) + foo".
llvm-svn: 313800
Ted Woodward [Wed, 20 Sep 2017 19:16:53 +0000 (19:16 +0000)]
Fix warning caused by new clang::BuiltinType::Float16 added in r312794
llvm-svn: 313799
Vlad Tsyrklevich [Wed, 20 Sep 2017 19:14:16 +0000 (19:14 +0000)]
Introduce the llvm-cfi-verify tool (resubmission of D37937).
Summary: Resubmission of D37937. Fixed i386 target building (conversion from std::size_t& to uint64_t& failed). Fixed documentation warning failure about docs/CFIVerify.rst not being in the tree.
Reviewers: vlad.tsyrklevich
Reviewed By: vlad.tsyrklevich
Patch by Mitch Phillips
Subscribers: mgorny, pcc, llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D38089
llvm-svn: 313798
Matt Arsenault [Wed, 20 Sep 2017 19:09:28 +0000 (19:09 +0000)]
AMDGPU: Fix encoding of op_sel for mad_mix* opcodes
llvm-svn: 313797
Cameron Desrochers [Wed, 20 Sep 2017 19:03:37 +0000 (19:03 +0000)]
[PCH] Fixed preamble breaking with BOM presence (and particularly, fluctuating BOM presence)
This patch fixes broken preamble-skipping when the preamble region includes a byte order mark (BOM). Previously, parsing would fail if preamble PCH generation was enabled and a BOM was present.
This also fixes preamble invalidation when a BOM appears or disappears. This may seem to be an obscure edge case, but it happens regularly with IDEs that pass buffer overrides that never (or always) have a BOM, yet the underlying file from the initial parse that generated a PCH might (or might not) have a BOM.
I've included a test case for these scenarios.
Differential Revision: https://reviews.llvm.org/D37491
llvm-svn: 313796