Commit Graph

229521 Commits

Author SHA1 Message Date
Marcin Koscielnicki ee587cba0e [ASan] Add shadow offset for SystemZ.
This is the compiler-rt counterpart to D19650.

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

llvm-svn: 268162
2016-04-30 10:02:12 +00:00
Marcin Koscielnicki 57290f934a [ASan] Add shadow offset for SystemZ.
SystemZ on Linux currently has 53-bit address space.  In theory, the hardware
could support a full 64-bit address space, but that's not supported due to
kernel limitations (it'd require 5-level page tables), and there are no plans
for that.  The default process layout stays within first 4TB of address space
(to avoid creating 4-level page tables), so any offset >= (1 << 42) is fine.
Let's use 1 << 52 here, ie. exactly half the address space.

I've originally used 7 << 50 (uses top 1/8th of the address space), but ASan
runtime assumes there's some space after the shadow area.  While this is
fixable, it's simpler to avoid the issue entirely.

Also, I've originally wanted to have the shadow aligned to 1/8th the address
space, so that we can use OR like X86 to assemble the offset.  I no longer
think it's a good idea, since using ADD enables us to load the constant just
once and use it with register + register indexed addressing.

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

llvm-svn: 268161
2016-04-30 09:57:34 +00:00
Filipe Cabecinhas 30cba35a84 Finally fix invalid-pointer-pairs.cc. This time the demangle on the Windows buildbot.
llvm-svn: 268160
2016-04-30 08:34:40 +00:00
Simon Pilgrim 8e38a5439b [InstCombine][AVX] Split off VPERMILVAR tests and added additional tests for UNDEF mask elements
llvm-svn: 268159
2016-04-30 07:32:19 +00:00
Simon Pilgrim 640f9964c7 [InstCombine][AVX] VPERMILVAR to shuffle combine to use general aggregate elements. NFCI.
Make use of Constant::getAggregateElement instead of checking constant types - first step towards adding support for UNDEF mask elements.

llvm-svn: 268158
2016-04-30 07:23:30 +00:00
Kuba Brecka 9ccde5ace4 [tsan] Return 0 from malloc_size for non-malloc'd pointers
In http://reviews.llvm.org/D19100, I introduced a bug: On OS X, existing programs rely on malloc_size() to detect whether a pointer comes from heap memory (malloc_size returns non-zero) or not. We have to distinguish between a zero-sized allocation (where we need to return 1 from malloc_size, due to other binary compatibility reasons, see http://reviews.llvm.org/D19100), and pointers that are not returned from malloc at all.

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

llvm-svn: 268157
2016-04-30 07:14:41 +00:00
Chris Bieneman eb5bd02a7e Stab in the dark to fix the PS4 bot
r268127 is causing the PS4 bots to fail. Not sure what is causing it, but hopefully this will fix it.

llvm-svn: 268156
2016-04-30 05:27:17 +00:00
Sriraman Tallam c198d3344e Differential Revision: http://reviews.llvm.org/D19753
Delete Target Option PositionIndependentExecutable as PIE is now part of module flags.

llvm-svn: 268155
2016-04-30 04:18:52 +00:00
Tom Stellard c51e4468b7 AMDGPU/SI: Remove wait state handling for SMRD in SIInsertWaits
This was supposed to be part of r268143.

llvm-svn: 268154
2016-04-30 04:04:48 +00:00
Eric Fiselier 53ca3c93db Replace one more occurrence of non-standard std:launch::any. Patch from STL@microsoft.com
llvm-svn: 268153
2016-04-30 02:30:18 +00:00
Hal Finkel 17e9754dd4 [PowerPC/QPX] Fix the load/splat peephole with overlapping reads
If, in between the splat and the load (which does an implicit splat), there is
a read of the splat register, then that register must have another earlier
definition. In that case, we can't replace the load's destination register with
the splat's destination register.

Unfortunately, I don't have a small or non-fragile test case.

llvm-svn: 268152
2016-04-30 01:59:28 +00:00
Amjad Aboud dc4531e552 Reverting 268055 as it caused PR27579.
llvm-svn: 268151
2016-04-30 01:44:38 +00:00
Amjad Aboud 72da9391f0 Reverting 268054 & 268063 as they caused PR27579.
llvm-svn: 268150
2016-04-30 01:44:07 +00:00
Rafael Espindola a85efd985c Don't create dynamic relocations to ro segments.
These would just crash at runtime.

If we ever decide to support rw text segments this should make it easier
to implement as there is now a single point where we notice the problem.

I have tested this with a freebsd buildworld. It found a non pic
assembly file being linked into a .so,. With that fixed, buildworld
finished.

llvm-svn: 268149
2016-04-30 01:15:17 +00:00
Sanjoy Das 47cf2affbd [LowerGuardIntrinsics] Keep track of !make.implicit metadata
If a guard call being lowered by LowerGuardIntrinsics has the
`!make.implicit` metadata attached, then reattach the metadata to the
branch in the resulting expanded form of the intrinsic.  This allows us
to implement null checks as guards and still get the benefit of implicit
null checks.

llvm-svn: 268148
2016-04-30 00:55:59 +00:00
Lawrence Hu 1befea2bdc Reroll loops with multiple IV and negative step part 3
support multiple induction variables

    This patch enable loop reroll for the following case:
        for(int i=0;  i<N; i += 2) {
           S += *a++;
           S += *a++;
        };

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

llvm-svn: 268147
2016-04-30 00:51:22 +00:00
Lang Hames df29078dc8 [Orc] Fix the AArch64 resolver size.
llvm-svn: 268146
2016-04-30 00:50:26 +00:00
Rafael Espindola cceacd7113 Don't depend on lld creating relocations in ro segments.
We currently don't do a good job of diagnosing inputs that would require
dynamic relocations to be applied to read only segments.

I am about to improve lld in that area, but unfortunately we developed
tests that depend on the current behavior.

To make clear what is actually changing, this first patch just updates
tests to not depend on the current behavior. In most cases this just
means using a rw section instead of a ro one, but that unfortunately
changes many addresses.

llvm-svn: 268145
2016-04-30 00:49:10 +00:00
Vedant Kumar 62db78449f Fix a typo (NFC)
llvm-svn: 268144
2016-04-30 00:32:54 +00:00
Tom Stellard cb6ba62d6f AMDGPU/SI: Enable the post-ra scheduler
Summary:
This includes a hazard recognizer implementation to replace some of
the hazard handling we had during frame index elimination.

Reviewers: arsenm

Subscribers: qcolombet, arsenm, llvm-commits

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

llvm-svn: 268143
2016-04-30 00:23:06 +00:00
Sanjoy Das 52c68bb0f5 [LowerGuardIntrinsics] Preserve calling conv when lowering
llvm-svn: 268142
2016-04-30 00:17:47 +00:00
Sanjay Patel bc6fad0bdf add minimal test to show dropped metadata
llvm-svn: 268141
2016-04-30 00:12:54 +00:00
Eugene Zelenko 5b407543c0 [Release Notes] Mention Clang-tidy cert-err34-c check.
Fix order and style of Boost related notes.

llvm-svn: 268140
2016-04-30 00:11:10 +00:00
Sanjay Patel 6748ec49e9 remove the metadata added with r267827
We can demonstrate the 'select' bug and fix with a simpler test case.
The merged weight values are already tested in another test.

llvm-svn: 268139
2016-04-30 00:02:36 +00:00
Filipe Cabecinhas 486c5d6ae9 Fix test's memory leaks.
llvm-svn: 268138
2016-04-29 23:42:34 +00:00
Sriraman Tallam ae06a0d888 Delete store to Target option PositionIndependentExecutable as PIE is now set in module flags.
Differential Revision: http://reviews.llvm.org/D19749

llvm-svn: 268137
2016-04-29 23:38:53 +00:00
Rafael Espindola f1e880eb8d Document how to recreate a binary.
llvm-svn: 268136
2016-04-29 23:35:49 +00:00
Chaoren Lin 6840ae9d3c Fix TestEnumTypes.py for 32 bit platforms.
Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 268135
2016-04-29 23:34:44 +00:00
Rafael Espindola 9e5e2df3f3 Document how to recreate a binary.
llvm-svn: 268134
2016-04-29 23:28:36 +00:00
Rafael Espindola aae59561d6 Use simpler types. NFC.
llvm-svn: 268133
2016-04-29 23:20:30 +00:00
Justin Lebar 76945b2f44 [CUDA] Copy host builtin types to NVPTXTargetInfo.
Summary:
Host and device types must match, otherwise when we pass values back and
forth between the host and device, we will get the wrong result.

This patch makes NVPTXTargetInfo inherit most of its type information
from the host's target info.

Reviewers: rsmith

Subscribers: cfe-commits, jhen, tra

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

llvm-svn: 268131
2016-04-29 23:05:19 +00:00
Xinliang David Li 4b2fdccad9 Reapply r268107 after fixing a bug breaks debug build.
Makes the new method to set data needed by debug dump.

llvm-svn: 268130
2016-04-29 22:59:36 +00:00
Denis Zobnin 3f287c26bf [NFC] Initialize a variable to make buildbot green.
In r268085 "[MS] Make #pragma pack use PragmaStack<> class." there was an
uninitialized variable 'Alignment', which caused the following failure:
  http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/1758
Zero-initialize the variable to fix this failure.

llvm-svn: 268129
2016-04-29 22:50:16 +00:00
Chris Bieneman bd61e0b4a8 Fix test case for incompatible sysroot warning
r268127 broke some bots because it needs to specify a darwin target.

llvm-svn: 268128
2016-04-29 22:44:33 +00:00
Chris Bieneman e60e7c2987 Add a new warning to notify users of mismatched SDK and deployment target
Summary:
This patch adds a new driver warning -Wincompatible-sdk which notifies the user when they are mismatching the version min options and the sysroot.

The patch works by checking the sysroot (if present) for an SDK name, then matching that against the target platform. In the case of a mismatch it logs a warning.

Reviewers: bob.wilson, rsmith

Subscribers: rsmith, edward-san, cfe-commits

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

llvm-svn: 268127
2016-04-29 22:28:34 +00:00
Sanjoy Das 107aefc2fc Mark guards on true as "trivially dead"
This moves some logic added to EarlyCSE in rL268120 into
`llvm::isInstructionTriviallyDead`.  Adds a test case for DCE to
demonstrate that passes other than EarlyCSE can now pick up on the new
information.

llvm-svn: 268126
2016-04-29 22:23:16 +00:00
Chris Bieneman aa8dfe9fb3 [CMake] [Xcode] Improving Xcode toolchain generation to support distribution targets
This adds a new target `install-distribution-toolchain` which will install an Xcode toolchain featuring just the LLVM components specified in LLVM_DISTRIBUTION_COMPONENTS.

llvm-svn: 268125
2016-04-29 22:19:35 +00:00
Chris Bieneman 4497e3a1e6 [CMake] Create a separate install target for libcxx headers
This change doesn't impact the behavior of the install-libcxx target which installs whichever libcxx components you build, it just adds a separate target to just install the headers.

llvm-svn: 268124
2016-04-29 22:17:15 +00:00
Sanjay Patel 1d0ac7c5b8 clean up documentation comments; NFC
llvm-svn: 268122
2016-04-29 22:03:27 +00:00
Haicheng Wu 4afe0425db [MBP] Use Function::optForSize() instead of checking OptimizeForSize directly.
Fix a FIXME.  Disable loop alignment if compiled with -Oz now.

llvm-svn: 268121
2016-04-29 22:01:10 +00:00
Sanjoy Das ee81b23fe7 [EarlyCSE] Simplify guard intrinsics
Summary:
This change teaches EarlyCSE some basic properties of guard intrinsics:

 - Guard intrinsics read all memory, but don't write to any memory
 - After a guard has executed, the condition it was guarding on can be
   assumed to be true
 - Guard intrinsics on a constant `true` are no-ops

Reviewers: reames, hfinkel

Subscribers: mcrosier, llvm-commits

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

llvm-svn: 268120
2016-04-29 21:52:58 +00:00
Matt Arsenault 701c21ea10 AMDGPU: Fix crash with unreachable terminators.
If a block has no successors because it ends in unreachable,
this was accessing an invalid iterator.

Also stop counting instructions that don't emit any
real instructions.

llvm-svn: 268119
2016-04-29 21:52:13 +00:00
Davide Italiano bf5ef7b63b [ELF] Ignore -d option (and aliases).
The linker already allocates common symbols by default.
Discussed with Rafael.

llvm-svn: 268117
2016-04-29 21:44:02 +00:00
Xinliang David Li 0552521b03 Revert r268107 -- debug build failure
llvm-svn: 268116
2016-04-29 21:43:28 +00:00
Simon Pilgrim bf60cc492c [InstCombine][SSE] PSHUFB to shuffle combine to use general aggregate elements. NFCI.
Make use of Constant::getAggregateElement instead of checking constant types - first step towards adding support for UNDEF mask elements.

llvm-svn: 268115
2016-04-29 21:34:54 +00:00
Filipe Cabecinhas dd754ef857 Try to fix clang-cmake-aarch64-42vma by removing a memory leak (have a global var capture it).
llvm-svn: 268114
2016-04-29 21:33:12 +00:00
George Burgess IV f23ce3609b [Sema] Specify the underlying type for an enum. NFC.
llvm-svn: 268113
2016-04-29 21:32:53 +00:00
Lang Hames f74e93b600 [Orc] Add ORC lazy-compilation support for AArch64.
The ORC compile callbacks and indirect stubs APIs will now work for AArc64,
allowing functions to be lazily compiled and/or updated.

llvm-svn: 268112
2016-04-29 21:32:00 +00:00
Lang Hames ae643ee2d1 [Orc] Make sure we don't drop the internal error in OrcRemoteTargetClient when
the constructor fails, as this would lead to an 'unchecked error' crash.

llvm-svn: 268111
2016-04-29 21:29:48 +00:00
Greg Clayton d49a8f9b54 Watch out for compilers that generate bad bitfield info. If the bit size of a bitfield member doesn't lie within the bit bounds of the type itself, just leave it out so we don't get clang asserting and killing our IDE when it gets unhappy with the information.
https://llvm.org/bugs/show_bug.cgi?id=27515
<rdar://problem/21082998>

llvm-svn: 268110
2016-04-29 21:26:46 +00:00