oota-llvm.git
8 years agoMCJITTests/MCJITCAPITest.cpp: Try to appease i686-win32.
NAKAMURA Takumi [Thu, 30 Jul 2015 13:06:53 +0000 (13:06 +0000)]
MCJITTests/MCJITCAPITest.cpp: Try to appease i686-win32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243639 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][FastISel] Remove hidden mips-fast-isel option.
Vasileios Kalintiris [Thu, 30 Jul 2015 12:39:33 +0000 (12:39 +0000)]
[mips][FastISel] Remove hidden mips-fast-isel option.

Summary:
This hidden option would disable code generation through FastISel by
default. It was removed from the available options and from the
Fast-ISel tests that required it in order to run the tests.

Reviewers: dsanders

Subscribers: qcolombet, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243638 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][FastISel] Apply only zero-extension to constants prior to their materialization.
Vasileios Kalintiris [Thu, 30 Jul 2015 11:51:44 +0000 (11:51 +0000)]
[mips][FastISel] Apply only zero-extension to constants prior to their materialization.

Summary:
Previously, we would sign-extend non-boolean negative constants and
zero-extend otherwise. This was problematic for PHI instructions with
negative values that had a type with bitwidth less than that of the
register used for materialization.

More specifically, ComputePHILiveOutRegInfo() assumes the constants
present in a PHI node are zero extended in their container and
afterwards deduces the known bits.

For example, previously we would materialize an i16 -4 with the
following instruction:

  addiu $r, $zero, -4

The register would end-up with the 32-bit 2's complement representation
of -4. However, ComputePHILiveOutRegInfo() would generate a constant
with the upper 16-bits set to zero. The SelectionDAG builder would use
that information to generate an AssertZero node that would remove any
subsequent trunc & zero_extend nodes.

In theory, we should modify ComputePHILiveOutRegInfo() to consult
target-specific hooks about the way they prefer to materialize the
given constants. However, git-blame reports that this specific code
has not been touched since 2011 and it seems to be working well for every
target so far.

Reviewers: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243636 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[test-release.sh] Add -no-libunwind to disable it on targets that don't support it.
Daniel Sanders [Thu, 30 Jul 2015 10:14:57 +0000 (10:14 +0000)]
[test-release.sh] Add -no-libunwind to disable it on targets that don't support it.

Summary:
Mips doesn't implement unw_getcontext() or libunwind::Registers_*::jumpto() yet
so we must disable libunwind for this release.

Reviewers: hans

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243633 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Recognize "flags" as an identifier, not a register in Intel-syntax inline asm
Michael Kuperstein [Thu, 30 Jul 2015 10:10:25 +0000 (10:10 +0000)]
[X86] Recognize "flags" as an identifier, not a register in Intel-syntax inline asm

Patch by: marina.yatsina@intel.com
Differential Revision: http://reviews.llvm.org/D11512

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243630 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd amdopencl environment to triple
Matt Arsenault [Thu, 30 Jul 2015 08:16:51 +0000 (08:16 +0000)]
Add amdopencl environment to triple

This is used by the AMD x86 OpenCL implementation
to change some ABI details on Windows and Linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243627 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LoopVer] Add missing std::move
Adam Nemet [Thu, 30 Jul 2015 04:21:13 +0000 (04:21 +0000)]
[LoopVer] Add missing std::move

The reason I was passing this vector by value in the constructor so that
I wouldn't have to copy when initializing the corresponding member but
then I forgot the std::move.

The use-case is LoopDistribution which filters the checks then
std::moves it to LoopVersioning's constructor.  With this interface we
can avoid any copies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243616 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LDist] Filter the checks locally rather than in LAA, NFC
Adam Nemet [Thu, 30 Jul 2015 03:29:16 +0000 (03:29 +0000)]
[LDist] Filter the checks locally rather than in LAA, NFC

Before, we were passing the pointer partitions to LAA.  Now, we get all
the checks from LAA and filter out the checks within partitions in
LoopDistribution.

This effectively concludes the steps to move filtering memchecks from
LAA into its clients.  There is still some cleanup left to remove the
unused interfaces in LAA that still take PtrPartition.

(Moving this functionality to LoopDistribution also requires
needsChecking on pointers to be made public.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243613 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] implement strncmp hook for data-flow-guided fuzzing (w/ and w/o dfsan...
Kostya Serebryany [Thu, 30 Jul 2015 02:33:45 +0000 (02:33 +0000)]
[libFuzzer] implement strncmp hook for data-flow-guided fuzzing (w/ and w/o dfsan), add a test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243611 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MCJIT] Fix a memory leak in a unit test that was introduced in r243589.
Lang Hames [Thu, 30 Jul 2015 02:05:37 +0000 (02:05 +0000)]
[MCJIT] Fix a memory leak in a unit test that was introduced in r243589.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243609 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] implement memcmp hook for data-flow-guided fuzzing (w/o dfsan), extend...
Kostya Serebryany [Thu, 30 Jul 2015 01:34:58 +0000 (01:34 +0000)]
[libFuzzer] implement memcmp hook for data-flow-guided fuzzing (w/o dfsan), extend the memcmp fuzzer test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243603 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoPrefix make_reverse_iterator with llvm namespace.
Pete Cooper [Thu, 30 Jul 2015 00:40:42 +0000 (00:40 +0000)]
Prefix make_reverse_iterator with llvm namespace.

