Commit Graph

223205 Commits

Author SHA1 Message Date
Hans Wennborg 75734f87a6 Add more triples after r261235
Since the behaviour is now different between Darwin and non-Darwin,
more triples are needed :-/

llvm-svn: 261238
2016-02-18 18:44:33 +00:00
Matthew Simpson 921ad01a1d [AArch64] Reduce vector insert/extract cost for Kryo
Differential Revision: http://reviews.llvm.org/D17379

llvm-svn: 261237
2016-02-18 18:35:45 +00:00
Reid Kleckner 7c8e2c37ba Clang on Windows supports exceptions, un XFAIL the passing tests
llvm-svn: 261236
2016-02-18 18:33:58 +00:00
Hans Wennborg 23cdc643b9 Revert to extend i8/i16 return values on Darwin (PR26665)
In r260133, LLVM was changed to no longer extend i8/i16 return values,
as it's not required by the ABI. However, code was found in the wild
that relies on the old behaviour on Darwin, so this commit reverts
back to that old behaviour for Darwin.

On other platforms, it's less likely that code would be depending on
the old behaviour, as GCC and MSVC haven't been extending such return
values.

llvm-svn: 261235
2016-02-18 18:17:05 +00:00
Benjamin Kramer 3a16e2a26a Make header self-contained. NFC.
llvm-svn: 261234
2016-02-18 18:02:48 +00:00
Reid Kleckner 0765fbc332 [WinASan] Fix page size and mmap granularity confusion
We were erroneously reporting 16K as the page size on Windows because
the code that does the shadow mapping was using page size instead of
allocation granularity. After fixing that, we can resolve the FIXMEs in
the Windows implementations of GetPageSize and GetMmapGranularity by
calling GetSystemInfo instead of returning hard-coded, incorrect
answers.

llvm-svn: 261233
2016-02-18 17:58:22 +00:00
Chad Rosier c00ab4f27d [Hexagon] Remove redundant check.
llvm-svn: 261232
2016-02-18 17:49:57 +00:00
Ben Craig b8aea04ef5 Split locale management out of newlib/xlocale.h. NFCI
This is one part of many of a locale refactor. See
http://reviews.llvm.org/D17146 for an idea of where this is going.

For the locale refactor, the locale management functions (newlocale,
freelocale, uselocale) are needed in a separate header from the various _l
functions. This is because some platforms implement the _l functions in terms
of a locale switcher RAII helper, and the locale switcher RAII helper needs
the locale management functions. This patch helps pave the way by getting all
the functions in the right files, so that later diffs aren't completely
horrible.

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

Unfortunately, I have no access to a newlib system to build and test with, so
this change has been made blind.

Reviewed: http://reviews.llvm.org/D17382
llvm-svn: 261231
2016-02-18 17:40:16 +00:00
Ben Craig 217946da98 Split locale management out of ibm/xlocale.h. NFCI
This is one part of many of a locale refactor. See
http://reviews.llvm.org/D17146 for an idea of where this is going.

For the locale refactor, the locale management functions (newlocale,
freelocale, uselocale) are needed in a separate header from the various _l
functions. This is because some platforms implement the _l functions in terms
of a locale switcher RAII helper, and the locale switcher RAII helper needs
the locale management functions. This patch helps pave the way by getting all
the functions in the right files, so that later diffs aren't completely
horrible.

Unfortunately, I have no access to an AIX machine to build with, so this change
has been made blind. Also, the original author (Xing Xue) does not appear to
have a Phabricator account.

Reviewed: http://reviews.llvm.org/D17380
llvm-svn: 261230
2016-02-18 17:37:33 +00:00
Ed Maste 371310e1ae [tsan] Disable sysroot flag on FreeBSD
FreeBSD does not install a number of Clang-provided headers for the
compiler in the base system due to incompatibilities between FreeBSD's     
and Clang's versions. As a workaround do not use --sysroot=. on FreeBSD    
until this is addressed.

llvm.org/pr26651
Differential Revision:	http://reviews.llvm.org/D17383

llvm-svn: 261229
2016-02-18 17:35:30 +00:00
Xinliang David Li 1153f194bd Stop creating covmap as note section on ELF
covmap needs to created as non allocatable, but not with
SHT_NOTE. The latter was needed to workaround a problem
of BFD linker with gc, which is no longer needed. (A more
proper longer term fix requires changing FE driver to force
referencing the section using linker script).

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

