platform/upstream/llvm.git
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

9 years ago[Intrin.h] Use compiler builtins to model memory barriers
David Majnemer [Thu, 16 Jul 2015 03:13:02 +0000 (03:13 +0000)]
[Intrin.h] Use compiler builtins to model memory barriers

_ReadBarrier, _WriteBarrier, and _ReadWriteBarrier are essentially
memory barriers of one form or another.  Model these as
atomic_signal_fence(ATOMIC_SEQ_CST).

__faststorefence is a curious intrinsic.  It's single purpose seems to
an alternative to mfence when that instruction is slow.  However, mfence
is not always slow and is, in general, preferable to a 'lock or'
sequence on certain CPUs.  Give the compiler freedom to select the best
sequence to get a fence.

llvm-svn: 242378

9 years agoMake sure that __libcpp_compressed_pair_imp default-constructs its' members, rather...
Marshall Clow [Thu, 16 Jul 2015 03:05:06 +0000 (03:05 +0000)]
Make sure that __libcpp_compressed_pair_imp default-constructs its' members, rather than value-initializing them. Fixes PR#24137

llvm-svn: 242377

9 years ago[LAA] Split out a helper to check the pointer partitions, NFC
Adam Nemet [Thu, 16 Jul 2015 02:48:05 +0000 (02:48 +0000)]
[LAA] Split out a helper to check the pointer partitions, NFC

This is made a static public member function to allow the transition of
this logic from LAA to LoopDistribution.  (Technically, it could be an
implementation-local static function but then it would not be accessible
from LoopDistribution.)

llvm-svn: 242376

9 years agoMark two tests as failing on clang 3.8 (they failed on 3.7, too)
Marshall Clow [Thu, 16 Jul 2015 02:44:33 +0000 (02:44 +0000)]
Mark two tests as failing on clang 3.8 (they failed on 3.7, too)

llvm-svn: 242375

9 years agoAdd a class ValueObjectConstResultCast.
Siva Chandra [Thu, 16 Jul 2015 01:47:12 +0000 (01:47 +0000)]
Add a class ValueObjectConstResultCast.

Summary:
Other changes around the main change include:

1. Add a method Cast to ValueObjectConstResult, ValueObjectConstResultImpl
and ValueObjectConstResultChild.

2. Add an argument |live_address| of type lldb::addr_t to the constructor
of ValueObjectConstResultChild. This is passed on to the backing
ValueObjectConstResultImpl object constructor so that the address of the
child value can be calculated properly.

Reviewers: granata.enrico, clayborg

Subscribers: lldb-commits

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

llvm-svn: 242374

9 years agoRevert "[X86] Allow more call sequences to use push instructions for argument passing"
Reid Kleckner [Thu, 16 Jul 2015 01:30:00 +0000 (01:30 +0000)]
Revert "[X86] Allow more call sequences to use push instructions for argument passing"

It miscompiles some code and a reduced test case has been sent to the
author.

This reverts commit r240257.

llvm-svn: 242373

9 years agoRevert "Update LLVM bindings after r239940. ..."
Reid Kleckner [Thu, 16 Jul 2015 01:16:39 +0000 (01:16 +0000)]
Revert "Update LLVM bindings after r239940. ..."

Revert the changes to the C API LLVMBuildLandingPad that were part of
the personality function move. We now set the personality on the parent
function when the C API attempts to construct a landingpad with a
personality.

This reverts commit r240010.

llvm-svn: 242372

9 years agoPR10405 - Desugar FunctionType and TemplateSpecializationType if any type that appear...
Nikola Smiljanic [Thu, 16 Jul 2015 01:06:17 +0000 (01:06 +0000)]
PR10405 - Desugar FunctionType and TemplateSpecializationType if any type that appears inside needs to be desugared.

llvm-svn: 242371

9 years agoFix broken testcase from r242358.
Alex Lorenz [Thu, 16 Jul 2015 00:58:33 +0000 (00:58 +0000)]
Fix broken testcase from r242358.

The testcase failed on non X86 targets, because I forgot to pass the
'-march=x86-64' option into llc for one of the X86 specific tests.

llvm-svn: 242370

9 years ago[ARM] Define a subtarget feature that is used to avoid using movt/movw
Akira Hatanaka [Thu, 16 Jul 2015 00:58:23 +0000 (00:58 +0000)]
[ARM] Define a subtarget feature that is used to avoid using movt/movw
pairs for 32-bit immediates.

