Matthias Braun [Wed, 24 Aug 2016 00:42:05 +0000 (00:42 +0000)]
MachineModuleInfo: Avoid dummy constructor, use INITIALIZE_TM_PASS
Change this pass constructor to just accept a const TargetMachine * and
use INITIALIZE_TM_PASS, that way we can get rid of the dummy
constructor. The pass will still fail when calling the default
constructor leading to TM == nullptr, this is no different than before
but is more in line what other codegen passes are doing and avoids the
dummy constructor.
llvm-svn: 279598
Saleem Abdulrasool [Wed, 24 Aug 2016 00:24:05 +0000 (00:24 +0000)]
Revert "libc++: Perform configuration checks with -nodefaultlibs"
This reverts SVN r279584 which broke the buildbots. Will re-apply once the
issue has been root-caused and fixed.
llvm-svn: 279596
Kostya Serebryany [Wed, 24 Aug 2016 00:10:25 +0000 (00:10 +0000)]
[sanitizer] trying to fix the PPC bots
llvm-svn: 279595
David Callahan [Wed, 24 Aug 2016 00:10:06 +0000 (00:10 +0000)]
[ADCE] Add control dependence computation
Summary:
This is part of a serious of patches to evolve ADCE.cpp to support
removing of unnecessary control flow.
This patch adds the ability to compute control dependences using
the iterated dominance frontier. We extend the liveness propagation
to alternate between data and control dependences until convergences.
Modify the pass manager intergation to compute the post-dominator tree
needed for iterator dominance frontier.
We still force all terminators live for now until we add code to
handlinge removing control flow in a later patch.
No changes to effective behavior with this patch
Previous patches:
D23225 [ADCE] Modify data structures to support removing control flow
D23065 [ADCE] Refactor anticipating new functionality (NFC)
D23102 [ADCE] Refactoring for new functionality (NFC)
Reviewers: nadav, majnemer, mehdi_amini
Subscribers: twoh, freik, llvm-commits
Differential Revision: https://reviews.llvm.org/D23559
llvm-svn: 279594
Philip Reames [Tue, 23 Aug 2016 23:58:08 +0000 (23:58 +0000)]
[stackmaps] Remove an unneeded member variable [NFC]
llvm-svn: 279590
Kostya Serebryany [Tue, 23 Aug 2016 23:43:08 +0000 (23:43 +0000)]
[libFuzzer] fix link in docs
llvm-svn: 279589
Kostya Serebryany [Tue, 23 Aug 2016 23:37:37 +0000 (23:37 +0000)]
[libFuzzer] collect 64 states for value profile, not 65
llvm-svn: 279588
Kostya Serebryany [Tue, 23 Aug 2016 23:36:21 +0000 (23:36 +0000)]
[libFuzzer] docs on value profile
llvm-svn: 279587
Philip Reames [Tue, 23 Aug 2016 23:33:29 +0000 (23:33 +0000)]
[stackmaps] More extraction of common code [NFCI]
General cleanup before starting to work on the part I want to actually change.
llvm-svn: 279586
Michael Zolotukhin [Tue, 23 Aug 2016 23:13:15 +0000 (23:13 +0000)]
[LoopUnroll] By default disable unrolling when optimizing for size.
Summary:
In clang commit r268509 we started to invoke loop-unroll pass from the
driver even under -Os. However, we happen to not initialize optsize
thresholds properly, which si fixed with this change.
r268509 led to some big compile time regressions, because we started to
unroll some loops that we didn't unroll before. With this change I hope
to recover most of the regressions. We still are slightly slower than
before, because we do some checks here and there in loop-unrolling
before we bail out, but at least the slowdown is not that huge now.
Reviewers: hfinkel, chandlerc
Subscribers: mzolotukhin, llvm-commits
Differential Revision: https://reviews.llvm.org/D23388
llvm-svn: 279585
Saleem Abdulrasool [Tue, 23 Aug 2016 23:01:16 +0000 (23:01 +0000)]
libc++: Perform configuration checks with -nodefaultlibs
We're compiling libc++ with -nodefaultlibs, so we should also pass this option
during the configuration checks to ensure those checks are consistent with the
actual build.
The primary motivation here is to ease cross-compilation against a non-standard
set of C++ libraries. Previously, the configuration checks would attempt to link
against the standard C++ libraries, which would cause link failures when
cross-compiling, even though the actual library link would go through correctly
(because of the use of -nodefaultlibs and explicitly specifying any needed
libraries). This is more correct even ignoring the motivation, however.
Patch by Shoaib Meenai!
llvm-svn: 279584
Richard Smith [Tue, 23 Aug 2016 22:21:58 +0000 (22:21 +0000)]
Don't use "return {...}" to initialize a std::tuple. This has only been valid
since 2015 (n4387), though it's allowed by a library DR so new implementations
accept it in their C++11 modes...
This should unbreak the build with libstdc++ 4.9.
llvm-svn: 279583
Richard Smith [Tue, 23 Aug 2016 22:14:15 +0000 (22:14 +0000)]
#ifdef out validation code when asserts are disabled to remove unused variable
warnings.
llvm-svn: 279582
Richard Smith [Tue, 23 Aug 2016 22:10:46 +0000 (22:10 +0000)]
Remove unused data member to unbreak -Werror builds.
llvm-svn: 279581
Richard Smith [Tue, 23 Aug 2016 22:08:27 +0000 (22:08 +0000)]
Revert r279564. It introduces undefined behavior (binding a reference to a
dereferenced null pointer) in MachineModuleInfo::MachineModuleInfo that causes
-Werror builds (including several buildbots) to fail.
llvm-svn: 279580
Tim Northover [Tue, 23 Aug 2016 22:07:31 +0000 (22:07 +0000)]
GlobalISel: add some G_TRUNCs to make icmp test valid MIR.
llvm-svn: 279579
Sanjay Patel [Tue, 23 Aug 2016 22:05:55 +0000 (22:05 +0000)]
[InstCombine] use local variables for repeated values; NFCI
llvm-svn: 279578
Petr Hosek [Tue, 23 Aug 2016 21:34:53 +0000 (21:34 +0000)]
[MC] Support .dc directives in assembler parser
While these directives are mostly aliases for the existing integer
and float value directives, some of them like .dc.a have no direct
equivalents and are sometimes being used for convenience.
Differential Revision: https://reviews.llvm.org/D23810
llvm-svn: 279577
Mehdi Amini [Tue, 23 Aug 2016 21:30:12 +0000 (21:30 +0000)]
[ThinLTO] Add caching to the new LTO API
Add the ability to plug a cache on the LTO API.
I tried to write such that a linker implementation can
control the cache backend. This is intrusive and I'm
not totally happy with it, but I can't figure out a
better design right now.
Differential Revision: https://reviews.llvm.org/D23599
llvm-svn: 279576
Sanjay Patel [Tue, 23 Aug 2016 21:25:13 +0000 (21:25 +0000)]
[InstCombine] move foldICmpShrConstConst() contents to foldICmpShrConst(); NFCI
There will only be 3 lines of code in foldICmpShrConst() when the cleanup is done,
so it doesn't make much sense to have a separate function for a single fold.
llvm-svn: 279575
Philip Reames [Tue, 23 Aug 2016 21:21:43 +0000 (21:21 +0000)]
[stackmaps] Extract out magic constants [NFCI]
This is a first step towards clarifying the exact MI semantics of stackmap's "live values".
llvm-svn: 279574
Matthias Braun [Tue, 23 Aug 2016 21:19:49 +0000 (21:19 +0000)]
MachineFunction: Introduce NoPHIs property
I want to compute the SSA property of .mir files automatically in
upcoming patches. The problem with this is that some inputs will be
reported as static single assignment with some passes claiming not to
support SSA form. In reality though those passes do not support PHI
instructions => Track the presence of PHI instructions separate from the
SSA property.
Differential Revision: https://reviews.llvm.org/D22719
llvm-svn: 279573
Kostya Serebryany [Tue, 23 Aug 2016 21:19:47 +0000 (21:19 +0000)]
[sanitizer] change the 64-bit allocator to use a single array for free-d chunks instead of a lock-free linked list of tranfer batches. This change simplifies the code, makes the allocator more 'hardened', and will allow simpler code to release RAM to OS. This may also slowdown malloc stress tests due to lock contension, but I did not observe noticeable slowdown on various real multi-threaded benchmarks.
llvm-svn: 279572
Richard Smith [Tue, 23 Aug 2016 21:12:54 +0000 (21:12 +0000)]
Fix member call on null pointer, found by sanitizer buildbot.
llvm-svn: 279571
Kostya Serebryany [Tue, 23 Aug 2016 21:12:04 +0000 (21:12 +0000)]
[sanitizer] adding a threaded performance stress test for malloc (useful for manual analysis of malloc performance)
llvm-svn: 279570
Tim Northover [Tue, 23 Aug 2016 21:11:36 +0000 (21:11 +0000)]
GlobalISel: add forgotten test-case for G_ICMP
llvm-svn: 279569
Sanjay Patel [Tue, 23 Aug 2016 21:01:35 +0000 (21:01 +0000)]
[InstCombine] remove icmp shr folds that are already handled by InstSimplify
AFAICT, these already worked in all cases for scalar types, and I enhanced
the code to work for vector types in:
https://reviews.llvm.org/rL279543
llvm-svn: 279568
Tim Northover [Tue, 23 Aug 2016 21:01:33 +0000 (21:01 +0000)]
GlobalISel: make truncate/extend casts uniform
They really should have both types represented, but early variants were created
before MachineInstrs could have multiple types so they're rather ambiguous.
llvm-svn: 279567
Tim Northover [Tue, 23 Aug 2016 21:01:26 +0000 (21:01 +0000)]
GlobalISel: legalize integer comparisons on AArch64.
Next step is doing both legalizations at the same time! Marvel at GlobalISel's
cunning.
llvm-svn: 279566
Tim Northover [Tue, 23 Aug 2016 21:01:20 +0000 (21:01 +0000)]
GlobalISel: legalize conditional branches on AArch64.
llvm-svn: 279565
Matthias Braun [Tue, 23 Aug 2016 20:58:29 +0000 (20:58 +0000)]
CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses
Re-apply this commit with the deletion of a MachineFunction delegated to
a separate pass to avoid use after free when doing this directly in
AsmPrinter.
This patch removes the MachineFunctionAnalysis. Instead we keep a
map from IR Function to MachineFunction in the MachineModuleInfo.
This allows the insertion of ModulePasses into the codegen pipeline
without breaking it because the MachineFunctionAnalysis gets dropped
before a module pass.
Peak memory should stay unchanged without a ModulePass in the codegen
pipeline: Previously the MachineFunction was freed at the end of a codegen
function pipeline because the MachineFunctionAnalysis was dropped; With
this patch the MachineFunction is freed after the AsmPrinter has
finished.
Differential Revision: http://reviews.llvm.org/D23736
llvm-svn: 279564
David Majnemer [Tue, 23 Aug 2016 20:52:00 +0000 (20:52 +0000)]
[ValueTracking] Use a function_ref to avoid multiple instantiations
No functional change intended, this should just be a code size
improvement.
llvm-svn: 279563
Matthew Simpson [Tue, 23 Aug 2016 20:48:50 +0000 (20:48 +0000)]
[SLP] Avoid signed integer overflow
The test case included with r279125 exposed an existing signed integer
overflow. Since getTreeCost can return INT_MAX, we can't sum this cost together
with other costs, such as getReductionCost.
This patch removes the possibility of assigning a cost of INT_MAX. Since we
were previously using INT_MAX as an indicator for "should not vectorize", we
now explicitly check this condition with "isTreeTinyAndNotFullyVectorizable"
before computing a cost.
This patch adds a run-line to the test case used for r279125 that ensures we
don't vectorize. Previously, this line would vectorize the test case by chance
due to undefined behavior in the cost calculation.
Differential Revision: https://reviews.llvm.org/D23723
llvm-svn: 279562
Zachary Turner [Tue, 23 Aug 2016 20:08:02 +0000 (20:08 +0000)]
Remove unused translation unit.
llvm-svn: 279561
Zachary Turner [Tue, 23 Aug 2016 20:07:32 +0000 (20:07 +0000)]
Update coding standards for include style.
Reviewed By: lattner
Differential Revision: https://reviews.llvm.org/D23591
llvm-svn: 279560
Chris Bieneman [Tue, 23 Aug 2016 20:07:07 +0000 (20:07 +0000)]
driver: Support checking for rlimits via cmake (when bootstrapping)
Summary:
Add a cmake check for sys/resource.h and replace the __has_include() check with its result, in order to make it possible to use rlimits when building with compilers not supporting __has_include() -- i.e. when bootstrapping.
// Please also re-apply
dfcd52eb1d8e5d322404b40414cb7331c7380a8c (llvm-config.h fix)
Patch by: Michał Górny
Reviewers: rsmith, beanz
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D23744
llvm-svn: 279559
Nico Weber [Tue, 23 Aug 2016 19:59:55 +0000 (19:59 +0000)]
Remove two dos line endings.
llvm-svn: 279558
Richard Smith [Tue, 23 Aug 2016 19:41:39 +0000 (19:41 +0000)]
Fix regression introduced by r279164: only pass definitions as the PatternDef
to DiagnoseUninstantiableTemplate, teach hasVisibleDefinition to correctly
determine whether a function definition is visible, and mark both the function
and the template as visible when merging function template definitions to
provide hasVisibleDefinition with the relevant information.
The change to always pass the right declaration as the PatternDef to
DiagnoseUninstantiableTemplate also caused those checks to happen before other
diagnostics in InstantiateFunctionDefinition, giving worse diagnostics for the
same situations, so I sunk the relevant diagnostics into
DiagnoseUninstantiableTemplate. Those parts of this patch are based on changes
in reviews.llvm.org/D23492 by Vassil Vassilev.
This reinstates r279486, reverted in r279500, with a fix to
DiagnoseUninstantiableTemplate to only mark uninstantiable explicit
instantiation declarations as invalid if we actually diagnosed them. (When we
trigger an explicit instantiation of a class member from an explicit
instantiation declaration for the class, it's OK if there is no corresponding
definition and we certainly don't want to mark the member invalid in that
case.) This previously caused a build failure during bootstrap.
llvm-svn: 279557
Mehdi Amini [Tue, 23 Aug 2016 19:32:41 +0000 (19:32 +0000)]
[LTO] Fix test following r279550
The output name changed, but it was passing locally
using the old output still present in the build dir.
llvm-svn: 279556
Nico Weber [Tue, 23 Aug 2016 19:32:02 +0000 (19:32 +0000)]
clang-cl: Make /Brepro actually work.
/Brepro means we want reproducible builds, i.e. we _don't_ want the timestamp
that's needed to be compatible with the incremental linker.
https://reviews.llvm.org/D23805
llvm-svn: 279555
Tim Northover [Tue, 23 Aug 2016 19:30:42 +0000 (19:30 +0000)]
GlobalISel: extend legalizer interface to handle multiple types.
Instructions like G_ICMP have multiple types that may need to be legalized (the
boolean output and nearly arbitrary inputs in this case). So the legalizer must
be capable of deciding what to do for each of them separately.
llvm-svn: 279554
Tim Northover [Tue, 23 Aug 2016 19:30:38 +0000 (19:30 +0000)]
GlobalISel: mark pointer casts legal on AArch64.
llvm-svn: 279553
Adhemerval Zanella [Tue, 23 Aug 2016 19:25:12 +0000 (19:25 +0000)]
libcxx: Fix libcxx tests on aarch64 with libunwind
Some tests uses 'long double' to/from conversions and for some targets
they are provided by compiler runtime (either compiler-rt or libgcc).
However when building libcxx with linunwinder current test configuration
at target_info.py do not include the required libraries, as:
not llvm_unwinder:
"-lc++" "-lm" "-lgcc_s" "-lgcc" "-lpthread" "-lc" "-lgcc_s" "-lgcc"
llvm_unwinder
"-lc++" "-lm" "-lpthread" "-lc" "-lunwind" "-ldl"
This causes some tests build issues with missing symbols on aarch64,
for instance, where 'long double' is a binary float with 128-bits with
mostly of internal operations being provided by software routines.
This patch changes how to define the default linker flags with libunwinder by
adding libgcc regardless.
I checked and aarch64 and x86_64 with libcxx and libunwind (with and without
LIBCXXABI_USE_LLVM_UNWINDER).
llvm-svn: 279552
Mehdi Amini [Tue, 23 Aug 2016 18:39:15 +0000 (18:39 +0000)]
[ThinLTO] Add a llvm-lto2 test to check that ODR type uniquing is enabled (NFC)
This adds a test for r279532, thanks David Li for noticing :)
Recommit r279545 after committing first a dependent patch.
llvm-svn: 279551
Mehdi Amini [Tue, 23 Aug 2016 18:39:12 +0000 (18:39 +0000)]
Stop always creating and running an LTO compilation if there is not a single LTO object
Summary:
I assume there was a use case, so maybe this strawman patch will help
clarifying if it is legit.
In any case the current situation is not legit: a ThinLTO compilation
should not trigger an unexpected full LTO compilation.
Right now, adding a --save-temps option triggers this and makes the
number of output differs.
Reviewers: tejohnson
Subscribers: pcc, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D23600
llvm-svn: 279550
Mehdi Amini [Tue, 23 Aug 2016 18:25:59 +0000 (18:25 +0000)]
Revert "[ThinLTO] Add a llvm-lto2 test to check that ODR type uniquing is enabled (NFC)"
This reverts commit r279545, test is failing, my Output dir was dirty and making the test pass.
llvm-svn: 279549
Tim Northover [Tue, 23 Aug 2016 18:20:09 +0000 (18:20 +0000)]
GlobalISel: legalize 1-bit load/store and mark 8/16 bit variants legal on AArch64.
llvm-svn: 279548
Kostya Serebryany [Tue, 23 Aug 2016 18:13:51 +0000 (18:13 +0000)]
[asan] minor fix in the asan memory profile
llvm-svn: 279547
Tim Northover [Tue, 23 Aug 2016 18:12:58 +0000 (18:12 +0000)]
ARM-Darwin: ignore and diagnose attempts to omit frame pointer.
iOS (and other 32-bit ARM variants) always require a valid frame pointer to
improve backtraces. Previously the -fomit-frame-pointer and
-momit-leaf-frame-pointer options were being silently discarded via hacks in
the backend. It's better if Clang configures itself to emit the correct IR and
warns about (ignored) attempts to override this.
llvm-svn: 279546
Mehdi Amini [Tue, 23 Aug 2016 18:12:55 +0000 (18:12 +0000)]
[ThinLTO] Add a llvm-lto2 test to check that ODR type uniquing is enabled (NFC)
This adds a test for r279532, thanks David Li for noticing :)
llvm-svn: 279545
Peter Zotov [Tue, 23 Aug 2016 18:07:16 +0000 (18:07 +0000)]
[CMake] [OCaml] Add -DLLVM_ENABLE_OCAMLDOC switch
Patch by Michael Gorny.
llvm-svn: 279544
Sanjay Patel [Tue, 23 Aug 2016 18:00:51 +0000 (18:00 +0000)]
[InstSimplify] allow icmp with constant folds for splat vectors, part 2
Completes the m_APInt changes for simplifyICmpWithConstant().
Other commits in this series:
https://reviews.llvm.org/rL279492
https://reviews.llvm.org/rL279530
https://reviews.llvm.org/rL279534
https://reviews.llvm.org/rL279538
llvm-svn: 279543
Xinliang David Li [Tue, 23 Aug 2016 18:00:41 +0000 (18:00 +0000)]
Possible fix of test failures on win bots
llvm-svn: 279542
Eugene Zelenko [Tue, 23 Aug 2016 17:57:24 +0000 (17:57 +0000)]
[Documentation] Fix style of Clang-tidy readability-non-const-parameter.
llvm-svn: 279541
Jim Ingham [Tue, 23 Aug 2016 17:55:21 +0000 (17:55 +0000)]
Implementation "step out" plans shouldn't gather the return value.
When, for instance, "step-in" steps into a function that it doesn't want
to stop in (e.g. has no debug info) it will push a step-out plan to implement
the step out so it can then continue stepping. These step out's don't use
the result of the function stepped out of, so they shouldn't spend the time
to compute it.
llvm-svn: 279540
Chris Bieneman [Tue, 23 Aug 2016 17:32:38 +0000 (17:32 +0000)]
Delete remaining compiler-rt makefiles
Summary:
Since we can now build the builtins without a full toolchain these files should no longer be needed.
This is the last vestige of autoconf!
Reviewers: compnerd, iains, jroelofs
Subscribers: dberris, llvm-commits
Differential Revision: https://reviews.llvm.org/D23777
llvm-svn: 279539
Sanjay Patel [Tue, 23 Aug 2016 17:30:56 +0000 (17:30 +0000)]
[InstSimplify] allow icmp with constant folds for splat vectors, part 1
llvm-svn: 279538
Justin Lebar [Tue, 23 Aug 2016 17:18:11 +0000 (17:18 +0000)]
[SelectionDAG] Use a union of bitfield structs for SDNode::SubclassData.
Summary:
This greatly simplifies our handling of SDNode::SubclassData.
NFC, hopefully. :)
See discussion in D23035 for discussion about the design API of these
bitfields.
Reviewers: chandlerc
Subscribers: llvm-commits, rnk
Differential Revision: https://reviews.llvm.org/D23036
llvm-svn: 279537
Justin Lebar [Tue, 23 Aug 2016 17:18:07 +0000 (17:18 +0000)]
[CodeGen] Convert a loop to a for-each loop. NFC
llvm-svn: 279536
Eugene Zelenko [Tue, 23 Aug 2016 17:14:32 +0000 (17:14 +0000)]
Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes.
Differential revision: https://reviews.llvm.org/D23789
llvm-svn: 279535
Sanjay Patel [Tue, 23 Aug 2016 17:13:38 +0000 (17:13 +0000)]
[InstSimplify] add tests to show missing vector icmp folds
llvm-svn: 279534
Jim Ingham [Tue, 23 Aug 2016 17:13:33 +0000 (17:13 +0000)]
Change the PathMappingList::FindFile to use FileSpec API's
Also, when appending path components, collapse multiple "/" into one at the join.
llvm-svn: 279533
Mehdi Amini [Tue, 23 Aug 2016 16:53:34 +0000 (16:53 +0000)]
[ThinLTO] Make sure the Context used for the ThinLTO backend has all the appropriate options
An important performance setting on the LLVMContext for LTO is
enableDebugTypeODRUniquing(), this adds an automatic merging of
debug information in the context based on type ids.
Also, the lto::Config includes a diagnostic handler that needs to
be set on the Context, as well as the setDiscardValueNames() setting.
llvm-svn: 279532
Nico Weber [Tue, 23 Aug 2016 16:47:09 +0000 (16:47 +0000)]
clang-cl: Accept MSVC 2015's `/source-charset:utf-8` flag.
clang already treats all inputs as utf-8. Warn if anything but utf-8 is passed.
Do this by mapping source-charset to finput-charset, which already behaves like
this. Slightly tweak finput-charset to accept "utf-8" case-insensitively. This
matches gcc's and cl.exe's behavior, and IANA says that character set names are
case-insensitive.
https://reviews.llvm.org/D23807
llvm-svn: 279531
Sanjay Patel [Tue, 23 Aug 2016 16:46:53 +0000 (16:46 +0000)]
[InstSimplify] move icmp with constant tests to another file; NFC
...because like the corresponding code, this is just too big to keep adding to.
And the next step is to add a vector version of each of these tests to show
missed folds.
Also, auto-generate CHECK lines and add comments for the tests that correspond to
the source code.
llvm-svn: 279530
Artem Dergachev [Tue, 23 Aug 2016 16:42:00 +0000 (16:42 +0000)]
[analyzer] Fix CloneDetector crash on calling methods of class templates.
If a call expression represents a method call of a class template,
and the method itself isn't templated, then the method may be considered
to be a template instantiation without template specialization arguments.
No longer crash when we could not find template specialization arguments.
Patch by Raphael Isemann!
Differential Revision: https://reviews.llvm.org/D23780
llvm-svn: 279529
Pete Cooper [Tue, 23 Aug 2016 16:23:45 +0000 (16:23 +0000)]
Fix some more asserts after r279466.
That commit added a new version of Intrinsic::getName which should only
be called when the intrinsic has no overloaded types. There are several
debugging paths, such as SDNode::dump which are printing the name of the
intrinsic but don't have the overloaded types. These paths should be ok
to just print the name instead of crashing.
The fix here is ultimately to just add a 'None' second argument as that
calls the overload capable getName, which is less efficient, but this is a
debugging path anyway, and not perf critical.
Thanks to Björn Pettersson for pointing out that there were more crashes.
llvm-svn: 279528
Simon Pilgrim [Tue, 23 Aug 2016 16:11:21 +0000 (16:11 +0000)]
[X86][SSE] Demonstrate inability to recognise that (v)cvtpd2dq & (v)cvttpd2dq intrinsics implicitly zeroes the upper half of the xmm
llvm-svn: 279527
Krzysztof Parzyszek [Tue, 23 Aug 2016 16:01:01 +0000 (16:01 +0000)]
[Hexagon] Packetize return value setup with the return instruction
Commit r279241 unintentionally reverted that ability.
llvm-svn: 279526
Xinliang David Li [Tue, 23 Aug 2016 16:00:54 +0000 (16:00 +0000)]
Fix windows build failure
llvm-svn: 279525
Duncan P. N. Exon Smith [Tue, 23 Aug 2016 15:56:50 +0000 (15:56 +0000)]
Rename unittests/ADT/ilistTest.cpp to ilistTestTemp.cpp (temporarily)
I'll rename this to IListTest.cpp after a waiting period (tonight?
tomorrow?), with a full explanation in that commit.
First, I'm moving it aside because Git doesn't play well with case-only
filename changes on case-insensitive file systems (and I suspect the
same is true of SVN). This two-stage change should help to avoid
spurious failures on bots that don't do clean checkouts.
llvm-svn: 279524
Xinliang David Li [Tue, 23 Aug 2016 15:39:03 +0000 (15:39 +0000)]
[Profile] refactor meta data copying/swapping code
Differential Revision: http://reviews.llvm.org/D23619
llvm-svn: 279523
Adrian Prantl [Tue, 23 Aug 2016 15:38:59 +0000 (15:38 +0000)]
Work around PR29097 to get the module bots going again.
This replaces an =default constructor with an explicit definition.
llvm-svn: 279522
Simon Pilgrim [Tue, 23 Aug 2016 15:10:39 +0000 (15:10 +0000)]
[X86][AVX] Updated fptosi_2f64_to_4i32 test to show missed opportunity to implicit zero the upper elements
llvm-svn: 279521
Simon Pilgrim [Tue, 23 Aug 2016 15:00:52 +0000 (15:00 +0000)]
[X86][AVX] Add v2i32 fp to int conversion tests
llvm-svn: 279520
Alexander Kornienko [Tue, 23 Aug 2016 14:48:29 +0000 (14:48 +0000)]
[clang-tidy] Merge ExtraArgs(Before) instead of overriding them.
Added proper tests.
llvm-svn: 279519
Simon Pilgrim [Tue, 23 Aug 2016 14:37:35 +0000 (14:37 +0000)]
[X86][AVX] Add AVX2/AVX512 fp to int conversion tests
llvm-svn: 279518
Jacques Pienaar [Tue, 23 Aug 2016 14:36:53 +0000 (14:36 +0000)]
[lanai] Use const instead of constexpr
The windows build bot did not like constexpr.
llvm-svn: 279517
Alexander Kornienko [Tue, 23 Aug 2016 14:13:31 +0000 (14:13 +0000)]
[clang-tidy] Fix the order of ExtraArgsBefore
Added tests for the relative order of -extra-arg(-before) and ExtraArgs(Before).
llvm-svn: 279516
Elliot Colp [Tue, 23 Aug 2016 14:03:02 +0000 (14:03 +0000)]
Fix SystemZ hang caused by r279105
The change in r279105 causes an infinite loop in some cases, as it sets the upper bits of an AND mask constant, which DAGCombiner::SimplifyDemandedBits then unsets.
This patch reverts that part of the behaviour, instead relying on .td peepholes to perform the transformation to NILL. I reapplied my original fix for the problem addressed by r279105 (unsetting the upper bits, which prevents a compiler abort for a different reason).
Differential Revision: https://reviews.llvm.org/D23781
llvm-svn: 279515
Davide Italiano [Tue, 23 Aug 2016 12:32:57 +0000 (12:32 +0000)]
[LTOCodeGenerator] Reduce code duplication. NFCI.
llvm-svn: 279514
Pavel Labath [Tue, 23 Aug 2016 12:10:09 +0000 (12:10 +0000)]
Fix a crash in GDBRemoteCommunicationClient::GetSupportedStructuredDataPlugins
The function was attempting to write the reply to the log even if the reply was empty.
llvm-svn: 279513
Pavel Labath [Tue, 23 Aug 2016 12:10:03 +0000 (12:10 +0000)]
Fix API usage in TestMultithreaded.test_sb_api_listener_event_process_state
The test was attempting to backtrace a process after every state change event (including the
"running", and "restarted" ones), which is not a good idea.
llvm-svn: 279512
Simon Pilgrim [Tue, 23 Aug 2016 11:26:28 +0000 (11:26 +0000)]
[X86][SSE] Demonstrate inability to recognise that (v)cvtpd2ps intrinsics implicitly zeroes the upper half of the xmm
llvm-svn: 279511
NAKAMURA Takumi [Tue, 23 Aug 2016 10:47:40 +0000 (10:47 +0000)]
LLVMLanaDesc: Update libdesp.
llvm-svn: 279510
NAKAMURA Takumi [Tue, 23 Aug 2016 10:43:01 +0000 (10:43 +0000)]
Change the target's name, s/LanaiMCTargetDesc/LanaiDesc/g.
"AllTargetsDescs" in llvm-mc/CMakeLists.txt expects not ${target}MCTargetDesc, but ${target}Desc.
llvm-svn: 279509
Simon Pilgrim [Tue, 23 Aug 2016 10:35:24 +0000 (10:35 +0000)]
[X86][SSE] Demonstrate inability to recognise that (v)cvtpd2ps implicitly zeroes the upper half of the xmm
llvm-svn: 279508
Daniel Marjamaki [Tue, 23 Aug 2016 10:09:08 +0000 (10:09 +0000)]
[clang-tidy] readability-non-const-parameter: add new check that warns when function parameters should be const
The check will warn when the constness will make the function interface safer.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D15332
llvm-svn: 279507
Oliver Stannard [Tue, 23 Aug 2016 09:19:22 +0000 (09:19 +0000)]
[ARM] Generate consistent frame records for Thumb2
There is not an official documented ABI for frame pointers in Thumb2,
but we should try to emit something which is useful.
We use r7 as the frame pointer for Thumb code, which currently means
that if a function needs to save a high register (r8-r11), it will get
pushed to the stack between the frame pointer (r7) and link register
(r14). This means that while a stack unwinder can follow the chain of
frame pointers up the stack, it cannot know the offset to lr, so does
not know which functions correspond to the stack frames.
To fix this, we need to push the callee-saved registers in two batches,
with the first push saving the low registers, fp and lr, and the second
push saving the high registers. This is already implemented, but
previously only used for iOS. This patch turns it on for all Thumb2
targets when frame pointers are required by the ABI, and the frame
pointer is r7 (Windows uses r11, so this isn't a problem there). If
frame pointer elimination is enabled we still emit a single push/pop
even if we need a frame pointer for other reasons, to avoid increasing
code size.
We must also ensure that lr is pushed to the stack when using a frame
pointer, so that we end up with a complete frame record. Situations that
could cause this were rare, because we already push lr in most
situations so that we can return using the pop instruction.
Differential Revision: https://reviews.llvm.org/D23516
llvm-svn: 279506
Sagar Thakur [Tue, 23 Aug 2016 08:15:25 +0000 (08:15 +0000)]
[TSan][MIPS] Changes mips memory layout to support pie with address space randomization.
Reviewed by dvyukov
Differential: D23644
llvm-svn: 279505
Daniel Berlin [Tue, 23 Aug 2016 05:42:41 +0000 (05:42 +0000)]
GVNHoist: Use the pass version of MemorySSA and preserve it.
Summary: GVNHoist: Use the pass version of MemorySSA and preserve it.
Reviewers: sebpop, george.burgess.iv
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23782
llvm-svn: 279504
Matthias Braun [Tue, 23 Aug 2016 05:17:11 +0000 (05:17 +0000)]
Revert "(HEAD -> master, origin/master, origin/HEAD) CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses"
Reverting while tracking down a use after free.
This reverts commit r279502.
llvm-svn: 279503
Matthias Braun [Tue, 23 Aug 2016 03:20:09 +0000 (03:20 +0000)]
CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses
This patch removes the MachineFunctionAnalysis. Instead we keep a
map from IR Function to MachineFunction in the MachineModuleInfo.
This allows the insertion of ModulePasses into the codegen pipeline
without breaking it because the MachineFunctionAnalysis gets dropped
before a module pass.
Peak memory should stay unchanged without a ModulePass in the codegen
pipeline: Previously the MachineFunction was freed at the end of a codegen
function pipeline because the MachineFunctionAnalysis was dropped; With
this patch the MachineFunction is freed after the AsmPrinter has
finished.
Differential Revision: http://reviews.llvm.org/D23736
llvm-svn: 279502
Vitaly Buka [Tue, 23 Aug 2016 02:58:12 +0000 (02:58 +0000)]
[asan] Fix OOB_char on arm 32bit
Summary:
This does not actually fixes the test.
AddressSanitizer::OOB_char behavior is inconsistent but it somehow usually
works. On arm it runs more iterations than expected. And adding a new test with AddressSanitizerInterface prefix, even empty, somehow breaks OOB_char test.
So I will rename my test to make the bot green and will continue to investigate the test.
Reviewers: krasin
Subscribers: aemerson, rengolin, kubabrecka, llvm-commits, samparker
Differential Revision: https://reviews.llvm.org/D23790
llvm-svn: 279501
Chandler Carruth [Tue, 23 Aug 2016 02:00:51 +0000 (02:00 +0000)]
Revert r279486 "Fix regression introduced by r279164"
Build bots seem unhappy and as Richard was leaving he asked me to revert
this for him. Doing so.
llvm-svn: 279500
Matt Arsenault [Tue, 23 Aug 2016 01:30:30 +0000 (01:30 +0000)]
BranchRelaxation: Fix handling of blocks with multiple conditional
branches
Looping over all terminators exposed AArch64 tests hitting
an assert from analyzeBranch failing. I believe these cases
were miscompiled before.
e.g.
fcmp s0, s1
b.ne LBB0_1
b.vc LBB0_2
b LBB0_2
LBB0_1:
; Large block
LBB0_2:
; ...
Both of the individual conditional branches need to
be expanded, since neither can reach the final block.
Split the original block into ones which analyzeBranch
will be able to understand.
llvm-svn: 279499
Jacques Pienaar [Tue, 23 Aug 2016 01:06:44 +0000 (01:06 +0000)]
[lanai] Make Lanai backend non-experimental
Summary:
Add Lanai backend to default targets.
Discussion of proposal: http://lists.llvm.org/pipermail/llvm-dev/2016-July/102480.html. ISA added in r279149.
Reviewers: jyknight, rengolin, eliben, chandlerc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D22530
llvm-svn: 279498
Jacques Pienaar [Tue, 23 Aug 2016 01:04:41 +0000 (01:04 +0000)]
[lanai] Exit early in Mem Alu combiner if sentinel reach.
LanaiMemAluCombiner could try to query the debug value of a list sentinel. Add check to exit early instead.
llvm-svn: 279497
Francis Ricci [Tue, 23 Aug 2016 00:49:03 +0000 (00:49 +0000)]
[builtins] Don't always use -ffreestanding when compiling builtins
This can break on some sysroots. Let the user define it if necessary.
llvm-svn: 279496
Kostya Serebryany [Tue, 23 Aug 2016 00:30:43 +0000 (00:30 +0000)]
[sanitizer] allocator: split the local cache class into two, one for 32-bit allocator and one for 64-bit one. NFC. The two imlementations will diverge in the following changes.
llvm-svn: 279495