platform/upstream/llvm.git
9 years ago[MainLoop] Fix assertion failure
Pavel Labath [Fri, 17 Jul 2015 10:08:38 +0000 (10:08 +0000)]
[MainLoop] Fix assertion failure

Upon connection termination the waitable handle of an IOObject gets reset to an invalid handle.
This caused a problem since we used the object->GetWaitableHandle as a key to the set of
registered events. The fix is to use something more immutable as a key: we make a copy of the
original waitable handle, instead of holding onto the IOObject.

llvm-svn: 242515

9 years ago-Refactored ARMTargetInfo in order to use the API of TargetParser
Alexandros Lamprineas [Fri, 17 Jul 2015 09:08:37 +0000 (09:08 +0000)]
-Refactored ARMTargetInfo in order to use the API of TargetParser
 for extracting target specific information.
-Patches commit r241343: case 'armv7l' was unhandled in
 ARMTargetInfo::getCPUAttr(), and thus it was returning invalid
 characters for macro definition.

Change-Id: I1a0972e5ff5529cd17376c6562047bab8b4da32c
Phabricator: http://reviews.llvm.org/D10839
llvm-svn: 242514

9 years ago[llgo] cmd/gllgo: handle/ignore more flags
Andrew Wilkins [Fri, 17 Jul 2015 08:15:01 +0000 (08:15 +0000)]
[llgo] cmd/gllgo: handle/ignore more flags

Summary:
This diff is to support Debian packaging,
which sets various hardening-rleated flags
in CFLAGS. They don't make sense for Go,
so we just ignore them.

Reviewers: pcc

Subscribers: llvm-commits, axw

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

llvm-svn: 242513

9 years ago[PM/AA] Disable the core unsafe aspect of GlobalsModRef in the face of
Chandler Carruth [Fri, 17 Jul 2015 06:58:24 +0000 (06:58 +0000)]
[PM/AA] Disable the core unsafe aspect of GlobalsModRef in the face of
basic changes to the IR such as folding pointers through PHIs, Selects,
integer casts, store/load pairs, or outlining.

This leaves the feature available behind a flag. This flag's default
could be flipped if necessary, but the real-world performance impact of
this particular feature of GMR may not be sufficiently significant for
many folks to want to run the risk.

Currently, the risk here is somewhat mitigated by half-hearted attempts
to update GlobalsModRef when the rest of the optimizer changes
something. However, I am currently trying to remove that update
mechanism as it makes migrating the AA infrastructure to a form that can
be readily shared between new and old pass managers very challenging.
Without this update mechanism, it is possible that this still unlikely
failure mode will start to trip people, and so I wanted to try to
proactively avoid that.

There is a lengthy discussion on the mailing list about why the core
approach here is flawed, and likely would need to look totally different
to be both reasonably effective and resilient to basic IR changes
occuring. This patch is essentially the first of two which will enact
the result of that discussion. The next patch will remove the current
update mechanism.

Thanks to lots of folks that helped look at this from different angles.
Especial thanks to Michael Zolotukhin for doing some very prelimanary
benchmarking of LTO without GlobalsModRef to get a rough idea of the
impact we could be facing here. So far, it looks very small, but there
are some concerns lingering from other benchmarking. The default here
may get flipped if performance results end up pointing at this as a more
significant issue.

Also thanks to Pete and Gerolf for reviewing!

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

llvm-svn: 242512

9 years ago[OCaml] Use a nicer style for documentation than OCaml default.
Peter Zotov [Fri, 17 Jul 2015 06:37:59 +0000 (06:37 +0000)]
[OCaml] Use a nicer style for documentation than OCaml default.

In particular, it's much easier to read, as it doesn't expand all
the way on wide-screen displays.

CSS committed under LLVM license with explicit permission from
Daniel Bünzli <daniel.buenzli@erratique.ch>.

llvm-svn: 242511

9 years ago[asan] Fix invalid debug info for promotable allocas
Kuba Brecka [Fri, 17 Jul 2015 06:29:57 +0000 (06:29 +0000)]
[asan] Fix invalid debug info for promotable allocas

Since r230724 ("Skip promotable allocas to improve performance at -O0"), there is a regression in the generated debug info for those non-instrumented variables. When inspecting such a variable's value in LLDB, you often get garbage instead of the actual value. ASan instrumentation is inserted before the creation of the non-instrumented alloca. The only allocas that are considered standard stack variables are the ones declared in the first basic-block, but the initial instrumentation setup in the function breaks that invariant.

This patch makes sure uninstrumented allocas stay in the first BB.

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

llvm-svn: 242510

9 years ago[llvm-cxxdump] Don't rely on global state
Davide Italiano [Fri, 17 Jul 2015 06:18:36 +0000 (06:18 +0000)]
[llvm-cxxdump] Don't rely on global state

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

llvm-svn: 242509

9 years ago[CodeGen, X86] Classify vectors <= 32 bits as INTEGER
David Majnemer [Fri, 17 Jul 2015 05:49:13 +0000 (05:49 +0000)]
[CodeGen, X86] Classify vectors <= 32 bits as INTEGER

We shouldn't crash despite the AMD64 ABI not giving clear guidance as to
how to pass around vector types <= 32 bits.  Instead, classify such
vectors as INTEGER to be compatible with GCC.

This fixes PR24162.

llvm-svn: 242508