This was fallout from r243581.  Turns out C++14 has make_reverse_iterator.

Thanks to Filipe and David for the quick fix suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243598 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agopush fast-math check for machine-combiner reassociations into instruction-type check...
Sanjay Patel [Thu, 30 Jul 2015 00:04:21 +0000 (00:04 +0000)]
push fast-math check for machine-combiner reassociations into instruction-type check; NFC

This makes it simpler to add instruction types that don't depend on fast-math.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243596 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoIR: Implement Value::mergeUseLists() iteratively
Matthias Braun [Wed, 29 Jul 2015 23:22:48 +0000 (23:22 +0000)]
IR: Implement Value::mergeUseLists() iteratively

This avoids stack overflows when the the compiler does not perform tail call
elimination. Apparently this happens for MSVC with the /Ob2 switch which
may be used by external code including this header.

Reported by and based on a patch from Jean-Francois Riendeau.

Related to rdar://21900756

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243590 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MCJIT] Fix PR20656 by teaching MCJIT to honor ExecutionEngine's global mapping.
Lang Hames [Wed, 29 Jul 2015 23:12:33 +0000 (23:12 +0000)]
[MCJIT] Fix PR20656 by teaching MCJIT to honor ExecutionEngine's global mapping.

This is important for users of the C API who can't supply custom symbol
resolvers yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243589 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix typo "fuction" noticed in comments in AssumptionCache.h, and also all the other...
Nick Lewycky [Wed, 29 Jul 2015 22:32:47 +0000 (22:32 +0000)]
Fix typo "fuction" noticed in comments in AssumptionCache.h, and also all the other files that have the same typo. All comments, no functionality change! (Merely a "fuctionality" change.)

Bonus change to remove emacs major mode marker from SystemZMachineFunctionInfo.cpp because emacs already knows it's C++ from the extension. Also fix typo "appeary" in AMDGPUMCAsmInfo.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243585 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[dsymutil] Re-add command line option -v this time printing the version.
Frederic Riss [Wed, 29 Jul 2015 22:29:50 +0000 (22:29 +0000)]
[dsymutil] Re-add command line option -v this time printing the version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243584 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[dsymutil] Use option categories.
Frederic Riss [Wed, 29 Jul 2015 22:29:46 +0000 (22:29 +0000)]
[dsymutil] Use option categories.

Prevent all the unrelated LLVM options to appear in the -help output
by introducing a tool specific option category. As a drive-by improve
the wording of the help message.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243583 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[dsymutil] Rename -v option to -verbose
Frederic Riss [Wed, 29 Jul 2015 22:29:34 +0000 (22:29 +0000)]
[dsymutil] Rename -v option to -verbose

The dsymutil-classic -v option dumps the tool version rather than
putting it in verbose mode. Rename -v to -verbose and update the
tests that use it (in the process removing it from a few tests that
didn't require it anymore since the -dump-debug-map option was
introduced).
A followup commit will reintroduce the -v option that dumps the
version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243582 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReapply "Add reverse(ContainerTy) range adapter."
Pete Cooper [Wed, 29 Jul 2015 22:19:09 +0000 (22:19 +0000)]
Reapply "Add reverse(ContainerTy) range adapter."

This reverts commit r243567, which ultimately reapplies r243563.

The fix here was to use std::enable_if for overload resolution.  Thanks to David
Blaikie for lots of help on this, and for the extra tests!

Original commit message follows:

