platform/upstream/llvm.git
8 years ago[ASTImporter] Implement missing VisitAccessSpecDecl function in ASTImporter class.
Argyrios Kyrtzidis [Thu, 18 Feb 2016 23:08:36 +0000 (23:08 +0000)]
[ASTImporter] Implement missing VisitAccessSpecDecl function in ASTImporter class.

Patch by Elisavet Sakellari!

llvm-svn: 261274

8 years ago[CMake] Properly set CMAKE_BUILD_TYPE to Debug by default
Chris Bieneman [Thu, 18 Feb 2016 23:07:09 +0000 (23:07 +0000)]
[CMake] Properly set CMAKE_BUILD_TYPE to Debug by default

Summary:
PR26666: CMAKE_BUILD_TYPE was previously being reset to blank.

Reviewers: rnk, beanz

Subscribers: llvm-commits

Patch By: Derek Bruening

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

llvm-svn: 261273

8 years agoFix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in source...
Eugene Zelenko [Thu, 18 Feb 2016 22:39:14 +0000 (22:39 +0000)]
Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in source/Commands/CommandObjectBreakpoint.cpp; other minor fixes.

llvm-svn: 261272

8 years agoRemove use of builtin comma operator.
Richard Trieu [Thu, 18 Feb 2016 22:34:54 +0000 (22:34 +0000)]
Remove use of builtin comma operator.

Cleanup for upcoming Clang warning -Wcomma.  No functionality change intended.

llvm-svn: 261271

8 years agoRemove uses of builtin comma operator.
Richard Trieu [Thu, 18 Feb 2016 22:09:30 +0000 (22:09 +0000)]
Remove uses of builtin comma operator.

Cleanup for upcoming Clang warning -Wcomma.  No functionality change intended.

llvm-svn: 261270

8 years agoChange comma to semi-colon, no functionality change.
Richard Trieu [Thu, 18 Feb 2016 22:07:42 +0000 (22:07 +0000)]
Change comma to semi-colon, no functionality change.

Cleanup for upcoming Clang warning -Wcomma.

llvm-svn: 261269

8 years ago[ADT] Be less clever when using a nonce type for disambiguation.
Jordan Rose [Thu, 18 Feb 2016 22:03:23 +0000 (22:03 +0000)]
[ADT] Be less clever when using a nonce type for disambiguation.

Old compilers don't like constexpr, but we're only going to use this in one
place anyway: this file. Everyone else should go through PointerLikeTypeTraits.

Update to r261259.

llvm-svn: 261268

8 years ago[libFuzzer] only read MaxLen bytes from every file in the corpus to speedup loading...
Kostya Serebryany [Thu, 18 Feb 2016 21:49:10 +0000 (21:49 +0000)]
[libFuzzer] only read MaxLen bytes from every file in the corpus to speedup loading the corpus

llvm-svn: 261267

8 years agoRemove expectedFlakeyFreeBSD decorator for prompt setting
Ed Maste [Thu, 18 Feb 2016 21:38:24 +0000 (21:38 +0000)]
Remove expectedFlakeyFreeBSD decorator for prompt setting

The race condition/use after free involved in setting long prompts
appears to be fixed now (although I do not know which commit fixed it).

llvm.org/pr22611

llvm-svn: 261266

8 years ago[PPCLoopDataPrefetch] Move pass to Transforms/Scalar/LoopDataPrefetch. NFC
Adam Nemet [Thu, 18 Feb 2016 21:38:19 +0000 (21:38 +0000)]
[PPCLoopDataPrefetch] Move pass to Transforms/Scalar/LoopDataPrefetch. NFC

