Matthias Braun [Fri, 20 Jan 2017 18:30:28 +0000 (18:30 +0000)]
ARM: tLDR_postidx should be marked mayLoad
This fixes -verify-machineinstrs complaints.
llvm-svn: 292629
Rafael Espindola [Fri, 20 Jan 2017 18:20:37 +0000 (18:20 +0000)]
Simplify. NFC.
addIgnored already creates the symbol only if there is a reference to
it.
llvm-svn: 292628
Simon Pilgrim [Fri, 20 Jan 2017 18:20:30 +0000 (18:20 +0000)]
[InstCombine][X86] Add MULDQ/MULUDQ undef handling
llvm-svn: 292627
Alexey Bataev [Fri, 20 Jan 2017 18:04:29 +0000 (18:04 +0000)]
[SLP] A new test for horizontal vectorization for non-power-of-2
instructions.
llvm-svn: 292626
Matthias Braun [Fri, 20 Jan 2017 18:04:27 +0000 (18:04 +0000)]
AArch64LoadStoreOptimizer: Update kill flags when merging stores
Kill flags need to be updated correctly when moving stores up/down to
form store pair instructions.
Those invalid flags have been ignored before but as of r290014 they are
recognized when using -mllvm -verify-machineinstrs.
Also simplifies test/CodeGen/AArch64/ldst-opt-dbg-limit.mir, renames it
to ldst-opt.mir test and adds a new tests for this change.
Differential Revision: https://reviews.llvm.org/D28875
llvm-svn: 292625
Petar Jovanovic [Fri, 20 Jan 2017 17:53:30 +0000 (17:53 +0000)]
[mips] Fix debug information for __thread variable
This patch fixes debug information for __thread variable on Mips
using .dtprelword and .dtpreldword directives.
Patch by Aleksandar Beserminji.
Differential Revision: http://reviews.llvm.org/D28770
llvm-svn: 292624
Eugene Zelenko [Fri, 20 Jan 2017 17:52:16 +0000 (17:52 +0000)]
[AMDGPU] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 292623
Wei Mi [Fri, 20 Jan 2017 17:38:54 +0000 (17:38 +0000)]
[RegisterCoalescing] Recommit the patch "Remove partial redundent copy".
The recommit fixes a bug related with live interval update after the partial
redundent copy is moved.
The original patch is to solve the performance problem described in PR27827.
Register coalescing sometimes cannot remove a copy because of interference.
But if we can find a reverse copy in one of the predecessor block of the copy,
the copy is partially redundent and we may remove the copy partially by moving
it to the predecessor block without the reverse copy.
Differential Revision: https://reviews.llvm.org/D28585
llvm-svn: 292621
Simon Pilgrim [Fri, 20 Jan 2017 17:06:38 +0000 (17:06 +0000)]
[InstCombine][SSE] Tests showing missed opportunities to handle muldq/muludq with undef arguments
Fixed a typo in existing test names at the same time
llvm-svn: 292619
Haicheng Wu [Fri, 20 Jan 2017 16:52:22 +0000 (16:52 +0000)]
Revert "Recommit "[InlineCost] Use TTI to check if GEP is free." #2"
This reverts commit r292616 because the test case still has problem.
llvm-svn: 292618
Alex Lorenz [Fri, 20 Jan 2017 16:48:25 +0000 (16:48 +0000)]
[Frontend] The macro that describes the Objective-C bool type should
be defined for non Objective-C code as well
rdar://
29794915
Differential Revision: https://reviews.llvm.org/D28349
llvm-svn: 292617
Haicheng Wu [Fri, 20 Jan 2017 16:36:34 +0000 (16:36 +0000)]
Recommit "[InlineCost] Use TTI to check if GEP is free." #2
This is the second attemp to recommit r292526.
The original summary:
Currently, a GEP is considered free only if its indices are all constant.
TTI::getGEPCost() can give target-specific more accurate analysis. TTI is
already used for the cost of many other instructions.
llvm-svn: 292616
Alex Lorenz [Fri, 20 Jan 2017 15:38:58 +0000 (15:38 +0000)]
[Sema] Improve the error diagnostic for dot destructor calls on pointer objects
This commit improves the mismatched destructor type error by detecting when the
destructor call has used a '.' instead of a '->' on a pointer to the destructed
type. The diagnostic now suggests to use '->' instead of '.', and adds a fixit
where appropriate.
rdar://
28766702
Differential Revision: https://reviews.llvm.org/D25817
llvm-svn: 292615
Peter Smith [Fri, 20 Jan 2017 15:25:45 +0000 (15:25 +0000)]
[ELF] Cleanup createThunks() NFC.
Include removal of call to getThunkExpr() as it has already been
called and recorded by scanRelocs()
Cleanup suggestions by Rafael.
llvm-svn: 292614
Simon Pilgrim [Fri, 20 Jan 2017 15:15:59 +0000 (15:15 +0000)]
Remove trailing whitespace. NFCI.
llvm-svn: 292613
Simon Pilgrim [Fri, 20 Jan 2017 15:14:38 +0000 (15:14 +0000)]
[CostModel][X86] Removed unused cost. NFCI.
SHL v8i32 is already handled in the SSE41 cost table
llvm-svn: 292612
Pavel Labath [Fri, 20 Jan 2017 14:17:16 +0000 (14:17 +0000)]
Prevent client from querying each thread's PC at each stop.
Summary:
The server was no longer sending the thread PCs the way the client
expected them.
I changed the server to send them back as a threadstop info field,
similar to the Apple version of the server.
I also changed the client to look for them there, before querying the
server.
I added a test to ensure the server doesn't stop sending them.
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D28880
Author: Jason Majors
llvm-svn: 292611
Simon Pilgrim [Fri, 20 Jan 2017 13:21:30 +0000 (13:21 +0000)]
[InstCombine][SSE] Tests showing missed opportunities to constant fold packss/packus
llvm-svn: 292609
Sjoerd Meijer [Fri, 20 Jan 2017 13:10:12 +0000 (13:10 +0000)]
[Thumb] Add support for tMUL in the compare instruction peephole optimizer.
We also want to optimise tests like this: return a*b == 0. The MULS
instruction is flag setting, so we don't need the CMP instruction but can
instead branch on the result of the MULS. The generated instructions sequence
for this example was: MULS, MOVS, MOVS, CMP. The MOVS instruction load the
boolean values resulting from the select instruction, but these MOVS
instructions are flag setting and were thus preventing this optimisation. Now
we first reorder and move the MULS to before the CMP and generate sequence
MOVS, MOVS, MULS, CMP so that the optimisation could trigger. Reordering of the
MULS and MOVS is safe to do because the subsequent MOVS instructions just set
the CPSR register and don't use it, i.e. the CPSR is dead.
Differential Revision: https://reviews.llvm.org/D27990
llvm-svn: 292608
Eric Fiselier [Fri, 20 Jan 2017 12:54:45 +0000 (12:54 +0000)]
Don't default older GCC's to C++17, but C++14 or C++11 instead
llvm-svn: 292607
Eric Fiselier [Fri, 20 Jan 2017 12:52:59 +0000 (12:52 +0000)]
Revert "Don't default older GCC's to C++17, but C++14 or C++11 instead"
The commit isn't quite right, and I want to only have to merge one
commit into 4.0
llvm-svn: 292606
Eric Fiselier [Fri, 20 Jan 2017 12:46:57 +0000 (12:46 +0000)]
Don't default older GCC's to C++17, but C++14 or C++11 instead
llvm-svn: 292605
Krasimir Georgiev [Fri, 20 Jan 2017 12:39:05 +0000 (12:39 +0000)]
[clang-format] Remove redundant test in style-on-command-line.cpp
Summary:
rL292562 added a fix to always format if the fallback style is set to "none".
In test/Format/style-on-command-line.cpp:19 is redundant, since -fallback-style
has a default value of LLVM set in ClangFormat.cpp:72.
@amaiorano: I believe that the rest of the test cases still cover your change in
case the fallback style is explicitly set to "none". Please, if this is not the
case, initiate a discussion.
Reviewers: ioeric, bkramer
Reviewed By: ioeric
Subscribers: cfe-commits, klimek, amaiorano
Differential Revision: https://reviews.llvm.org/D28943
llvm-svn: 292604
Simon Pilgrim [Fri, 20 Jan 2017 11:28:07 +0000 (11:28 +0000)]
[InstCombine][SSE] Tests showing missed opportunities to handle packss/packus with undef arguments
llvm-svn: 292601
Krasimir Georgiev [Fri, 20 Jan 2017 11:06:58 +0000 (11:06 +0000)]
Remove 'RUN: false' from Driver/response-file.c
Summary:
It seems that rL292518 introduced a RUN: false, but the continuation rL292545
forgot to remove it back.
This has flown under the radar, because it's a long test and doesn't get
executed by default during sanity testing.
To test:
$ cd llvm_build
$ ./bin/llvm-lit --param run_long_tests=true tools/clang/test/Driver/response-file.c
@rsmith: have a look if this change is OK please.
Reviewers: bkramer
Reviewed By: bkramer
Subscribers: cfe-commits, rsmith
Differential Revision: https://reviews.llvm.org/D28941
llvm-svn: 292600
Benjamin Kramer [Fri, 20 Jan 2017 10:37:53 +0000 (10:37 +0000)]
Pacify -Wreorder.
llvm-svn: 292599
Hafiz Abid Qadeer [Fri, 20 Jan 2017 10:24:03 +0000 (10:24 +0000)]
Fix more unused variable warnings when asserts are disabled.
llvm-svn: 292598
Mehdi Amini [Fri, 20 Jan 2017 10:18:32 +0000 (10:18 +0000)]
Add an assertion to PlaceholderQueue destructor, ensuring it has been flushed
llvm-svn: 292597
Sam Kolton [Fri, 20 Jan 2017 10:01:25 +0000 (10:01 +0000)]
[AMDGPU] Add subtarget features for SDWA/DPP
Reviewers: vpykhtin, artem.tamazov, tstellarAMD
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye
Differential Revision: https://reviews.llvm.org/D28900
llvm-svn: 292596
Malcolm Parsons [Fri, 20 Jan 2017 09:54:26 +0000 (09:54 +0000)]
Fix documentation typo.
llvm-svn: 292595
George Rimar [Fri, 20 Jan 2017 09:45:36 +0000 (09:45 +0000)]
[ELF] - Do not crash when assign common symbol's values in script
Found that during attempts of linking linux kernel,
previously we partially duplicated code from getOutputSection(),
and it missed commons symbol case.
Differential revision: https://reviews.llvm.org/D28903
llvm-svn: 292594
Philipp Stephani [Fri, 20 Jan 2017 09:37:50 +0000 (09:37 +0000)]
Use UTF-8 for all communication with clang-format
Summary: Instead of picking the buffer file coding system, always use utf-8-unix for communicating with clang-format. This is fine because clang-format never actually reads the file to be formatted, only standard input. This is a bit simpler (process coding system is now a constant) and potentially faster, as utf-8-unix is Emacs's internal coding system. Also add an end-to-end test that actually invokes clang-format.
Reviewers: klimek
Reviewed By: klimek
Differential Revision: https://reviews.llvm.org/D28904
llvm-svn: 292593
Chandler Carruth [Fri, 20 Jan 2017 09:30:03 +0000 (09:30 +0000)]
[PM] Tidy up the spacing of this new, much nicer test file.
llvm-svn: 292592
Simon Pilgrim [Fri, 20 Jan 2017 09:28:21 +0000 (09:28 +0000)]
[InstCombine][SSE] Add DemandedElts support for PACKSS/PACKUS instructions
Simplify a packss/packus truncation based on the elements of the mask that are actually demanded.
Differential Revision: https://reviews.llvm.org/D28777
llvm-svn: 292591
Alexey Bataev [Fri, 20 Jan 2017 08:57:28 +0000 (08:57 +0000)]
[OPENMP] Fix for PR31643: Clang crashes when compiling code on Windows
with SEH and openmp
In some cituations (during codegen for Windows SEH constructs)
CodeGenFunction instance may have CurFn equal to nullptr. OpenMP related
code does not expect such situation during cleanup.
llvm-svn: 292590
Chandler Carruth [Fri, 20 Jan 2017 08:42:19 +0000 (08:42 +0000)]
[PM] Port LoopSink to the new pass manager.
Like several other loop passes (the vectorizer, etc) this pass doesn't
really fit the model of a loop pass. The critical distinction is that it
isn't intended to be pipelined together with other loop passes. I plan
to add some documentation to the loop pass manager to make this more
clear on that side.
LoopSink is also different because it doesn't really need a lot of the
infrastructure of our loop passes. For example, if there aren't loop
invariant instructions causing a preheader to exist, there is no need to
form a preheader. It also doesn't need LCSSA because this pass is
only involved in sinking invariant instructions from a preheader into
the loop, not reasoning about live-outs.
This allows some nice simplifications to the pass in the new PM where we
can directly walk the loops once without restructuring them.
Differential Revision: https://reviews.llvm.org/D28921
llvm-svn: 292589
Chandler Carruth [Fri, 20 Jan 2017 08:42:14 +0000 (08:42 +0000)]
[LoopSink] Trivial comment cleanup.
llvm-svn: 292588
Diana Picus [Fri, 20 Jan 2017 08:15:24 +0000 (08:15 +0000)]
[ARM] Use helpers for adding pred / CC operands. NFC
Hunt down some of the places where we use bare addReg(0) or addImm(AL).addReg(0)
and replace with add(condCodeOp()) and add(predOps()). This should make it
easier to understand what those operands represent (without having to look at
the definition of the instruction that we're adding to).
Differential Revision: https://reviews.llvm.org/D27984
llvm-svn: 292587
Craig Topper [Fri, 20 Jan 2017 07:12:30 +0000 (07:12 +0000)]
[AVX-512] Fix a couple test cases to not pass an undef mask to gather intrinsic. This could break if any future optimizations taken advantage of the undef.
llvm-svn: 292585
Jonas Paulsson [Fri, 20 Jan 2017 06:48:47 +0000 (06:48 +0000)]
[TargetLowering] Improve comment for setOperationAction().
Add a sentence that says that the type argument can refer to
either the type of a result, or that of an operand.
Review: Eli Friedman.
llvm-svn: 292584
Daniel Berlin [Fri, 20 Jan 2017 06:38:41 +0000 (06:38 +0000)]
NewGVN: Fix PR 31682, an overactive assert.
Part of the assert has been left active for further debugging.
The other part has been turned into a stat for tracking for the
moment.
llvm-svn: 292583
Eric Fiselier [Fri, 20 Jan 2017 06:27:34 +0000 (06:27 +0000)]
Still expose std::align_val_t in C++17 even if we don't have aligned new/delete.
r292564 disabled the aligned new/delete overloads on platforms without
posix_memalign. Unfortunately that patch also disabled the align_val_t
definition in C++17 as well.
This patch causes align_val_t to be exposed in C++17 regardless
of if we have the new/delete overloads.
llvm-svn: 292582
Mohammad Shahid [Fri, 20 Jan 2017 06:05:33 +0000 (06:05 +0000)]
[SLP] Add a base test for jumbled store
Change-Id: I905ce08a02c76a6896dcfd9629547417c99adc4a
llvm-svn: 292581
Saleem Abdulrasool [Fri, 20 Jan 2017 05:33:22 +0000 (05:33 +0000)]
llvm-cxxfilt: add missing includes from previous change
llvm-svn: 292580
Saleem Abdulrasool [Fri, 20 Jan 2017 05:27:09 +0000 (05:27 +0000)]
llvm-cxxfilt: fix program description
Fix a silly copy-paste error in the tool description. Take the
opportunity to add crash stack printing which will hopefully never be
needed.
llvm-svn: 292579
Peter Collingbourne [Fri, 20 Jan 2017 04:58:12 +0000 (04:58 +0000)]
ELF: Fix ICF crash on absolute symbol relocations.
If two sections contained relocations to absolute symbols with the same
value we would crash when trying to access their sections. Add a check that
both symbols point to sections before accessing their sections, and treat
absolute symbols as equal if their values are equal.
Differential Revision: https://reviews.llvm.org/D28935
llvm-svn: 292578
Eric Fiselier [Fri, 20 Jan 2017 04:39:17 +0000 (04:39 +0000)]
Refactor unique_ptr/shared_ptr deleter test types into single header.
llvm-svn: 292577
Saleem Abdulrasool [Fri, 20 Jan 2017 04:25:26 +0000 (04:25 +0000)]
llvm-cxxfilt: support `-t` to demangle types
By default c++filt demangles functions, though you can optionally pass
`-t` to have it decode types as well, behaving nearly identical to
`__cxa_demangle`. Add support for this mode.
llvm-svn: 292576
Matthias Braun [Fri, 20 Jan 2017 04:23:08 +0000 (04:23 +0000)]
BitVector: Fix undefined behaviour
Calling reset() on an empty BitVector would call memset with a nullptr
argument which is undefined behaviour.
This should fix the sanitizer bot.
llvm-svn: 292575
Matthias Braun [Fri, 20 Jan 2017 03:58:42 +0000 (03:58 +0000)]
Revert "LiveRegUnits: Add accumulateBackward() function"
This seems to be breaking some bots.
This reverts commit r292543.
llvm-svn: 292574
Saleem Abdulrasool [Fri, 20 Jan 2017 03:54:04 +0000 (03:54 +0000)]
Revert "Demangle: only demangle mangled symbols"
This reverts SVN r286795. This was incorrect the demangler is expected
to be able to demangle types as well as functions. This makes the
behaviour of itaniumDemangle similar to __cxa_demangle once more.
llvm-svn: 292573
Haicheng Wu [Fri, 20 Jan 2017 03:40:41 +0000 (03:40 +0000)]
Revert "Recommit "[InlineCost] Use TTI to check if GEP is free.""
This reverts commit r292570. The test still has problem.
llvm-svn: 292572
Jordan Rose [Fri, 20 Jan 2017 03:33:42 +0000 (03:33 +0000)]
[AST Printer] Print attributes on enum constants
The AST printer was dropping attributes on enumerators (enum
constants). Now it's not.
llvm-svn: 292571
Haicheng Wu [Fri, 20 Jan 2017 03:09:11 +0000 (03:09 +0000)]
Recommit "[InlineCost] Use TTI to check if GEP is free."
This recommits r292526 which is reverted in r292529 after fixing the test case.
The original summary:
Currently, a GEP is considered free only if its indices are all constant.
TTI::getGEPCost() can give target-specific more accurate analysis. TTI is
already used for the cost of many other instructions.
llvm-svn: 292570
Chandler Carruth [Fri, 20 Jan 2017 02:41:20 +0000 (02:41 +0000)]
[LoopInfo] Add helper methods to compute two useful orderings of the
loops in a function.
These are relatively confusing to talk about and compute correctly so it
seems really good to write down their implementation in one place. I've
replaced one place we needed this in the loop PM infrastructure and
I have another place in a pending patch that wants it.
We can't quite use this for the core loop PM walk because there we're
sometimes working on a sub-forest.
I'll add the expected unittests before committing this but wanted to
make sure folks were happy with these names / comments.
Credit goes to Richard Smith for the idea for naming the order where siblings
are in reverse program order but the tree traversal remains preorder.
Differential Revision: https://reviews.llvm.org/D28932
llvm-svn: 292569
Greg Parker [Fri, 20 Jan 2017 02:12:22 +0000 (02:12 +0000)]
[test] Remove an unwanted match for `UNSUPPORTED:`.
llvm-svn: 292568
Greg Parker [Fri, 20 Jan 2017 02:01:04 +0000 (02:01 +0000)]
[test] Remove a unwanted match for `XFAIL:`.
llvm-svn: 292567
Eric Fiselier [Fri, 20 Jan 2017 01:47:26 +0000 (01:47 +0000)]
Disable aligned new/delete on Apple platforms without posix_memalign
Summary:
This patch disables the aligned new/delet overloads on Apple platforms without `posix_memalign`. This fixes libc++.dylib build regressions on such platforms.
This fixes http://llvm.org/PR31448.
This patch should also be merged into the 4.0 release branch
Reviewers: mclow.lists, rsmith, dexonsmith, jeremyhu
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D28931
llvm-svn: 292564
Ahmed Bougacha [Fri, 20 Jan 2017 01:37:24 +0000 (01:37 +0000)]
[AArch64][GlobalISel] Widen scalar int->fp conversions.
It's incorrect to ignore the higher bits of the integer source.
Teach the legalizer how to widen it.
llvm-svn: 292563
Antonio Maiorano [Fri, 20 Jan 2017 01:22:42 +0000 (01:22 +0000)]
clang-format: fix fallback style set to "none" not always formatting
This fixes clang-format not formatting if fallback-style is explicitly set to
"none", and either a config file is found or YAML is passed in without a
"BasedOnStyle". With this change, passing "none" in these cases will have no
affect, and LLVM style will be used as the base style.
Differential Revision: https://reviews.llvm.org/D28844
llvm-svn: 292562
Richard Smith [Fri, 20 Jan 2017 01:19:46 +0000 (01:19 +0000)]
PR31701: Fix crash on invalid caused by parsing a dependent initializer when we
don't know we're in a dependent context.
llvm-svn: 292561
Eric Fiselier [Fri, 20 Jan 2017 01:13:49 +0000 (01:13 +0000)]
[NFC] Group aligned new/delete definitions together in new.cpp
This patch is cleanup to prepare for future changes
llvm-svn: 292560
Richard Smith [Fri, 20 Jan 2017 01:08:15 +0000 (01:08 +0000)]
Fix documentation typo.
llvm-svn: 292559
Richard Smith [Fri, 20 Jan 2017 00:57:59 +0000 (00:57 +0000)]
Add documentation for constexpr string builtin support.
llvm-svn: 292558
Eric Fiselier [Fri, 20 Jan 2017 00:57:08 +0000 (00:57 +0000)]
Fix handling of Apple target triple when checking the ABI lists.
The check-cxx-abilist rule uses TARGET_TRIPLE to determine which
ABI list to check. However the triple on Apple contains the darwin
version which changes frequently, but libc++ doesn't need
different ABI lists for each darwin version.
This patch strips the minor version and patchlevel from TARGET_TRIPLE
before using it to determine the ABI list.
llvm-svn: 292557
Michael Kuperstein [Fri, 20 Jan 2017 00:47:32 +0000 (00:47 +0000)]
[PM] Attempt to pacify windows bots.
Another difference in type pretty-printing, this one windows-specific.
llvm-svn: 292556
Richard Smith [Fri, 20 Jan 2017 00:45:35 +0000 (00:45 +0000)]
P0426: Make the library implementation of constexpr char_traits a little easier
by providing a memchr builtin that returns char* instead of void*.
Also add a __has_feature flag to indicate the presence of constexpr forms of
the relevant <string> functions.
llvm-svn: 292555
Stanislav Mekhanoshin [Fri, 20 Jan 2017 00:44:31 +0000 (00:44 +0000)]
[AMDGPU] Prevent spills before exec mask is restored
Inline spiller can decide to move a spill as early as possible in the basic block.
It will skip phis and label, but we also need to make sure it skips instructions
in the basic block prologue which restore exec mask.
Added isPositionLike callback in TargetInstrInfo to detect instructions which
shall be skipped in addition to common phis, labels etc.
Differential Revision: https://reviews.llvm.org/D27997
llvm-svn: 292554
Justin Bogner [Fri, 20 Jan 2017 00:30:17 +0000 (00:30 +0000)]
GlobalISel: Add a note about how we're being a bit loose with memory operands
The logic in r292461 is conservatively correct, but we should revisit
this later. Add a TODO so we don't forget.
llvm-svn: 292553
Ahmed Bougacha [Fri, 20 Jan 2017 00:30:09 +0000 (00:30 +0000)]
[AArch64][GlobalISel] Split FP conversion legalizer tests. NFC.
Big functions with large vreg # are quite unwieldy to update.
Change it to have one function per test (it does increase boilerplate,
but makes the core hopefully more readable and maintanable).
llvm-svn: 292552
Ahmed Bougacha [Fri, 20 Jan 2017 00:30:06 +0000 (00:30 +0000)]
[AArch64][GlobalISel] Split legalizer combine tests. NFC.
Big functions with large vreg # are quite unwieldy to update. This test
also relied on legal s8 operations which we're considering removing.
Change it to have one function per test (it does increase boilerplate,
but makes the core hopefully more readable and maintanable), and use
100% legal operations throughout.
llvm-svn: 292551
Ahmed Bougacha [Fri, 20 Jan 2017 00:29:59 +0000 (00:29 +0000)]
[MIRParser] Allow generic register specification on operand.
This completes r292321 by adding support for generic registers, e.g.:
%2:_(s32) = G_ADD %0, %1
llvm-svn: 292550
Kuba Mracek [Fri, 20 Jan 2017 00:25:01 +0000 (00:25 +0000)]
[lit] Limit parallelism of sanitizer tests on Darwin [compiler-rt part, take 2]
Running lit tests and unit tests of ASan and TSan on macOS has very bad performance when running with a high number of threads. This is caused by xnu (the macOS kernel), which currently doesn't handle mapping and unmapping of sanitizer shadow regions (reserved VM which are several terabytes large) very well. The situation is so bad that increasing the number of threads actually makes the total testing time larger. The macOS buildbots are affected by this. Note that we can't easily limit the number of sanitizer testing threads without affecting the rest of the tests.
This patch adds a special "group" into lit, and limits the number of concurrently running tests in this group. This helps solve the contention problem, while still allowing other tests to run in full, that means running lit with -j8 will still with 8 threads, and parallelism is only limited in sanitizer tests.
Differential Revision: https://reviews.llvm.org/D28420
llvm-svn: 292549
Kuba Mracek [Fri, 20 Jan 2017 00:24:32 +0000 (00:24 +0000)]
[lit] Limit parallelism of sanitizer tests on Darwin [llvm part, take 2]
Running lit tests and unit tests of ASan and TSan on macOS has very bad performance when running with a high number of threads. This is caused by xnu (the macOS kernel), which currently doesn't handle mapping and unmapping of sanitizer shadow regions (reserved VM which are several terabytes large) very well. The situation is so bad that increasing the number of threads actually makes the total testing time larger. The macOS buildbots are affected by this. Note that we can't easily limit the number of sanitizer testing threads without affecting the rest of the tests.
This patch adds a special "group" into lit, and limits the number of concurrently running tests in this group. This helps solve the contention problem, while still allowing other tests to run in full, that means running lit with -j8 will still with 8 threads, and parallelism is only limited in sanitizer tests.
Differential Revision: https://reviews.llvm.org/D28420
llvm-svn: 292548
Justin Bogner [Fri, 20 Jan 2017 00:24:30 +0000 (00:24 +0000)]
GlobalISel: Only set FailedISel on dropped dbg intrinsics when using fallback
It's easier to test the non-fallback path if we just drop these
intrinsics for now, like we did before we added the fallback path.
We'll obviously need to fix this properly, but the fixme for that is
already here.
llvm-svn: 292547
Anna Thomas [Fri, 20 Jan 2017 00:21:33 +0000 (00:21 +0000)]
[AliasAnalysis] Fences do not modify constant memory location
Summary:
Fence instructions are currently marked as `ModRef` for all memory locations.
We can improve this for constant memory locations (such as constant globals),
since fence instructions cannot modify these locations.
This helps us to forward constant loads across fences (added test case in GVN).
There were no changes in behaviour for similar test cases in early-cse and licm.
Reviewers: dberlin, sanjoy, reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28914
llvm-svn: 292546
Richard Smith [Fri, 20 Jan 2017 00:20:39 +0000 (00:20 +0000)]
Finish implementation of C++ DR1310 (wg21.link/cwg1310).
Diagnose the case when a dependent template name instantiates to an
injected-class-name outside a nested-name-specifier.
llvm-svn: 292545
Justin Bogner [Fri, 20 Jan 2017 00:16:19 +0000 (00:16 +0000)]
GlobalISel: Pass the MachineFunction in to reportSelectionError directly
Rather than trying to find MF based on the possibly-null MI we've
passed in here, just pass it in directly. It's already available at
all callers anyway.
llvm-svn: 292544
Matthias Braun [Fri, 20 Jan 2017 00:16:17 +0000 (00:16 +0000)]
LiveRegUnits: Add accumulateBackward() function
This function can be used to accumulate the set of all read and modified
register in a sequence of instructions.
Use this code in AArch64A57FPLoadBalancing::scavengeRegister() to prove
the concept.
- The AArch64A57LoadBalancing code is using a backwards analysis now
which is irrespective of kill flags. This is the main motivation for
this change.
Differential Revision: http://reviews.llvm.org/D22082
llvm-svn: 292543
Matthias Braun [Fri, 20 Jan 2017 00:16:14 +0000 (00:16 +0000)]
CodeGen: Add/Factor out LiveRegUnits class; NFCI
This is a set of register units intended to track register liveness, it
is similar in spirit to LivePhysRegs.
You can also think of this as the liveness tracking parts of the
RegisterScavenger factored out into an own class.
This was proposed in http://llvm.org/PR27609
Differential Revision: http://reviews.llvm.org/D21916
llvm-svn: 292542
Eric Fiselier [Fri, 20 Jan 2017 00:00:31 +0000 (00:00 +0000)]
Fix demangle helper after r286788
llvm-svn: 292541
Tim Northover [Thu, 19 Jan 2017 23:59:35 +0000 (23:59 +0000)]
AArch64: fall back to DAG ISel for inline assembly.
We can't currently handle "calls" to inlineasm strings so it's better to let
the DAG handle it than generate rubbish.
llvm-svn: 292540
Eric Fiselier [Thu, 19 Jan 2017 23:48:05 +0000 (23:48 +0000)]
Adjust msvc_stdlib_force_include.hpp to handle clang++
Summary: This patch adjusts the newly added `msvc_stdlib_force_include.hpp` so that it also works when used with `clang++`.
Reviewers: STL_MSFT
Reviewed By: STL_MSFT
Differential Revision: https://reviews.llvm.org/D28917
llvm-svn: 292539
Zachary Turner [Thu, 19 Jan 2017 23:44:14 +0000 (23:44 +0000)]
Fix a few more build errors.
llvm-svn: 292538
Zachary Turner [Thu, 19 Jan 2017 23:41:11 +0000 (23:41 +0000)]
Fix incorrectly formed assert statement.
llvm-svn: 292537
Michael Kuperstein [Thu, 19 Jan 2017 23:39:28 +0000 (23:39 +0000)]
[PM] Make default pipeline test for the new PM strict
Use CHECK-NEXT to verify that a test breaks whenever unexpected passes,
analyses, or invalidations show up in default pipelines. The test case
is constructed so that we don't expect to invalidate anything, and needs
to be kept that way.
The test is slightly less strict than we'd like because of differences
in type pretty-printing.
(Right now it does show some invalidations - all of those are intentional
and temporary.)
Differential Revision: https://reviews.llvm.org/D28887
llvm-svn: 292536
Zachary Turner [Thu, 19 Jan 2017 23:31:24 +0000 (23:31 +0000)]
[pdb] Add HashTable data structure.
This was being parsed / serialized ad-hoc inside the code
for a specific PDB stream. But this data structure is used
in multiple ways / places within the PDB format. To be able
to re-use it we need to raise this code out and make it more
generic. In doing so, a number of bugs are fixed in the
original implementation, and support is added for growing
the hash table and deleting items from the hash table,
which had either been omitted or incorrect implemented in
the initial version.
Differential Revision: https://reviews.llvm.org/D28715
llvm-svn: 292535
Michael Kuperstein [Thu, 19 Jan 2017 23:22:55 +0000 (23:22 +0000)]
Revert r292530 since it breaks buildbots.
llvm-svn: 292534
Dehao Chen [Thu, 19 Jan 2017 23:20:31 +0000 (23:20 +0000)]
clang-format SampleProfile.cpp (NFC)
llvm-svn: 292533
Peter Collingbourne [Thu, 19 Jan 2017 23:10:14 +0000 (23:10 +0000)]
LTO: Flush the resolution file after writing to it.
Without this the file could be truncated if the linker crashes.
llvm-svn: 292532
Davide Italiano [Thu, 19 Jan 2017 23:07:51 +0000 (23:07 +0000)]
[SCCP] Teach the pass how to handle `div` with overdefined operands.
This can prove that:
extern int f;
int g() {
int x = 0;
for (int i = 0; i < 365; ++i) {
x /= f;
}
return x;
}
always returns zero. Thanks to Sanjoy for confirming this
transformation actually made sense (bugs are mine).
llvm-svn: 292531
Michael Kuperstein [Thu, 19 Jan 2017 22:55:46 +0000 (22:55 +0000)]
[PM] Make default pipeline test for the new PM strict
Use CHECK-NEXT to verify that a test breaks whenever unexpected passes,
analyses, or invalidations show up in default pipelines. The test case
is constructed so that we don't expect to invalidate anything, and needs
to be kept that way.
(Right now it does show some invalidations - all of those are intentional
and temporary.)
Differential Revision: https://reviews.llvm.org/D28887
llvm-svn: 292530
Haicheng Wu [Thu, 19 Jan 2017 22:51:03 +0000 (22:51 +0000)]
Revert "[InlineCost] Use TTI to check if GEP is free."
This reverts commit r292526. The test case has problem.
llvm-svn: 292529
Simon Pilgrim [Thu, 19 Jan 2017 22:41:22 +0000 (22:41 +0000)]
[SelectionDAG] Improve knownbits handling of UMIN/UMAX (PR31293)
This patch improves the knownbits logic for unsigned integer min/max opcodes.
For UMIN we know that the result will have the maximum of the inputs' known leading zero bits in the result, similarly for UMAX the maximum of the inputs' leading one bits.
This is particularly useful for simplifying clamping patterns,. e.g. as SSE doesn't have a uitofp instruction we want to use sitofp instead where possible and for that we need to confirm that the top bit is not set.
Differential Revision: https://reviews.llvm.org/D28853
llvm-svn: 292528
Haicheng Wu [Thu, 19 Jan 2017 22:28:34 +0000 (22:28 +0000)]
[InlineCost] Use TTI to check if GEP is free.
Currently, a GEP is considered free only if its indices are all constant.
TTI::getGEPCost() can give target-specific more accurate analysis. TTI is
already used for the cost of many other instructions.
Differential Revision: https://reviews.llvm.org/D28693
llvm-svn: 292526
Alex Shlyapnikov [Thu, 19 Jan 2017 22:15:54 +0000 (22:15 +0000)]
Whenever reasonable, merge ASAN quarantine batches to save memory.
Summary:
There are cases when thread local quarantine drains almost empty
quarantine batches into the global quarantine. The current approach leaves
them almost empty, which might create a huge memory overhead (each batch
is 4K/8K, depends on bitness).
Reviewers: eugenis
Subscribers: kubabrecka, llvm-commits
Differential Revision: https://reviews.llvm.org/D28068
llvm-svn: 292525
Hans Wennborg [Thu, 19 Jan 2017 21:33:13 +0000 (21:33 +0000)]
Don't inline dllimport functions referencing non-imported methods
This is another follow-up to r246338. I had assumed methods were already
handled by the AST visitor, but turns out they weren't.
llvm-svn: 292522
Stanislav Mekhanoshin [Thu, 19 Jan 2017 21:26:22 +0000 (21:26 +0000)]
[AMDGPU] Add exec copy to LiveIntervals in SILowerControlFlow::emitElse
This instruction is missing from LiveIntervals.
I'm not aware of any problems because of this though.
Differential Revision: https://reviews.llvm.org/D28879
llvm-svn: 292521
Kostya Serebryany [Thu, 19 Jan 2017 21:14:47 +0000 (21:14 +0000)]
[libFuzzer] ensure that entries in PersistentAutoDictionary are not empty
llvm-svn: 292520
Davide Italiano [Thu, 19 Jan 2017 21:07:42 +0000 (21:07 +0000)]
[SCCP] Update comment in visitBinaryOp() after recent changes.
llvm-svn: 292519