For cases where we needed a foreach loop in reverse over a container,
we had to do something like

 for (const GlobalValue *GV : make_range(TypeInfos.rbegin(),
                                         TypeInfos.rend())) {

This provides a convenience method which shortens this to

 for (const GlobalValue *GV : reverse(TypeInfos)) {

There are 2 versions of this, with a preference to the rbegin() version.

The first uses rbegin() and rend() to construct an iterator_range.

The second constructs an iterator_range from the begin() and end() methods
wrapped in std::reverse_iterator's.

Reviewed by David Blaikie.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243581 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRename hasCompatibleFunctionAttributes->areInlineCompatible based
Eric Christopher [Wed, 29 Jul 2015 22:09:48 +0000 (22:09 +0000)]
Rename hasCompatibleFunctionAttributes->areInlineCompatible based
on suggestions. Currently the function is only used for inline purposes
and this is more descriptive for the use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243578 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Keep 32-bit target i64 vector shifts on SSE unit.
Simon Pilgrim [Wed, 29 Jul 2015 21:44:27 +0000 (21:44 +0000)]
[X86][SSE] Keep 32-bit target i64 vector shifts on SSE unit.

This patch improves the 32-bit target i64 constant matching to detect the shuffle vector splats that are introduced by i64 vector shift vectorization (D8416).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243577 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: use 32-bit MOV rather than UBFX to truncate registers.
Tim Northover [Wed, 29 Jul 2015 21:34:32 +0000 (21:34 +0000)]
AArch64: use 32-bit MOV rather than UBFX to truncate registers.

It's potentially more efficient on Cyclone, and from the optimization guides &
schedulers looks like it has no effect on Cortex-A53 or A57. In general you'd
expect a MOV to be about the most efficient instruction with its semantics,
even though the official "UXTW" alias is really a UBFX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243576 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Serialization: Serialize the frame info's save and restore points.
Alex Lorenz [Wed, 29 Jul 2015 21:09:09 +0000 (21:09 +0000)]
MIR Serialization: Serialize the frame info's save and restore points.

This commit serializes the save and restore machine basic block references from
the machine frame information class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243575 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Parser: Extract the code that parses MBB references into a new method. NFC.
Alex Lorenz [Wed, 29 Jul 2015 20:57:11 +0000 (20:57 +0000)]
MIR Parser: Extract the code that parses MBB references into a new method. NFC.

This commit extracts the code that's used by the class 'MIRParserImpl' to parse
the machine basic block references into a new method named 'parseMBBReference'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243572 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Vectorize i64 ASHR operations
Simon Pilgrim [Wed, 29 Jul 2015 20:31:45 +0000 (20:31 +0000)]
[X86][SSE] Vectorize i64 ASHR operations

This patch vectorizes the v2i64/v4i64 ASHR shift operations - the last remaining integer vector shifts that are still being transferred to/from the scalar unit to be completed.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243569 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Add reverse(ContainerTy) range adapter."
Pete Cooper [Wed, 29 Jul 2015 20:29:10 +0000 (20:29 +0000)]
Revert "Add reverse(ContainerTy) range adapter."

This reverts commit r243563.

The GCC buildbots were extremely unhappy about this.  Reverting while
we discuss a better way of doing overload resolution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243567 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[opaque pointers] Remove use of PointerType::getElementType in favor of GEPOperator...
David Blaikie [Wed, 29 Jul 2015 20:26:23 +0000 (20:26 +0000)]
[opaque pointers] Remove use of PointerType::getElementType in favor of GEPOperator::getSourceElementType

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243566 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd reverse(ContainerTy) range adapter.
Pete Cooper [Wed, 29 Jul 2015 20:00:39 +0000 (20:00 +0000)]
Add reverse(ContainerTy) range adapter.

For cases where we needed a foreach loop in reverse over a container,
we had to do something like

  for (const GlobalValue *GV : make_range(TypeInfos.rbegin(),
                                          TypeInfos.rend())) {

This provides a convenience method which shortens this to

  for (const GlobalValue *GV : reverse(TypeInfos)) {

There are 2 versions of this, with a preference to the rbegin() version.

The first uses rbegin() and rend() to construct an iterator_range.

The second constructs an iterator_range from the begin() and end() methods
wrapped in std::reverse_iterator's.

Reviewed by David Blaikie.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243563 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ASan] Disable dynamic alloca and UAR detection in presence of returns_twice calls.
Alexey Samsonov [Wed, 29 Jul 2015 19:36:08 +0000 (19:36 +0000)]
[ASan] Disable dynamic alloca and UAR detection in presence of returns_twice calls.

Summary:
returns_twice (most importantly, setjmp) functions are
optimization-hostile: if local variable is promoted to register, and is
changed between setjmp() and longjmp() calls, this update will be
undone. This is the reason why "man setjmp" advises to mark all these
locals as "volatile".

This can not be enough for ASan, though: when it replaces static alloca
with dynamic one, optionally called if UAR mode is enabled, it adds a
whole lot of SSA values, and computations of local variable addresses,
that can involve virtual registers, and cause unexpected behavior, when
these registers are restored from buffer saved in setjmp.

To fix this, just disable dynamic alloca and UAR tricks whenever we see
a returns_twice call in the function.

Reviewers: rnk

Subscribers: llvm-commits, kcc

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243561 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-objdump] Inverting logic to match the word "predicate". Returning true when...
Colin LeMahieu [Wed, 29 Jul 2015 19:21:13 +0000 (19:21 +0000)]
[llvm-objdump] Inverting logic to match the word "predicate".  Returning true when we want it rather than when we want to discard it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243558 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-objdump] Merging MachO DumpSections in to FilterSections. Simplifying some...
Colin LeMahieu [Wed, 29 Jul 2015 19:08:10 +0000 (19:08 +0000)]
[llvm-objdump] Merging MachO DumpSections in to FilterSections.  Simplifying some predicate logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243556 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRoll forward r242871
Jingyue Wu [Wed, 29 Jul 2015 18:59:09 +0000 (18:59 +0000)]
Roll forward r242871

r242871 missed one place that should be guarded with isPhysicalReg. This patch
fixes that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243555 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Serialization: Serialize the '.cfi_def_cfa' CFI instruction.
Alex Lorenz [Wed, 29 Jul 2015 18:57:23 +0000 (18:57 +0000)]
MIR Serialization: Serialize the '.cfi_def_cfa' CFI instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243554 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Parser: Parse multiple LHS register machine operands.
Alex Lorenz [Wed, 29 Jul 2015 18:51:21 +0000 (18:51 +0000)]
MIR Parser: Parse multiple LHS register machine operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243553 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agomove DAGCombiner's allowableAlignment() helper function into the TLI
Sanjay Patel [Wed, 29 Jul 2015 18:24:18 +0000 (18:24 +0000)]
move DAGCombiner's allowableAlignment() helper function into the TLI

Making allowableAlignment() more accessible was suggested as a predecessor patch
for D10662, so I've pulled it into TargetLowering. This let's us remove 4 instances
of duplicate logic in LegalizeDAG.

There's a subtle functional change in the implementation: the existing
allowableAlignment() code was using getPrefTypeAlignment() when checking
alignment with the DataLayout and assumed that was fast. In this implementation,
we use getABITypeAlignment() and assume that is fast. See the TODO comment or the
discussion in the Phab review for future improvements in this implementation
(don't use the data layout at all).

There are no regression test changes from this difference, and I'm not sure how to
expose it via a test. I think we actually do want to provide the 'Fast' param when
checking this from DAGCombiner::MergeConsecutiveStores(). Ie, we shouldn't merge
stores if the new stores are not going to be fast. But that change will require
fixing allowsMisalignedMemoryAccess() overrides as noted in D10662.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243549 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[asan] Remove special case mapping on Android/AArch64.
Evgeniy Stepanov [Wed, 29 Jul 2015 18:22:25 +0000 (18:22 +0000)]
[asan] Remove special case mapping on Android/AArch64.

ASan shadow on Android starts at address 0 for both historic and
performance reasons. This is possible because the platform mandates
-pie, which makes lower memory region always available.

This is not such a good idea on 64-bit platforms because of MAP_32BIT
incompatibility.

This patch changes Android/AArch64 mapping to be the same as that of
Linux/AAarch64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243548 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoLowerBitSets: Add debugging output.
Peter Collingbourne [Wed, 29 Jul 2015 18:12:36 +0000 (18:12 +0000)]
LowerBitSets: Add debugging output.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243546 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Unroll] Handle SwitchInst properly.
Michael Zolotukhin [Wed, 29 Jul 2015 18:10:33 +0000 (18:10 +0000)]
[Unroll] Handle SwitchInst properly.

Previously successor selection was simply wrong.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243545 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Unroll] Don't crash when simplified branch condition is undef.
Michael Zolotukhin [Wed, 29 Jul 2015 18:10:29 +0000 (18:10 +0000)]
[Unroll] Don't crash when simplified branch condition is undef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243544 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRename test full-unroll-bad-geps.ll to full-unroll-crashers.ll.
Michael Zolotukhin [Wed, 29 Jul 2015 18:10:23 +0000 (18:10 +0000)]
Rename test full-unroll-bad-geps.ll to full-unroll-crashers.ll.

