Commit Graph

272319 Commits

Author SHA1 Message Date
Sanjay Patel
58f02afecd [x86] add more tests for node-level FMF; NFC
llvm-svn: 313893
2017-09-21 17:40:58 +00:00
Zachary Turner
bbe23ae675 [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
2017-09-21 17:38:13 +00:00
Craig Topper
280f133773 [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
2017-09-21 17:30:02 +00:00
Zaara Syeda
50ce30c4f4 Fix buildbot failures, add mtriple to gpr-vsr-spill.ll
llvm-svn: 313890
2017-09-21 17:05:47 +00:00
Zachary Turner
43bcf226c1 [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
2017-09-21 17:02:08 +00:00
Adrian Prantl
5a919cbea2 llvm-dwarfdump: Add support for the --arch command line option.
llvm-svn: 313888
2017-09-21 16:26:18 +00:00
Zachary Turner
71deeee593 [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
2017-09-21 16:18:28 +00:00
Zaara Syeda
fcd9697d72 [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
2017-09-21 16:12:33 +00:00
Benjamin Kramer
c48461922e Add missing file from r313884.
llvm-svn: 313885
2017-09-21 15:32:05 +00:00
Benjamin Kramer
eb14c1109f [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
2017-09-21 15:27:45 +00:00
Simon Pilgrim
1efe0c7224 [X86][SSE] Add PSHUFLW/PSHUFHW tests inspired by PR34686
llvm-svn: 313883
2017-09-21 15:11:51 +00:00
Simon Atanasyan
af273f203c [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
2017-09-21 14:40:32 +00:00
Michael Kruse
6d7a7896ce [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
2017-09-21 14:23:11 +00:00
Alexey Bataev
0dce2ea758 [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
2017-09-21 14:06:59 +00:00
Simon Atanasyan
ede43b71f8 [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
2017-09-21 14:04:53 +00:00
Simon Atanasyan
9f676a7798 [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
2017-09-21 14:04:47 +00:00
Jonas Paulsson
b0e8a2e623 [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
2017-09-21 13:52:24 +00:00
Daniel Jasper
7d2f38d600 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
2017-09-21 12:07:33 +00:00
Mikael Holmen
582e141007 [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
2017-09-21 11:14:27 +00:00
Javed Absar
4b13bfd965 [TableGen] Tidy up CodeGenRegisters
Replacing range loops.

Reviewed by: @MatzeB
Differential Revision: https://reviews.llvm.org/D38091

llvm-svn: 313874
2017-09-21 10:51:47 +00:00
Simon Atanasyan
11766558d7 [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
2017-09-21 10:44:26 +00:00
Jonas Devlieghere
2b029e830f [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
2017-09-21 10:28:33 +00:00
Dean Michael Berris
c14b5f210f [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
2017-09-21 10:16:56 +00:00
Strahinja Petrovic
29202f6dc1 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
2017-09-21 10:04:02 +00:00
Jatin Bhateja
1a86c382d4 [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
2017-09-21 09:53:21 +00:00
George Rimar
3674fb6f2c [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
2017-09-21 08:25:59 +00:00
Gabor Horvath
5536a01ad2 [analyzer] Fix an assertion fail in VirtualCallChecker
Differential Revision: https://reviews.llvm.org/D37978

llvm-svn: 313866
2017-09-21 08:18:59 +00:00
Matt Arsenault
1390af2dd2 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
2017-09-21 07:00:48 +00:00
Simon Atanasyan
6810367610 [MIPS] Restore checking of the disassembler output. NFC
llvm-svn: 313864
2017-09-21 04:55:27 +00:00
Craig Topper
1b9d24ca57 [X86] Remove execute permissions from a couple files.
llvm-svn: 313863
2017-09-21 04:55:08 +00:00
Craig Topper
8b6b8cc5b1 [X86] Remove windows line endings.
llvm-svn: 313862
2017-09-21 04:55:07 +00:00
Craig Topper
d1252692a4 [X86] Remove unused tablegen class.
llvm-svn: 313861
2017-09-21 04:55:06 +00:00
Craig Topper
d022d25eb3 [TableGen] Use CHAR_BIT instead of hardcoded 8 with sizeof. NFC
llvm-svn: 313860
2017-09-21 04:55:04 +00:00
Craig Topper
ddfdd9413a [TableGen] Include StringMap.h instead of StringSet.h since that's the data structure we use.
llvm-svn: 313859
2017-09-21 04:55:03 +00:00
Craig Topper
ac055388ff 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
2017-09-21 04:54:59 +00:00
Serguei Katkov
675e304ef8 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
2017-09-21 04:50:41 +00:00
Vitaly Buka
17def21749 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
2017-09-21 02:51:56 +00:00
David L. Jones
e85a0eca21 [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
2017-09-21 01:26:16 +00:00
Vedant Kumar
18dd9e88ed [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
2017-09-21 01:11:30 +00:00
Matt Arsenault
fdcdd88d57 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
2017-09-21 00:45:59 +00:00
Vitaly Buka
be88ae0eb0 [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
2017-09-21 00:35:22 +00:00
Davide Italiano
bb0690e486 [AArch64] Properly check alignment for AARCH64_LD_PREL_LO19.
Follow-up suggested by Peter Smith.

llvm-svn: 313850
2017-09-21 00:26:28 +00:00
Zachary Turner
957d611575 [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
2017-09-21 00:24:52 +00:00
Craig Topper
e33755860d [X86] Replace a condition that can never be true with an assert.
llvm-svn: 313848
2017-09-21 00:18:48 +00:00
Craig Topper
f0ba300332 [SelectionDAG] Replace a flag that can never be true with an assert.
llvm-svn: 313847
2017-09-21 00:18:46 +00:00
Davide Italiano
6fb3b428a4 [AArch64] Include test for out of range LD_PREL_LO19.
llvm-svn: 313846
2017-09-21 00:16:29 +00:00
Vitaly Buka
08706542e9 [asan] Remove trailing spaces
llvm-svn: 313845
2017-09-21 00:14:17 +00:00
Vitaly Buka
d0d025ef62 [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
2017-09-21 00:11:30 +00:00
Vitaly Buka
d7f0361ab1 [asan] Remove "rm -f" in tests where it was needed only because of >>
llvm-svn: 313843
2017-09-21 00:06:08 +00:00
Michael Kruse
0e370cf1a7 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
2017-09-21 00:01:13 +00:00