Commit Graph

228414 Commits

Author SHA1 Message Date
Saleem Abdulrasool 358efd6557 API: fix a -Wunused-variable warning
expr_log is only conditionally used via preprocessing.  Ensure that we guard the
definition accordingly.  NFC.

llvm-svn: 267001
2016-04-21 16:56:02 +00:00
Saleem Abdulrasool 25b75a2f7d Host: fix some -Wformat-pedantic warnings
Add explicit casts for function pointer to void * for %p conversion.  NFC.

llvm-svn: 267000
2016-04-21 16:55:58 +00:00
Philip Reames 92c43699bc [unordered] Add tests and conservative handling in support of future changes [NFCI]
This change adds a couple of test cases to make sure FindAvailableLoadedValue does the right thing.  At the moment, the code added is dead, but separating it makes follow on changes far more obvious.

llvm-svn: 266999
2016-04-21 16:51:08 +00:00
Chad Rosier 99bc480bc3 Address Philip's post-commit feedback for r266987. NFC.
llvm-svn: 266998
2016-04-21 16:18:02 +00:00
Philip Reames 6ffe718c64 Minor comment cleanup [NFC]
llvm-svn: 266997
2016-04-21 16:15:19 +00:00
Rafael Espindola 543bebd8ee Fix test to run everywhere.
Because of X86 instead of x86 is was masked as unsupported everywhere.

llvm-svn: 266996
2016-04-21 15:51:28 +00:00
Rafael Espindola 15ca14c0b9 Fix recursive -only-needed.
We were assuming that only linkonce_odr GVs were lazy linked.

llvm-svn: 266995
2016-04-21 14:56:33 +00:00
Kuba Brecka bf8b5f8dd2 [tsan] Rename ReportThread->pid to ReportThread->os_id
The field "pid" in ReportThread is used to store the OS-provided thread ID (pthread_self or gettid). The name "pid" suggests it's a process ID, which it isn't. Let's rename it.

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

llvm-svn: 266994
2016-04-21 14:49:25 +00:00
Renato Golin 1f04213e98 [x86] Force mixes asm syntax test to check for x86
llvm-svn: 266993
2016-04-21 14:40:06 +00:00
Alexander Kornienko bfb43b7298 [Clang-tidy] Fix for crash in modernize-raw-string-literal check
Summary:
Clang-tidy modernize-raw-string-literal check crashes on run-time assert while it is evaluating compiler predefined identifiers such as
- __FUNCTION__
- __func__
- __PRETTY_FUNCTION__

Check is asserting because it cannot find opening quote for such string literal. It occurs only on debug build config.
I think that it would be good to prune such cases by crossing off predefined expressions - there is no need to evaluate such matches.

Reviewers: LegalizeAdulthood, alexfh

Subscribers: cfe-commits

Patch by Marek Jenda!

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

llvm-svn: 266992
2016-04-21 14:39:12 +00:00
Kuba Brecka 586d93bd8b [sanitizer] Use pthread_threadid_np as thread ID on OS X
Let's use pthread_threadid_np which returns a more reasonable ID than pthread_self (which is actually a stack pointer). The numbers from pthread_threadid_np are already used in other tools, e.g. in LLDB, and often appear in logs, so it's much more useful than pthread_self.

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

llvm-svn: 266991
2016-04-21 14:38:41 +00:00
Zoran Jovanovic 9360c10a88 [mips][microMIPS] Implement ldpc instruction
Differential Revision: http://reviews.llvm.org/D15009

llvm-svn: 266990
2016-04-21 14:32:12 +00:00
Krzysztof Parzyszek a58ff5117a [Hexagon] Define architecture version macros for hexagonv55
llvm-svn: 266989
2016-04-21 14:30:04 +00:00
Zoran Jovanovic 6764fa7840 [mips][microMIPS] Add R_MICROMIPS_PC19_S2 relocation
Differential Revision: http://reviews.llvm.org/D14915

llvm-svn: 266988
2016-04-21 14:09:35 +00:00
Chad Rosier af83e40dee Refactor implied condition logic from ValueTracking directly into CmpInst. NFC.
Differential Revision: http://reviews.llvm.org/D19330

llvm-svn: 266987
2016-04-21 14:04:54 +00:00
Aaron Ballman 1978f7fe29 Clarify memory ownership semantics; NFC.
Patch by Clement Courbet

llvm-svn: 266986
2016-04-21 13:51:07 +00:00
Zoran Jovanovic 02b7003068 [mips][microMIPS] Add R_MICROMIPS_PC26_S1 relocation
Differential Revision: http://reviews.llvm.org/D14822