No reason to limit it only to GEP-related crashes. More tests are to
come here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243543 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix typos in comments. NFC.
Lang Hames [Wed, 29 Jul 2015 18:07:48 +0000 (18:07 +0000)]
Fix typos in comments. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243542 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[PeepholeOptimizer] Look through PHIs to find additional register sources"
Bruno Cardoso Lopes [Wed, 29 Jul 2015 17:46:47 +0000 (17:46 +0000)]
Revert "[PeepholeOptimizer] Look through PHIs to find additional register sources"

Reported to Broke some internal tests: PR24303

This reverts commit r243486.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243540 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd an ArgList::AddAllArgs that accepts a vector of OptSpecifier.
Douglas Katzman [Wed, 29 Jul 2015 17:34:41 +0000 (17:34 +0000)]
Add an ArgList::AddAllArgs that accepts a vector of OptSpecifier.

This lifts the somewhat arbitrary restriction on 3 OptSpecifiers.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243539 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: use AddressingModes.h accessors for compare shifts
Tim Northover [Wed, 29 Jul 2015 16:39:56 +0000 (16:39 +0000)]
AArch64: use AddressingModes.h accessors for compare shifts

No functional change because "lsl #12" is actually encoded as 12, but one less
bug if someone ever decides to change that for the giggles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243536 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agotest-release.sh: Add option for building the OpenMP run-time
Hans Wennborg [Wed, 29 Jul 2015 16:29:06 +0000 (16:29 +0000)]
test-release.sh: Add option for building the OpenMP run-time

This isn't part of the official release process, but provides a convenient way
to build binaries for those who want to experiment with it. Hopefully the run-
time can be part of the regular build and release process for 3.8.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243531 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReverting r243386 because it has serious post-commit concerns that have not been...
Aaron Ballman [Wed, 29 Jul 2015 15:57:49 +0000 (15:57 +0000)]
Reverting r243386 because it has serious post-commit concerns that have not been addressed. Also reverts r243389, which relied on this commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243527 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-objdump] Added -j flag to filter sections that are operated on.
Colin LeMahieu [Wed, 29 Jul 2015 15:45:39 +0000 (15:45 +0000)]
[llvm-objdump] Added -j flag to filter sections that are operated on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243526 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTemporarily revert r242871
Jingyue Wu [Wed, 29 Jul 2015 15:26:11 +0000 (15:26 +0000)]
Temporarily revert r242871

PR24299

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243522 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PPC] Fix PR24216: Don't generate splat for misaligned shuffle mask
Bill Schmidt [Wed, 29 Jul 2015 14:31:57 +0000 (14:31 +0000)]
[PPC] Fix PR24216: Don't generate splat for misaligned shuffle mask

Given certain shuffle-vector masks, LLVM emits splat instructions
which splat the wrong bytes from the source register.  The issue is
that the function PPC::isSplatShuffleMask() in PPCISelLowering.cpp
does not ensure that the splat pattern found is requesting bytes that
are aligned on an EltSize boundary.  This patch detects this situation
as not a valid splat mask, resulting in a permute being generated
instead of a splat.

Patch and test case by Tyler Kenney, cleaned up a bit by me.

This is a simple bug fix that would be good to incorporate into 3.7.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243519 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AArch64] Define subtarget feature strict-align.
Akira Hatanaka [Wed, 29 Jul 2015 14:17:26 +0000 (14:17 +0000)]
[AArch64] Define subtarget feature strict-align.

