Craig Topper [Sun, 27 Nov 2016 19:51:41 +0000 (19:51 +0000)]
[AVX-512] Add integer and fp unpck instructions to load folding tables.
llvm-svn: 288004
Simon Pilgrim [Sun, 27 Nov 2016 19:28:39 +0000 (19:28 +0000)]
[X86][SSE] Split lowerVectorShuffleAsShift ready for combines. NFCI.
Moved most of matching code into matchVectorShuffleAsShift to share with target shuffle combines (in a future commit).
llvm-svn: 288003
Rui Ueyama [Sun, 27 Nov 2016 19:28:32 +0000 (19:28 +0000)]
Add paralell_for and use it where appropriate.
When we iterate over numbers as opposed to iterable elements,
parallel_for fits better than parallel_for_each.
llvm-svn: 288002
Craig Topper [Sun, 27 Nov 2016 18:51:13 +0000 (18:51 +0000)]
[X86] Add TB_NO_REVERSE to entries in the load folding table where the instruction's load size is smaller than the register size.
If we were to unfold these, the load size would be increased to the register size. This is not safe to do since the enlarged load can do things like cross a page boundary into a page that doesn't exist.
I probably missed some instructions, but this should be a large portion of them.
llvm-svn: 288001
Simon Pilgrim [Sun, 27 Nov 2016 18:25:02 +0000 (18:25 +0000)]
[X86][SSE] Added tests showing missed combines for shuffle to shifts.
llvm-svn: 288000
Hal Finkel [Sun, 27 Nov 2016 16:26:14 +0000 (16:26 +0000)]
Adjust type-trait evaluation to properly handle Using(Shadow)Decls
Since r274049, for an inheriting constructor declaration, the name of the using
declaration (and using shadow declaration comes from the using declaration) is
the name of a derived class, not the base class (line 8225-8232 of
lib/Sema/SemaDeclCXX.cpp in https://reviews.llvm.org/rL274049). Because of
this, name-based lookup performed inside Sema::LookupConstructors returns not
only CXXConstructorDecls but also Using(Shadow)Decls, which results assertion
failure reported in PR29087.
Patch by Taewook Oh, thanks!
Differential Revision: https://reviews.llvm.org/D23765
llvm-svn: 287999
Sanjay Patel [Sun, 27 Nov 2016 15:54:45 +0000 (15:54 +0000)]
add tests to show missing analysis; NFC
llvm-svn: 287998
Sanjay Patel [Sun, 27 Nov 2016 15:53:48 +0000 (15:53 +0000)]
fix formatting; NFC
llvm-svn: 287997
Rafael Espindola [Sun, 27 Nov 2016 09:44:45 +0000 (09:44 +0000)]
Also skip regular symbol assignment at the start of a script.
Unfortunatelly some scripts look like
kernphys = ...
. = ....
and the expectation in that every orphan section is after the
assignment.
llvm-svn: 287996
Craig Topper [Sun, 27 Nov 2016 08:55:31 +0000 (08:55 +0000)]
[AVX-512] Add masked EVEX vpmovzx/sx instructions to load folding tables.
llvm-svn: 287995
Rafael Espindola [Sun, 27 Nov 2016 07:39:45 +0000 (07:39 +0000)]
Don't put an orphan before the first . assignment.
This is an horrible special case, but seems to match bfd's behaviour
and is important for avoiding placing an orphan section before the
expected start of the file.
llvm-svn: 287994
Mohammad Shahid [Sun, 27 Nov 2016 03:35:31 +0000 (03:35 +0000)]
[SLP] Add new and update existing lit testfor providing more context to incoming patch for vectorization of jumbled load
Change-Id: Ifb9091bb0f84c1937c2c8bd2fc345734f250d2f9
llvm-svn: 287992
Craig Topper [Sun, 27 Nov 2016 01:52:51 +0000 (01:52 +0000)]
[X86] Remove alignment restrictions from load folding table for some instructions that don't have a restriction.
Most of these are the SSE4.1 PMOVZX/PMOVSX instructions which all read less than 128-bits. The only other was PMOVUPD which by definition is an unaligned load.
llvm-svn: 287991
Ekaterina Romanova [Sat, 26 Nov 2016 19:38:19 +0000 (19:38 +0000)]
[DOXYGEN] Updated instruction names corresponding to avxintrin.h intrinsics.
Documentation for some of the avxintrin.h's intrinsics errorneously said that
non VEX-prefixed instructions could be generated. This was fixed.
I tried several different solutions to achieve pretty printing of unordered lists (nested and non-nested) in param sections in doxygen.
llvm-svn: 287990
Kuba Mracek [Sat, 26 Nov 2016 19:09:32 +0000 (19:09 +0000)]
[tsan] Fix the lit expansion of %deflake not to eat a space
The lit expansion of "%deflake " (notice the space after) expands in a way that the space is removed, this fixes that.
Differential Revision: https://reviews.llvm.org/D27139
llvm-svn: 287989
Marshall Clow [Sat, 26 Nov 2016 18:45:03 +0000 (18:45 +0000)]
Implement conjuntion/disjuntion/negation for LFTS v2. Same code and tests for the ones in std::
llvm-svn: 287988
Craig Topper [Sat, 26 Nov 2016 18:43:26 +0000 (18:43 +0000)]
[X86] Remove hasOneUse check that is redundant with the one in IsProfitableToFold.
llvm-svn: 287987
Craig Topper [Sat, 26 Nov 2016 18:43:24 +0000 (18:43 +0000)]
[X86] Fix the zero extending load detection in X86DAGToDAGISel::selectScalarSSELoad to pass the load node to IsProfitableToFold and IsLegalToFold.
Previously we were passing the SCALAR_TO_VECTOR node.
llvm-svn: 287986
Craig Topper [Sat, 26 Nov 2016 18:43:21 +0000 (18:43 +0000)]
[X86] Simplify control flow. NFCI
llvm-svn: 287985
Tobias Grosser [Sat, 26 Nov 2016 17:58:40 +0000 (17:58 +0000)]
[ScopInfo] Use SCEVRewriteVisitor to simplify SCEVSensitiveParameterRewriter [NFC]
llvm-svn: 287984
Craig Topper [Sat, 26 Nov 2016 17:29:25 +0000 (17:29 +0000)]
[X86] Add a hasOneUse check to selectScalarSSELoad to keep the same load from being folded multiple times.
Summary: When selectScalarSSELoad is looking for a scalar_to_vector of a scalar load, it makes sure the load is only used by the scalar_to_vector. But it doesn't make sure the scalar_to_vector is only used once. This can cause the same load to be folded multiple times. This can be bad for performance. This also causes the chain output to be duplicated, but not connected to anything so chain dependencies will not be satisfied.
Reviewers: RKSimon, zvi, delena, spatel
Subscribers: andreadb, llvm-commits
Differential Revision: https://reviews.llvm.org/D26790
llvm-svn: 287983
Sanjay Patel [Sat, 26 Nov 2016 16:13:23 +0000 (16:13 +0000)]
[InstCombine] add test to show missing vector optimization; NFC
llvm-svn: 287982
Marshall Clow [Sat, 26 Nov 2016 15:49:40 +0000 (15:49 +0000)]
Implement the 'detection idiom' from LFTS v2
llvm-svn: 287981
Sanjay Patel [Sat, 26 Nov 2016 15:23:20 +0000 (15:23 +0000)]
[InstCombine] don't drop metadata in FoldOpIntoSelect()
llvm-svn: 287980
Rui Ueyama [Sat, 26 Nov 2016 15:15:11 +0000 (15:15 +0000)]
Change return types of split{Non,}Strings.
They return new vectors, but at the same time they mutate other vectors,
so returning values doesn't make much sense. We should just mutate two
vectors.
llvm-svn: 287979
Rui Ueyama [Sat, 26 Nov 2016 15:10:01 +0000 (15:10 +0000)]
Make getColorDiagnostics return a boolean value instead of an enum.
Config->ColorDiagnostics was of type enum before. Now it is just a
boolean flag. Thanks Rafael for suggestion.
llvm-svn: 287978
Rui Ueyama [Sat, 26 Nov 2016 15:09:58 +0000 (15:09 +0000)]
Split MergeOutputSection::finalize.
llvm-svn: 287977
Sanjay Patel [Sat, 26 Nov 2016 15:01:59 +0000 (15:01 +0000)]
add optional param to copy metadata when creating selects; NFC
There are other spots where we can use this; we're currently dropping
metadata in some places, and there are proposed changes where we will
want to propagate metadata.
IRBuilder's CreateSelect() already has a parameter like this, so this
change makes the regular 'Create' API line up with that.
llvm-svn: 287976
Craig Topper [Sat, 26 Nov 2016 08:21:52 +0000 (08:21 +0000)]
[AVX-512] Add unmasked EVEX vpmovzx/sx instructions to load folding tables.
llvm-svn: 287975
Craig Topper [Sat, 26 Nov 2016 08:21:48 +0000 (08:21 +0000)]
[AVX-512] Add masked 128/256-bit integer add/sub instructions to load folding tables.
llvm-svn: 287974
Tobias Grosser [Sat, 26 Nov 2016 07:37:46 +0000 (07:37 +0000)]
[ScopDetect] Expand statistics of the detected scops
We now collect:
Number of total loops
Number of loops in scops
Number of scops
Number of scops with maximal loop depth 1
Number of scops with maximal loop depth 2
Number of scops with maximal loop depth 3
Number of scops with maximal loop depth 4
Number of scops with maximal loop depth 5
Number of scops with maximal loop depth 6 and larger
Number of loops in scops (profitable scops only)
Number of scops (profitable scops only)
Number of scops with maximal loop depth 1 (profitable scops only)
Number of scops with maximal loop depth 2 (profitable scops only)
Number of scops with maximal loop depth 3 (profitable scops only)
Number of scops with maximal loop depth 4 (profitable scops only)
Number of scops with maximal loop depth 5 (profitable scops only)
Number of scops with maximal loop depth 6 and larger (profitable scops only)
These statistics are certainly completely accurate as we might drop scops
when building up their polyhedral representation, but they should give a good
indication of the number of scops we detect.
llvm-svn: 287973
Craig Topper [Sat, 26 Nov 2016 07:21:00 +0000 (07:21 +0000)]
[AVX-512] Add masked 512-bit integer add/sub instructions to load folding tables.
llvm-svn: 287972
Craig Topper [Sat, 26 Nov 2016 07:20:57 +0000 (07:20 +0000)]
[AVX-512] Teach LowerFormalArguments to use the extended register class when available. Fix the avx512vl stack folding tests to clobber more registers or otherwise they use xmm16 after this change.
llvm-svn: 287971
Craig Topper [Sat, 26 Nov 2016 07:20:53 +0000 (07:20 +0000)]
[AVX-512] Add VLX versions of VDIVPD/PS and VMULPD/PS to load folding tables.
llvm-svn: 287970
Rafael Espindola [Sat, 26 Nov 2016 06:55:35 +0000 (06:55 +0000)]
Create sections with just assignments as STT_NOBITS.
This matches the behaviour of bfd ld. Using 0 was causing problems
with strip, which would remove these sections.
llvm-svn: 287969
Tobias Grosser [Sat, 26 Nov 2016 05:53:09 +0000 (05:53 +0000)]
[ScopDetectionDiagnostic] Collect statistics for each diagnostic type
Our original statistics were added before we introduced a more fine-grained
diagnostic system, but the granularity of our statistics has never been
increased accordingly. This change introduces now one statistic counter per
diagnostic to enable us to collect fine-grained statistics about who certain
scops are not detected. In case coarser grained statistics are needed, the
user is expected to combine counters manually.
llvm-svn: 287968
Davide Italiano [Sat, 26 Nov 2016 05:37:04 +0000 (05:37 +0000)]
[ELF] Be compliant with LLVM and rename Lto into LTO. NFCI.
llvm-svn: 287967
Alexander Shaposhnikov [Sat, 26 Nov 2016 05:23:44 +0000 (05:23 +0000)]
[lldb] Fix typos in file headers
This diff fixes typos in file headers (incorrect file names).
Test plan:
Under llvm/tools/lldb/source:
find ./* -type f | grep -e '\(cpp\|h\)$' | while read F; do B=$(basename $F); echo $F head -n 1 $F | grep -v $B | wc -l ; done
Differential revision: https://reviews.llvm.org/D27115
llvm-svn: 287966
Tobias Grosser [Sat, 26 Nov 2016 05:08:27 +0000 (05:08 +0000)]
[ScopDetectionDiagnostic] IrreducibleRegion is a subclasses of CFG
Reflect this correctly in the RejectReasonKind enum. The definition of
RejectReasonKind::IrreducibleRegion was introduced in r258497, when we started
to refuse regions containing irreducible loops.
llvm-svn: 287965
Tobias Grosser [Sat, 26 Nov 2016 05:08:24 +0000 (05:08 +0000)]
[ScopDetectionDiagnostic] Remove leftover RejectReasonKind for Conditions [NFC]
In r248118 some diagnostics for unstructured control flow have been removed,
but the corresponding RejectReasonKind was accidentally not removed. This
change removes it, as it is not needed any more.
llvm-svn: 287964
Tobias Grosser [Sat, 26 Nov 2016 03:44:31 +0000 (03:44 +0000)]
[ScopDectionDiagnostic] Use scoped enums instead three letter prefix [NFC]
This improves readability of the code.
llvm-svn: 287963
Tom Stellard [Sat, 26 Nov 2016 02:26:04 +0000 (02:26 +0000)]
AMDGPU/SI: Use float as the operand type for amdgcn.interp intrinsics
Reviewers: arsenm, nhaehnle
Subscribers: kzhuravl, wdng, yaxunl, llvm-commits, tony-tye
Differential Revision: https://reviews.llvm.org/D26724
llvm-svn: 287962
Craig Topper [Sat, 26 Nov 2016 02:14:00 +0000 (02:14 +0000)]
[X86][XOP] Add a reversed reg/reg form for VPROT instructions.
The W bit distinquishes which operand is the memory operand. But if the mod bits are 3 then the memory operand is a register and there are two possible encodings. We already did this correctly for several other XOP instructions.
llvm-svn: 287961
Craig Topper [Sat, 26 Nov 2016 02:13:58 +0000 (02:13 +0000)]
[X86] Add SSE, AVX, and AVX2 version of MOVDQU to the load/store folding tables for consistency.
Not sure this is truly needed but we had the floating point equivalents, the aligned equivalents, and the EVEX equivalents. So this just makes it complete.
llvm-svn: 287960
Kuba Mracek [Sat, 26 Nov 2016 01:30:31 +0000 (01:30 +0000)]
[asan] Support handle_sigill on Darwin
Handling SIGILL on Darwin works fine, so let's just make this feature work and re-enable the ill.cc testcase.
Differential Revision: https://reviews.llvm.org/D27141
llvm-svn: 287959
Dylan McKay [Sat, 26 Nov 2016 01:07:32 +0000 (01:07 +0000)]
Un-XFAIL an AVR CodeGen test
llvm-svn: 287958
Kuba Mracek [Sat, 26 Nov 2016 00:50:08 +0000 (00:50 +0000)]
[asan] Add a "dump_registers" flag to print out CPU registers after a SIGSEGV
This patch prints out all CPU registers after a SIGSEGV. These are available in the signal handler context. Only implemented for Darwin. Can be turned off with the dump_registers flag.
Differential Revision: https://reviews.llvm.org/D11365
llvm-svn: 287957
Craig Topper [Fri, 25 Nov 2016 23:21:34 +0000 (23:21 +0000)]
[AVX-512] Put the AVX-512 sections of the load folding tables into mostly alphabetical order. This is consistent with the older sections of the table. NFC
llvm-svn: 287956
David Majnemer [Fri, 25 Nov 2016 22:35:09 +0000 (22:35 +0000)]
Replace some callers of setTailCall with setTailCallKind
We were a little sloppy with adding tailcall markers. Be more
consistent by using setTailCallKind instead of setTailCall.
llvm-svn: 287955
Sanjay Patel [Fri, 25 Nov 2016 21:12:39 +0000 (21:12 +0000)]
[SimplifyCFG] auto-generate better checks; NFC
llvm-svn: 287954
Sanjay Patel [Fri, 25 Nov 2016 21:07:13 +0000 (21:07 +0000)]
[SimplifyCFG] auto-generate better checks; NFC
llvm-svn: 287953
Rui Ueyama [Fri, 25 Nov 2016 20:42:39 +0000 (20:42 +0000)]
Fix buildbots.
llvm-svn: 287952
Rui Ueyama [Fri, 25 Nov 2016 20:41:45 +0000 (20:41 +0000)]
Fix typo.
llvm-svn: 287951
Rui Ueyama [Fri, 25 Nov 2016 20:37:16 +0000 (20:37 +0000)]
Do not print out ARGV0 in white because it's unreadable on white background.
llvm-svn: 287950
Rui Ueyama [Fri, 25 Nov 2016 20:27:32 +0000 (20:27 +0000)]
Support -color-diagnostics={auto,always,never}.
-color-diagnostics=auto is default because that's the same as
Clang's default. When color is enabled, error or warning messages
are colored like this.
error:
<bold>ld.lld</bold> <red>error:</red> foo.o: no such file
warning:
<bold>ld.lld</bold> <magenta>warning:</magenta> foo.o: no such file
Differential Revision: https://reviews.llvm.org/D27117
llvm-svn: 287949
Rui Ueyama [Fri, 25 Nov 2016 20:20:57 +0000 (20:20 +0000)]
We shouldn't call parallle_for_each if -no-thread is given.
llvm-svn: 287948
Joerg Sonnenberger [Fri, 25 Nov 2016 20:15:57 +0000 (20:15 +0000)]
Typo.
llvm-svn: 287947
Rui Ueyama [Fri, 25 Nov 2016 20:05:08 +0000 (20:05 +0000)]
Parallelize uncompress() and splitIntoPieces().
Uncompressing section contents and spliting mergeable section contents
into smaller chunks are heavy tasks. They scan entire section contents
and do CPU-intensive tasks such as uncompressing zlib-compressed data
or computing a hash value for each section piece.
Luckily, these tasks are independent to each other, so we can do that
in parallel_for_each. The number of input sections is large (as opposed
to the number of output sections), so there's a large parallelism here.
Actually the current design to call uncompress() and splitIntoPieces()
in batch was chosen with doing this in mind. Basically what we need to
do here is to replace `for` with `parallel_for_each`.
It seems this patch improves latency significantly if linked programs
contain debug info (which in turn contain lots of mergeable strings.)
For example, the latency to link Clang (debug build) improved by 20% on
my machine as shown below. Note that ld.gold took 19.2 seconds to do
the same thing.
Before:
30801.782712 task-clock (msec) # 3.652 CPUs utilized ( +- 2.59% )
104,084 context-switches # 0.003 M/sec ( +- 1.02% )
5,063 cpu-migrations # 0.164 K/sec ( +- 13.66% )
2,528,130 page-faults # 0.082 M/sec ( +- 0.47% )
85,317,809,130 cycles # 2.770 GHz ( +- 2.62% )
67,352,463,373 stalled-cycles-frontend # 78.94% frontend cycles idle ( +- 3.06% )
<not supported> stalled-cycles-backend
44,295,945,493 instructions # 0.52 insns per cycle
# 1.52 stalled cycles per insn ( +- 0.44% )
8,572,384,877 branches # 278.308 M/sec ( +- 0.66% )
141,806,726 branch-misses # 1.65% of all branches ( +- 0.13% )
8.
433424003 seconds time elapsed ( +- 1.20% )
After:
35523.764575 task-clock (msec) # 5.265 CPUs utilized ( +- 2.67% )
159,107 context-switches # 0.004 M/sec ( +- 0.48% )
8,123 cpu-migrations # 0.229 K/sec ( +- 23.34% )
2,372,483 page-faults # 0.067 M/sec ( +- 0.36% )
98,395,342,152 cycles # 2.770 GHz ( +- 2.62% )
79,294,670,125 stalled-cycles-frontend # 80.59% frontend cycles idle ( +- 3.03% )
<not supported> stalled-cycles-backend
46,274,151,813 instructions # 0.47 insns per cycle
# 1.71 stalled cycles per insn ( +- 0.47% )
8,987,621,670 branches # 253.003 M/sec ( +- 0.60% )
148,900,624 branch-misses # 1.66% of all branches ( +- 0.27% )
6.
747548004 seconds time elapsed ( +- 0.40% )
llvm-svn: 287946
Rui Ueyama [Fri, 25 Nov 2016 18:51:56 +0000 (18:51 +0000)]
Move typedefs inside a class definition.
llvm-svn: 287945
Rui Ueyama [Fri, 25 Nov 2016 18:51:54 +0000 (18:51 +0000)]
Remove a parameter from ScriptParser.
llvm-svn: 287944
Rui Ueyama [Fri, 25 Nov 2016 18:51:53 +0000 (18:51 +0000)]
Move getLocation from Relocations.cpp to InputSection.cpp.
The function was used only within Relocations.cpp, but now we are
using it in many places, so this patch moves it to a file that fits
to the functionality.
llvm-svn: 287943
Marek Olsak [Fri, 25 Nov 2016 17:37:09 +0000 (17:37 +0000)]
AMDGPU/SI: Add back reverted SGPR spilling code, but disable it
suggested as a better solution by Matt
llvm-svn: 287942
Simon Pilgrim [Fri, 25 Nov 2016 17:25:21 +0000 (17:25 +0000)]
Use SDValue helpers instead of explicitly going via SDValue::getNode(). NFCI
llvm-svn: 287941
Simon Pilgrim [Fri, 25 Nov 2016 17:19:53 +0000 (17:19 +0000)]
Use SDValue helper instead of explicitly going via SDValue::getNode(). NFCI
llvm-svn: 287940
Craig Topper [Fri, 25 Nov 2016 16:48:05 +0000 (16:48 +0000)]
[AVX-512] Add support for changing VSHUFF64x2 to VSHUFF32x4 when its feeding a vselect with 32-bit element size.
Summary:
Shuffle lowering may have widened the element size of a i32 shuffle to i64 before selecting X86ISD::SHUF128. If this shuffle was used by a vselect this can prevent us from selecting masked operations.
This patch detects this and changes the element size to match the vselect.
I don't handle changing integer to floating point or vice versa as its not clear if its better to push such a bitcast to the inputs of the shuffle or to the user of the vselect. So I'm ignoring that case for now.
Reviewers: delena, zvi, RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D27087
llvm-svn: 287939
Eugene Leviant [Fri, 25 Nov 2016 16:42:04 +0000 (16:42 +0000)]
[ELF] Add explicit template instantiations for toString
llvm-svn: 287938
Craig Topper [Fri, 25 Nov 2016 16:33:53 +0000 (16:33 +0000)]
[AVX-512] Add VPERMT2* and VPERMI2* instructions to load folding tables.
llvm-svn: 287937
Marek Olsak [Fri, 25 Nov 2016 16:03:34 +0000 (16:03 +0000)]
Revert "AMDGPU: Implement SGPR spilling with scalar stores"
This reverts commit
4404d0d6e354e80dd7f8f0a0e12d8ad809cf007e.
llvm-svn: 287936
Marek Olsak [Fri, 25 Nov 2016 16:03:27 +0000 (16:03 +0000)]
Revert "AMDGPU: Fix MMO when splitting spill"
This reverts commit
79d4f8b8b1ce430c3d5dac4fc72a9eebaed24fe1.
llvm-svn: 287935
Marek Olsak [Fri, 25 Nov 2016 16:03:22 +0000 (16:03 +0000)]
Revert "AMDGPU: Fix adding extra implicit def of register"
This reverts commit
e834ce5976567575621901fb967b8018b9916d71.
llvm-svn: 287934
Marek Olsak [Fri, 25 Nov 2016 16:03:19 +0000 (16:03 +0000)]
Revert "AMDGPU: Fix not setting kill flag on temp reg when spilling"
This reverts commit
057bbbe4ae170247ba37f08f2e70ef185267d1bb.
llvm-svn: 287933
Marek Olsak [Fri, 25 Nov 2016 16:03:15 +0000 (16:03 +0000)]
Revert "AMDGPU: Make m0 unallocatable"
This reverts commit
124ad83dae04514f943902446520c859adee0e96.
llvm-svn: 287932
Marek Olsak [Fri, 25 Nov 2016 16:03:06 +0000 (16:03 +0000)]
Revert "AMDGPU: Remove m0 spilling code"
This reverts commit
f18de36554eb22416f8ba58e094e0272523a4301.
llvm-svn: 287931
Marek Olsak [Fri, 25 Nov 2016 16:03:02 +0000 (16:03 +0000)]
Revert "AMDGPU: Preserve m0 value when spilling"
This reverts commit
a5a179ffd94fd4136df461ec76fb30f04afa87ce.
llvm-svn: 287930
Eric Liu [Fri, 25 Nov 2016 16:02:49 +0000 (16:02 +0000)]
Do not do raw name replacement when FromDecl is a class forward-declaration.
Summary:
If the `FromDecl` is a class forward declaration, the reference is
still considered as referring to the original definition given the nature
of forward-declarations, so we can't do a raw name replacement in this case.
Reviewers: bkramer
Subscribers: cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D27132
llvm-svn: 287929
Simon Pilgrim [Fri, 25 Nov 2016 15:07:15 +0000 (15:07 +0000)]
[X86][SSE] Added knownbits through bitcast test
llvm-svn: 287928
Pavel Labath [Fri, 25 Nov 2016 14:43:37 +0000 (14:43 +0000)]
Fix builds Windows and OSX builds after Connection refactor in r287922
Switch various bits of platform-specific code to chrono that I did not notice
when doing a linux build. This exposed a bug that ConnectionGenericFileWindows
did not handle the magic UINT32_MAX timeout value (instead it waited for about an
hour, which is close enough I guess). Fix that as well.
llvm-svn: 287927
Joerg Sonnenberger [Fri, 25 Nov 2016 14:14:43 +0000 (14:14 +0000)]
Document the arguments form of commands.
llvm-svn: 287926
Abhilash Bhandari [Fri, 25 Nov 2016 14:07:44 +0000 (14:07 +0000)]
[Loop Unswitch] Patch to selective unswitch only the reachable branch instructions.
Summary:
The iterative algorithm for Loop Unswitching may render some of the branches unreachable in the unswitched loops.
Given the exponential nature of the algorithm, this is quite an overhead.
This patch fixes this problem by selectively unswitching only those branches within a loop that are reachable from the loop header.
Reviewers: Michael Zolothukin, Anna Thomas, Weiming Zhao.
Subscribers: llvm-commits.
Differential Revision: http://reviews.llvm.org/D26299
llvm-svn: 287925
Eric Liu [Fri, 25 Nov 2016 12:39:03 +0000 (12:39 +0000)]
Consider nested namespaces in the canonical namespace as canonical as well.
Summary:
For example, this case was missed when looking for different but canonical
namespaces. UseContext in this case should be considered as in the canonical
namespace.
```
namespace a { namespace b { <FromContext> } }
namespace a { namespace b { namespace c { <UseContext> } } }
```
Added some commenting.
Reviewers: bkramer
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D27125
llvm-svn: 287924
Pavel Labath [Fri, 25 Nov 2016 12:37:49 +0000 (12:37 +0000)]
Fix darwin build broken by r287920
I accidentally used the wrong brackets when including llvm headers.
llvm-svn: 287923
Pavel Labath [Fri, 25 Nov 2016 12:22:32 +0000 (12:22 +0000)]
Introduce Chrono to the Connection class. NFCI.
llvm-svn: 287922
Pavel Labath [Fri, 25 Nov 2016 12:15:17 +0000 (12:15 +0000)]
Fix FreeBSD build error in r287920
The conditional expression is ambiguous there, so help it by explicitly casting.
This will go away once we use chrono all the way down.
llvm-svn: 287921
Pavel Labath [Fri, 25 Nov 2016 11:58:44 +0000 (11:58 +0000)]
Introduce chrono to the Communication class
This replaces the raw integer timeout parameters in the class with their
chrono-based equivalents. To achieve this, I have moved the Timeout class to a
more generic place and added a quick unit test for it.
llvm-svn: 287920
Simon Pilgrim [Fri, 25 Nov 2016 11:10:43 +0000 (11:10 +0000)]
[X86][SSE] Added v16i8 shuffle test case from PR31151
llvm-svn: 287919
Simon Dardis [Fri, 25 Nov 2016 11:06:43 +0000 (11:06 +0000)]
[mips] Correct jal expansion for local symbols in .local directives.
This patch corrects the behaviour of code such as:
.local foo
jal foo
foo:
to use the correct jal expansion when writing ELF files.
Patch by: Daniel Sanders
Reviewers: zoran.jovanovic, seanbruno, vkalintiris
Differential Revision: https://reviews.llvm.org/D24722
llvm-svn: 287918
Johan Engelen [Fri, 25 Nov 2016 11:01:12 +0000 (11:01 +0000)]
Use Clang for D language support.
Differential revision: https://reviews.llvm.org/D24794
llvm-svn: 287917
Pavel Labath [Fri, 25 Nov 2016 10:28:09 +0000 (10:28 +0000)]
Merge Linux and FreeBSD arm64 register contexts
Summary:
This is a test-the-water change about possibilities of reducing duplication in
the register context definitions.
I've named the new class RegisterInfoPOSIX, as RegisterContextPOSIX was already
taken :(. The two files were identical except for a fix by Tamas in D12636,
which was applied to the Linux version only, which fixed a discrepancy between
the definitions of fpsr and fpcr on one hand, and all other floating point
register definitions on the other.
Linux test suite still passes after this change. For freebsd, make the floating
point register behavior consistent, but I don't know whether it will be
consistently fixed, or consistently broken. By eyeballing the code, I have a
feeling that a similar fix to D12636 will be required in
RegisterContextPOSIXProcessMonitor_arm64::ReadRegister, but I can't be sure as I
have no way to test it (the assert in that function should fire upon accessing
the registers if it is wrong though).
Reviewers: emaste, clayborg
Subscribers: aemerson, rengolin, beanz, mgorny, modocache, dmikulin, lldb-commits
Differential Revision: https://reviews.llvm.org/D25947
llvm-svn: 287916
Eugene Leviant [Fri, 25 Nov 2016 08:56:36 +0000 (08:56 +0000)]
[ELF] Refactor getDynRel to print error location
Differential revision: https://reviews.llvm.org/D27055
llvm-svn: 287915
Eugene Leviant [Fri, 25 Nov 2016 08:27:15 +0000 (08:27 +0000)]
[ELF] EhOutputSection improvements
Differential revision: https://reviews.llvm.org/D27098
llvm-svn: 287914
George Rimar [Fri, 25 Nov 2016 08:05:41 +0000 (08:05 +0000)]
[ELF] - Add support for access to most of synthetic sections from linkerscript.
This is important for cases like:
.sdata : {
*(.got.plt .got)
...
}
That was not supported before as there was no way to get access to
synthetic sections from script.
More details on review page.
Differential revision: https://reviews.llvm.org/D27040
llvm-svn: 287913
Dean Michael Berris [Fri, 25 Nov 2016 03:54:45 +0000 (03:54 +0000)]
Revert "[XRay][compiler-rt] XRay Buffer Queue"
Broke the build on arm7 and aarch64.
llvm-svn: 287911
Dean Michael Berris [Fri, 25 Nov 2016 03:14:10 +0000 (03:14 +0000)]
[XRay][compiler-rt] XRay Buffer Queue
Summary:
This implements a simple buffer queue to manage a pre-allocated queue of
fixed-sized buffers to hold XRay records. We need this to support
Flight Data Recorder (FDR) mode. We also implement this as a sub-library
first to allow for development before actually using it in an
implementation.
Some important properties of the buffer queue:
- Thread-safe enqueueing/dequeueing of fixed-size buffers.
- Pre-allocation of buffers at construction.
Reviewers: majnemer, rSerge, echristo
Subscribers: mehdi_amini, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D26232
llvm-svn: 287910
Craig Topper [Fri, 25 Nov 2016 02:29:24 +0000 (02:29 +0000)]
[X86] Invert an 'if' and early out to fix a weird indentation. NFCI
llvm-svn: 287909
Craig Topper [Fri, 25 Nov 2016 02:29:21 +0000 (02:29 +0000)]
[X86] Size a SmallVector to the worst case mask size for a 512-bit shuffle. NFCI
llvm-svn: 287908
Kuba Mracek [Thu, 24 Nov 2016 22:50:22 +0000 (22:50 +0000)]
Add "compiler-rt", "libcxx" and "libcxxabi" to svn:ignore under projects/
Differential Revision: https://reviews.llvm.org/D27069
llvm-svn: 287905
Craig Topper [Thu, 24 Nov 2016 21:48:52 +0000 (21:48 +0000)]
[DAGCombine] Teach DAG combine that if both inputs of a vselect are the same, then the condition doesn't matter and the vselect can be removed.
Selects with scalar condition already handle this correctly.
llvm-svn: 287904
Craig Topper [Thu, 24 Nov 2016 21:48:50 +0000 (21:48 +0000)]
[X86] Modify two tests that passed undef to both sides of a vselect to instead pass unique values.
I'd like to teach DAG combine to remove vselects where both sides are identical and these tests were in the way of that.
llvm-svn: 287903
Kuba Mracek [Thu, 24 Nov 2016 21:24:54 +0000 (21:24 +0000)]
[tsan] Add support for GCD dispatch_suspend and dispatch_resume
GCD queues can be suspended and resumed with dispatch_suspend and dispatch_resume. We need to add synchronization between the call to dispatch_resume and any subsequent executions of blocks in the queue that was resumed. We already have an Acquire(q) before the block executes, so this patch just adds the Release(q) in an interceptor of dispatch_resume.
Differential Revision: https://reviews.llvm.org/D27112
llvm-svn: 287902
Rui Ueyama [Thu, 24 Nov 2016 20:59:44 +0000 (20:59 +0000)]
Use toString() to report incompatible files.
llvm-svn: 287901