Commit Graph

182018 Commits

Author SHA1 Message Date
Juergen Ributzka 88e32517c4 [FastISel][tblgen] Rename tblgen generated FastISel functions. NFC.
This is the final round of renaming. This changes tblgen to emit lower-case
function names for FastEmitInst_* and FastEmit_*, and updates all its uses
in the source code.

Reviewed by Eric

llvm-svn: 217075
2014-09-03 20:56:59 +00:00
Juergen Ributzka 5b8bb4d7dd [FastISel] Rename public visible FastISel functions. NFC.
This commit renames the following public FastISel functions:
LowerArguments -> lowerArguments
SelectInstruction -> selectInstruction
TargetSelectInstruction -> fastSelectInstruction
FastLowerArguments -> fastLowerArguments
FastLowerCall -> fastLowerCall
FastLowerIntrinsicCall -> fastLowerIntrinsicCall
FastEmitZExtFromI1 -> fastEmitZExtFromI1
FastEmitBranch -> fastEmitBranch
UpdateValueMap -> updateValueMap
TargetMaterializeConstant -> fastMaterializeConstant
TargetMaterializeAlloca -> fastMaterializeAlloca
TargetMaterializeFloatZero -> fastMaterializeFloatZero
LowerCallTo -> lowerCallTo

Reviewed by Eric

llvm-svn: 217074
2014-09-03 20:56:52 +00:00
Chandler Carruth 534643c818 [JIT] Add an out-of-line definition for the virtual destructor in
JITEventListener. This used to be in the old JIT (last line of the file)
and everyone just "happened" to pick it up from there. =/ Doh.

llvm-svn: 217073
2014-09-03 20:39:10 +00:00
Chandler Carruth c1e8ebc259 [x86] Add an SSE4.1 mode to this test.
llvm-svn: 217072
2014-09-03 20:39:06 +00:00
Eric Christopher b68e25330b Remove resetSubtargetFeatures as it is unused.
llvm-svn: 217071
2014-09-03 20:36:31 +00:00
Eric Christopher e08189195b Remove unnecessary getTarget call now that the subtarget is cached
on the machine function.

llvm-svn: 217070
2014-09-03 20:36:26 +00:00
Sanjay Patel 4b02d91db0 house cleaning: "Don’t duplicate function or class name at the beginning of the comment."
llvm-svn: 217069
2014-09-03 20:08:51 +00:00
Rafael Espindola 9c35966944 Add writeFileWithSystemEncoding to LibLLVMSuppor.
This patch adds to LLVMSupport the capability of writing files with
international characters encoded in the current system encoding. This
is relevant for Windows, where we can either use UTF16 or the current
code page (the legacy Windows international characters). On UNIX, the
file is always saved in UTF8.

This will be used in a patch for clang to thoroughly support response
files creation when calling other tools, addressing PR15171. On
Windows, to correctly support internationalization, we need the
ability to write response files both in UTF16 or the current code
page, depending on the tool we will call. GCC for mingw, for instance,
requires files to be encoded in the current code page. MSVC tools
requires files to be encoded in UTF16.

Patch by Rafael Auler!

llvm-svn: 217068
2014-09-03 20:02:00 +00:00
David Blaikie d1101574f7 unique_ptrify MCJIT::emitObject
llvm-svn: 217067
2014-09-03 19:57:35 +00:00
Nick Kledzik 141330aef6 [mach-o] Add support for using export tries
On Darwin at runtime, dyld will prefer to use the export trie of a dylib instead
of the traditional symbol table (which is large and requires a binary search).

This change enables the linker to generate an export trie and to prefer it if
found in a dylib being linked against.  This also simples the yaml for dylibs
because the yaml form of the trie can be reduced to just a sequence of names.

llvm-svn: 217066
2014-09-03 19:52:50 +00:00
David Blaikie ed9709d928 unique_ptrify a bunch of stuff through RuntimeDyld::loadObject
llvm-svn: 217065
2014-09-03 19:48:09 +00:00
Alexey Samsonov 3205b51673 Add ubsan/not_ubsan features to Clang lit tests and use
them to exclude tests with large stack usage from UBSan bootstrap.

llvm-svn: 217064
2014-09-03 19:46:32 +00:00
Chandler Carruth bfc6b954ac [x86] Make this test check everything for both SSE2 and AVX1 modes,
using a common 'all' prefix for the common test output.

llvm-svn: 217063
2014-09-03 19:39:10 +00:00
Jonathan Roelofs 3bb7b558df Detection for _LIBCPP_HAS_NO_MONOTONIC_CLOCK caused several more build breakages
Remove it for now. This flag can be set in build scripts instead.

llvm-svn: 217061
2014-09-03 18:48:28 +00:00
Juergen Ributzka 7a76c2409e [FastISel] Some long overdue spring cleaning of FastISel.
Things got a little bit messy over the years and it is time for a little bit
spring cleaning.

This first commit is focused on the FastISel base class itself. It doxyfies all
comments, C++11fies the code where it makes sense, renames internal methods to
adhere to the coding standard, and clang-formats the files.

