platform/upstream/llvm.git
8 years agoAdd modules downloaded by ModuleCache to the global ModuleList
Tamas Berghammer [Thu, 10 Dec 2015 17:08:23 +0000 (17:08 +0000)]
Add modules downloaded by ModuleCache to the global ModuleList

Adding the modules to the global module list eleminate issues in the
case when a module is unloaded from the target but some object (e.g.
breakpoint) still referencing them with weak pointers. It also speeds
up the case when we load, unload, load the same shared library because
the global module cache will keep the parsed debug info around between
the 2 load (this scenario happens for some code on android).

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

llvm-svn: 255260

8 years ago[ThinLTO] Debug message cleanup (NFC)
Teresa Johnson [Thu, 10 Dec 2015 16:39:07 +0000 (16:39 +0000)]
[ThinLTO] Debug message cleanup (NFC)

Added some missing spaces between the module identifier and the start of
the debug message. Also added a ":" after the module identifier to make
this look a little nicer.

llvm-svn: 255259

8 years agoAvoid undefined behavior when vector is empty.
Rafael Espindola [Thu, 10 Dec 2015 16:35:06 +0000 (16:35 +0000)]
Avoid undefined behavior when vector is empty.

Found by ubsan.

llvm-svn: 255258

8 years agoremove duplicated comments and don't repeat function names in comments; NFC
Sanjay Patel [Thu, 10 Dec 2015 16:34:21 +0000 (16:34 +0000)]
remove duplicated comments and don't repeat function names in comments; NFC

llvm-svn: 255257

8 years ago[ThinLTO] Release files in gold plugin during combined index (take 2)
Teresa Johnson [Thu, 10 Dec 2015 16:11:23 +0000 (16:11 +0000)]
[ThinLTO] Release files in gold plugin during combined index (take 2)

Ensure we release the files even when they don't hold a function index
summary section, by restructuring the control flow a little bit.

llvm-svn: 255256

8 years ago[WebAssembly] Tighten up several CHECK tests.
Dan Gohman [Thu, 10 Dec 2015 14:52:34 +0000 (14:52 +0000)]
[WebAssembly] Tighten up several CHECK tests.

llvm-svn: 255255

8 years agoSlit lib/Linker in two.
Rafael Espindola [Thu, 10 Dec 2015 14:19:35 +0000 (14:19 +0000)]
Slit lib/Linker in two.

A linker normally has two stages: symbol resolution and "moving stuff".

In lib/Linker there is the complication of lazy linking some globals,
but it was still far more mixed than it needed to.

This splits the linker into a lower level IRMover and the linker proper.
The IRMover just takes a list of globals to move and a callback that
lets the user control what is lazy linked.

The main motivation is that now tools/gold (and soon lld) can use their
own symbol resolution to instruct IRMover what to do.

llvm-svn: 255254

8 years ago[WebAssembly] Make WebAssemblyStoreResults only return true when it has a change.
Dan Gohman [Thu, 10 Dec 2015 14:17:36 +0000 (14:17 +0000)]
[WebAssembly] Make WebAssemblyStoreResults only return true when it has a change.

llvm-svn: 255253

8 years ago[WebAssembly] Fix WebAssemblyPeephole to set Changed to true when making changes.
Dan Gohman [Thu, 10 Dec 2015 14:16:34 +0000 (14:16 +0000)]
[WebAssembly] Fix WebAssemblyPeephole to set Changed to true when making changes.

llvm-svn: 255252

8 years ago[WebAssembly] Declare that WebAssemblyPeephole does not modify the CFG.
Dan Gohman [Thu, 10 Dec 2015 14:12:04 +0000 (14:12 +0000)]
[WebAssembly] Declare that WebAssemblyPeephole does not modify the CFG.

llvm-svn: 255251

8 years ago[WebAssembly] Remove an unneeded getAnalysisUsage override.
Dan Gohman [Thu, 10 Dec 2015 14:10:04 +0000 (14:10 +0000)]
[WebAssembly] Remove an unneeded getAnalysisUsage override.

llvm-svn: 255250

8 years agoAdd --version-script= alias for --version-script
Ed Maste [Thu, 10 Dec 2015 14:08:45 +0000 (14:08 +0000)]
Add --version-script= alias for --version-script

llvm-svn: 255249

8 years agoAdd a license clarification for use of links and titles of CERT secure coding guidelines.
Aaron Ballman [Thu, 10 Dec 2015 13:53:36 +0000 (13:53 +0000)]
Add a license clarification for use of links and titles of CERT secure coding guidelines.

llvm-svn: 255248

8 years ago[DeadStoreElimination] Add support for non-local DSE.
Chad Rosier [Thu, 10 Dec 2015 13:51:43 +0000 (13:51 +0000)]
[DeadStoreElimination] Add support for non-local DSE.