llvm-svn: 266985
2016-04-21 13:43:26 +00:00
Sam Kolton 201398e8a3 [AMDGPU] Assembler: prevent parseDPPCtrlOps from eating invalid tokens
Reviewers: nhaustov, tstellarAMD

Subscribers: arsenm

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

llvm-svn: 266984
2016-04-21 13:14:24 +00:00
Michael Zuckerman 4fa96af4db [Clang][AVX512][BuiltIn] Adding intrinsics of VGATHER{DPS|DPD} , VPGATHER{QD|QQ|DD|DQ} and VGATHERPF{0|1}{DPS|QPS|DPD|QPD} instruction set .
Differential Revision: http://reviews.llvm.org/D19224

llvm-svn: 266983
2016-04-21 12:47:27 +00:00
Rafael Espindola 29af472cf6 Use llvm::CachedHash.
llvm-svn: 266982
2016-04-21 12:21:06 +00:00
Rafael Espindola e9f0784acc Add a CachedHash structure.
A DenseMap doesn't store the hashes, so it needs to recompute them when
the table is resized.

In some applications the hashing cost is noticeable. That is the case
for example in lld for symbol names (StringRef).

This patch adds a templated structure that can wraps any value that can
go in a DenseMap and caches the hash.

llvm-svn: 266981
2016-04-21 12:16:21 +00:00
Zlatko Buljan dd4151504a [mips][microMIPS] Implement TLBP, TLBR, TLBWI and TLBWR instructions
Differential Revision: http://reviews.llvm.org/D18855

llvm-svn: 266980
2016-04-21 11:32:40 +00:00
George Rimar 72ab8481fa [ELF] - Make LinkerScript::getSectionOrder private. NFC.
llvm-svn: 266979
2016-04-21 11:28:11 +00:00
George Rimar dbbd8b15bf [ELF] - Use ArrayRef instead of std::vector& for LinkerScript module. NFC.
llvm-svn: 266978
2016-04-21 11:21:48 +00:00
Zlatko Buljan d370f440e2 [mips][microMIPS] Implement LL, SC, MOVEP, ROTR, ROTRV and SYSCALL instructions and add tests for LWM32 and SWM32
Differential Revision: http://reviews.llvm.org/D19150

llvm-svn: 266977
2016-04-21 11:01:51 +00:00
Denis Zobnin 628b022a0e Correctly parse GCC-style asm line following MS-style asm line.
Quit parsing MS-style inline assembly if the following statement has GCC style.
Enables compilation of code like

void f() {
  __asm mov ebx, ecx
  __asm__("movl %ecx, %edx");
}

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

llvm-svn: 266976
2016-04-21 10:59:18 +00:00
Benjamin Kramer 023ef1bd13 Back out the test case for r266973 for now.
It breaks on windows, need to investigate. It's not testing the
important part of that change anyways.

llvm-svn: 266975
2016-04-21 10:46:14 +00:00
George Rimar 71b26e94fd [ELF] - Get rid of SectionOrder array.
SectionOrder vector was a part of LinkerScript class.

It can be removed because Commands vector contains the 
same information and SectiorOrder is just a subset.

Differential revision: http://reviews.llvm.org/D19171

llvm-svn: 266974
2016-04-21 10:22:02 +00:00
Benjamin Kramer b5737c1491 [Tooling] Inject -resource-dir instead of overwriting argv[0].
This allows using a different standard library (the one from argv[0] in
the compilation database) with the correct builtins.

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

llvm-svn: 266973
2016-04-21 10:18:18 +00:00
Andrey Turetskiy 6a8b91df64 Compilation for Intel MCU (Part 1/3)
Add -miamcu option which:
  * Sets IAMCU triple
  * Sets IAMCU ABI
  * Enforces static compilation

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

llvm-svn: 266972
2016-04-21 10:16:48 +00:00
Evgeny Astigeevich fc972f1451 Updated a test not to produce an empty s-file.
llvm-svn: 266971
2016-04-21 09:36:49 +00:00
Haojian Wu 9cba1b52ef Fix cast compiler warning message in include-fixer.
Reviewers: bkramer

Subscribers: cfe-commits

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

llvm-svn: 266970
2016-04-21 09:16:32 +00:00
Evgeny Astigeevich fd89fe0dd3 [AArch64][CodeGen] Fix of PR27158: incorrect peephole optimization in AArch64InstrInfo::optimizeCompareInstr
AArch64InstrInfo::optimizeCompareInstr has bug PR27158 which causes generation of incorrect code.
A compare instruction is substituted with another instruction which does not
produce the same flags as the original compare instruction.
This patch contains:
1. Fix of the bug.
2. A regression test in MIR.
3. A new test to check that SUBS is replaced by SUB.

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

