Commit Graph

231496 Commits

Author SHA1 Message Date
Sanjay Patel 5496a23316 fix comments; NFC
llvm-svn: 270237
2016-05-20 17:07:19 +00:00
Sanjay Patel 1dc57cb944 use range-loops; NFCI
llvm-svn: 270236
2016-05-20 17:00:10 +00:00
Quentin Colombet 46df722eb0 [RegBankSelect] Specify different optimization mode for the pass.
The mode should be choose by the target when instantiating the pass.

llvm-svn: 270235
2016-05-20 16:55:35 +00:00
Sanjay Patel 8bc63b2f47 fix documentation comments; NFC
llvm-svn: 270234
2016-05-20 16:46:01 +00:00
Krzysztof Parzyszek 64439ac775 Fix error reporting in register scavenger (lack of emergency spill slot)
- Do not store Twine objects.
- Remove report_fatal_error, since llvm_unreachable does terminate the
  program in release mode.

llvm-svn: 270233
2016-05-20 16:38:34 +00:00
Quentin Colombet f75c2bfc6b [RegBankSelect] Add a method to avoid splitting while repairing.
The previous choice of the insertion points for repairing was
straightfoward but may introduce some basic block or edge splitting. In
some situation this is something we can avoid.
For instance, when repairing a phi argument, instead of placing the
repairing on the related incoming edge, we may move it to the previous
block, before the terminators. This is only possible when the argument
is not defined by one of the terminator.

llvm-svn: 270232
2016-05-20 16:36:12 +00:00
Davide Italiano f7211fd44d [PM/PartiallyInlineLibCalls] Fix pass dependencies.
Inline getAnalysisUsage() while I'm here.

llvm-svn: 270231
2016-05-20 16:23:14 +00:00
Simon Pilgrim 55ef3da27b [X86][AVX] Generalized matching for target shuffle combines
This patch is a first step towards a more extendible method of matching combined target shuffle masks.

Initially this just pulls out the existing basic mask matches and adds support for some 256/512 bit equivalents. Future patterns will require a number of features to be added but I wanted to keep this patch simple.

I hope we can avoid duplication between shuffle lowering and combining and share more complex pattern match functions in future commits.

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

llvm-svn: 270230
2016-05-20 16:19:30 +00:00
Simon Pilgrim acb71db577 [X86][AVX] Sync with clang/test/CodeGen/avx-builtins.c
llvm-svn: 270229
2016-05-20 16:05:55 +00:00
Davide Italiano 8749dfd1bf [PartiallyInlineLibCalls] Remove dead includes. NFC.
llvm-svn: 270228
2016-05-20 15:52:23 +00:00
Simon Pilgrim 8a8c4e1404 [X86][AVX] Added _mm256_testc_si256/_mm256_testnzc_si256/_mm256_testz_si256 tests
llvm-svn: 270227
2016-05-20 15:49:17 +00:00
Adrian McCarthy 8e0879a9d3 Eliminate unnecessary file access checks in Clang driver on Windows
Differential Revision: http://reviews.llvm.org/D20454

llvm-svn: 270226
2016-05-20 15:46:23 +00:00
Davide Italiano 08713bd1ed [PM/PartiallyInlineLibCalls] Convert to static function in preparation for porting this pass to the new PM.
llvm-svn: 270225
2016-05-20 15:43:39 +00:00
Benjamin Kramer f4c520d5d2 Add all the avx512 flavors to __builtin_cpu_supports's list.
This is matching what trunk gcc is accepting. Also adds a missing ssse3
case. PR27779. The amount of duplication here is annoying, maybe it
should be factored into a separate .def file?

llvm-svn: 270224
2016-05-20 15:21:08 +00:00
Bill Seurer a143aed23c [powerpc] mark static_tls.cc test as UNSUPPORTED on powerpc64
An upcoming change for ld in binutils 2.26 causes this test to
always fail.

llvm-svn: 270223
2016-05-20 14:54:37 +00:00
Sanjay Patel 75892a1543 [SimplifyCFG] eliminate switch cases based on known range of switch condition
This was noted in PR24766:
https://llvm.org/bugs/show_bug.cgi?id=24766#c2

We may not know whether the sign bit(s) are zero or one, but we can still
optimize based on knowing that the sign bit is repeated.

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

llvm-svn: 270222
2016-05-20 14:53:09 +00:00
Krzysztof Parzyszek ce6f3bdee4 Correction to r270219: fix detection of invalid frame index
llvm-svn: 270220
2016-05-20 14:34:03 +00:00
Krzysztof Parzyszek 70b1eee793 Skip entries with invalid indexes in the search loop in register scavenger
llvm-svn: 270219
2016-05-20 14:18:54 +00:00
Sanjay Patel 42bbe77009 [MCExpr] avoid UB via negation of INT_MIN
I accidentally exposed a bug in MCExpr::evaluateAsRelocatableImpl() with the test file added in:
http://reviews.llvm.org/rL269977

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