This commit defines subtarget feature strict-align and uses it instead of
cl::opt -aarch64-strict-align to decide whether strict alignment should be
forced.

rdar://problem/21529937

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243516 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMake function comments consistently imperative.
Bjarke Hammersholt Roune [Wed, 29 Jul 2015 00:29:08 +0000 (00:29 +0000)]
Make function comments consistently imperative.

(tiny edit, mostly a test that my new commit access works)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243505 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Statepoints] Let patchable statepoints have a symbolic call target.
Sanjoy Das [Tue, 28 Jul 2015 23:50:30 +0000 (23:50 +0000)]
[Statepoints] Let patchable statepoints have a symbolic call target.

Summary:
As added initially, statepoints required their call targets to be a
constant pointer null if ``numPatchBytes`` was non-zero.  This turns out
to be a problem ergonomically, since there is no way to mark patchable
statepoints as calling a (readable) symbolic value.

This change remove the restriction of requiring ``null`` call targets
for patchable statepoints, and changes PlaceSafepoints to maintain the
symbolic call target through its transformation.

Reviewers: reames, swaroop.sridhar

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243502 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix broken ArrayRef conversion from r243497.
Alex Lorenz [Tue, 28 Jul 2015 23:34:27 +0000 (23:34 +0000)]
Fix broken ArrayRef conversion from r243497.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243501 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoignore duplicate divisor uses when transforming into reciprocal multiplies (PR24141)
Sanjay Patel [Tue, 28 Jul 2015 23:28:22 +0000 (23:28 +0000)]
ignore duplicate divisor uses when transforming into reciprocal multiplies (PR24141)

PR24141: https://llvm.org/bugs/show_bug.cgi?id=24141
contains a test case where we have duplicate entries in a node's uses() list.

After r241826, we use CombineTo() to delete dead nodes when combining the uses into
reciprocal multiplies, but this fails if we encounter the just-deleted node again in
the list.

The solution in this patch is to not add duplicate entries to the list of users that
we will subsequently iterate over. For the test case, this avoids triggering the
combine divisors logic entirely because there really is only one user of the divisor.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243500 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix TLI's combineRepeatedFPDivisors interface to return the minimum user threshold
Sanjay Patel [Tue, 28 Jul 2015 23:05:48 +0000 (23:05 +0000)]
fix TLI's combineRepeatedFPDivisors interface to return the minimum user threshold

This fix was suggested as part of D11345 and is part of fixing PR24141.

With this change, we can avoid walking the uses of a divisor node if the target
doesn't want the combineRepeatedFPDivisors transform in the first place.

There is no NFC-intended other than that.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243498 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Serialization: Serialize the target index machine operands.
Alex Lorenz [Tue, 28 Jul 2015 23:02:45 +0000 (23:02 +0000)]
MIR Serialization: Serialize the target index machine operands.

Reviewers: Duncan P. N. Exon Smith

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243497 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Define subtarget feature strict-align.
Akira Hatanaka [Tue, 28 Jul 2015 22:44:28 +0000 (22:44 +0000)]
[ARM] Define subtarget feature strict-align.

This commit defines subtarget feature strict-align and uses it instead of
cl::opt -arm-strict-align to decide whether strict alignment should be
forced. Also, remove the logic that was checking the OS and architecture
as clang is now responsible for setting strict-align based on the command
line options specified and the target architecute and OS.

rdar://problem/21529937

http://reviews.llvm.org/D11470

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243493 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: be careful of large immediates when optimising cmps.
Tim Northover [Tue, 28 Jul 2015 22:42:32 +0000 (22:42 +0000)]
AArch64: be careful of large immediates when optimising cmps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243492 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[tests] Use llvm-readobj instead of macho-dump.
Davide Italiano [Tue, 28 Jul 2015 21:58:08 +0000 (21:58 +0000)]
[tests] Use llvm-readobj instead of macho-dump.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243487 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PeepholeOptimizer] Look through PHIs to find additional register sources
Bruno Cardoso Lopes [Tue, 28 Jul 2015 21:45:50 +0000 (21:45 +0000)]
[PeepholeOptimizer] Look through PHIs to find additional register sources

Reapply 243271 with more fixes; although we are not handling multiple
sources with coalescable copies, we were not properly skipping this
case.

- Teaches the ValueTracker in the PeepholeOptimizer to look through PHI
instructions.
- Add findNextSourceAndRewritePHI method to lookup into multiple sources
returnted by the ValueTracker and rewrite PHIs with new sources.

With these changes we can find more register sources and rewrite more
copies to allow coaslescing of bitcast instructions. Hence, we eliminate
unnecessary VR64 <-> GR64 copies in x86, but it could be extended to
other archs by marking "isBitcast" on target specific instructions. The
x86 example follows:

A:
  psllq %mm1, %mm0
  movd  %mm0, %r9
  jmp C

B:
  por %mm1, %mm0
  movd  %mm0, %r9
  jmp C

C:
  movd  %r9, %mm0
  pshufw  $238, %mm0, %mm0

Becomes:

A:
  psllq %mm1, %mm0
  jmp C

B:
  por %mm1, %mm0
  jmp C

C:
  pshufw  $238, %mm0, %mm0