llvm-svn: 266969
2016-04-21 08:54:08 +00:00
Craig Topper 21690db05a [AVX512] Add CTTZ support for v8i64 and v16i32 vectors.
llvm-svn: 266968
2016-04-21 07:30:06 +00:00
Craig Topper 89d7a76d88 [X86] Fix vector-tzcnt-512 test to disable CDI while enabling BWI for one of the runs. Update check patterns accordingly.
llvm-svn: 266967
2016-04-21 07:30:03 +00:00
Craig Topper 4c07b0f896 Fix test command line to explicitly disable CDI instructions for one test.
llvm-svn: 266966
2016-04-21 07:29:59 +00:00
Mehdi Amini 721800d438 CachePruning: early exit if no path supplied
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266965
2016-04-21 06:43:45 +00:00
Mehdi Amini 9df9a9cd53 ThinLTO: initialize variables
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266964
2016-04-21 06:43:41 +00:00
Craig Topper 340ad0a0c9 [AVX512] Add support for lowering CTTZ v64i8 and v32i16 with BWI instructions.
llvm-svn: 266963
2016-04-21 06:39:34 +00:00
Craig Topper 7dedfdc60a [X86] Remove redundant calls to setOperationAction for EXTRACT_VECTOR_ELT/INSERT_VECTOR_ELT from SSE41 block. They were already done in an earlier block. NFC
llvm-svn: 266962
2016-04-21 06:39:32 +00:00
Craig Topper 032e985cbc [X86] Remove some operations from the default Expand all vector ops loop. Instead let them stay Legal and mark them Expand for specific types where needed. Reduces overall number of calls to setOperationAction. NFC
llvm-svn: 266961
2016-04-21 06:39:29 +00:00
Craig Topper 98c855d480 [X86] Remove old leftover MMX code that sets various 64-bit vector operations to Expand. These vector types aren't legal so these operations would never make it far enough to need to expand. NFC
llvm-svn: 266960
2016-04-21 06:39:26 +00:00
Mehdi Amini f95f77adf6 ThinLTO: add module caching handling.
Differential Revision: http://reviews.llvm.org/D18494

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266959
2016-04-21 05:54:23 +00:00
Mehdi Amini a71a5a6289 ThinLTO: Resolve linkonce_odr aliases just like functions
This help to streamline the process of handling importing since
we don't need to special case alias everywhere: just like
linkonce_odr function, make sure at least one alias is emitted
by turning it weak.

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266958
2016-04-21 05:47:17 +00:00
Davide Italiano 253f71ba5a [LTO/Test] Make x86_64-darwin bot happy again.
llvm-svn: 266957
2016-04-21 05:30:32 +00:00
Weiming Zhao d69a6d2b28 [libc++] fix macro redef warning when exception is disabled
Summary:
 when setting LIBCXX_ENABLE_EXCEPTIONS=false, _LIBCPP_NO_EXCEPTIONS wil be defined in both commandline and _config

Reviewers: bcraig, EricWF

Subscribers: cfe-commits

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

llvm-svn: 266956
2016-04-21 05:28:18 +00:00
Sanjoy Das 54a3a006ca [SimplifyCFG] Fold `llvm.guard(false)` to unreachable
Summary:
`llvm.guard(false)` always bails out of the current compilation unit, so
we can prune any control flow following it.

Reviewers: hfinkel, pcc, reames

Subscribers: majnemer, reames, mcrosier, llvm-commits

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

llvm-svn: 266955
2016-04-21 05:09:12 +00:00
Davide Italiano afd1b06d8e [LTO] Another couple of tests for cases we already get right.
-> Drop linkage when converting to decl
-> Handling of unnamed_addr.

llvm-svn: 266954
2016-04-21 04:50:08 +00:00
Davide Italiano 3c0410d09d [LTO] Discard names for Values that are not global.
This is not on by default (but it might be in the future).
The knob to enable the optimization is -lto-discard-value-names.

llvm-svn: 266953
2016-04-21 04:46:22 +00:00
Craig Topper 3e6be4c27a [X86] Remove unnecessary setting of CTTZ_ZERO_UNDEF to Custom for vector types where we can't do any better than the Custom lowering of CTTZ. LegalizeVectorOps will expand to CTTZ since its marked Custom.
CTTZ_ZERO_UNDEF can be custom lowered specially if CTLZ is supported. Otherwise CTTZ and CTTZ_ZERO_UNDEF are handled the same way by using CTPOP and bitmath.

llvm-svn: 266952
2016-04-21 04:44:00 +00:00