This change is needed to avoid emitting movt/movw pairs when doing LTO
and do so on a per-function basis.

Out-of-tree projects currently using cl::opt option -arm-use-movt=0 or
false to avoid emitting movt/movw pairs should make changes to add
subtarget feature "+no-movt" (see the changes made to clang in r242368).

rdar://problem/21529937

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

llvm-svn: 242369

9 years ago[ARM] Pass subtarget feature "+no-movt" instead of passing backend option
Akira Hatanaka [Thu, 16 Jul 2015 00:43:00 +0000 (00:43 +0000)]
[ARM] Pass subtarget feature "+no-movt" instead of passing backend option
"-arm-use-movt=0".

This change is needed since backend options do not make it to the backend
when doing LTO and are not capable of changing the behavior of code-gen
passes on a per-function basis.

rdar://problem/21529937

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

llvm-svn: 242368

9 years agoTrying to fix the windows bots.
Rafael Espindola [Thu, 16 Jul 2015 00:38:34 +0000 (00:38 +0000)]
Trying to fix the windows bots.

llvm-svn: 242367

9 years agoRevert r242365.
Evgeniy Stepanov [Thu, 16 Jul 2015 00:32:26 +0000 (00:32 +0000)]
Revert r242365.

r242365 removed two unrelated files by accident.

llvm-svn: 242366

9 years agoupdated tests for correct commit, concerning D11198
Naomi Musgrave [Thu, 16 Jul 2015 00:25:46 +0000 (00:25 +0000)]
updated tests for correct commit, concerning D11198

Summary: Updating missed changes in revision D11198

Reviewers: eugenis, kcc

Subscribers: cfe-commits

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

llvm-svn: 242365

9 years agoupdated tests for correct commit
Naomi Musgrave [Thu, 16 Jul 2015 00:25:45 +0000 (00:25 +0000)]
updated tests for correct commit

llvm-svn: 242364

9 years ago[CMake] Revisit PR23539: allow to override SANITIZER_MIN_OSX_VERSION at configure...
Alexey Samsonov [Thu, 16 Jul 2015 00:20:50 +0000 (00:20 +0000)]
[CMake] Revisit PR23539: allow to override SANITIZER_MIN_OSX_VERSION at configure time.

Some users may need to configure Clang/compiler-rt with
-DMACOSX_DEPLOYMENT_TARGET=10.6, as they expect Clang to produce working
(non-sanitized) binaries on 10.6. In this case they would need to
additionally provide -DSANITIZER_MIN_OSX_VERSION=10.7 to mark
that sanitizer runtimes may only be used on 10.7+ (where they are
supported).

llvm-svn: 242363

9 years agoFix handling of relative paths in thin archives.
Rafael Espindola [Thu, 16 Jul 2015 00:14:49 +0000 (00:14 +0000)]
Fix handling of relative paths in thin archives.

The member has to end up with a path relative to the archive.

llvm-svn: 242362

9 years agoClear kill flags in ARMLoadStoreOptimizer.
Pete Cooper [Thu, 16 Jul 2015 00:09:18 +0000 (00:09 +0000)]
Clear kill flags in ARMLoadStoreOptimizer.

The pass here was clearing kill flags on instructions which had
their sources killed in the instruction being combined.  But
given that the new instruction is inserted after the existing ones,
any existing instructions with kill flags will lead to the verifier
complaining that we are reading an undefined physreg.

For example, what we had prior to this optimization is
t2STRi12 %R1, %SP, 12
t2STRi12 %R1<kill>, %SP, 16
t2STRi12 %R0<kill>, %SP, 8

and prior to this fix that would generate
t2STRi12 %R1<kill>, %SP, 16
t2STRDi8 %R0<kill>, %R1, %SP, 8

This is clearly incorrect as it didn't clear the kill flag on R1
used with offset 16 because there was no kill flag on the instruction
with offset 12.

After this change we clear the kill flag on the offset 16 instruction
because we know it will be used afterwards in the new instruction.

I haven't provided a test case.  I have a small test, but even it is
very sensitive to register allocation order which isn't ideal.

llvm-svn: 242359

9 years agoMIR Serialization: Serialize the jump table index operands.
Alex Lorenz [Wed, 15 Jul 2015 23:38:35 +0000 (23:38 +0000)]
MIR Serialization: Serialize the jump table index operands.

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