Differential Revision: http://reviews.llvm.org/D11197
rdar://problem/20404526

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243486 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][FastISel] Fix call lowering by bailing out on "fastcc" calls.
Vasileios Kalintiris [Tue, 28 Jul 2015 21:43:31 +0000 (21:43 +0000)]
[mips][FastISel] Fix call lowering by bailing out on "fastcc" calls.

Summary:
Currently, we support only the MIPS O32 ABI calling convention for call
lowering. With this change we avoid using the O32 calling convetion for
lowering calls marked as using the fast calling convention.

Reviewers: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243485 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RuntimeDyld] Remove a memory-leak that was introduced in r243456. Thanks to Ben
Lang Hames [Tue, 28 Jul 2015 20:51:53 +0000 (20:51 +0000)]
[RuntimeDyld] Remove a memory-leak that was introduced in r243456. Thanks to Ben
Kramer for catching this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243476 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix typo.
Chih-Hung Hsieh [Tue, 28 Jul 2015 20:38:29 +0000 (20:38 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243475 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoLimit this test only on linux.
Chih-Hung Hsieh [Tue, 28 Jul 2015 20:31:10 +0000 (20:31 +0000)]
Limit this test only on linux.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243474 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Unroll] Add debug dumps to loop-unroll analyzer.
Michael Zolotukhin [Tue, 28 Jul 2015 20:07:29 +0000 (20:07 +0000)]
[Unroll] Add debug dumps to loop-unroll analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243471 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][FastISel] Fix generated code for IR's select instruction.
Vasileios Kalintiris [Tue, 28 Jul 2015 19:57:25 +0000 (19:57 +0000)]
[mips][FastISel] Fix generated code for IR's select instruction.

Summary:
Generate correct code for the select instruction by zero-extending
it's boolean/condition operand to GPR-width. This is necessary because
the conditional-move instructions operate on the whole register.

Reviewers: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243469 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Unroll] Don't analyze blocks outside the loop.
Michael Zolotukhin [Tue, 28 Jul 2015 19:21:21 +0000 (19:21 +0000)]
[Unroll] Don't analyze blocks outside the loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243466 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Don't try to use LDS/vector for private if pointer value stored
Matt Arsenault [Tue, 28 Jul 2015 18:47:00 +0000 (18:47 +0000)]
AMDGPU: Don't try to use LDS/vector for private if pointer value stored

If the pointer is the store's value operand, this would produce
a broken module. Make sure the use is actually for the pointer operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243462 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix crash if called function is a bitcast
Matt Arsenault [Tue, 28 Jul 2015 18:29:14 +0000 (18:29 +0000)]
AMDGPU: Fix crash if called function is a bitcast

getCalledFunction() is null, so this would crash. Replace
crash with an error on unsupported call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243461 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SCEV] Apply NSW and NUW flags via poison value analysis
Jingyue Wu [Tue, 28 Jul 2015 18:22:40 +0000 (18:22 +0000)]
[SCEV] Apply NSW and NUW flags via poison value analysis

Summary:
Make Scalar Evolution able to propagate NSW and NUW flags from instructions to SCEVs in some cases. This is based on reasoning about when poison from instructions with these flags would trigger undefined behavior. This gives a 13% speed-up on some Eigen3-based Google-internal microbenchmarks for NVPTX.

There does not seem to be clear agreement about when poison should be considered to propagate through instructions. In this analysis, poison propagates only in cases where that should be uncontroversial.

This change makes LSR able to create induction variables for expressions like &ptr[i + offset] for loops like this:

  for (int i = 0; i < limit; ++i) {
    sum += ptr[i + offset];
  }

Here ptr is a 64 bit pointer and offset is a 32 bit integer. For NVPTX, LSR currently creates an induction variable for i + offset instead, which is not as fast. Improving this situation is what brings the 13% speed-up on some Eigen3-based Google-internal microbenchmarks for NVPTX.

There are more details in this discussion on llvmdev.
June: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-June/thread.html#87234
July: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-July/thread.html#87392

Patch by Bjarke Roune

Reviewers: eliben, atrick, sanjoy

Subscribers: majnemer, hfinkel, jingyue, meheff, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243460 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix return type of getImplicitParameterOffset.
Matt Arsenault [Tue, 28 Jul 2015 18:09:55 +0000 (18:09 +0000)]
AMDGPU: Fix return type of getImplicitParameterOffset.

Patch by Zoltan Gilian <zoltan.gilian@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243459 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd a test case for r242191 ([MMX] Use the appropriate instructions for
Alex Lorenz [Tue, 28 Jul 2015 17:52:59 +0000 (17:52 +0000)]
Add a test case for r242191 ([MMX] Use the appropriate instructions for
GR64 <-> VR64 copies).

This commit adds a MIR test case for the commit r242191, which was committed
without one. This test case verifies that the ExpandPostRA pass expands the
GR64 <-> VR64 copies into the appropriate MMX_MOV instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243457 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RuntimeDyld] Make LoadedObjectInfo::getLoadedSectionAddress take a SectionRef
Lang Hames [Tue, 28 Jul 2015 17:52:11 +0000 (17:52 +0000)]
[RuntimeDyld] Make LoadedObjectInfo::getLoadedSectionAddress take a SectionRef
rather than a string section name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243456 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMove unit tests to target specific directories.
Chih-Hung Hsieh [Tue, 28 Jul 2015 17:32:49 +0000 (17:32 +0000)]
Move unit tests to target specific directories.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243454 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Serialization: Serialize the block address machine operands.
Alex Lorenz [Tue, 28 Jul 2015 17:28:03 +0000 (17:28 +0000)]
MIR Serialization: Serialize the block address machine operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243453 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoWebAssembly: MCAsmInfo only has one syntax variant for now.
JF Bastien [Tue, 28 Jul 2015 17:23:07 +0000 (17:23 +0000)]
WebAssembly: MCAsmInfo only has one syntax variant for now.