We extend the search for redundant stores to predecessor blocks that
unconditionally lead to the block BB with the current store instruction.  That
also includes single-block loops that unconditionally lead to BB, and
if-then-else blocks where then- and else-blocks unconditionally lead to BB.

http://reviews.llvm.org/D13363
Patch by Ivan Baev <ibaev@codeaurora.org>!

llvm-svn: 255247

8 years agoBitcasts between FP and INT values using direct moves
Nemanja Ivanovic [Thu, 10 Dec 2015 13:35:28 +0000 (13:35 +0000)]
Bitcasts between FP and INT values using direct moves

This patch corresponds to review:
http://reviews.llvm.org/D15286

LLVM IR frequently contains bitcast operations between floating point and
integer values of the same width. Doing this through memory operations is
quite expensive on PPC. This patch allows the use of direct register moves
between FPRs and GPRs for lowering bitcasts.

llvm-svn: 255246

8 years agoMacro debug info support in LLVM IR
Amjad Aboud [Thu, 10 Dec 2015 12:56:35 +0000 (12:56 +0000)]
Macro debug info support in LLVM IR
Introduced DIMacro and DIMacroFile debug info metadata in the LLVM IR to support macros.

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

llvm-svn: 255245

8 years ago[NFC] Improve a comment from my previous commit (r255221)
Faisal Vali [Thu, 10 Dec 2015 12:29:11 +0000 (12:29 +0000)]
[NFC] Improve a comment from my previous commit (r255221)

llvm-svn: 255244

8 years ago[clang-tidy] Sort includes case-sensitively.
Alexander Kornienko [Thu, 10 Dec 2015 12:24:19 +0000 (12:24 +0000)]
[clang-tidy] Sort includes case-sensitively.

The motivation is:
  1. consistency with clang-format, vim :sort etc.
  2. we don't want the tools to depend on the current locale to do the include
     sorting

llvm-svn: 255243

8 years ago[asan] Use atomic_uintptr_t instead of atomic_uint64_t in SuppressErrorReport.
Yury Gribov [Thu, 10 Dec 2015 11:07:19 +0000 (11:07 +0000)]
[asan] Use atomic_uintptr_t instead of atomic_uint64_t in SuppressErrorReport.

Some targets (e.g. Mips) don't have 64-bit atomics, so using atomic_uint64_t
leads to build failures. Use atomic_uintptr_t to avoid such errors.

Patch by Max Ostapenko.

llvm-svn: 255242

8 years ago[LLE] Use the PredicatedScalarEvolution interface to query SCEVs for dependences
Silviu Baranga [Thu, 10 Dec 2015 11:07:18 +0000 (11:07 +0000)]
[LLE] Use the PredicatedScalarEvolution interface to query SCEVs for dependences

Summary:
LAA uses the PredicatedScalarEvolution interface, so it can produce
forward/backward dependences having SCEVs that are AddRecExprs only after being
transformed by PredicatedScalarEvolution.

Use PredicatedScalarEvolution to get the expected expressions.

Reviewers: anemet

Subscribers: llvm-commits, sanjoy

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

llvm-svn: 255241

8 years agoSwitch to gold linker on android x86, x86_64, arm
Tamas Berghammer [Thu, 10 Dec 2015 11:02:51 +0000 (11:02 +0000)]
Switch to gold linker on android x86, x86_64, arm

These architectures already using the gold linker for the android
framework and switching to gold gives us the opportunity to enable ICF.

Safe ICF (identical code folding) reduces the size of an optimized and
striped binary by ~5%.

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

llvm-svn: 255240

8 years ago[RenderScript] Refactor condition deciding when to JIT RS runtime
Ewan Crawford [Thu, 10 Dec 2015 10:20:39 +0000 (10:20 +0000)]
[RenderScript] Refactor condition deciding when to JIT RS runtime

Patch creates a member function that decides when to JIT all the details about an allocation.
By checking for zero pointers we can avoid the situation where we store uninitialised data from previously inspecting the allocation during creation.

llvm-svn: 255238

8 years agoDifferential Revision: http://reviews.llvm.org/D15333
Aidan Dodds [Thu, 10 Dec 2015 10:11:49 +0000 (10:11 +0000)]
Differential Revision: reviews.llvm.org/D15333

llvm-svn: 255237

8 years ago[analyzer] Fix symbolic element index lifetime.
Artem Dergachev [Thu, 10 Dec 2015 09:28:06 +0000 (09:28 +0000)]
[analyzer] Fix symbolic element index lifetime.

SymbolReaper was destroying the symbol too early when it was referenced only
from an index SVal of a live ElementRegion.

In order to test certain aspects of this patch, extend the debug.ExprInspection
checker to allow testing SymbolReaper in a direct manner.

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

llvm-svn: 255236

8 years ago[ELF] - Implemented --print-gc-sections command line argument.
George Rimar [Thu, 10 Dec 2015 09:12:18 +0000 (09:12 +0000)]
[ELF] - Implemented --print-gc-sections command line argument.