This patch is part of the work to make PPCLoopDataPrefetch
target-independent
(http://thread.gmane.org/gmane.comp.compilers.llvm.devel/92758).

Obviously the pass still only used from PPC at this point.  Subsequent
patches will start driving this from ARM64 as well.

Due to the previous patch most lines should show up as moved lines.

llvm-svn: 261265

8 years ago[PPCLoopDataPrefetch] Remove PPC from some of the names. NFC
Adam Nemet [Thu, 18 Feb 2016 21:37:12 +0000 (21:37 +0000)]
[PPCLoopDataPrefetch] Remove PPC from some of the names. NFC

This is done only to make the next patch that move the pass out PPC to
Transforms easier to read.  After this most line should show up as moved
lines in that patch.

This patch is part of the work to make PPCLoopDataPrefetch
target-independent
(http://thread.gmane.org/gmane.comp.compilers.llvm.devel/92758).

llvm-svn: 261264

8 years agoUn-XFAIL the last C++ EH test, it was fixed by r261258
Reid Kleckner [Thu, 18 Feb 2016 21:24:30 +0000 (21:24 +0000)]
Un-XFAIL the last C++ EH test, it was fixed by r261258

llvm-svn: 261263

8 years ago[WinEH] Hoist state stores from successors
David Majnemer [Thu, 18 Feb 2016 21:13:35 +0000 (21:13 +0000)]
[WinEH] Hoist state stores from successors

If we know that all of our successors want to be in the exact same
state, it makes sense to hoist the state transition into their common
predecessor.

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

llvm-svn: 261262

8 years agoAdd test coverage for default linker
Xinliang David Li [Thu, 18 Feb 2016 21:11:37 +0000 (21:11 +0000)]
Add test coverage for default linker

llvm-svn: 261261

8 years ago[Sema] Fix bug in TypeLocBuilder::pushImpl
Akira Hatanaka [Thu, 18 Feb 2016 21:05:09 +0000 (21:05 +0000)]
[Sema] Fix bug in TypeLocBuilder::pushImpl

The code in TypeLocBuilder::pushImpl wasn't correctly handling the case
where an element that has an 8-byte alignment was being pushed.

I plan to follow up with a patch to remove redundancies and simplify the
function.

rdar://problem/23838912

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

llvm-svn: 261260

8 years ago[ADT] Fix PointerEmbeddedInt when the underlying type is uintptr_t.
Jordan Rose [Thu, 18 Feb 2016 21:00:08 +0000 (21:00 +0000)]
[ADT] Fix PointerEmbeddedInt when the underlying type is uintptr_t.

...and when you try to store negative values in it.

llvm-svn: 261259

8 years ago[IR] Straighten out bundle overload of IRBuilder::CreateCall
Reid Kleckner [Thu, 18 Feb 2016 20:57:41 +0000 (20:57 +0000)]
[IR] Straighten out bundle overload of IRBuilder::CreateCall

IRBuilder has two ways of putting bundle operands on calls: the default
operand bundle, and an overload of CreateCall that takes an operand
bundle list.

Previously, this overload used a default argument of None. This made it
impossible to distinguish between the case were the caller doesn't care
about bundles, and the case where the caller explicitly wants no
bundles. We behaved as if they wanted the latter behavior rather than
the former, which led to problems with simplifylibcalls and WinEH.

This change fixes it by making the parameter non-optional, so we can
distinguish these two cases.

llvm-svn: 261258

8 years ago[X86ISelLowering] Use isPowerof2 instead of rewriting it. NFC.
Davide Italiano [Thu, 18 Feb 2016 20:43:15 +0000 (20:43 +0000)]
[X86ISelLowering] Use isPowerof2 instead of rewriting it. NFC.

llvm-svn: 261255

8 years agoAdd support for invoke/landingpad/resume in C API test
Amaury Sechet [Thu, 18 Feb 2016 20:38:32 +0000 (20:38 +0000)]
Add support for invoke/landingpad/resume in C API test

Summary: As per title. There was a lot of part missing in the C API, so I had to extend the invoke and landingpad API.

Reviewers: echristo, joker.eph, Wallbraker

Subscribers: llvm-commits

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

llvm-svn: 261254

8 years agoMissed a spot in r261251, also ignore attributes on all pointer parameters
Krzysztof Parzyszek [Thu, 18 Feb 2016 20:30:40 +0000 (20:30 +0000)]
Missed a spot in r261251, also ignore attributes on all pointer parameters

llvm-svn: 261253

8 years agoUse Backend_EmitMCNull for null codegen unit tests.
David L. Jones [Thu, 18 Feb 2016 20:27:16 +0000 (20:27 +0000)]
Use Backend_EmitMCNull for null codegen unit tests.

Using Backend_EmitLL attemps to create a file with an empty filename.
This is problematic in certain environments: an empty filename may be
illegal, or the default output path may not be writable (in the case
where an empty filename would otherwise have some non-failing
semantics). This patch switches to use Backend_EmitMCNull, which
allows CodeGen to run, but does not attempt to create or write an
output file.

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

llvm-svn: 261252

8 years agoMake test less prone to attribute changes
Krzysztof Parzyszek [Thu, 18 Feb 2016 20:02:03 +0000 (20:02 +0000)]
Make test less prone to attribute changes

llvm-svn: 261251

8 years agoRestrict scope of variables [NFC]
Philip Reames [Thu, 18 Feb 2016 19:45:31 +0000 (19:45 +0000)]
Restrict scope of variables [NFC]

llvm-svn: 261250

8 years agoRemove unnecessary semicolons after braces
Jonathan Peyton [Thu, 18 Feb 2016 19:38:25 +0000 (19:38 +0000)]
Remove unnecessary semicolons after braces

llvm-svn: 261249

8 years ago[analyzer] Include comment mistakenly left out of r261243. NFC.
Devin Coughlin [Thu, 18 Feb 2016 19:37:39 +0000 (19:37 +0000)]
[analyzer] Include comment mistakenly left out of r261243. NFC.

It explains why we can't just synthesize bodies of setters in BodyFarm.

llvm-svn: 261248

8 years agoMake deprecation message for -fsanitize-coverage= with numeric argument friendlier.
Nico Weber [Thu, 18 Feb 2016 19:32:54 +0000 (19:32 +0000)]
Make deprecation message for -fsanitize-coverage= with numeric argument friendlier.

http://reviews.llvm.org/D17397

llvm-svn: 261247

8 years agoFix a typo in FormatCache.cpp such that the cache would potentially return an invalid...
Enrico Granata [Thu, 18 Feb 2016 19:23:52 +0000 (19:23 +0000)]
Fix a typo in FormatCache.cpp such that the cache would potentially return an invalid format in some cases

llvm-svn: 261246

8 years ago[CaptureTracking] Support atomicrmw and cmpxchg
Philip Reames [Thu, 18 Feb 2016 19:23:27 +0000 (19:23 +0000)]
[CaptureTracking] Support atomicrmw and cmpxchg

These atomic operations are conceptually both a load and store from the same location. As such, we can treat them as the most conservative of those two components which in practice, means we can treat them like stores. An cmpxchg or atomicrmw captures the values, but not the locations accessed.

Note: We can probably be more aggressive about the comparison value in an cmpxhg since to have it be in memory, it must already be captured, but I figured it was better to avoid that for the moment.

Note 2: It turns out that since we don't actually support cmpxchg of pointer type, writing a negative test is impossible.

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

llvm-svn: 261245

8 years ago[analyzer] Improve modeling of ObjC synthesized property setters.
Devin Coughlin [Thu, 18 Feb 2016 19:13:30 +0000 (19:13 +0000)]
[analyzer] Improve modeling of ObjC synthesized property setters.

When modeling a call to a setter for a property that is synthesized to be
backed by an instance variable, don't invalidate the entire instance
but rather only the storage for the updated instance variable itself.

This still doesn't model the effect of the setter completely. It doesn't
bind the set value to the ivar storage location because doing so would cause
the set value to escape, removing valuable diagnostics about potential
leaks of the value from the retain count checker.

llvm-svn: 261243

8 years agoFix Clang-tidy modernize-use-nullptr warnings in some files in source/Target; other...
Eugene Zelenko [Thu, 18 Feb 2016 18:52:47 +0000 (18:52 +0000)]
Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Target; other minor fixes.

llvm-svn: 261242

8 years agoAdd target and host platform enumerations so we're not using strings.
Zachary Turner [Thu, 18 Feb 2016 18:50:02 +0000 (18:50 +0000)]
Add target and host platform enumerations so we're not using strings.

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

llvm-svn: 261241

8 years agoFix SocketTest on Windows.
Zachary Turner [Thu, 18 Feb 2016 18:49:56 +0000 (18:49 +0000)]
Fix SocketTest on Windows.

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

llvm-svn: 261240

8 years ago[DebugInfoPDB] Add source / line number accessors for PDB.
Zachary Turner [Thu, 18 Feb 2016 18:47:29 +0000 (18:47 +0000)]
[DebugInfoPDB] Add source / line number accessors for PDB.

This patch adds a variety of different methods to query source
and line number information from PDB files.

llvm-svn: 261239

8 years agoAdd more triples after r261235
Hans Wennborg [Thu, 18 Feb 2016 18:44:33 +0000 (18:44 +0000)]
Add more triples after r261235

Since the behaviour is now different between Darwin and non-Darwin,
more triples are needed :-/

llvm-svn: 261238

8 years ago[AArch64] Reduce vector insert/extract cost for Kryo
Matthew Simpson [Thu, 18 Feb 2016 18:35:45 +0000 (18:35 +0000)]
[AArch64] Reduce vector insert/extract cost for Kryo

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

llvm-svn: 261237

8 years agoClang on Windows supports exceptions, un XFAIL the passing tests
Reid Kleckner [Thu, 18 Feb 2016 18:33:58 +0000 (18:33 +0000)]
Clang on Windows supports exceptions, un XFAIL the passing tests

llvm-svn: 261236

8 years agoRevert to extend i8/i16 return values on Darwin (PR26665)
Hans Wennborg [Thu, 18 Feb 2016 18:17:05 +0000 (18:17 +0000)]
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

8 years agoMake header self-contained. NFC.
Benjamin Kramer [Thu, 18 Feb 2016 18:02:48 +0000 (18:02 +0000)]
Make header self-contained. NFC.

llvm-svn: 261234

8 years ago[WinASan] Fix page size and mmap granularity confusion
Reid Kleckner [Thu, 18 Feb 2016 17:58:22 +0000 (17:58 +0000)]
[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

8 years ago[Hexagon] Remove redundant check.
Chad Rosier [Thu, 18 Feb 2016 17:49:57 +0000 (17:49 +0000)]
[Hexagon] Remove redundant check.

llvm-svn: 261232

8 years agoSplit locale management out of newlib/xlocale.h. NFCI
Ben Craig [Thu, 18 Feb 2016 17:40:16 +0000 (17:40 +0000)]
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

8 years agoSplit locale management out of ibm/xlocale.h. NFCI
Ben Craig [Thu, 18 Feb 2016 17:37:33 +0000 (17:37 +0000)]
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

8 years ago[tsan] Disable sysroot flag on FreeBSD
Ed Maste [Thu, 18 Feb 2016 17:35:30 +0000 (17:35 +0000)]
[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

8 years agoStop creating covmap as note section on ELF
Xinliang David Li [Thu, 18 Feb 2016 17:20:22 +0000 (17:20 +0000)]
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

8 years agoFix OSX cmake build
Ewan Crawford [Thu, 18 Feb 2016 17:01:40 +0000 (17:01 +0000)]
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

8 years agoAllow all combinations of types and subscripts for memory accesses
Johannes Doerfert [Thu, 18 Feb 2016 16:50:12 +0000 (16:50 +0000)]
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

8 years agoAMDGPU/SI: add llvm.amdgcn.image.load/store[.mip] intrinsics
Nicolai Haehnle [Thu, 18 Feb 2016 16:44:18 +0000 (16:44 +0000)]
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

8 years agoFile missed from r261222
Serge Pavlov [Thu, 18 Feb 2016 16:43:24 +0000 (16:43 +0000)]
File missed from r261222

llvm-svn: 261223

8 years agoAvoid double deletion in Clang driver.
Serge Pavlov [Thu, 18 Feb 2016 16:42:09 +0000 (16:42 +0000)]
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

8 years agoAdd an AST matcher for real floating-point types. e.g., float, double, long double...
Aaron Ballman [Thu, 18 Feb 2016 16:36:01 +0000 (16:36 +0000)]
Add an AST matcher for real floating-point types. e.g., float, double, long double, but not complex.

llvm-svn: 261221

8 years ago[Hexagon] Fix compilation error with GCC 6
Krzysztof Parzyszek [Thu, 18 Feb 2016 16:10:27 +0000 (16:10 +0000)]
[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

8 years ago[analyzer] dump_ast_matchers.py: fix replacement regexps
Yury Gribov [Thu, 18 Feb 2016 15:43:56 +0000 (15:43 +0000)]
[analyzer] dump_ast_matchers.py: fix replacement regexps

Patch by Alex Sidorin!

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

llvm-svn: 261219

8 years ago[Hexagon] Implement TLS support
Krzysztof Parzyszek [Thu, 18 Feb 2016 15:42:57 +0000 (15:42 +0000)]
[Hexagon] Implement TLS support

Patch by Anand Kodnani.

llvm-svn: 261218

8 years ago[Parse] Code complete expressions in bracket declarators.
Benjamin Kramer [Thu, 18 Feb 2016 15:30:24 +0000 (15:30 +0000)]
[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

8 years agoAdd more isl object printing function
Hongbin Zheng [Thu, 18 Feb 2016 15:24:42 +0000 (15:24 +0000)]
Add more isl object printing function

llvm-svn: 261216

8 years agoAdd the missing __isl_give to MemoryAccess::getAccessRelation
Hongbin Zheng [Thu, 18 Feb 2016 15:24:38 +0000 (15:24 +0000)]
Add the missing __isl_give to MemoryAccess::getAccessRelation

llvm-svn: 261215

8 years agoFixed comments formatting. NFC.
George Rimar [Thu, 18 Feb 2016 15:17:01 +0000 (15:17 +0000)]
Fixed comments formatting. NFC.

llvm-svn: 261214

8 years agoRenamed sh_type -> Type, sh_flags -> Flags in arguments. NFC.
George Rimar [Thu, 18 Feb 2016 14:20:08 +0000 (14:20 +0000)]
Renamed sh_type -> Type, sh_flags -> Flags in arguments. NFC.

llvm-svn: 261213

8 years agoReapply commit r259357 with a fix for PR26629
Matthew Simpson [Thu, 18 Feb 2016 14:14:40 +0000 (14:14 +0000)]
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

8 years ago[mips][microMIPS] Implement TLBINV and TLBINVF instructions
Zlatko Buljan [Thu, 18 Feb 2016 14:10:52 +0000 (14:10 +0000)]
[mips][microMIPS] Implement TLBINV and TLBINVF instructions
Differential Revision: http://reviews.llvm.org/D16849

llvm-svn: 261211

8 years ago[Hexagon] Add support for __builtin_prefetch
Krzysztof Parzyszek [Thu, 18 Feb 2016 13:58:38 +0000 (13:58 +0000)]
[Hexagon] Add support for __builtin_prefetch

llvm-svn: 261210

8 years ago[OPENMP] Fix codegen for lastprivate loop counters.
Alexey Bataev [Thu, 18 Feb 2016 13:48:15 +0000 (13:48 +0000)]
[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

8 years ago[Hexagon] Update the callee-saved register set for EH-aware functions
Krzysztof Parzyszek [Thu, 18 Feb 2016 13:41:05 +0000 (13:41 +0000)]
[Hexagon] Update the callee-saved register set for EH-aware functions

llvm-svn: 261208

8 years agoAdd parentheses around arithmetic in operand of '|'.
Benjamin Kramer [Thu, 18 Feb 2016 13:23:17 +0000 (13:23 +0000)]
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

8 years ago[LLDB][MIPS] Provide CPU string to compiler for appropriate code generation for MIPS
Bhushan D. Attarde [Thu, 18 Feb 2016 11:53:28 +0000 (11:53 +0000)]
[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

8 years agoImprove the handling of missing elf symtab and missing symbol sizes
Tamas Berghammer [Thu, 18 Feb 2016 11:12:18 +0000 (11:12 +0000)]
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

8 years ago[analyzer] Add --force-analyze-debug-code option to scan-build
Yury Gribov [Thu, 18 Feb 2016 11:08:46 +0000 (11:08 +0000)]
[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

8 years ago[PM] Port the PostOrderFunctionAttrs pass to the new pass manager and
Chandler Carruth [Thu, 18 Feb 2016 11:03:11 +0000 (11:03 +0000)]
[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

8 years ago[Renderscript] Refactor .rs.info parser.
Aidan Dodds [Thu, 18 Feb 2016 10:59:46 +0000 (10:59 +0000)]
[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

8 years ago[X86][SSE] Improve PSHUFB shuffle mask decoding.
Simon Pilgrim [Thu, 18 Feb 2016 10:17:40 +0000 (10:17 +0000)]
[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

8 years agoMinor code cleanup. NFC.
Junmo Park [Thu, 18 Feb 2016 10:09:20 +0000 (10:09 +0000)]
Minor code cleanup. NFC.

llvm-svn: 261200

8 years agoTest commit access.
Nikolay Haustov [Thu, 18 Feb 2016 10:02:12 +0000 (10:02 +0000)]
Test commit access.

llvm-svn: 261199

8 years ago[AVX512][PRORQ][PRORD] Change imm8 to int
Michael Zuckerman [Thu, 18 Feb 2016 09:52:12 +0000 (09:52 +0000)]
[AVX512][PRORQ][PRORD] Change imm8 to int

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

llvm-svn: 261198

8 years ago[PM/AA] Teach the new pass manager to use pass-by-lambda for registering
Chandler Carruth [Thu, 18 Feb 2016 09:45:17 +0000 (09:45 +0000)]
[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

8 years ago[CLANG] [AVX512] [BUILTIN] Adding pmovsx{b|d|w}{w|d|q}{128|256|512} builtin to clang
Michael Zuckerman [Thu, 18 Feb 2016 09:09:34 +0000 (09:09 +0000)]
[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

8 years ago[MSVC] Turn C++ EH on my default
David Majnemer [Thu, 18 Feb 2016 08:15:05 +0000 (08:15 +0000)]
[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

8 years agoMake a stub version of MITests, instead of reverting.
NAKAMURA Takumi [Thu, 18 Feb 2016 07:37:17 +0000 (07:37 +0000)]
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

8 years ago[compiler-rt] Return correct size of struct pthread for glibc-2.12.2
Jonas Hahnfeld [Thu, 18 Feb 2016 07:08:26 +0000 (07:08 +0000)]
[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

8 years agoSema: provide an extension warning for enable_if
Saleem Abdulrasool [Thu, 18 Feb 2016 06:49:31 +0000 (06:49 +0000)]
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

8 years ago[Parse] Make sure we don't forget to diagnose typos in exprs
David Majnemer [Thu, 18 Feb 2016 06:37:44 +0000 (06:37 +0000)]
[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

8 years ago[WebAssembly] Don't use setRequiresStructuredCFG(true).
Dan Gohman [Thu, 18 Feb 2016 06:32:53 +0000 (06:32 +0000)]
[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

8 years agoRevert "LiveIntervalAnalysis: Remove LiveVariables requirement" and LiveIntervalTest
Matthias Braun [Thu, 18 Feb 2016 05:21:43 +0000 (05:21 +0000)]
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

8 years ago[TableGen,X86] Add NDEBUG check to a variable initialization that's only used by...
Craig Topper [Thu, 18 Feb 2016 04:54:32 +0000 (04:54 +0000)]
[TableGen,X86] Add NDEBUG check to a variable initialization that's only used by asserts. NFC

llvm-svn: 261188

8 years ago[TableGen,X86] Remove extra optional operand from RawFrm. RawFrm with 2 immediates...
Craig Topper [Thu, 18 Feb 2016 04:54:29 +0000 (04:54 +0000)]
[TableGen,X86] Remove extra optional operand from RawFrm. RawFrm with 2 immediates is handled by RawFrmImm8/RawFrmImm16.

llvm-svn: 261187

8 years ago[AMDGPU] Disassembler: Added basic disassembler for AMDGPU target
Tom Stellard [Thu, 18 Feb 2016 03:42:32 +0000 (03:42 +0000)]
[AMDGPU] Disassembler: Added basic disassembler for AMDGPU target

Changes:

- Added disassembler project
- Fixed all decoding conflicts in .td files
- Added DecoderMethod=“NONE” option to Target.td that allows to
  disable decoder generation for an instruction.
- Created decoding functions for VS_32 and VReg_32 register classes.
- Added stubs for decoding all register classes.
- Added several tests for disassembler

Disassembler only supports:

- VI subtarget
- VOP1 instruction encoding
- 32-bit register operands and inline constants

[Valery]

One of the point that requires to pay attention to is how decoder
conflicts were resolved:

- Groups of target instructions were separated by using different
  DecoderNamespace (SICI, VI, CI) using similar to AssemblerPredicate
  approach.

- There were conflicts in IMAGE_<> instructions caused by two
  different reasons:

1. dmask wasn’t specified for the output (fixed)
2. There are image instructions that differ only by the number of
   the address components but have the same encoding by the HW spec. The
   actual number of address components is determined by the HW at runtime
   using image resource descriptor starting from the VGPR encoded in an
   IMAGE instruction. This means that we should choose only one instruction
   from conflicting group to be the rule for decoder. I didn’t find the way
   to disable decoder generation for an arbitrary instruction and therefore
   made a onelinear fix to tablegen generator that would suppress decoder
   generation when DecoderMethod is set to “NONE”. This is a change that
   should be reviewed and submitted first. Otherwise I would need to
   specify different DecoderNamespace for every instruction in the
   conflicting group. I haven’t checked yet if DecoderMethod=“NONE” is not
   used in other targets.
3. IMAGE_GATHER decoder generation is for now disabled and to be
   done later.

[/Valery]

Patch By: Sam Kolton

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

llvm-svn: 261185

8 years ago[libFuzzer] fix the libFuzzer bot
Kostya Serebryany [Thu, 18 Feb 2016 02:02:40 +0000 (02:02 +0000)]
[libFuzzer] fix the libFuzzer bot

llvm-svn: 261184

8 years agoAdd usage instructions for TypeSystemMap::AddToMap.
Jim Ingham [Thu, 18 Feb 2016 01:28:22 +0000 (01:28 +0000)]
Add usage instructions for TypeSystemMap::AddToMap.

llvm-svn: 261183

8 years ago[sanitizer-coverage] allow -fsanitize-coverage=trace-pc w/o any other sanitizer and...
Kostya Serebryany [Thu, 18 Feb 2016 00:49:23 +0000 (00:49 +0000)]
[sanitizer-coverage] allow -fsanitize-coverage=trace-pc w/o any other sanitizer and w/o ...=[func,bb,edge]. This makes this syntax a superset of the GCC's syntax

llvm-svn: 261182

8 years agoCommit tests missing from r261180.
Eric Fiselier [Thu, 18 Feb 2016 00:21:09 +0000 (00:21 +0000)]
Commit tests missing from r261180.

llvm-svn: 261181

8 years agoGet <ext/hash_map> working again
Eric Fiselier [Thu, 18 Feb 2016 00:20:34 +0000 (00:20 +0000)]
Get <ext/hash_map> working again

llvm-svn: 261180

8 years agoFix Clang-tidy modernize-use-nullptr warnings; other minor fixes.
Eugene Zelenko [Thu, 18 Feb 2016 00:10:17 +0000 (00:10 +0000)]
Fix Clang-tidy modernize-use-nullptr warnings; other minor fixes.

llvm-svn: 261179

8 years ago[sanitizer-coverage] add a deprecation warning for -fsanitize-coverage=[1234]
Kostya Serebryany [Wed, 17 Feb 2016 23:57:17 +0000 (23:57 +0000)]
[sanitizer-coverage] add a deprecation warning for -fsanitize-coverage=[1234]

llvm-svn: 261178

8 years agoAdd upport for bitcast in the C API echo test
Amaury Sechet [Wed, 17 Feb 2016 23:55:59 +0000 (23:55 +0000)]
Add upport for bitcast in the C API echo test

llvm-svn: 261177

8 years ago[WebAssembly] Disable register stackification and coloring when not optimizing
Derek Schuff [Wed, 17 Feb 2016 23:20:43 +0000 (23:20 +0000)]
[WebAssembly] Disable register stackification and coloring when not optimizing

These passes are optimizations, and should be disabled when not
optimizing.
Also create an MCCodeGenInfo so the opt level is correctly plumbed to
the backend pass manager.
Also remove the command line flag for disabling register coloring;
running llc with -O0 should now be useful for debugging, so it's not
necessary.

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

llvm-svn: 261176

8 years agoAArch64: always clear kill flags up to last eliminated copy
Tim Northover [Wed, 17 Feb 2016 23:07:04 +0000 (23:07 +0000)]
AArch64: always clear kill flags up to last eliminated copy

After r261154, we were only clearing flags if the known-zero register was
originally live-in to the basic block, but we have to do it even if not when
more than one COPY has been eliminated, otherwise the user of the first COPY
may still have <kill> marked.

E.g.

BB#N:
    %X0 = COPY %XZR
    STRXui %X0<kill>, <fi#0>
    %X0 = COPY %XZR
    STRXui %X0<kill>, <fi#1>

We can eliminate both copies, X0 is not live-in, but we must clear the kill on
the first store.

Unfortunately, I've been unable to come up with a non-fragile test for this.
I've only seen it in the wild with regalloc-created spills, and attempts to
reproduce that in a reasonable way run afoul of COPY coalescing. Even volatile
asm clobbers were moved around. Should fix the aarch64 bot though.

llvm-svn: 261175

8 years agoAdd support for memory operations (load/store/gep) in C API echo test
Amaury Sechet [Wed, 17 Feb 2016 22:51:03 +0000 (22:51 +0000)]
Add support for memory operations (load/store/gep) in C API echo test

Summary: As per title.

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

Subscribers: llvm-commits

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

llvm-svn: 261174

8 years ago[DebugInfoPDB] A few cleanups on PDB Variant class.
Zachary Turner [Wed, 17 Feb 2016 22:46:33 +0000 (22:46 +0000)]
[DebugInfoPDB] A few cleanups on PDB Variant class.

Also implements the PDBSymbolCompilandEnv::getValue() method,
which until now had been unimplemented specifically because
variant did not support string values.

llvm-svn: 261173

8 years agoMove LLVMCreateTargetData and LLVMDisposeTargetData together. NFC
Amaury Sechet [Wed, 17 Feb 2016 22:41:09 +0000 (22:41 +0000)]
Move LLVMCreateTargetData and LLVMDisposeTargetData together. NFC

llvm-svn: 261172

8 years agoDon't crash w/ a diagnostic range containing a null byte
David Majnemer [Wed, 17 Feb 2016 22:37:45 +0000 (22:37 +0000)]
Don't crash w/ a diagnostic range containing a null byte

We prematurely ended the line at the null byte which caused us to crash
down stream because we tried to reason about columns beyond the end of
the line.

llvm-svn: 261171

8 years ago[readobj] Remove uneeded braces in case statement.
Michael J. Spencer [Wed, 17 Feb 2016 22:30:41 +0000 (22:30 +0000)]
[readobj] Remove uneeded braces in case statement.

llvm-svn: 261170