9 years agoTests for "Disabling of "redefine_extname" pragma for C++ code"
Alexey Bataev [Fri, 17 Jul 2015 04:21:51 +0000 (04:21 +0000)]
Tests for "Disabling of "redefine_extname" pragma for C++ code"

In response to Richard Smith's comment (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150622/131782.html), this patch disables "redefine_extname" pragma for C++ code. Also, I added a test that this pragma doesn't apply to static declarations.
Differential Revision: http://reviews.llvm.org/D10805

llvm-svn: 242507

9 years agoclang: s/PCHContainerOps/PCHContainerRdr/ in \param(s), introduced in r242499. [...
NAKAMURA Takumi [Fri, 17 Jul 2015 04:16:02 +0000 (04:16 +0000)]
clang: s/PCHContainerOps/PCHContainerRdr/ in \param(s), introduced in r242499. [-Wdocumentation]

llvm-svn: 242506

9 years agoFix clang-fuzzer build after r242499.
Adrian Prantl [Fri, 17 Jul 2015 04:07:47 +0000 (04:07 +0000)]
Fix clang-fuzzer build after r242499.

llvm-svn: 242505

9 years agoDriver: Determine file names for crash reports more reliably
Justin Bogner [Fri, 17 Jul 2015 03:35:54 +0000 (03:35 +0000)]
Driver: Determine file names for crash reports more reliably

Guessing which file name to replace based on the -main-file-name
argument to -cc1 is flawed. Instead, keep track of which arguments are
inputs to each command.

llvm-svn: 242504

9 years agoAArch64: add comment missed out from earlier patch.
Tim Northover [Fri, 17 Jul 2015 03:31:50 +0000 (03:31 +0000)]
AArch64: add comment missed out from earlier patch.

Helps explain some of the background behind this bit of code.

llvm-svn: 242503

9 years agoTeach the std::wstring data formatter how to properly display strings with embedded...
Enrico Granata [Fri, 17 Jul 2015 01:56:25 +0000 (01:56 +0000)]
Teach the std::wstring data formatter how to properly display strings with embedded NUL bytes

llvm-svn: 242501

9 years agoARM: Enable MachineScheduler and disable PostRAScheduler for swift.
Matthias Braun [Fri, 17 Jul 2015 01:44:31 +0000 (01:44 +0000)]
ARM: Enable MachineScheduler and disable PostRAScheduler for swift.

This is mostly done to disable the PostRAScheduler which optimizes for
instruction latencies which isn't a good fit for out-of-order
architectures. This also allows to leave out the itinerary table in
swift in favor of the SchedModel ones.

This change leads to performance improvements/regressions by as much as
10% in some benchmarks, in fact we loose 0.4% performance over the
llvm-testsuite for reasons that appear to be unknown or out of the
compilers control. rdar://20803802 documents the investigation of
these effects.

While it is probably a good idea to perform the same switch for the
other ARM out-of-order CPUs, I limited this change to swift as I cannot
perform the benchmark verification on the other CPUs.

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

llvm-svn: 242500

9 years agoMake the clang module container format selectable from the command line.
Adrian Prantl [Fri, 17 Jul 2015 01:19:54 +0000 (01:19 +0000)]
Make the clang module container format selectable from the command line.
- introduces a new cc1 option -fmodule-format=[raw,obj]
  with 'raw' being the default
- supports arbitrary module container formats that libclang is agnostic to
- adds the format to the module hash to avoid collisions
- splits the old PCHContainerOperations into PCHContainerWriter and
  a PCHContainerReader.

Thanks to Richard Smith for reviewing this patch!

llvm-svn: 242499

9 years agoOnly do fmul (fadd x, x), c combine if the fadd only has one use
Matt Arsenault [Fri, 17 Jul 2015 01:14:35 +0000 (01:14 +0000)]
Only do fmul (fadd x, x), c combine if the fadd only has one use

This was increasing the instruction count if the fadd has multiple uses.

llvm-svn: 242498

9 years agoAdd StringPrinter support for printing a std::string with embedded NUL bytes
Enrico Granata [Fri, 17 Jul 2015 01:03:59 +0000 (01:03 +0000)]
Add StringPrinter support for printing a std::string with embedded NUL bytes

llvm-svn: 242496

9 years agoUse small encodings for constants when possible.
Rafael Espindola [Fri, 17 Jul 2015 00:57:52 +0000 (00:57 +0000)]
Use small encodings for constants when possible.

llvm-svn: 242493

9 years ago__builtin_setjmp/__builtin_longjmp is support on ARM now
Matthias Braun [Fri, 17 Jul 2015 00:46:27 +0000 (00:46 +0000)]
__builtin_setjmp/__builtin_longjmp is support on ARM now

llvm-svn: 242492

9 years agoMIR Serialization: Serialize the frame setup machine instruction flag.
Alex Lorenz [Fri, 17 Jul 2015 00:24:15 +0000 (00:24 +0000)]
MIR Serialization: Serialize the frame setup machine instruction flag.

llvm-svn: 242491

9 years agoAllow gdbremote.py to take input from STDIN and handle "c" and "s" packets.
Greg Clayton [Fri, 17 Jul 2015 00:19:31 +0000 (00:19 +0000)]
Allow gdbremote.py to take input from STDIN and handle "c" and "s" packets.

llvm-svn: 242490

9 years agoAllow __builtin_setjmp/__builtin_longjmp on ARM
Matthias Braun [Fri, 17 Jul 2015 00:15:22 +0000 (00:15 +0000)]
Allow __builtin_setjmp/__builtin_longjmp on ARM

The problems in the llvm target got fixed in r242481 and r242482.

Related to rdar://20544153, rdar://20660786

llvm-svn: 242489

9 years agoRe-landing r242318 after buildbot update.
Chaoren Lin [Thu, 16 Jul 2015 23:45:08 +0000 (23:45 +0000)]
Re-landing r242318 after buildbot update.

llvm-svn: 242488

9 years agoMIR Serialization: Serialize the frame index machine operands.
Alex Lorenz [Thu, 16 Jul 2015 23:37:45 +0000 (23:37 +0000)]
MIR Serialization: Serialize the frame index machine operands.

Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242487

9 years agoAdd new constructors for LoopInfo/DominatorTree/BFI/BPI
Cong Hou [Thu, 16 Jul 2015 23:23:35 +0000 (23:23 +0000)]
Add new constructors for LoopInfo/DominatorTree/BFI/BPI

Those new constructors make it more natural to construct an object for a function. For example, previously to build a LoopInfo for a function, we need four statements:

DominatorTree DT;
LoopInfo LI;
DT.recalculate(F);
LI.analyze(DT);

Now we only need one statement:

LoopInfo LI(DominatorTree(F));

http://reviews.llvm.org/D11274

llvm-svn: 242486

9 years agoDoxygen: Enable autobrief feature, matching llvm config/coding standards.
James Dennett [Thu, 16 Jul 2015 23:17:43 +0000 (23:17 +0000)]
Doxygen: Enable autobrief feature, matching llvm config/coding standards.

Summary: This corresponds to the change made in r237417 - "Doxygen: Enable autobrief feature and update coding standards."

Reviewers: eliben

Subscribers: eliben, cfe-commits

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

llvm-svn: 242485

9 years agoclang-format: Respect IndentWrappedFunctionNames when aligning colons
Daniel Jasper [Thu, 16 Jul 2015 22:58:24 +0000 (22:58 +0000)]
clang-format: Respect IndentWrappedFunctionNames when aligning colons

Before:
  - (void)shortf:(GTMFoo *)theFoo
  dontAlignNamef:(NSRect)theRect {
  }

After:
  - (void)shortf:(GTMFoo *)theFoo
      dontAlignNamef:(NSRect)theRect {
  }

Patch by Kwasi Mensah, thank you!

llvm-svn: 242484

9 years ago[Sema] Refactor Sema::ImplicitExceptionSpecification::CalledDecl
Davide Italiano [Thu, 16 Jul 2015 22:37:54 +0000 (22:37 +0000)]
[Sema] Refactor Sema::ImplicitExceptionSpecification::CalledDecl

This (hopefully) brings more clarity. No functional changes (intended).

llvm-svn: 242483

9 years agoArm: Don't define a label twice with two setjmps in a function.
Matthias Braun [Thu, 16 Jul 2015 22:34:20 +0000 (22:34 +0000)]
Arm: Don't define a label twice with two setjmps in a function.

Constructing a name based on the function name didn't give us a unique
symbol if we had more than one setjmp in a function. Using
MCContext::createTempSymbol() always gives us a unique name.

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

llvm-svn: 242482

9 years agoFix __builtin_setjmp in combination with sjlj exception handling.
Matthias Braun [Thu, 16 Jul 2015 22:34:16 +0000 (22:34 +0000)]
Fix __builtin_setjmp in combination with sjlj exception handling.

llvm.eh.sjlj.setjmp was used as part of the SjLj exception handling
style but is also used in clang to implement __builtin_setjmp.  The ARM
backend needs to output additional dispatch tables for the SjLj
exception handling style, these tables however can't be emitted if
llvm.eh.sjlj.setjmp is simply used for __builtin_setjmp and no actual
landing pad blocks exist.

To solve this issue a new llvm.eh.sjlj.setup_dispatch intrinsic is
introduced which is used instead of llvm.eh.sjlj.setjmp in the SjLj
exception handling lowering, so we can differentiate between the case
where we actually need to setup a dispatch table and the case where we
just need the __builtin_setjmp semantic.

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

llvm-svn: 242481

9 years agoAdd __has_feature(attribute_availability_with_version_underscores).
Jordan Rose [Thu, 16 Jul 2015 22:30:10 +0000 (22:30 +0000)]
Add __has_feature(attribute_availability_with_version_underscores).

This goes with r218884 from, um, last autumn.

rdar://problem/21754114

llvm-svn: 242480

9 years agoXfail pexpect tests for Windows hosts.
Chaoren Lin [Thu, 16 Jul 2015 22:24:16 +0000 (22:24 +0000)]
Xfail pexpect tests for Windows hosts.

llvm-svn: 242457

9 years agoFix ffiInvoke() use of DataLayout, broken in 242414
Mehdi Amini [Thu, 16 Jul 2015 22:23:09 +0000 (22:23 +0000)]
Fix ffiInvoke() use of DataLayout, broken in 242414

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242456

9 years agoInclude what we use, instead of letting them get pulled in implictly. This makes...
Marshall Clow [Thu, 16 Jul 2015 22:13:26 +0000 (22:13 +0000)]
Include what we use, instead of letting them get pulled in implictly. This makes the tests work on VS. Thanks to STL for the report

llvm-svn: 242454

9 years agoAdd missing REQUIRES to this test.
Sean Silva [Thu, 16 Jul 2015 22:12:44 +0000 (22:12 +0000)]
Add missing REQUIRES to this test.

An internal builder was failing.

llvm-svn: 242452

9 years ago[SCEV][NFC] Use triple-slash (///) for comment.
Sanjoy Das [Thu, 16 Jul 2015 22:08:37 +0000 (22:08 +0000)]
[SCEV][NFC] Use triple-slash (///) for comment.

Makes the comments for proveNoWrapByVaryingStart consistent with the
rest of ScalarEvolution.h

llvm-svn: 242451

9 years agoDocumentation cleanup. No functional change intended.
James Dennett [Thu, 16 Jul 2015 22:06:34 +0000 (22:06 +0000)]
Documentation cleanup.  No functional change intended.

llvm-svn: 242450

9 years ago[ASan] PR24150: restrict test case to i386.
Alexey Samsonov [Thu, 16 Jul 2015 21:46:58 +0000 (21:46 +0000)]
[ASan] PR24150: restrict test case to i386.

llvm-svn: 242449

9 years agoFix spelling. NFCI.
Simon Pilgrim [Thu, 16 Jul 2015 21:44:53 +0000 (21:44 +0000)]
Fix spelling. NFCI.

llvm-svn: 242448

9 years agoAArch64: make inexact signalling on round Darwin-specific
Tim Northover [Thu, 16 Jul 2015 21:30:21 +0000 (21:30 +0000)]
AArch64: make inexact signalling on round Darwin-specific

C11 leaves the choice on whether round-to-integer operations set the inexact
flag implementation-defined. Darwin does expect it to be set, but this seems to
be against the intent of the IEEE document and slower to implement anyway. So
it should be opt-in.

llvm-svn: 242446

9 years ago[CMake] One more attempt to fix PR24144.
Alexey Samsonov [Thu, 16 Jul 2015 21:20:05 +0000 (21:20 +0000)]
[CMake] One more attempt to fix PR24144.

This time, exclude ExternalProject from build using set_target_properties.

llvm-svn: 242444

9 years ago[X86][SSE] Added nounwind attribute to vector shift tests.
Simon Pilgrim [Thu, 16 Jul 2015 21:14:26 +0000 (21:14 +0000)]
[X86][SSE] Added nounwind attribute to vector shift tests.

Stop i686 codegen from generating cfi directives.

llvm-svn: 242443

9 years ago[PowerPC] v4i32 is a VSRCRegClass
Bill Schmidt [Thu, 16 Jul 2015 21:14:07 +0000 (21:14 +0000)]
[PowerPC] v4i32 is a VSRCRegClass

I was looking at some vector code generation and kept seeing
unnecessary vector copies into the Altivec half of the VSX registers.
I discovered that we overlooked v4i32 when adding the register classes
for VSX; we only added v4f32 and v2f64.  This means that anything that
canonicalizes into v4i32 (which is a LOT of stuff) ends up being
forced into VRRC on its way to VSRC.

The fix is one line.  The rest of the patch is fixing up some test
cases whose code generation has changed as a result.

This seems like it would be a good candidate for backport to 3.7.

llvm-svn: 242442

9 years agoList supported architectures for StackMap section and related intrinsics
Philip Reames [Thu, 16 Jul 2015 21:10:46 +0000 (21:10 +0000)]
List supported architectures for StackMap section and related intrinsics

Not having this documented led to some confusion in a recent review thread.

llvm-svn: 242441

9 years ago[X86][SSE] Updated vector conversion test names.
Simon Pilgrim [Thu, 16 Jul 2015 21:00:57 +0000 (21:00 +0000)]
[X86][SSE] Updated vector conversion test names.

I'll be adding further tests shortly so need a more thorough naming convention.

llvm-svn: 242440

9 years agoStreamline the coding style in NVPTXLowerAggrCopies
Eli Bendersky [Thu, 16 Jul 2015 20:42:38 +0000 (20:42 +0000)]
Streamline the coding style in NVPTXLowerAggrCopies

Make the style consistent with LLVM style throughout and clang-format.

llvm-svn: 242439

9 years agoMachineInstr: Explain the subtle semantics of uses()/defs()
Matthias Braun [Thu, 16 Jul 2015 20:27:01 +0000 (20:27 +0000)]
MachineInstr: Explain the subtle semantics of uses()/defs()

llvm-svn: 242438

9 years ago[NVPTX] enable SpeculativeExecution in NVPTX
Jingyue Wu [Thu, 16 Jul 2015 20:13:48 +0000 (20:13 +0000)]
[NVPTX] enable SpeculativeExecution in NVPTX

Summary:
SpeculativeExecution enables a series straight line optimizations (such
as SLSR and NaryReassociate) on conditional code. For example,

  if (...)
    ... b * s ...
  if (...)
    ... (b + 1) * s ...

speculative execution can hoist b * s and (b + 1) * s from then-blocks,
so that we have

  ... b * s ...
  if (...)
    ...
  ... (b + 1) * s ...
  if (...)
    ...

Then, SLSR can rewrite (b + 1) * s to (b * s + s) because after
speculative execution b * s dominates (b + 1) * s.

The performance impact of this change is significant. It speeds up the
benchmarks running EigenFloatContractionKernelInternal16x16
(https://bitbucket.org/eigen/eigen/src/ba68f42fa69e4f43417fe1e52669d4dd5d2b3bee/unsupported/Eigen/CXX11/src/Tensor/TensorContractionCuda.h?at=default#cl-526)
by roughly 2%. Some internal benchmarks that have the above code pattern
are improved by up to 40%. No significant slowdowns are observed on
Eigen CUDA microbenchmarks.

Reviewers: jholewinski, broune, eliben

Subscribers: llvm-commits, jholewinski

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

llvm-svn: 242437

9 years agoAArch64: Implement conditional compare sequence matching.
Matthias Braun [Thu, 16 Jul 2015 20:02:37 +0000 (20:02 +0000)]
AArch64: Implement conditional compare sequence matching.

This is a new iteration of the reverted r238793 /
http://reviews.llvm.org/D8232 which wrongly assumed that any and/or
trees can be represented by conditional compare sequences, however there
are some restrictions to that. This version fixes this and adds comments
that explain exactly what types of and/or trees can actually be
implemented as conditional compare sequences.

Related to http://llvm.org/PR20927, rdar://18326194

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

llvm-svn: 242436

9 years agoMake sure we calculate resolver symbol addresses correctly for ARM. The trie entries...
Greg Clayton [Thu, 16 Jul 2015 19:50:57 +0000 (19:50 +0000)]
Make sure we calculate resolver symbol addresses correctly for ARM. The trie entries have bit 0 set for Thumb functions and we need to remove that so we can correctly determine which symbols are resolvers.

<rdar://problem/21396553>

llvm-svn: 242435

9 years agoAMDPGU/SI: Negative offsets aren't allowed in MUBUF's vaddr operand
Tom Stellard [Thu, 16 Jul 2015 19:40:09 +0000 (19:40 +0000)]
AMDPGU/SI: Negative offsets aren't allowed in MUBUF's vaddr operand

Reviewers: arsenm

Subscribers: llvm-commits

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

llvm-svn: 242434

9 years agoAMDPGU/SI: Use AssertZext node to mask high bit for scratch offsets
Tom Stellard [Thu, 16 Jul 2015 19:40:07 +0000 (19:40 +0000)]
AMDPGU/SI: Use AssertZext node to mask high bit for scratch offsets

Summary:
We can safely assume that the high bit of scratch offsets will never
be set, because this would require at least 128 GB of GPU memory.

Reviewers: arsenm

Subscribers: llvm-commits

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

llvm-svn: 242433

9 years ago[SemaType] Use a range loop.
Davide Italiano [Thu, 16 Jul 2015 19:31:40 +0000 (19:31 +0000)]
[SemaType] Use a range loop.

llvm-svn: 242432

9 years agoLiveInterval: Document and enforce rules about empty subranges.
Matthias Braun [Thu, 16 Jul 2015 18:55:35 +0000 (18:55 +0000)]
LiveInterval: Document and enforce rules about empty subranges.

Empty subranges are not allowed in a LiveInterval and must be removed
instead: Check this in the verifiers, put a reminder for this in the
comment of the shrinkToUses variant for a single lane and make it
automatic for the shrinkToUses variant for a LiveInterval.

llvm-svn: 242431

9 years agoDo not duplicate method name in comment, remove duplicate comment
Matthias Braun [Thu, 16 Jul 2015 18:55:32 +0000 (18:55 +0000)]
Do not duplicate method name in comment, remove duplicate comment

llvm-svn: 242430

9 years agoDelete an unused function.
Rafael Espindola [Thu, 16 Jul 2015 18:41:41 +0000 (18:41 +0000)]
Delete an unused function.

Patch by Xan López!

llvm-svn: 242429

9 years agoRevert "Add missing load/store flags to thumb2 instructions."
Pete Cooper [Thu, 16 Jul 2015 18:38:13 +0000 (18:38 +0000)]
Revert "Add missing load/store flags to thumb2 instructions."

This reverts commit r242300.

This is causing buildbot failures which we are investigating.
I'll reapply once we know whats going on, but for now want to
get the bots green.

llvm-svn: 242428

9 years agoCOFF: Set Load Configuration entry in Data Directory.
Rui Ueyama [Thu, 16 Jul 2015 18:30:35 +0000 (18:30 +0000)]
COFF: Set Load Configuration entry in Data Directory.

Load Configuration field points to a structure containing information
for SEH. That data strucutre is not created by the linker but provided
by an external file. What we have to do is just to set __load_config_used
address to the header.

llvm-svn: 242427

9 years agoRename LoopInfo::Analyze() to LoopInfo::analyze() and turn its parameter type to...
Cong Hou [Thu, 16 Jul 2015 18:23:57 +0000 (18:23 +0000)]
Rename LoopInfo::Analyze() to LoopInfo::analyze() and turn its parameter type to const&.

The benefit of turning the parameter of LoopInfo::analyze() to const& is that it now can accept a rvalue.

http://reviews.llvm.org/D11250

llvm-svn: 242426

9 years ago[CMake] Workaround for PR24144: avoid installing libcxx_tsan and libcxx_msan by defau...
Alexey Samsonov [Thu, 16 Jul 2015 17:53:01 +0000 (17:53 +0000)]
[CMake] Workaround for PR24144: avoid installing libcxx_tsan and libcxx_msan by default "ninja install" command.

Summary:
Exclude external libc++ builds from "all" target, so that they are only
build on demand, and are not installed together with LLVM/Clang.

Reviewers: hans

Subscribers: llvm-commits

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

llvm-svn: 242424

9 years agoInternalize: internalize comdat members as a group, and drop comdat on such members.
Peter Collingbourne [Thu, 16 Jul 2015 17:42:21 +0000 (17:42 +0000)]
Internalize: internalize comdat members as a group, and drop comdat on such members.

Internalizing an individual comdat group member without also internalizing
the other members of the comdat can break comdat semantics. For example,
if a module contains a reference to an internalized comdat member, and the
linker chooses a comdat group from a different object file, this will break
the reference to the internalized member.

This change causes the internalizer to only internalize comdat members if all
other members of the comdat are not externally visible. Once a comdat group
has been fully internalized, there is no need to apply comdat rules to its
members; later optimization passes (e.g. globaldce) can legally drop individual
members of the comdat. So we drop the comdat attribute from all comdat members.

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

llvm-svn: 242423

9 years agoFixed an error in cuda-options.cu test:
Artem Belevich [Thu, 16 Jul 2015 17:24:18 +0000 (17:24 +0000)]
Fixed an error in cuda-options.cu test:
  -target option must be used without '='.

llvm-svn: 242422

9 years agoSet the libc++ version # to 3.7. Will bump to 3.8 soon
Marshall Clow [Thu, 16 Jul 2015 17:22:24 +0000 (17:22 +0000)]
Set the libc++ version # to 3.7.   Will bump to 3.8 soon

llvm-svn: 242421

9 years agoDisable #pragma redefine_extname for C++ code as it does not make sense in such a...
Aaron Ballman [Thu, 16 Jul 2015 17:06:53 +0000 (17:06 +0000)]
Disable #pragma redefine_extname for C++ code as it does not make sense in such a context.

Patch by Andrey Bokhanko!

llvm-svn: 242420

9 years ago[NVPTX] Don't leak dead instructions after unlinking them from the BasicBlock
Benjamin Kramer [Thu, 16 Jul 2015 16:51:48 +0000 (16:51 +0000)]
[NVPTX] Don't leak dead instructions after unlinking them from the BasicBlock

llvm-svn: 242417

9 years agoFix Kaleidoscope tuto: ExecutionEngine->getDataLayout() returns a ref
Mehdi Amini [Thu, 16 Jul 2015 16:47:18 +0000 (16:47 +0000)]
Fix Kaleidoscope tuto: ExecutionEngine->getDataLayout() returns a ref

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242416

9 years agoFix test/COFF/dll.test after r242342.
Nico Weber [Thu, 16 Jul 2015 16:45:01 +0000 (16:45 +0000)]
Fix test/COFF/dll.test after r242342.

r242342 removed the RUN line that wrote t2.obj, but another RUN line further
down still reads t2.obj, so add it back.

llvm-svn: 242415

9 years agoMake ExecutionEngine owning a DataLayout
Mehdi Amini [Thu, 16 Jul 2015 16:34:23 +0000 (16:34 +0000)]
Make ExecutionEngine owning a DataLayout

Summary:
This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one owned by the
module.

The ExecutionEngine will act as an exception and will be unsafe to
be reused across context. We don't enforce this rule but undefined
behavior can occurs if the user tries to do it.

Reviewers: lhames

Subscribers: echristo, llvm-commits, rafael, yaron.keren

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242414

9 years agoCorrect lowering of memmove in NVPTX
Eli Bendersky [Thu, 16 Jul 2015 16:27:19 +0000 (16:27 +0000)]
Correct lowering of memmove in NVPTX

This fixes https://llvm.org/bugs/show_bug.cgi?id=24056

Also a bit of refactoring along the way.

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

llvm-svn: 242413

9 years agoAMDGPU/R600: Remove unused variable
Tom Stellard [Thu, 16 Jul 2015 16:13:34 +0000 (16:13 +0000)]
AMDGPU/R600: Remove unused variable

This fixes a warning introduced by r242410.

llvm-svn: 242412

9 years agoAMDPGU/R600: Replace llvm_unreachable() call with LLVMContext::emitError()
Tom Stellard [Thu, 16 Jul 2015 15:38:29 +0000 (15:38 +0000)]
AMDPGU/R600: Replace llvm_unreachable() call with LLVMContext::emitError()

Summary:
This fixes an issue on MIPS where the infinite-loop-evergreen.ll test
was failing to terminate.

Fixes PR24147.

Reviewers: arsenm, dsanders

Subscribers: llvm-commits

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

llvm-svn: 242410

9 years ago[Codegen] Add intrinsics 'absdiff' and corresponding SDNodes for absolute difference...
James Molloy [Thu, 16 Jul 2015 15:22:46 +0000 (15:22 +0000)]
[Codegen] Add intrinsics 'absdiff' and corresponding SDNodes for absolute difference operation

This adds new intrinsics "*absdiff" for absolute difference ops to facilitate efficient code generation for "sum of absolute differences" operation.
The patch also contains the introduction of corresponding SDNodes and basic legalization support.Sanity of the generated code is tested on X86.

This is 1st of the three patches.

Patch by Shahid Asghar-ahmad!

llvm-svn: 242409

9 years ago- TargetParser does not handle armv7l in parseArchProfile().
Alexandros Lamprineas [Thu, 16 Jul 2015 14:54:41 +0000 (14:54 +0000)]
- TargetParser does not handle armv7l in parseArchProfile().
- ARM V7L matches the 'A' profile of ARM architecture.

Change-Id: I80c8b973f5c93fb040c177a227644d56b1b83ea8
Phabricator: http://reviews.llvm.org/D11261
llvm-svn: 242406

9 years agoclang-format: [Proto] Handle enum bodies differently.
Daniel Jasper [Thu, 16 Jul 2015 14:25:43 +0000 (14:25 +0000)]
clang-format: [Proto] Handle enum bodies differently.

In proto, enum constants can contain complex options and should be
handled more like individual declarations.

Before:
  enum Type {
    UNKNOWN = 0 [(some_options) =
                     {
                       a: aa,
                       b: bb
                     }];
  };

After:
  enum Type {
    UNKNOWN = 0 [(some_options) = {
      a: aa,
      b: bb
    }];
  };

llvm-svn: 242404

9 years agoFix compiler warning in ThreadPlanStepRange
Pavel Labath [Thu, 16 Jul 2015 14:21:49 +0000 (14:21 +0000)]
Fix compiler warning in ThreadPlanStepRange

llvm-svn: 242403

9 years agoAdd jThreadsInfo support to lldb-server
Pavel Labath [Thu, 16 Jul 2015 14:14:35 +0000 (14:14 +0000)]
Add jThreadsInfo support to lldb-server

Summary:
This commit adds initial support for the jThreadsInfo packet to lldb-server. The current
implementation does not expedite inferior memory.  I have also added a description of the new
packet to our protocol documentation (mostly taken from Greg's earlier commit message).

Reviewers: clayborg, ovyalov, tberghammer

Subscribers: lldb-commits

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

llvm-svn: 242402

9 years agoRevert "Default to linking lldb-server statically for Android."
Tamas Berghammer [Thu, 16 Jul 2015 14:13:01 +0000 (14:13 +0000)]
Revert "Default to linking lldb-server statically for Android."

With static linking lldb-server crashes in platform mode when
tries to listen on localhost:5432 on the android build bot.

This reverts commit 3ea861707dec8423746679ff496e4fd03255d4cf.

llvm-svn: 242401

9 years agoFix memcheck interval ends for pointers with negative strides
Silviu Baranga [Thu, 16 Jul 2015 14:02:58 +0000 (14:02 +0000)]
Fix memcheck interval ends for pointers with negative strides

Summary:
The checking pointer grouping algorithm assumes that the
starts/ends of the pointers are well formed (start <= end).

The runtime memory checking algorithm also assumes this by doing:

 start0 < end1 && start1 < end0

to detect conflicts. This check only works if start0 <= end0 and
start1 <= end1.

This change correctly orders the interval ends by either checking
the stride (if it is constant) or by using min/max SCEV expressions.

Reviewers: anemet, rengolin

Subscribers: rengolin, llvm-commits

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

llvm-svn: 242400

9 years ago[X86] Test for r242395 (Fix emitPrologue() to make less assumptions about pushes)
Michael Kuperstein [Thu, 16 Jul 2015 13:55:39 +0000 (13:55 +0000)]
[X86] Test for r242395 (Fix emitPrologue() to make less assumptions about pushes)

llvm-svn: 242399

9 years ago[X86] Reapply r240257 : "Allow more call sequences to use push instructions for argum...
Michael Kuperstein [Thu, 16 Jul 2015 13:54:14 +0000 (13:54 +0000)]
[X86] Reapply r240257 : "Allow more call sequences to use push instructions for argument passing"

This allows more call sequences to use pushes instead of movs when optimizing for size.
In particular, calling conventions that pass some parameters in registers (e.g. thiscall) are now supported.

This should no longer cause miscompiles, now that a bug in emitPrologue was fixed in r242395.

llvm-svn: 242398

9 years agoFix compiler warning in ArchSpec
Pavel Labath [Thu, 16 Jul 2015 13:11:34 +0000 (13:11 +0000)]
Fix compiler warning in ArchSpec

llvm-svn: 242397

9 years agoAdd missing include for android-arm build
Tamas Berghammer [Thu, 16 Jul 2015 12:35:04 +0000 (12:35 +0000)]
Add missing include for android-arm build

llvm-svn: 242396

9 years ago[X86] Fix emitPrologue() to make less assumptions about pushes
Michael Kuperstein [Thu, 16 Jul 2015 12:27:59 +0000 (12:27 +0000)]
[X86] Fix emitPrologue() to make less assumptions about pushes

When X86FrameLowering::emitPrologue() looks for where to insert the %esp subtraction
to allocate stack space for local allocations, it assumes that any sequence of push
instructions that starts at function entry consists purely of spills of callee-save
registers.
This may be false, since from some point forward, the pushes may pushing arguments
to a subsequent function call.

This caused a miscompile that was exposed by r240257, and is not easily testable
since r240257 was reverted. A test will be committed separately after r240257 is
reapplied.

llvm-svn: 242395

9 years agoRevert "Make ExecutionEngine owning a DataLayout"
Michael Kuperstein [Thu, 16 Jul 2015 12:20:31 +0000 (12:20 +0000)]
Revert "Make ExecutionEngine owning a DataLayout"

Reverting to fix buildbot breakage.

This reverts commit r242387.

llvm-svn: 242394

9 years ago[Mips] Make helper function static, NFC.
Benjamin Kramer [Thu, 16 Jul 2015 11:12:05 +0000 (11:12 +0000)]
[Mips] Make helper function static, NFC.

llvm-svn: 242393

9 years agoImprove XFAIL for test_lldb_process_load_and_unload_commands
Tamas Berghammer [Thu, 16 Jul 2015 10:00:06 +0000 (10:00 +0000)]
Improve XFAIL for test_lldb_process_load_and_unload_commands

llvm-svn: 242392

9 years agoRevert "[NativeProcessLinux] Integrate MainLoop"
Pavel Labath [Thu, 16 Jul 2015 08:45:03 +0000 (08:45 +0000)]
Revert "[NativeProcessLinux] Integrate MainLoop"

This seems to be causing major slowdows on the android buildbot. Reverting while I investigate.

llvm-svn: 242391

9 years agoAdd option to choose where in the pass pipeline polly is run
Tobias Grosser [Thu, 16 Jul 2015 08:28:09 +0000 (08:28 +0000)]
Add option to choose where in the pass pipeline polly is run

These options are useful to play with the location of Polly within LLVM's
pass manager.

llvm-svn: 242390

9 years agoAdd PM extension point EP_VectorizerStart
Tobias Grosser [Thu, 16 Jul 2015 08:20:37 +0000 (08:20 +0000)]
Add PM extension point EP_VectorizerStart

This extension point allows passes to be executed right before the vectorizer
and other highly target specific optimizations are run.

llvm-svn: 242389

9 years agoAdd missing break in switch case in R600ISelLowering
Mehdi Amini [Thu, 16 Jul 2015 06:23:12 +0000 (06:23 +0000)]
Add missing break in switch case in R600ISelLowering

Summary: Catched by coverity.

Reviewers: arsenm

Subscribers: llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242388

9 years agoMake ExecutionEngine owning a DataLayout
Mehdi Amini [Thu, 16 Jul 2015 06:17:14 +0000 (06:17 +0000)]
Make ExecutionEngine owning a DataLayout

Summary:
This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one owned by the
module.

The ExecutionEngine will act as an exception and will be unsafe to
be reused across context. We don't enforce this rule but undefined
behavior can occurs if the user tries to do it.

Reviewers: lhames

Subscribers: echristo, llvm-commits, rafael, yaron.keren

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242387

9 years agoMove most user of TargetMachine::getDataLayout to the Module one
Mehdi Amini [Thu, 16 Jul 2015 06:11:10 +0000 (06:11 +0000)]
Move most user of TargetMachine::getDataLayout to the Module one

Summary:
This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one owned by the
module.

This patch is quite boring overall, except for some uglyness in
ASMPrinter which has a getDataLayout function but has some clients
that use it without a Module (llmv-dsymutil, llvm-dwarfdump), so
some methods are taking a DataLayout as parameter.

Reviewers: echristo

Subscribers: yaron.keren, rafael, llvm-commits, jholewinski

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242386

9 years agoRemove DataLayout from TargetLoweringObjectFile, redirect to Module
Mehdi Amini [Thu, 16 Jul 2015 06:04:17 +0000 (06:04 +0000)]
Remove DataLayout from TargetLoweringObjectFile, redirect to Module

Summary:
This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one owned by the
module.

Reviewers: echristo

Subscribers: yaron.keren, rafael, llvm-commits, jholewinski

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242385

9 years agoRedirect pointerSize query to the TargetMachine in ASMPrinter
Mehdi Amini [Thu, 16 Jul 2015 05:59:25 +0000 (05:59 +0000)]
Redirect pointerSize query to the TargetMachine in ASMPrinter

Summary:
Because llvm-dsymutil is using ASMPrinter without any MachineFunction
of Module available.

This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one owned by the
module.

Reviewers: echristo

Subscribers: yaron.keren, rafael, llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 242384

9 years agoActually "RUN:" the tests...
Filipe Cabecinhas [Thu, 16 Jul 2015 05:22:17 +0000 (05:22 +0000)]
Actually "RUN:" the tests...

llvm-svn: 242383

9 years ago[OPENMP] Fixed detection of canonical loops with random access iterators.
Alexey Bataev [Thu, 16 Jul 2015 04:19:43 +0000 (04:19 +0000)]
[OPENMP] Fixed detection of canonical loops with random access iterators.

Add handling of iterators with copy/move constructors with default arguments + converting template constructors.

llvm-svn: 242382

9 years ago[LLDB][MIPS] Detect MIPS application specific extensions like micromips
Jaydeep Patil [Thu, 16 Jul 2015 03:51:55 +0000 (03:51 +0000)]
[LLDB][MIPS] Detect MIPS application specific extensions like micromips
    SUMMARY:
    The patch detects MIPS application specific extensions (ASE) like micromips by reading
    ELF header.e_flags and SHT_MIPS_ABIFLAGS section. MIPS triple does not contain ASE
    information like micromips, mips16, DSP, MSA etc. These can be read from header.e_flags
    or SHT_MIPS_ABIFLAGS section.

    Reviewers: clayborg
    Subscribers: mohit.bhakkad, sagar, lldb-commits
    Differential Revision: http://reviews.llvm.org/D11133

llvm-svn: 242381

9 years agoOnly include the stack memory for the caller stack
Jason Molenda [Thu, 16 Jul 2015 03:42:40 +0000 (03:42 +0000)]
Only include the stack memory for the caller stack
frame, don't go any further, in RNBRemote::SendStopReplyPacketForThread.

These are the memory pre-fetches in the T05 packet and are
included in every private stop that lldb does.  lldb needs, at most,
the caller stack frame so we're sending more data than needed by
including additional stack memory prefetches in this reply packet.

Once we've stopped for a public stop, we're going to do a jThreadsInfo
which will include the stack memory prefetches for all threads,
including the one which had the stop reason.

llvm-svn: 242380

9 years agoBuild ValueObjectConstResultCast.cpp.
Jason Molenda [Thu, 16 Jul 2015 03:38:17 +0000 (03:38 +0000)]
Build ValueObjectConstResultCast.cpp.

llvm-svn: 242379