List all sections removed by garbage collection. This option is only effective if garbage collection has been enabled via the `--gc-sections' option.

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

llvm-svn: 255235

8 years ago[PostRA scheduling] Allow a target to do scheduling when it wants post RA.
Jonas Paulsson [Thu, 10 Dec 2015 09:10:07 +0000 (09:10 +0000)]
[PostRA scheduling] Allow a target to do scheduling when it wants post RA.

SystemZ needs to do its scheduling after branch relaxation, which can
only happen after block placement, and therefore the standard
PostRAScheduler point in the pass sequence is too early.

TargetMachine::targetSchedulesPostRAScheduling() is a new method that
signals on returning true that target will insert the final scheduling
pass on its own.

Reviewed by Hal Finkel

llvm-svn: 255234

8 years ago[ELF] - Resolve R_386_PLT32 statically in some cases.
George Rimar [Thu, 10 Dec 2015 09:03:39 +0000 (09:03 +0000)]
[ELF] - Resolve R_386_PLT32 statically in some cases.

If R_386_PLT32 relocation is applied against symbol that can not be preempted then it can be resolved statically.
Patch implements it for x86 target.

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

llvm-svn: 255233

8 years ago[Sema] Use UnaryOperatorKind and BinaryOperatorKind in parameter lists instead of...
Craig Topper [Thu, 10 Dec 2015 08:51:49 +0000 (08:51 +0000)]
[Sema] Use UnaryOperatorKind and BinaryOperatorKind in parameter lists instead of just unsigned. Removes a few explicit casts. NFC

llvm-svn: 255232

8 years agoAdd parentheses to suppress a -Wparentheses warning.
Craig Topper [Thu, 10 Dec 2015 08:49:55 +0000 (08:49 +0000)]
Add parentheses to suppress a -Wparentheses warning.

llvm-svn: 255231

8 years ago[asan] Move halt_on_error_suppress_equal_pcs.cc to Posix directory.
Yury Gribov [Thu, 10 Dec 2015 08:34:28 +0000 (08:34 +0000)]
[asan] Move halt_on_error_suppress_equal_pcs.cc to Posix directory.

Patch by Max Ostapenko.

llvm-svn: 255230

8 years ago[OPENMP] Fixed processing of predetermined data-sharing attributes
Alexey Bataev [Thu, 10 Dec 2015 08:20:58 +0000 (08:20 +0000)]
[OPENMP] Fixed processing of predetermined data-sharing attributes
Predetermined data-shared attributes for local variables are now considered as implicit. Also, patch prohibits changin of DSA for static memebers of classes.

llvm-svn: 255229

8 years ago[asan] Suppress duplicated errors in ASan recovery mode.
Yury Gribov [Thu, 10 Dec 2015 08:08:53 +0000 (08:08 +0000)]
[asan] Suppress duplicated errors in ASan recovery mode.

Patch by Max Ostapenko.

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

llvm-svn: 255228

8 years agoRevert r255137.
Akira Hatanaka [Thu, 10 Dec 2015 08:00:52 +0000 (08:00 +0000)]
Revert r255137.

This commit broke apple's internal bot.

llvm-svn: 255227

8 years agoAdd arg_begin() and arg_end() to CallInst and InvokeInst; NFCI
Sanjoy Das [Thu, 10 Dec 2015 06:39:02 +0000 (06:39 +0000)]
Add arg_begin() and arg_end() to CallInst and InvokeInst; NFCI

 - This simplifies the CallSite class, arg_begin / arg_end are now
   simple wrapper getters.

 - In several places, we were creating CallSite instances solely to call
   arg_begin and arg_end.  With this change, that's no longer required.

llvm-svn: 255226

8 years agolibclang: correct inverted logic
Saleem Abdulrasool [Thu, 10 Dec 2015 06:30:23 +0000 (06:30 +0000)]
libclang: correct inverted logic

The complete dtor is only emitted when there is a virtual destructor.  The test
itself was incorrect, so the issue in the code was not noticed.

llvm-svn: 255225

8 years ago[X86] Fix a couple cases were bitwise and logical operations were being mixed. NFC
Craig Topper [Thu, 10 Dec 2015 06:09:41 +0000 (06:09 +0000)]
[X86] Fix a couple cases were bitwise and logical operations were being mixed. NFC

llvm-svn: 255224

8 years ago[OPENMP] Make -fopenmp to turn on OpenMP support by default, clang part
Alexey Bataev [Thu, 10 Dec 2015 05:47:10 +0000 (05:47 +0000)]
[OPENMP] Make -fopenmp to turn on OpenMP support by default, clang part
Patch turns on OpenMP support in clang by default after fixing OpenMP buildbots.
Differential Revision: http://reviews.llvm.org/D13803

llvm-svn: 255223

8 years ago[OPENMP] Make -fopenmp to turn on OpenMP support by default.
Alexey Bataev [Thu, 10 Dec 2015 05:45:58 +0000 (05:45 +0000)]
[OPENMP] Make -fopenmp to turn on OpenMP support by default.
Patch turns on OpenMP support in clang by default after fixing OpenMP buildbots.
Differential Revision: http://reviews.llvm.org/D13802

llvm-svn: 255222

8 years agoFix PR24694 (CWG1591): Deducing array bound and element type from initializer list
Faisal Vali [Thu, 10 Dec 2015 05:36:39 +0000 (05:36 +0000)]
Fix PR24694 (CWG1591): Deducing array bound and element type from initializer list
https://llvm.org/bugs/show_bug.cgi?id=24694
http://wg21.link/cwg1591

Teach DeduceFromInitializerList in SemaTemplateDeduction.cpp to deduce against array (constant and dependent sized) parameters (really, reference to arrays since they don't decay to pointers), by checking if the template parameter is either one of those kinds of arrays, and if so, deducing each initializer list element against the element type, and then deducing the array bound if needed.

In brief, this patch enables the following code:
template<class T, int N> int *f(T (&&)[N]);
int *ip = f({1, 2, 3});

llvm-svn: 255221

8 years ago[WebAssembly] Implement mixed-type ISD::FCOPYSIGN.
Dan Gohman [Thu, 10 Dec 2015 04:55:31 +0000 (04:55 +0000)]
[WebAssembly] Implement mixed-type ISD::FCOPYSIGN.

ISD::FCOPYSIGN permits its operands to have differing types, and DAGCombiner
uses this. Add some def : Pat rules to expand this out into an explicit
conversion and a normal copysign operation.

llvm-svn: 255220

8 years ago[WebAssembly] Implement fma.
Dan Gohman [Thu, 10 Dec 2015 04:52:33 +0000 (04:52 +0000)]
[WebAssembly] Implement fma.

It is lowered to a libcall for now, but this is expected to change in the future.

llvm-svn: 255219

8 years ago[MSVC] Fix for http://llvm.org/PR25636: indexed accessor property not supported corre...
Alexey Bataev [Thu, 10 Dec 2015 04:38:18 +0000 (04:38 +0000)]
[MSVC] Fix for llvm.org/PR25636: indexed accessor property not supported correctly.
All problems described in http://llvm.org/PR25636 are implemented except for return value of the 'put' property. This patch fixes this problem with the indexed properties
Differential Revision: http://reviews.llvm.org/D15174

llvm-svn: 255218

8 years agoAMDGPU/SI: Fix warning introduced by r255204
Tom Stellard [Thu, 10 Dec 2015 03:10:46 +0000 (03:10 +0000)]
AMDGPU/SI: Fix warning introduced by r255204

llvm-svn: 255205

8 years agoAMDGPU/SI: Emit constant arrays in the .text section
Tom Stellard [Thu, 10 Dec 2015 02:13:01 +0000 (02:13 +0000)]
AMDGPU/SI: Emit constant arrays in the .text section

Summary:
This allows us to remove the END_OF_TEXT_LABEL hack we had been using
and simplifies the fixups used to compute the address of constant
arrays.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 255204

8 years agoAMDGPU/SI: Add support for sgpr and vgpr inline assembly constraints
Tom Stellard [Thu, 10 Dec 2015 02:12:53 +0000 (02:12 +0000)]
AMDGPU/SI: Add support for sgpr and vgpr inline assembly constraints

Summary: The 's' constraint represents sgprs and the 'v' constraint represents vgprs.

Reviewers: arsenm, echristo

Subscribers: arsenm, llvm-commits

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

llvm-svn: 255203

8 years ago[WebAssembly] Fix legalization of f32->f64 EXTLOAD.
Dan Gohman [Thu, 10 Dec 2015 02:07:53 +0000 (02:07 +0000)]
[WebAssembly] Fix legalization of f32->f64 EXTLOAD.

llvm-svn: 255202

8 years agoMark MS inline ASM 'nodplicate' it it has labels (PR23715)
Hans Wennborg [Thu, 10 Dec 2015 01:38:04 +0000 (01:38 +0000)]
Mark MS inline ASM 'nodplicate' it it has labels (PR23715)

Duplicating it can lead to labels being defined twice.

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

llvm-svn: 255201

8 years agoFix a typo in the clang user manual.
Yunzhong Gao [Thu, 10 Dec 2015 01:37:18 +0000 (01:37 +0000)]
Fix a typo in the clang user manual.
-fmax-unknown-pointer-align => -fmax-type-align

llvm-svn: 255200

8 years agoThere were problems if a relative path is used for an include path, the path will...
John Thompson [Thu, 10 Dec 2015 01:33:09 +0000 (01:33 +0000)]
There were problems if a relative path is used for an include path, the path will be normalized to ./xxx.  I don't know how to test this in a way that will work in a separated source/output environment, but it seems reasonable to assume that -I options won't be for provate directories.

llvm-svn: 255199

8 years agoPR25416: Improve performance of processing inline assembly consisting of many
Richard Smith [Thu, 10 Dec 2015 01:11:47 +0000 (01:11 +0000)]
PR25416: Improve performance of processing inline assembly consisting of many
implicitly-concatenated string literals. When looking for the start of a token
in the inline assembly, start from the end of the previous token, not the start
of the entire string.

Patch by Yunlian Jiang!

llvm-svn: 255198

8 years ago[WebAssembly] Update known test failures
Derek Schuff [Thu, 10 Dec 2015 01:09:40 +0000 (01:09 +0000)]
[WebAssembly] Update known test failures

We can now select sign_extend_inreg

llvm-svn: 255197

8 years ago[Lit Test] Updated 20 Lit tests to be C++11 compatible.
Charles Li [Thu, 10 Dec 2015 01:07:17 +0000 (01:07 +0000)]
[Lit Test] Updated 20 Lit tests to be C++11 compatible.

This is the 5th Lit test patch.
Expanded expected diagnostics to vary by C++ dialect.
Expanded RUN line to: default, C++98/03 and C++11.

llvm-svn: 255196

8 years agoRegisterPressure: Factor out liveness dead-def detection logic; NFCI
Matthias Braun [Thu, 10 Dec 2015 01:04:15 +0000 (01:04 +0000)]
RegisterPressure: Factor out liveness dead-def detection logic; NFCI

Detecting additional dead-defs without a dead flag that are only visible
through liveness information should be part of the register operand
collection not intertwined with the register pressure update logic.

llvm-svn: 255192

8 years ago[WebAssembly] Also legalize sign_extend_inreg of i32->i64.
Dan Gohman [Thu, 10 Dec 2015 01:00:19 +0000 (01:00 +0000)]
[WebAssembly] Also legalize sign_extend_inreg of i32->i64.

llvm-svn: 255191

8 years ago[WebAssembly] Update test failure expectations
Derek Schuff [Thu, 10 Dec 2015 00:56:18 +0000 (00:56 +0000)]
[WebAssembly] Update test failure expectations

llvm-svn: 255190

8 years agoReplace cmake check for printf with a check for fopen.
Evgeniy Stepanov [Thu, 10 Dec 2015 00:47:50 +0000 (00:47 +0000)]
Replace cmake check for printf with a check for fopen.

Printf is a builtin, and the check fails with -Werror because of a clang
warning about an incompatible redeclaration.

llvm-svn: 255189

8 years agoReplace cmake check for printf with a check for fopen.
Evgeniy Stepanov [Thu, 10 Dec 2015 00:47:08 +0000 (00:47 +0000)]
Replace cmake check for printf with a check for fopen.

Printf is a builtin, and the check fails with -Werror because of a clang
warning about an incompatible redeclaration.

llvm-svn: 255188

8 years agoReplace cmake check for printf with a check for fopen.
Evgeniy Stepanov [Thu, 10 Dec 2015 00:45:18 +0000 (00:45 +0000)]
Replace cmake check for printf with a check for fopen.

Printf is a builtin, and the check fails with -Werror because of a clang
warning about an incompatible redeclaration.

llvm-svn: 255187

8 years agoReplace cmake check for printf with a check for fopen.
Evgeniy Stepanov [Thu, 10 Dec 2015 00:44:42 +0000 (00:44 +0000)]
Replace cmake check for printf with a check for fopen.

Printf is a builtin, and the check fails with -Werror because of a clang
warning about an incompatible redeclaration.

llvm-svn: 255186

8 years agoRemove redundant _LIBCPP_ALWAYS_INLINE attribute from __convert_to_integral overloads
Eric Fiselier [Thu, 10 Dec 2015 00:43:37 +0000 (00:43 +0000)]
Remove redundant _LIBCPP_ALWAYS_INLINE attribute from __convert_to_integral overloads

llvm-svn: 255185

8 years agoRevert "[CMake] Provide options for toggling on and off various runtime libraries."
Chris Bieneman [Thu, 10 Dec 2015 00:40:58 +0000 (00:40 +0000)]
Revert "[CMake] Provide options for toggling on and off various runtime libraries."

This reverts r255170. This change caused a bunch of bot failures and needs to be revised.

llvm-svn: 255184

8 years ago[CMake] [Darwin] Log architecture test failures to CMakeError.log
Chris Bieneman [Thu, 10 Dec 2015 00:39:57 +0000 (00:39 +0000)]
[CMake] [Darwin] Log architecture test failures to CMakeError.log

This makes debugging configuration issues way easier.

llvm-svn: 255183

8 years agoPeepholeOptimizer: Ignore dead implicit defs
Dan Gohman [Thu, 10 Dec 2015 00:37:51 +0000 (00:37 +0000)]
PeepholeOptimizer: Ignore dead implicit defs

Target-specific instructions may have uninteresting physreg clobbers,
for target-specific reasons. The peephole pass doesn't need to concern
itself with such defs, as long as they're implicit and marked as dead.

llvm-svn: 255182

8 years ago[WebAssembly] Fix legalization of shift operators with illegal types.
Dan Gohman [Thu, 10 Dec 2015 00:26:26 +0000 (00:26 +0000)]
[WebAssembly] Fix legalization of shift operators with illegal types.

llvm-svn: 255181

8 years ago[WebAssembly] Fix copy+pastos.
Dan Gohman [Thu, 10 Dec 2015 00:22:40 +0000 (00:22 +0000)]
[WebAssembly] Fix copy+pastos.

llvm-svn: 255180

8 years ago[WebAssembly] Implement anyext.
Dan Gohman [Thu, 10 Dec 2015 00:17:35 +0000 (00:17 +0000)]
[WebAssembly] Implement anyext.

llvm-svn: 255179

8 years ago[lld][MachO] Always reserve space for the empty string in the mach-o symbol
Lang Hames [Thu, 10 Dec 2015 00:12:24 +0000 (00:12 +0000)]
[lld][MachO] Always reserve space for the empty string in the mach-o symbol
table.

The first entry in the MachO symbol table is always the empty string: make sure
we reserve space for it, or we will overflow the symbol table by one byte.

No test case - this manifests as an occasional memory error. In the near future
I hope to set up a bot building and runnnig LLD with sanitizers - that should
catch future instances of this issue.

llvm-svn: 255178

8 years agoRemove visibility attributes from out-of-class method definitions in iostreams.
Evgeniy Stepanov [Wed, 9 Dec 2015 23:42:30 +0000 (23:42 +0000)]
Remove visibility attributes from out-of-class method definitions in iostreams.

No point in pretending that these methods are hidden - they are
actually exported from libc++.so. Extern template declarations make
them part of libc++ ABI.

This patch does not change libc++.so export list (at least on Linux).

llvm-svn: 255177

8 years agoFix crash on invalid initialization with std::initializer_list
Reid Kleckner [Wed, 9 Dec 2015 23:18:38 +0000 (23:18 +0000)]
Fix crash on invalid initialization with std::initializer_list

It is possible for CheckListElementTypes to fail without filling in any
initializer list elements.

llvm-svn: 255176

8 years ago[X86] Enable shrink-wrapping by default, but keep it disabled for stack frames
Quentin Colombet [Wed, 9 Dec 2015 23:08:18 +0000 (23:08 +0000)]
[X86] Enable shrink-wrapping by default, but keep it disabled for stack frames
without a frame pointer when unwind may happen.
This is a workaround for a bug in the way we emit the CFI directives for
frameless unwind information. See PR25614.

llvm-svn: 255175

8 years agoObjective-C properties: loosen 'atomic' checking for readonly properties.
Douglas Gregor [Wed, 9 Dec 2015 22:57:32 +0000 (22:57 +0000)]
Objective-C properties: loosen 'atomic' checking for readonly properties.

r251874 reworked the way we handle properties declared within
Objective-C class extensions, which had the effective of tightening up
property checking in a number of places. In this particular class of
cases, we end up complaining about "atomic" mismatches between an
implicitly-atomic, readonly property and a nonatomic, readwrite
property, which doesn't make sense because "atomic" is essentially
irrelevant to readonly properties.

Therefore, suppress this diagnostic when the readonly property is
implicitly atomic. Fixes rdar://problem/23803109.

llvm-svn: 255174

8 years ago[PGO] Add cmake check to determine atomics op availability
Xinliang David Li [Wed, 9 Dec 2015 22:46:49 +0000 (22:46 +0000)]
[PGO] Add cmake check to determine atomics op availability

This allows the profile runtime to pick the right impl
for cmp&swap for a given target.

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

llvm-svn: 255173

8 years ago[CMake] Pass CMAKE_MAKE_PROGRAM through to compiler-rt build.
Chris Bieneman [Wed, 9 Dec 2015 22:46:25 +0000 (22:46 +0000)]
[CMake] Pass CMAKE_MAKE_PROGRAM through to compiler-rt build.

This is needed if your make tool is overridden.

llvm-svn: 255172

8 years agouse range-based for loops; NFCI
Sanjay Patel [Wed, 9 Dec 2015 22:45:45 +0000 (22:45 +0000)]
use range-based for loops; NFCI

llvm-svn: 255171

8 years ago[CMake] Provide options for toggling on and off various runtime libraries.
Chris Bieneman [Wed, 9 Dec 2015 22:45:03 +0000 (22:45 +0000)]
[CMake] Provide options for toggling on and off various runtime libraries.

Summary:
Rather than having to add new "experimental" options each time someone wants to work on bringing a sanitizer to a new platform, this patch makes options for all of them.

The default values for the options are set by the platform checks that would have enabled them, but they can be overridden on or off.

Reviewers: kubabrecka, samsonov

Subscribers: llvm-commits

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

llvm-svn: 255170

8 years agoSynchronize the logic for deciding to link a gv.
Rafael Espindola [Wed, 9 Dec 2015 22:44:00 +0000 (22:44 +0000)]
Synchronize the logic for deciding to link a gv.

We were deciding to not link an available_externally gv over a
declaration, but then copying over the body anyway.

llvm-svn: 255169

8 years ago[tsan] Move emptyset/oldset to ThreadSignalContext.
Yabin Cui [Wed, 9 Dec 2015 22:40:31 +0000 (22:40 +0000)]
[tsan] Move emptyset/oldset to ThreadSignalContext.

Summary:
Android doesn't support __thread keyword. So move emptyset/oldset
from THREADLOCAL to ThreadSignalContext.

Reviewers: kcc, eugenis, dvyukov

Subscribers: llvm-commits, tberghammer, danalbert

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

llvm-svn: 255168

8 years ago[tsan] Use REAL(malloc) instead of __libc_malloc for Android.
Yabin Cui [Wed, 9 Dec 2015 22:32:38 +0000 (22:32 +0000)]
[tsan] Use REAL(malloc) instead of __libc_malloc for Android.

Summary:
Android doesn't have __libc_malloc and related allocation
functions. As its dynamic linker doesn't use malloc, so
we can use REAL(malloc) to replace __libc_malloc safely.

Reviewers: kcc, eugenis, dvyukov

Subscribers: llvm-commits, tberghammer, danalbert, srhines

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

llvm-svn: 255167

8 years agoAdd 3 more missing inline/visibility attributes.
Evgeniy Stepanov [Wed, 9 Dec 2015 22:32:36 +0000 (22:32 +0000)]
Add 3 more missing inline/visibility attributes.

These are the cases when an out-of-class definition of a method is
marked _LIBCPP_INLINE_VISIBILITY, but the in-class declaration is
not. This will start failing when (or if) we switch to
attribute((internal_linkage)).

llvm-svn: 255166

8 years agoFix the target specific "-msse3" flag check in CMake. NFC
Sumanth Gundapaneni [Wed, 9 Dec 2015 22:26:38 +0000 (22:26 +0000)]
Fix the target specific "-msse3" flag check in CMake. NFC

msse3 is a target dependent flag and must be guarded as check_cxx_compiler_flag()
checks only for compiler error messages and ignores warnings. Earlier COMPILER_RT_HAS_MSSE3_FLAG
is set to "TRUE" for all targets as clang emits warnings and the compilation spits unnecessary
warnings for non-X86 targets. This issue is fixed by coupling the flag with "-Werror"

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

llvm-svn: 255165

8 years ago[tsan] Disable interceptors not supported in Android.
Yabin Cui [Wed, 9 Dec 2015 22:23:47 +0000 (22:23 +0000)]
[tsan] Disable interceptors not supported in Android.

Reviewers: kcc, eugenis, dvyukov

Subscribers: llvm-commits, tberghammer, danalbert, srhines

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

llvm-svn: 255164

8 years agofix typos; NFC
Sanjay Patel [Wed, 9 Dec 2015 22:16:07 +0000 (22:16 +0000)]
fix typos; NFC

llvm-svn: 255163

8 years agoUse __make_integer_seq builtin for std::make_integer_sequence. Patch by K-ballo.
Eric Fiselier [Wed, 9 Dec 2015 22:03:06 +0000 (22:03 +0000)]
Use __make_integer_seq builtin for std::make_integer_sequence. Patch by K-ballo.

llvm-svn: 255162

8 years agoenable timeout/exceptional exit support for xUnit formatter
Todd Fiala [Wed, 9 Dec 2015 22:02:31 +0000 (22:02 +0000)]
enable timeout/exceptional exit support for xUnit formatter

Also adds enable.py/disable.py script to simplify turning on and off
the issue_verification tests helpful for testing a results formatter.

llvm-svn: 255161

8 years agoasan_win_dynamic_runtime_thunk.cc: declare atexit
Hans Wennborg [Wed, 9 Dec 2015 21:43:03 +0000 (21:43 +0000)]
asan_win_dynamic_runtime_thunk.cc: declare atexit

MSVC apparently makes atexit available even without including stdlib.h,
but clang-cl does not. This makes the file build also with clang-cl.

llvm-svn: 255160

8 years agoPut progress.py back, apparently this can't be deleted.
Zachary Turner [Wed, 9 Dec 2015 21:32:28 +0000 (21:32 +0000)]
Put progress.py back, apparently this can't be deleted.

llvm-svn: 255159

8 years ago[PGO] Rename the profdata filename to avoid the conflict b/w tests.
Rong Xu [Wed, 9 Dec 2015 21:27:59 +0000 (21:27 +0000)]
[PGO] Rename the profdata filename to avoid the conflict b/w tests.

Two tests diag_mismatch.ll and diag_no_funcprofdata.ll generates the same
profdata filename which can conflict in current test runs. This patch
renames them to have different names.

llvm-svn: 255158

8 years agoIR: Make ConstantDataArray::getFP actually return a ConstantDataArray
Justin Bogner [Wed, 9 Dec 2015 21:21:07 +0000 (21:21 +0000)]
IR: Make ConstantDataArray::getFP actually return a ConstantDataArray

The ConstantDataArray::getFP(LLVMContext &, ArrayRef<uint16_t>)
overload has had a typo in it since it was written, where it will
create a Vector instead of an Array. This obviously doesn't work at
all, but it turns out that until r254991 there weren't actually any
callers of this overload. Fix the typo and add some test coverage.

llvm-svn: 255157

8 years ago[ThinLTO] Release files read when creating combined index in gold plugin
Teresa Johnson [Wed, 9 Dec 2015 21:11:42 +0000 (21:11 +0000)]
[ThinLTO] Release files read when creating combined index in gold plugin

This wasn't causing an issue since at HEAD we exit the linker completely
after creating the combined index.

llvm-svn: 255156

8 years ago[Float2Int] Don't operate on vector instructions
Reid Kleckner [Wed, 9 Dec 2015 21:08:18 +0000 (21:08 +0000)]
[Float2Int] Don't operate on vector instructions

This fixes a crash bug. It's also not clear if we'd want to do this
transform for vectors.

llvm-svn: 255155

8 years ago[llvm-dwp] Sink debug_types.dwo emission into the code parsing the type signatures...
David Blaikie [Wed, 9 Dec 2015 21:02:33 +0000 (21:02 +0000)]
[llvm-dwp] Sink debug_types.dwo emission into the code parsing the type signatures (NFC)

This is a preliminary change towards deduplicating type units based on
their signatures. Next change will skip emission of types when their
signature has already been seen.

llvm-svn: 255154

8 years agoRemove the -P option from dotest.py
Zachary Turner [Wed, 9 Dec 2015 20:48:59 +0000 (20:48 +0000)]
Remove the -P option from dotest.py

This was an option to display a graphical progress bar.  Nobody
is using this, and it doesn't work correctly anyway with the new
result formatter.

llvm-svn: 255153

8 years agoDelete the -n command line option from dotest.py.
Zachary Turner [Wed, 9 Dec 2015 20:48:42 +0000 (20:48 +0000)]
Delete the -n command line option from dotest.py.

This removes the option to not print some one time version and
diagnostic information when running the test suite.

llvm-svn: 255152

8 years agoRemove the -i command line option from dotest.py.
Zachary Turner [Wed, 9 Dec 2015 20:48:31 +0000 (20:48 +0000)]
Remove the -i command line option from dotest.py.

This is part of a larger effort to remove unused command line
options from dotest.py.

llvm-svn: 255151

8 years agoDelete the -F command line option from dotest.py.
Zachary Turner [Wed, 9 Dec 2015 20:48:19 +0000 (20:48 +0000)]
Delete the -F command line option from dotest.py.

This removes the failfast command line option as part of an effort
to simplify dotest and remove unused command line options.  You can
still Ctrl+C any time you want to exit early.

llvm-svn: 255150

8 years agoDon't assign a temporary string to a StringRef.
Rafael Espindola [Wed, 9 Dec 2015 20:41:10 +0000 (20:41 +0000)]
Don't assign a temporary string to a StringRef.

Should fix the windows debug and asan bots.

llvm-svn: 255149

8 years agoUse WeakVH to keep track of calls with operand bundles in CloneCodeInfo
Sanjoy Das [Wed, 9 Dec 2015 20:33:52 +0000 (20:33 +0000)]
Use WeakVH to keep track of calls with operand bundles in CloneCodeInfo

`CloneAndPruneIntoFromInst` can DCE instructions after cloning them into
the new function, and so an AssertingVH is too strong.  This change
switches CloneCodeInfo to use a std::vector<WeakVH>.

llvm-svn: 255148

8 years agoDelete trailing whitespace; NFC
Sanjoy Das [Wed, 9 Dec 2015 20:33:45 +0000 (20:33 +0000)]
Delete trailing whitespace; NFC

llvm-svn: 255147

8 years agoDelay context construction to when/if it is needed in gold plugin (NFC)
Teresa Johnson [Wed, 9 Dec 2015 19:49:40 +0000 (19:49 +0000)]
Delay context construction to when/if it is needed in gold plugin (NFC)

llvm-svn: 255146

8 years agoclang-format order of gold-plugin includes (NFC)
Teresa Johnson [Wed, 9 Dec 2015 19:45:55 +0000 (19:45 +0000)]
clang-format order of gold-plugin includes (NFC)

llvm-svn: 255144