Summary: MCAsmInfo is set up with the default AssemblerDialect, which is zero.

Subscribers: llvm-commits, sunfish, jfb

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243452 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoadd tests to show broken current behavior of minsize attribute
Sanjay Patel [Tue, 28 Jul 2015 17:18:25 +0000 (17:18 +0000)]
add tests to show broken current behavior of minsize attribute

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243451 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Parser: Extract the method 'parseGlobalValue'. NFC.
Alex Lorenz [Tue, 28 Jul 2015 17:09:52 +0000 (17:09 +0000)]
MIR Parser: Extract the method 'parseGlobalValue'. NFC.

This commit extracts the code that parses a global value from the method
'parseGlobalAddressOperand' into a new method 'parseGlobalValue', so that this
code can be reused by the method which will parse the block address machine
operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243450 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Parser: Move the function 'lexName'. NFC.
Alex Lorenz [Tue, 28 Jul 2015 17:03:40 +0000 (17:03 +0000)]
MIR Parser: Move the function 'lexName'. NFC.

This commit moves the function 'lexName' to the start of the file so it can
be reused by the function which will lex the named LLVM IR block references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243449 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Printer: Remove an outdated TODO comment and assertion. NFC.
Alex Lorenz [Tue, 28 Jul 2015 16:56:45 +0000 (16:56 +0000)]
MIR Printer: Remove an outdated TODO comment and assertion. NFC.

This commit removes an outdated TODO comment and a corresponding assertion
which asserts that the mir printer can't the print machine basic blocks that
aren't sequentially numbered.

This comment and assertion were correct when I was working on the patch which
serialized the machine basic blocks, but then I decided to add an 'ID'
attribute to the machine basic block's YAML mapping based on the patch review.
This comment and assertion then became invalid as with the 'ID' attribute we
can serialize the non sequential machine basic blocks and their references
without any problems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243447 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Parser: Remove redundant parameters. NFC.
Alex Lorenz [Tue, 28 Jul 2015 16:48:37 +0000 (16:48 +0000)]
MIR Parser: Remove redundant parameters. NFC.

This commit removes the redundant parameters from the two methods
'initializeRegisterInfo' and 'initializeFrameInfo'. The removed parameters are
redundant as we are already passing in the 'MachineFunction' to those methods,
and those parameters can be derived from the machine function parameter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243445 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoImplement target independent TLS compatible with glibc's emutls.c.
Chih-Hung Hsieh [Tue, 28 Jul 2015 16:24:05 +0000 (16:24 +0000)]
Implement target independent TLS compatible with glibc's emutls.c.

The 'common' section TLS is not implemented.
Current C/C++ TLS variables are not placed in common section.
DWARF debug info to get the address of TLS variables is not generated yet.

clang and driver changes in http://reviews.llvm.org/D10524

  Added -femulated-tls flag to select the emulated TLS model,
  which will be used for old targets like Android that do not
  support ELF TLS models.

Added TargetLowering::LowerToTLSEmulatedModel as a target-independent
function to convert a SDNode of TLS variable address to a function call
to __emutls_get_address.