llvm-svn: 261228
2016-02-18 17:20:22 +00:00
Ewan Crawford c6bef146ca Fix OSX cmake build
Commit r260721(http://reviews.llvm.org/D17182) introduced the following error when building for OSX using cmake:

Undefined symbols for architecture x86_64:

"_PyInit__lldb", referenced from:
   -exported_symbol[s_list] command line option

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Adding '*' to the regex solves this problem, since it makes the symbol optional.

Reviewers: sivachandra, zturner, labath
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D17384

llvm-svn: 261227
2016-02-18 17:01:40 +00:00
Johannes Doerfert 4d9bb8d594 Allow all combinations of types and subscripts for memory accesses
To support non-aligned accesses we introduce a virtual element size
  for arrays that divides each access function used for this array. The
  adjustment of the access function based on the element size of the
  array was therefore moved after this virtual element size was
  determined, thus after all accesses have been created.

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

llvm-svn: 261226
2016-02-18 16:50:12 +00:00
Nicolai Haehnle f2c64db55a AMDGPU/SI: add llvm.amdgcn.image.load/store[.mip] intrinsics
Summary:
These correspond to IMAGE_LOAD/STORE[_MIP] and are going to be used by Mesa
for the GL_ARB_shader_image_load_store extension.

IMAGE_LOAD is already matched by llvm.SI.image.load. That intrinsic has
a legacy name and pretends not to read memory.

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

llvm-svn: 261224
2016-02-18 16:44:18 +00:00
Serge Pavlov 7a545536f5 File missed from r261222
llvm-svn: 261223
2016-02-18 16:43:24 +00:00
Serge Pavlov 41c1f79dfe Avoid double deletion in Clang driver.
Llvm module object is shared between CodeGenerator and BackendConsumer,
in both classes it is stored as std::unique_ptr, which is not a good
design solution and can cause double deletion error. Usually it does
not occur because in BackendConsumer::HandleTranslationUnit the
ownership of CodeGenerator over the module is taken away. If however
this method is not called, the module is deleted twice and compiler crashes.

As the module owned by BackendConsumer is always the same as CodeGenerator
has, pointer to llvm module can be removed from BackendGenerator.

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

llvm-svn: 261222
2016-02-18 16:42:09 +00:00
Aaron Ballman eb7e5d9074 Add an AST matcher for real floating-point types. e.g., float, double, long double, but not complex.
llvm-svn: 261221
2016-02-18 16:36:01 +00:00
Krzysztof Parzyszek 754bad884d [Hexagon] Fix compilation error with GCC 6
Compiling Hexagon target with GCC 6 produces "error: should have been
declared inside" due to GCC PR c++/69657 which was merged.

Properly wrapping operator<<() definitions within the namespace llvm
fixes the issue.

Author: domagoj.stolfa

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

llvm-svn: 261220
2016-02-18 16:10:27 +00:00
Yury Gribov 75118f5d3d [analyzer] dump_ast_matchers.py: fix replacement regexps
Patch by Alex Sidorin!

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

llvm-svn: 261219
2016-02-18 15:43:56 +00:00
Krzysztof Parzyszek 7a737d1abb [Hexagon] Implement TLS support
Patch by Anand Kodnani.

llvm-svn: 261218
2016-02-18 15:42:57 +00:00
Benjamin Kramer 72dae62b8a [Parse] Code complete expressions in bracket declarators.
Currently we return no results when completing inside of the brackets in
a 'char foo[]' declaration. Let the generic expression completion code
handle it instead. We could get fancier here (e.g. filter non-constant
expressions in contexts where VLAs are not allowed), but it's a strict
improvement over the existing version.

llvm-svn: 261217
2016-02-18 15:30:24 +00:00
Hongbin Zheng a7bdd29c9c Add more isl object printing function
llvm-svn: 261216
2016-02-18 15:24:42 +00:00
Hongbin Zheng 0169ae8ed5 Add the missing __isl_give to MemoryAccess::getAccessRelation
llvm-svn: 261215
2016-02-18 15:24:38 +00:00
George Rimar e9e1d323c6 Fixed comments formatting. NFC.
llvm-svn: 261214
2016-02-18 15:17:01 +00:00
George Rimar 9bec24ab88 Renamed sh_type -> Type, sh_flags -> Flags in arguments. NFC.
llvm-svn: 261213
2016-02-18 14:20:08 +00:00
Matthew Simpson 92821cb4a8 Reapply commit r259357 with a fix for PR26629
Commit r259357 was reverted because it caused PR26629. We were assuming all
roots of a vectorizable tree could be truncated to the same width, which is not
the case in general. This commit reapplies the patch along with a fix and a new
test case to ensure we don't regress because of this issue again. This should
fix PR26629.

llvm-svn: 261212
2016-02-18 14:14:40 +00:00
Zlatko Buljan f034021443 [mips][microMIPS] Implement TLBINV and TLBINVF instructions
Differential Revision: http://reviews.llvm.org/D16849

llvm-svn: 261211
2016-02-18 14:10:52 +00:00
Krzysztof Parzyszek 6895b2ceb2 [Hexagon] Add support for __builtin_prefetch
llvm-svn: 261210
2016-02-18 13:58:38 +00:00
Alexey Bataev 8ffcc949b1 [OPENMP] Fix codegen for lastprivate loop counters.
Patch fixes bug with codegen for lastprivate loop counters. Also it may
improve performance for lastprivates calculations in some cases.

llvm-svn: 261209
2016-02-18 13:48:15 +00:00
Krzysztof Parzyszek 39686cf98e [Hexagon] Update the callee-saved register set for EH-aware functions
llvm-svn: 261208
2016-02-18 13:41:05 +00:00
Benjamin Kramer e593094a15 Add parentheses around arithmetic in operand of '|'.
This avoids a operator precedence warning for mixing + and | in an
expression. I checked that this matches the definition in the Split
DWARF proposal.

Patch by Cong Liu!

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

llvm-svn: 261207
2016-02-18 13:23:17 +00:00
Bhushan D. Attarde 3592a6ec6b [LLDB][MIPS] Provide CPU string to compiler for appropriate code generation for MIPS
SUMMARY:
    This patch implements ArchSpec::GetClangTargetCPU() that provides string representing current architecture as a target CPU.
    This string is then passed to tools like clang so that they generate correct code for that target.
    
    Reviewers: clayborg, zturner
    Subscribers: mohit.bhakkad, sagar, jaydeep, lldb-commits
    Differential Revision: http://reviews.llvm.org/D17022

llvm-svn: 261206
2016-02-18 11:53:28 +00:00
Tamas Berghammer 6b63b14851 Improve the handling of missing elf symtab and missing symbol sizes
* Generate artificial symbol names from eh_fame during symbol parsing
  so these symbols are already present when we calcualte the size of
  the symbols where 0 is specified.
* Fix symbol size calculation for the last symbol in the file where
  it have to last until the end of the parent section.

This is the re-commit of the original change after fixing some test
failures on OSX.

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

llvm-svn: 261205
2016-02-18 11:12:18 +00:00
Yury Gribov a6560ebe4c [analyzer] Add --force-analyze-debug-code option to scan-build
to force debug build and hopefully enable more precise warnings.

Static Analyzer is much more efficient when built in debug mode
(-UNDEBUG) so we advice users to enable it manually. This may be
inconvenient in case of large complex projects (think about Linux
distros e.g. Android or Tizen). This patch adds a flag to scan-build
which inserts -UNDEBUG automatically.

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

llvm-svn: 261204
2016-02-18 11:08:46 +00:00
Chandler Carruth 9c4ed175c2 [PM] Port the PostOrderFunctionAttrs pass to the new pass manager and
convert one test to use this.

This is a particularly significant milestone because it required
a working per-function AA framework which can be queried over each
function from within a CGSCC transform pass (and additionally a module
analysis to be accessible). This is essentially *the* point of the
entire pass manager rewrite. A CGSCC transform is able to query for
multiple different function's analysis results. It works. The whole
thing appears to actually work and accomplish the original goal. While
we were able to hack function attrs and basic-aa to "work" in the old
pass manager, this port doesn't use any of that, it directly leverages
the new fundamental functionality.

For this to work, the CGSCC framework also has to support SCC-based
behavior analysis, etc. The only part of the CGSCC pass infrastructure
not sorted out at this point are the updates in the face of inlining and
running function passes that mutate the call graph.

The changes are pretty boring and boiler-plate. Most of the work was
factored into more focused preperatory patches. But this is what wires
it all together.

llvm-svn: 261203
2016-02-18 11:03:11 +00:00
Aidan Dodds b0be30f71a [Renderscript] Refactor .rs.info parser.
This patch refactors the .rs.info table parser so that its more in line with the current language runtime code.

llvm-svn: 261202
2016-02-18 10:59:46 +00:00
Simon Pilgrim 05e48b95eb [X86][SSE] Improve PSHUFB shuffle mask decoding.
In cases where the PSHUFB shuffle mask is shared it might not be bitcasted to a vXi8 byte vector. This patch adds support for decoding these wider shuffle masks from the ConstantPool.

The test case in question makes use of this to recognise the shuffle mask is an unary UNPCKL pattern and simplifies accordingly.

llvm-svn: 261201
2016-02-18 10:17:40 +00:00
Junmo Park 80440eb804 Minor code cleanup. NFC.
llvm-svn: 261200
2016-02-18 10:09:20 +00:00
Nikolay Haustov 10813a4efa Test commit access.
llvm-svn: 261199
2016-02-18 10:02:12 +00:00
Michael Zuckerman 724dc3b20c [AVX512][PRORQ][PRORD] Change imm8 to int
Differential Revision: http://reviews.llvm.org/D17024

llvm-svn: 261198
2016-02-18 09:52:12 +00:00
Chandler Carruth edf5996b06 [PM/AA] Teach the new pass manager to use pass-by-lambda for registering
analysis passes, support pre-registering analyses, and use that to
implement parsing and pre-registering a custom alias analysis pipeline.

With this its possible to configure the particular alias analysis
pipeline used by the AAManager from the commandline of opt. I've updated
the test to show this effectively in use to build a pipeline including
basic-aa as part of it.

My big question for reviewers are around the APIs that are used to
expose this functionality. Are folks happy with pass-by-lambda to do
pass registration? Are folks happy with pre-registering analyses as
a way to inject customized instances of an analysis while still using
the registry for the general case?

Other thoughts of course welcome. The next round of patches will be to
add the rest of the alias analyses into the new pass manager and wire
them up here so that they can be used from opt. This will require
extending the (somewhate limited) functionality of AAManager w.r.t.
module passes.

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

llvm-svn: 261197
2016-02-18 09:45:17 +00:00
Michael Zuckerman 7cdb72f7ea [CLANG] [AVX512] [BUILTIN] Adding pmovsx{b|d|w}{w|d|q}{128|256|512} builtin to clang
Differential Revision: http://reviews.llvm.org/D16955

llvm-svn: 261196
2016-02-18 09:09:34 +00:00
David Majnemer 597293981d [MSVC] Turn C++ EH on my default
Our support for C++ EH is sufficiently good that it makes sense to
enable support for it out of the box.

While we are here, update the MSVCCompatibility doc.

llvm-svn: 261195
2016-02-18 08:15:05 +00:00
NAKAMURA Takumi c1857d1d21 Make a stub version of MITests, instead of reverting.
Lit tends to find out-of-date unittests in the build tree.

FIXME: It may be reverted several days after.
llvm-svn: 261194
2016-02-18 07:37:17 +00:00
Jonas Hahnfeld 9bf3acd5ff [compiler-rt] Return correct size of struct pthread for glibc-2.12.2
There seems to be a difference between 2.12.1 and 2.12.2 in 64-bit build.
Tested on Scientific Linux 6.6, based on RHEL.

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

llvm-svn: 261193
2016-02-18 07:08:26 +00:00
Saleem Abdulrasool 046ba5b66f Sema: provide an extension warning for enable_if
Clang implements an enable_if attribute as an extension.  Hook up `-Wpedantic`
to issue an extension usage warning when __enable_if__ is used.

llvm-svn: 261192
2016-02-18 06:49:31 +00:00
David Majnemer bc24cb5fb5 [Parse] Make sure we don't forget to diagnose typos in exprs
If ActOn*Op fails, we will forget to diagnose typos in the LHS of
expressions.

llvm-svn: 261191
2016-02-18 06:37:44 +00:00
Dan Gohman d85ab7fc10 [WebAssembly] Don't use setRequiresStructuredCFG(true).
While we still do want reducible control flow, the RequiresStructuredCFG
flag imposes more strict structure constraints than WebAssembly wants.
Unsetting this flag enables critical edge splitting and tail merging.

Also, disable TailDuplication explicitly, as it doesn't support virtual
registers, and was previously only disabled by the RequiresStructuredCFG
flag.

llvm-svn: 261190
2016-02-18 06:32:53 +00:00
Matthias Braun ac697c5d8e Revert "LiveIntervalAnalysis: Remove LiveVariables requirement" and LiveIntervalTest
The commit breaks stage2 compilation on PowerPC. Reverting for now while
this is analyzed. I also have to revert the LiveIntervalTest for now as
that depends on this commit.

Revert "LiveIntervalAnalysis: Remove LiveVariables requirement"
This reverts commit r260806.
Revert "Remove an unnecessary std::move to fix -Wpessimizing-move warning."
This reverts commit r260931.
Revert "Fix typo in LiveIntervalTest"
This reverts commit r260907.
Revert "Add unittest for LiveIntervalAnalysis::handleMove()"
This reverts commit r260905.

llvm-svn: 261189
2016-02-18 05:21:43 +00:00
Craig Topper 802e2e741c [TableGen,X86] Add NDEBUG check to a variable initialization that's only used by asserts. NFC
llvm-svn: 261188
2016-02-18 04:54:32 +00:00