llvm-svn: 270218
2016-05-20 14:09:41 +00:00
Krzysztof Parzyszek a053101c95 [Hexagon] Use pipe instead of temporary files in tests
llvm-svn: 270217
2016-05-20 14:01:34 +00:00
Krzysztof Parzyszek 89fb44147b [Hexagon] Recognize "s" constraint in inline-asm
llvm-svn: 270216
2016-05-20 13:50:32 +00:00
Alexander Kornienko 5d08bb72d9 [clang-tidy] Switch to a more common way of customizing check behavior.
This should have been done this way from the start, however I somehow missed
r257177.

llvm-svn: 270215
2016-05-20 13:42:40 +00:00
Tamas Berghammer 216963a723 Revert rL270207: "[LLDB][MIPS] Fix floating point handling in case of thread step-out"
The CL causes a build breakage on platforms where sizeof(double) == sizeof(long double)
and it incorrectly assumes that sizeof(double) and sizeof(long double) is the same
on the host and the target.

llvm-svn: 270214
2016-05-20 13:07:16 +00:00
Ben Craig 57b8b1f75f Reorganize locale extension fallbacks. NFCI
The various _l locale extension functions originate from very
different places.  Some come from POSIX, some are BSD extensions,
and some are shared BSD and GLIBC extensions. This patch tries to
group the local extension reimplementations by source. This should
make it easier to make libcxx work with POSIX compliant C libraries
that lack these extensions.

The fallback locale functions are also useful on their own for other
lightweight platforms. Putting these fallback implementations in
support/xlocale should enable code sharing.

I have no access to a newlib system or an android system to build
and test with. I _do_ have access to a system without any of the _l
locale extensions though, and I was able to ensure that the new
__posix_l_fallback.h and __strtonum_fallback.h didn't have any massive
problems.

http://reviews.llvm.org/D17416

llvm-svn: 270213
2016-05-20 12:58:41 +00:00
Simon Pilgrim 4fa8250ad0 [X86][AVX] Added _mm256_extract_epi64 test
llvm-svn: 270212
2016-05-20 12:57:21 +00:00
Haojian Wu cc0c10e300 [find-all-symbols] Some cleanups in unittest.
llvm-svn: 270211
2016-05-20 12:47:56 +00:00
Simon Pilgrim 94b17773e5 [X86][AVX] Full set of AVX intrinsics tests
llvm/test/CodeGen/X86/avx-intrinsics-fast-isel.ll will be synced to this

llvm-svn: 270210
2016-05-20 12:41:02 +00:00
Rafael Espindola c7e9813228 Refactor X86 symbol access classification.
This refactors the logic in X86 to avoid code duplication. It also
splits it in two steps: it first decides if a symbol is local to the DSO
and then uses that information to decide how to access it.

The first part is implemented by shouldAssumeDSOLocal. It is not in any
way specific to X86. In a followup patch I intend to move it to
somewhere common and reused it in other backends.

llvm-svn: 270209
2016-05-20 12:20:10 +00:00
Sagar Thakur b189db627c [LLDB][MIPS] Fix Floating point Registers Encoding
Patch by Nitesh Jain.

Summary: Currently floating point regsiters has eEncodingUint encoding. Hence register write  '1.25' will failed. This patch add eEncodingIEEE754 encoding for floating point registers( - ). This patch will fix test_fp_register_write in TestRegisters.py

Reviewers: clayborg, sagar
Subscribers: mohit.bhakkad, jaydeep, bhushan, sdardis, lldb-commits
Differential: D18853
llvm-svn: 270208
2016-05-20 12:11:52 +00:00
Sagar Thakur 71b1decd72 [LLDB][MIPS] Fix floating point handling in case of thread step-out
Patch by Nitesh Jain.

Summary: These patch fix thread step-out for hard and soft float.

Reviewers: clayborg, bhushan, jaydeep
Subscribers: mohit.bhakkad, sagar, sdardis
Differential: D20416
llvm-svn: 270207
2016-05-20 12:07:27 +00:00
Haojian Wu a23ac3d249 [find-all-symbol] Ignore inline namespace context.
Reviewers: bkramer

Subscribers: cfe-commits, ioeric

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

llvm-svn: 270206
2016-05-20 12:04:56 +00:00
Rafael Espindola 8571aa3d5d Simplify handling of hidden stubs on PowerPC.
We now handle them just like non hidden ones. This was already the case
on x86 (r207518) and arm (r207517).