Reviewed by Eric

llvm-svn: 217060
2014-09-03 18:46:45 +00:00
Alexey Samsonov 2c0aac2591 Fix member function call on null pointer in Sema::FindInstantiatedDecl.
This bug was reported by UBSan.

llvm-svn: 217059
2014-09-03 18:45:45 +00:00
Alexey Samsonov 029634e99e Fix downcasts of unaligned empty/tombstone DenseMap keys for DenseMap<AssertVH<T>, Foo>.
Test Plan: llvm regression test suite

Reviewers: chandlerc, rsmith

Reviewed By: rsmith

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D4976

llvm-svn: 217058
2014-09-03 18:11:48 +00:00
Lang Hames 5767f3f159 Add a regression test to sanity check the PBQP allocator.
llvm-svn: 217057
2014-09-03 18:04:10 +00:00
David Blaikie 10a27df8ff unique_ptrify IRObjectFile::createIRObjectFile
I took a guess at the changes to the gold plugin, because that doesn't
seem to build by default for me. Not sure what dependencies I might be
missing for that.

llvm-svn: 217056
2014-09-03 17:59:23 +00:00
Anton Yartsev 94e46f3eb8 Enhance the 'Vectors and Extended Vectors' section.
Added cast operations to the table of vector operations. Supported status 'no' means that there are no tests in the Clang test suite for the given cast.

llvm-svn: 217055
2014-09-03 17:59:21 +00:00
Juergen Ributzka 31c8054594 [FastISel][AArch64] Move unconditional branch handling into 'SelectBranch'. NFC.
llvm-svn: 217054
2014-09-03 17:58:10 +00:00
Chris Bieneman f7a637281a Removing static initializer from Debug.cpp by converting to a ManagedStatic.
This is part of our larger effort to remove static initializers from LLVM libraries.

Reviewed by: chandlerc

llvm-svn: 217053
2014-09-03 17:50:14 +00:00
David Blaikie 1f76e52629 unique_ptrify MachOUniversalBinary::create
llvm-svn: 217052
2014-09-03 17:41:05 +00:00
Sanjay Patel 9433a28845 Preserve IR flags (nsw, nuw, exact, fast-math) in SLP vectorizer (PR20802).
The SLP vectorizer should propagate IR-level optimization hints/flags (nsw, nuw, exact, fast-math)
when converting scalar instructions into vectors. But this isn't a simple copy - we need to take
the intersection (the logical 'and') of the sets of flags on the scalars.

The solution is further complicated because we can have non-uniform (non-SIMD) vector ops after:
http://reviews.llvm.org/D4015
http://llvm.org/viewvc/llvm-project?view=revision&revision=211339

The vast majority of changed files are existing tests that were not propagating IR flags, but I've
also added a new test file for focused testing of IR flag possibilities.

Differential Revision: http://reviews.llvm.org/D5172

llvm-svn: 217051
2014-09-03 17:40:30 +00:00
Rafael Espindola efde5a7740 Update for LLVM api change.
llvm-svn: 217050
2014-09-03 17:31:52 +00:00
Rafael Espindola 688121571a Pass a && to getLazyBitcodeModule.
This forces callers to use std::move when calling it. It is somewhat odd to have
code with std::move that doesn't always move, but it is also odd to have code
without std::move that sometimes moves.

llvm-svn: 217049
2014-09-03 17:31:46 +00:00
David Blaikie 99b96f42d6 Ensure ErrorOr cannot implicitly invoke explicit ctors of the underlying type.
An unpleasant surprise while migrating unique_ptrs (see changes in
lib/Object): ErrorOr<int*> was implicitly convertible to
ErrorOr<std::unique_ptr<int>>.

Keep the explicit conversions otherwise it's a pain to convert
ErrorOr<int*> to ErrorOr<std::unique_ptr<int>>.

I'm not sure if there should be more SFINAE on those explicit ctors (I
could check if !is_convertible && is_constructible, but since the ctor
has to be called explicitly I don't think there's any need to disable
them when !is_constructible - they'll just fail anyway. It's the
converting ctors that can create interesting ambiguities without proper
SFINAE). I had to SFINAE the explicit ones because otherwise they'd be
ambiguous with the implicit ones in an explicit context, so far as I
could tell.

The converting assignment operators seemed unnecessary (and similarly
buggy/dangerous) - just rely on the converting ctors to convert to the
right type for assignment instead.

llvm-svn: 217048
2014-09-03 17:31:25 +00:00
Rafael Espindola f1d2fc657b Update to not depend on "llvm-objdump -d -symbolize".
llvm-svn: 217047
2014-09-03 16:16:02 +00:00
Tom Stellard 7a9e2c6879 Implement isinf builtin
llvm-svn: 217046
2014-09-03 15:55:40 +00:00
Tom Stellard d8a73abfc3 Fix implementation of copysign
This was previously implemented with a macro and we were using
__builtin_copysign(), which takes double inputs for the float
version of copysign().