Added into lib/Target/*/*ISelLowering.cpp to call LowerToTLSEmulatedModel
for TLSModel::Emulated. Although all targets supporting ELF TLS models are
enhanced, emulated TLS model has been tested only for Android ELF targets.
Modified AsmPrinter.cpp to print the emutls_v.* and emutls_t.* variables for
emulated TLS variables.
Modified DwarfCompileUnit.cpp to skip some DIE for emulated TLS variabls.

TODO: Add proper DIE for emulated TLS variables.
      Added new unit tests with emulated TLS.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243438 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSummary:
Martell Malone [Tue, 28 Jul 2015 16:18:17 +0000 (16:18 +0000)]
Summary:
Object: add IMAGE_FILE_MACHINE_ARM64

The official specifications state that the value of IMAGE_FILE_MACHINE_ARM64
is 0xAA64 (as per the Microsoft Portable Executable and Common Object Format
Specification v8.3).

Reviewers: rnk

Subscribers: llvm-commits, compnerd, ruiu

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243434 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LVI] Cleanup whitespaces. NFC
Bruno Cardoso Lopes [Tue, 28 Jul 2015 15:53:21 +0000 (15:53 +0000)]
[LVI] Cleanup whitespaces. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243430 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix formatting; NFC
Sanjay Patel [Tue, 28 Jul 2015 15:38:43 +0000 (15:38 +0000)]
fix formatting; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243424 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AArch64] Match float round and convert to int instructions.
Geoff Berry [Tue, 28 Jul 2015 15:24:10 +0000 (15:24 +0000)]
[AArch64] Match float round and convert to int instructions.

Summary:
Add patterns for doing floating point round with various rounding modes
followed by conversion to int as a single FCVT* instruction.

Reviewers: t.p.northover, jmolloy

Subscribers: aemerson, rengolin, mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243422 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse a specified list of languages in cmake project() command.
Douglas Katzman [Tue, 28 Jul 2015 14:43:53 +0000 (14:43 +0000)]
Use a specified list of languages in cmake project() command.

This allows asm files and Cxx files to be compiled with different flags
rather than treating them identically. LLVM itself has no asm files
other than tests, but this setting is inherited by the compiler-rt
project (unless compiled standalone), which does have asm files.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243419 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LAA] Add clarifying comments for the checking pointer grouping algorithm. NFC
Silviu Baranga [Tue, 28 Jul 2015 13:44:08 +0000 (13:44 +0000)]
[LAA] Add clarifying comments for the checking pointer grouping algorithm. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243416 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoImplement __builtin_thread_pointer
Adhemerval Zanella [Tue, 28 Jul 2015 13:03:31 +0000 (13:03 +0000)]
Implement __builtin_thread_pointer

This path add the aarch64 lowering of __builtin_thread_pointer.  It uses
the already implemented AArch64ISD::THREAD_POINTER used in TLS generation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243412 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agodocs: update arcanist links
Martell Malone [Tue, 28 Jul 2015 11:43:37 +0000 (11:43 +0000)]
docs: update arcanist links

Summary:
I need a test commit for using arc.
This seems like an appropriate commit to use as a test

We may want to port this commit back to 3.7 also

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243408 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[GMR] Teach GlobalsModRef to distinguish an important and safe case of
Chandler Carruth [Tue, 28 Jul 2015 11:11:11 +0000 (11:11 +0000)]
[GMR] Teach GlobalsModRef to distinguish an important and safe case of
no-alias with non-addr-taken globals: they cannot alias a captured
pointer.

If the non-global underlying object would have been a capture were it to
alias the global, we can firmly conclude no-alias. It isn't reasonable
for a transformation to introduce a capture in a way observable by an
alias analysis. Consider, even if it were to temporarily capture one
globals address into another global and then restore the other global
afterward, there would be no way for the load in the alias query to
observe that capture event correctly. If it observes it then the
temporary capturing would have changed the meaning of the program,
making it an invalid transformation. Even instrumentation passes or
a pass which is synthesizing stores to global variables to expose race
conditions in programs could not trigger this unless it queried the
alias analysis infrastructure mid-transform, in which case it seems
reasonable to return results from before the transform started.

See the comments in the change for a more detailed outlining of the
theory here.

This should address the primary performance regression found when the
non-conservatively-correct path of the alias query was disabled.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243405 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoImproving lli documentation
Renato Golin [Tue, 28 Jul 2015 10:24:11 +0000 (10:24 +0000)]
Improving lli documentation

Too many people hope lli would act as an emulator when it's actually
just a tool to help prototype IR code and test the JIT compiler. This
commit makes that fact explicit in the documentation

It also migrates the old style bold/italic doc tags to the preferred
meta tags (.. option::, :program:, etc).

No errors when generating the documents, visual inspection in the HTML
result doesn't show any major difference, apart from the slight style
change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243401 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Remove mergeSPUpdatesUp()
Michael Kuperstein [Tue, 28 Jul 2015 08:56:13 +0000 (08:56 +0000)]
[X86] Remove mergeSPUpdatesUp()

X86FrameLowering has both a mergeSPUpdates() that accepts a direction, and an
mergeSPUpdatesUp(), which seem to do the same thing, except for a slightly
different interface. Removed the less general function.
NFC.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243396 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Use bitmasks instead of shuffles where possible.
Simon Pilgrim [Tue, 28 Jul 2015 08:54:41 +0000 (08:54 +0000)]
[X86][SSE] Use bitmasks instead of shuffles where possible.

VPAND is a lot faster than VPSHUFB and VPBLENDVB - this patch ensures we attempt to lower to a basic bitmask before lowering to the slower byte shuffle/blend instructions.

Split off from D11518.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243395 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX512: Add encoding tests to vptestnm instructions
Igor Breger [Tue, 28 Jul 2015 07:00:00 +0000 (07:00 +0000)]
AVX512: Add encoding tests to vptestnm instructions

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243391 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX512: Implemented encoding and intrinsics for VGETEXPSS/D instructions
Igor Breger [Tue, 28 Jul 2015 06:53:28 +0000 (06:53 +0000)]
AVX512: Implemented encoding and intrinsics for VGETEXPSS/D instructions
Added tests for intrinsics and encoding.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243390 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoChanges for MachineBasicBlock to use SortedVector for LiveIns.
Puyan Lotfi [Tue, 28 Jul 2015 06:38:41 +0000 (06:38 +0000)]
Changes for MachineBasicBlock to use SortedVector for LiveIns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243389 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMove the Target way of overriding DAG Scheduler to a target hook
Mehdi Amini [Tue, 28 Jul 2015 06:18:04 +0000 (06:18 +0000)]
Move the Target way of overriding DAG Scheduler to a target hook

Summary:
The previous way of overriding it was relying on calling "setDefault"
on the global registry, which implies global mutable state.

Reviewers: echristo, atrick

Subscribers: llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243388 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdding ADT SortedVector; client patch will follow.
Puyan Lotfi [Tue, 28 Jul 2015 06:04:00 +0000 (06:04 +0000)]
Adding ADT SortedVector; client patch will follow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243386 91177308-0d34-0410-b5e6-96231b3b80d8