llvm-svn: 270205
2016-05-20 12:00:52 +00:00
Miklos Vajna ed28d41b1a clang-rename: fix renaming members when referenced as macro arguments
The second check failed, FOO(C.X) wasn't renamed to FOO(C.Y).

Reviewers: klimek

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

llvm-svn: 270204
2016-05-20 11:43:59 +00:00
Martin Probst c4a0dd49a3 clang-format: [JS] sort ES6 imports.
Summary:
This change automatically sorts ES6 imports and exports into four groups:
absolute imports, parent imports, relative imports, and then exports. Exports
are sorted in the same order, but not grouped further.

To keep JS import sorting out of Format.cpp, this required extracting the
TokenAnalyzer infrastructure to separate header and implementation files.

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 270203
2016-05-20 11:24:24 +00:00
Eric Liu 6c9472c57f [find-all-symbols] fix failing unittest for Windows build bot.
llvm-svn: 270202
2016-05-20 11:14:36 +00:00
Tamas Berghammer 059e5fb44f Work around android-arm NDK bug exposed by rL269992
In the android-arm ndk there is a duplicated typedef in link.h
and in unwind.h causing build erros. This CL introduces a HACK
to prevent LLVM from finding unwind.h to fix the issue.

llvm-svn: 270201
2016-05-20 10:58:55 +00:00
NAKAMURA Takumi 0e57b13743 SparcISelLowering.cpp: Add missing StringSwitch.h
llvm-svn: 270200
2016-05-20 10:53:56 +00:00
Haojian Wu 20dec208e9 [find-all-symbol] Try to fix the failure windows unittest.
llvm-svn: 270199
2016-05-20 10:36:53 +00:00
Chris Dewhurst ad74117af4 [Sparc] Implement getRegisterByName.
Allows Sparc registers to be specifically referred to in inline assembly.

llvm-svn: 270198
2016-05-20 10:21:01 +00:00
Haojian Wu 17baf85e41 [clang-tidy] Add more descriptive comments and examples in misc-definitions-in-headers check.
Reviewers: alexfh

Subscribers: cfe-commits

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

llvm-svn: 270197
2016-05-20 09:38:25 +00:00
Eric Liu 81554e7257 [find-all-symbols] fixed FindAllMacros compilation error.
llvm-svn: 270196
2016-05-20 09:23:19 +00:00
Benjamin Kramer 38de59e4d9 [ProfileData] Thread unique_ptr through the summary builder to avoid leaks.
llvm-svn: 270195
2016-05-20 09:18:37 +00:00
Igor Kudrin ac40e81987 [Coverage] Fix an issue where improper coverage mapping data could be loaded for an inline function.
If an inline function is observed but unused in a translation unit, dummy
coverage mapping data with zero hash is stored for this function.
If such a coverage mapping section came earlier than real one, the latter
was ignored. As a result, llvm-cov was unable to show coverage information
for those functions.

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

llvm-svn: 270194
2016-05-20 09:14:24 +00:00
Eric Liu 83a4d7fbba [find-all-symbols] make HeaderMapCollector optional in FindAllSymbols and FindAllMacros.
llvm-svn: 270193
2016-05-20 09:12:01 +00:00
Chris Dewhurst 0dfa6bc004 [Sparc] Enable more inline assembly constraints.
Note: This is specifically to allow GCC's test pr44707 to pass.

Trivial change, not put for differential revision. Test included.

llvm-svn: 270192
2016-05-20 09:03:01 +00:00
Haojian Wu 1cea6e5531 [clang-tidy] Handle using-decls with more than one shadow decl.
Reviewers: alexfh

Subscribers: cfe-commits, djasper

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

llvm-svn: 270191
2016-05-20 08:34:32 +00:00
Diana Picus 86f1f4ca77 Fix some comment typos in SelectionDAGBuilder. NFC
llvm-svn: 270190
2016-05-20 08:06:31 +00:00
Haojian Wu 5e4f0255a1 [find-all-symbol] Add macro support.
Reviewers: bkramer

Subscribers: cfe-commits, ioeric

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

llvm-svn: 270189
2016-05-20 08:04:36 +00:00
Daniel Jasper 997cf2fea8 clang-format: [JS] Treat "for" as a reserved word after a ".".
Otherwise, clang-format can get confused with statements like:

  x.for = 1;

llvm-svn: 270188
2016-05-20 06:16:01 +00:00
Sean Silva 357b0e3a7c Use C-style comment.
I think we allow use of C99 for libprofile, but use a C-style comment
for consistency.

llvm-svn: 270187
2016-05-20 06:13:07 +00:00