Reviewed-and-Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217045
2014-09-03 15:55:38 +00:00
Nico Weber 2a9b6aae9a Fix indentation. No behavior change.
llvm-svn: 217044
2014-09-03 15:28:00 +00:00
Eli Bendersky 7325e56c10 Split off CUDA-specific Sema parts to a new file
In line with SemaOpenMP.cpp, etc. CUDA-specific semantic analysis code goes into
a separate file. This is in anticipation of adding extra functionality here in
the near future.

No change in functionality.

Review: http://reviews.llvm.org/D5160
llvm-svn: 217043
2014-09-03 15:27:03 +00:00
Tom Stellard c4e0c1075b CGBuiltin: Use @llvm.fabs rather than fabs libcall when emitting builtins
Using the intrinsic allows the SelectionDAGBuilder to turn this call
into the FABS Node and also the intrinsic is something the vectorizer knows
how to vectorize.

This patch also sets the readnone attribute on this call, which should
enable additional optmizations.

llvm-svn: 217042
2014-09-03 15:24:29 +00:00
Tom Stellard 102c68786c R600/SI: Add a pattern for i64 and in a branch
llvm-svn: 217041
2014-09-03 15:22:41 +00:00
Tom Stellard b8b841366a R600/SI: Fix typos in SIInstrInfo::areLoadsFromSameBasePtr()
This fixes a crash in the OpenCV test:
ImgprocWarpResizeArea/Resize.Mat/16

There is no test case for this, because this failure depends on a
specific ordering of the loads, which could easily change.

llvm-svn: 217040
2014-09-03 15:22:39 +00:00
Alexander Kornienko 805b44d124 ClangTidy misc-argument-comment check: don't check arguments to template
parameter packs.

Summary:
This disables this check for std::bind and similar functions that use
parameter packs to forward arguments to a different function. Name of the
parameter pack argument doesn't matter.

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D5168

llvm-svn: 217039
2014-09-03 14:56:30 +00:00
Alexey Volkov e46ca71f0b Allow libc++ to be built with GCC 5.0 compiler
Differential Revision: http://reviews.llvm.org/D5169

llvm-svn: 217038
2014-09-03 14:30:39 +00:00
Renato Golin c028a8e777 Check-label a bit more specific
Sometimes, the .file could be reordered and it'd identify the ldr in the filename as a bad match.

llvm-svn: 217037
2014-09-03 13:32:08 +00:00
Benjamin Kramer 6bcbe6e04d [clang-tidy] Eliminate inline copies of InTemplateInstantiation matcher.
llvm-svn: 217036
2014-09-03 13:30:28 +00:00
Benjamin Kramer b7f59d6bbd [clang-tidy] Use new ASTMatchers to identify template instantiations instead of copying it everywhere.
No intended functionality change.

llvm-svn: 217035
2014-09-03 13:21:51 +00:00
Joerg Sonnenberger 0a53727502 Document !and. Fix !shl and friends -- they provide binary operations.
llvm-svn: 217034
2014-09-03 13:17:03 +00:00
Iain Sandoe fe3add79bf Fix configure and make build of clang-interpreter.
Replaced 'jit' link component with 'mcjit'.
Updated the required libraries.

llvm-svn: 217033
2014-09-03 13:13:50 +00:00
Iain Sandoe d49305bfef Fix configure and make build of llvm examples.
Replaced link component 'jit' with 'mcjit'.

llvm-svn: 217032
2014-09-03 13:12:16 +00:00
Dmitry Vyukov f8cfdd9207 tsan: handle early signals
The second part of the fix of
https://code.google.com/p/thread-sanitizer/issues/detail?id=71

llvm-svn: 217031
2014-09-03 12:25:22 +00:00
Evgeniy Stepanov f1741f52ad [msan] Fix origin_history_per_stack_limit=0 behavior.
It disables the per-stack limit.

llvm-svn: 217030
2014-09-03 12:15:59 +00:00
Benjamin Kramer 7ab8476c15 ASTMatchers: Add a matcher to detect whether a decl or stmt is inside a template instantiation.
This is hoisted from clang-tidy where it's used everywhere. The implementation
is not particularly efficient right now, but there is no easy fix for that.

Differential Revision: http://reviews.llvm.org/D5085

llvm-svn: 217029
2014-09-03 12:08:14 +00:00
Benjamin Kramer 8c90fd71f7 Add override to overriden virtual methods, remove virtual keywords.
No functionality change. Changes made by clang-tidy + some manual cleanup.

llvm-svn: 217028
2014-09-03 11:41:21 +00:00
Jim Cownie 77c2a634b0 Fix a crash that occurred under obscure circumstances during library shutdown
llvm-svn: 217027
2014-09-03 11:34:33 +00:00
Jim Cownie 07ea89f637 Fix a bug where the library slept for up to KMP_BLOCKTIME before exiting
llvm-svn: 217026
2014-09-03 11:10:54 +00:00
Benjamin Kramer a39beb9dd6 Parse: Replace polymorphic functor objects with lambdas and llvm::function_ref.
No change in functionality.

llvm-svn: 217025
2014-09-03 11:06:10 +00:00