platform/upstream/llvm.git
9 years ago[SDK modernizer] Patch to fix type of the typed enums when
Fariborz Jahanian [Mon, 2 Mar 2015 23:58:02 +0000 (23:58 +0000)]
[SDK modernizer] Patch to fix type of the typed enums when
migrating to NS_ENUM typedef. rdar://19994496

llvm-svn: 231036

9 years ago[ADT] fail-fast iterators for DenseMap
Sanjoy Das [Mon, 2 Mar 2015 23:29:37 +0000 (23:29 +0000)]
[ADT] fail-fast iterators for DenseMap

Summary:
This patch is an attempt at making `DenseMapIterator`s "fail-fast".
Fail-fast iterators that have been invalidated due to insertion into
the host `DenseMap` deterministically trip an assert (in debug mode)
on access, instead of non-deterministically hitting memory corruption
issues.

Reviewers: dexonsmith, dberlin, ruiu, chandlerc

Reviewed By: chandlerc

Subscribers: yaron.keren, chandlerc, llvm-commits

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

llvm-svn: 231035

9 years agoTLI: Factor out sanitizeFunctionName. NFC.
Michael Zolotukhin [Mon, 2 Mar 2015 23:24:40 +0000 (23:24 +0000)]
TLI: Factor out sanitizeFunctionName. NFC.

llvm-svn: 231034

9 years agoMake ArchiveLibraryFile::~ArchiveLibraryFile virtual.
Rui Ueyama [Mon, 2 Mar 2015 23:03:33 +0000 (23:03 +0000)]
Make ArchiveLibraryFile::~ArchiveLibraryFile virtual.

"virtual" was present at a wrong place. FileArchive is a subclass of
ArchiveLibraryFile, and a FileArchive can be deleted through a
pointer of ArchiveLibraryFile. We want to make the destructor of the
base class virtual.

llvm-svn: 231033

9 years agoSymbolizer refactoring: Make LibbacktraceSymbolizer adopt the SymbolizerTool interface
Kuba Brecka [Mon, 2 Mar 2015 22:56:25 +0000 (22:56 +0000)]
Symbolizer refactoring: Make LibbacktraceSymbolizer adopt the SymbolizerTool interface

Reviewed at http://reviews.llvm.org/D7971

llvm-svn: 231032

9 years agoRemove shell requirement from test/Modules/explicit-build-relpath.cpp
Reid Kleckner [Mon, 2 Mar 2015 22:55:01 +0000 (22:55 +0000)]
Remove shell requirement from test/Modules/explicit-build-relpath.cpp

It only relies on 'cd', which the internal shell has now.

llvm-svn: 231031

9 years agoRevert bad change from r231029
Reid Kleckner [Mon, 2 Mar 2015 22:50:09 +0000 (22:50 +0000)]
Revert bad change from r231029

llvm-svn: 231030

9 years agoRemove shell requirements from tests that use 'cd'
Reid Kleckner [Mon, 2 Mar 2015 22:42:58 +0000 (22:42 +0000)]
Remove shell requirements from tests that use 'cd'

Modules and Tooling tests in particular tend to want to change the cwd,
so we were missing test coverage in this area on Windows. It should now
be easier to write such portable tests.

llvm-svn: 231029

9 years agoIndexedMap: Document why SmallVector<T, 0> is preferable here.
Benjamin Kramer [Mon, 2 Mar 2015 22:20:22 +0000 (22:20 +0000)]
IndexedMap: Document why SmallVector<T, 0> is preferable here.

llvm-svn: 231028

9 years agoSymbolizer refactoring: ExtractToken and friends
Kuba Brecka [Mon, 2 Mar 2015 22:15:14 +0000 (22:15 +0000)]
Symbolizer refactoring: ExtractToken and friends

Reviewed at http://reviews.llvm.org/D7867

llvm-svn: 231027

9 years agoclang-cl: Correctly ignore /openmp- (PR22748)
Hans Wennborg [Mon, 2 Mar 2015 22:09:05 +0000 (22:09 +0000)]
clang-cl: Correctly ignore /openmp- (PR22748)

llvm-svn: 231026

9 years ago[Sanitizer] Run test/sanitizer_common lit tests on all supported architectures.
Alexey Samsonov [Mon, 2 Mar 2015 22:03:52 +0000 (22:03 +0000)]
[Sanitizer] Run test/sanitizer_common lit tests on all supported architectures.

llvm-svn: 231025

9 years agoRevert "Revert "For the dwarf expression code get the subtarget off of the current""
Adrian Prantl [Mon, 2 Mar 2015 22:02:36 +0000 (22:02 +0000)]
Revert "Revert "For the dwarf expression code get the subtarget off of the current""

This reapplies r230990 without modifications.

llvm-svn: 231024

9 years agoRefactor DebugLocDWARFExpression so it doesn't require access to the
Adrian Prantl [Mon, 2 Mar 2015 22:02:33 +0000 (22:02 +0000)]
Refactor DebugLocDWARFExpression so it doesn't require access to the
TargetRegisterInfo. DebugLocEntry now holds a buffer with the raw bytes
of the pre-calculated DWARF expression.

Ought to be NFC, but it does slightly alter the output format of the
textual assembly.

This reapplies 230930 without the assertion in DebugLocEntry::finalize()
because not all Machine registers can be lowered into DWARF register
numbers and floating point constants cannot be expressed.

llvm-svn: 231023

9 years agocmake: Use MSVC atomics with clang-cl
Reid Kleckner [Mon, 2 Mar 2015 22:00:23 +0000 (22:00 +0000)]
cmake: Use MSVC atomics with clang-cl

llvm-svn: 231022

9 years agoSupport: Use const pointers for reads.
Jan Vesely [Mon, 2 Mar 2015 21:50:28 +0000 (21:50 +0000)]
Support: Use const pointers for reads.

Fixes tons of const-cast warnings.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Rui Ueyama <ruiu@google.com>
llvm-svn: 231021

9 years agoFix test case.
Sanjoy Das [Mon, 2 Mar 2015 21:47:47 +0000 (21:47 +0000)]
Fix test case.

r230921 broke backend-optimization-failure.cpp: after
r230921, LLVM no longer emits an expression to compute 'Length - 1'
and this perturbs LoopSimplify enough to emit the warning on line 10
instead of line 9.  This is a review request to fix the test case once
I re-land r230921.

llvm-svn: 231020

9 years agoAttempt to fix buildbot.
Fariborz Jahanian [Mon, 2 Mar 2015 21:46:17 +0000 (21:46 +0000)]
Attempt to fix buildbot.

llvm-svn: 231019

9 years agoRevert some changes that were made to fix PR20680.
Sanjoy Das [Mon, 2 Mar 2015 21:41:07 +0000 (21:41 +0000)]
Revert some changes that were made to fix PR20680.

This re-lands change r230921.  r230921 was reverted because it broke a
clang test; a checkin fixing the clang test will be commited shortly.

Summary:
As far as I can tell, the real bug causing the issue was fixed in
r230533.  SCEVExpander should mark an increment operation as nuw or nsw
only if it can *prove* that the operation does not overflow.  There
shouldn't be any situation where we have to do something different
because of no-wrap flags generated by SCEVExpander.

Revert "IndVarSimplify: Allow LFTR to fire more often"

This reverts commit 1ade0f0faa98877b688e0b9da58e876052c1e04e (SVN: 222213).

Revert "IndVarSimplify: Don't let LFTR compare against a poison value"

This reverts commit c0f2b8b528d8a37b0a1522aae90af649d6357eb5 (SVN: 217102).

Reviewers: majnemer, atrick, spatel

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

llvm-svn: 231018

9 years agolit: Add 'cd' support to the internal shell and port some tests
Reid Kleckner [Mon, 2 Mar 2015 21:33:18 +0000 (21:33 +0000)]
lit: Add 'cd' support to the internal shell and port some tests

The internal shell was already threading around a 'cwd' parameter. We
just have to make it mutable so that we can update it as the test script
executes.

If the shell ever grows support for environment variable substitution,
we could also implement support for export.

llvm-svn: 231017

9 years agoUse read{16,32,64}{le,be}() instead of *reinterpret_cast<u{little,big}{16,32,64}_t>().
Rui Ueyama [Mon, 2 Mar 2015 21:19:12 +0000 (21:19 +0000)]
Use read{16,32,64}{le,be}() instead of *reinterpret_cast<u{little,big}{16,32,64}_t>().

llvm-svn: 231016

9 years agoSmallVector: Allow initialization and assignment from initializer_list.
Benjamin Kramer [Mon, 2 Mar 2015 21:16:04 +0000 (21:16 +0000)]
SmallVector: Allow initialization and assignment from initializer_list.

Modeled after std::vector.

llvm-svn: 231015

9 years agoSymbolizer refactoring: Move internals to separate files
Kuba Brecka [Mon, 2 Mar 2015 21:15:09 +0000 (21:15 +0000)]
Symbolizer refactoring: Move internals to separate files

Reviewed at http://reviews.llvm.org/D7972

llvm-svn: 231014

9 years agoAllow compiler-rt build on Bitrig
Renato Golin [Mon, 2 Mar 2015 21:02:43 +0000 (21:02 +0000)]
Allow compiler-rt build on Bitrig

This is the only patch Bitrig uses for compiler-rt. It adds support
for Bitrig/arm in the clear cache code.

Patch by Patrick Wildt.

llvm-svn: 231012

9 years agoTLI: Use lambda. NFC.
Michael Zolotukhin [Mon, 2 Mar 2015 20:50:08 +0000 (20:50 +0000)]
TLI: Use lambda. NFC.

llvm-svn: 231011

9 years ago[CMake] Refactor LLDB main CMake file.
Zachary Turner [Mon, 2 Mar 2015 20:45:26 +0000 (20:45 +0000)]
[CMake] Refactor LLDB main CMake file.

The existing state of affairs was getting a little unwieldy.

All of LLDB's utility functions and initial configuration was in
the root CMake file.  I split this up into 3 separate files and
moved them to relevant subfolders under cmake/modules.

Also, I deleted the add_lldb_definitions() function.  It seemed
to be somewhat useless and did not serve any real purpose that
I was able to figure out.

llvm-svn: 231010

9 years agoImprove robustness of dependency-generation-crash.c test.
Matthias Braun [Mon, 2 Mar 2015 20:44:09 +0000 (20:44 +0000)]
Improve robustness of dependency-generation-crash.c test.

The test wants to provoke a failure when opening the output file.
Using chmod 0 on the output file does not work reliably on all
filesystems or when running the test as root.
Change the test to use a nonexistant directory instead.

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

llvm-svn: 231009

9 years ago[SDK modernizer]. Patch fixes driver's lack of
Fariborz Jahanian [Mon, 2 Mar 2015 20:43:32 +0000 (20:43 +0000)]
[SDK modernizer]. Patch fixes driver's lack of
recognition of mernizer's -objcmt-migrate-property-dot-syntax
option. rdar://19994452

llvm-svn: 231008

9 years agoMake ToVectorTy static.
Michael Zolotukhin [Mon, 2 Mar 2015 20:43:24 +0000 (20:43 +0000)]
Make ToVectorTy static.

llvm-svn: 231007

9 years agoFix a copy-paste bug.
Michael Zolotukhin [Mon, 2 Mar 2015 20:37:10 +0000 (20:37 +0000)]
Fix a copy-paste bug.

llvm-svn: 231006

9 years agoRemove include/lld/Core/Endian.h and use llvm/Support/Endian.h instead.
Rui Ueyama [Mon, 2 Mar 2015 20:31:43 +0000 (20:31 +0000)]
Remove include/lld/Core/Endian.h and use llvm/Support/Endian.h instead.

llvm-svn: 231005

9 years agoRevert "Refactor DebugLocDWARFExpression so it doesn't require access to the"
Adrian Prantl [Mon, 2 Mar 2015 20:01:54 +0000 (20:01 +0000)]
Revert "Refactor DebugLocDWARFExpression so it doesn't require access to the"

This reverts commit 230975 to investigate buildbot breakage.

llvm-svn: 231004

9 years agoRevert "For the dwarf expression code get the subtarget off of the current"
Adrian Prantl [Mon, 2 Mar 2015 20:01:47 +0000 (20:01 +0000)]
Revert "For the dwarf expression code get the subtarget off of the current"

This reverts commit 230990 because also reverting 230975.

llvm-svn: 231003

9 years agoSupport: Add {read,write}{16,32,64}{le,be} functions.
Rui Ueyama [Mon, 2 Mar 2015 20:00:15 +0000 (20:00 +0000)]
Support: Add {read,write}{16,32,64}{le,be} functions.

Add convenient functions for endian-aware reads/writes.

llvm-svn: 231002

9 years agoRemove useless .debug_macinfo section setup.
Paul Robinson [Mon, 2 Mar 2015 19:52:42 +0000 (19:52 +0000)]
Remove useless .debug_macinfo section setup.

llvm-svn: 231001

9 years ago[ASan/Win] Work around PR22545: call LLVM global_dtors in the MD atexit()
Timur Iskhodzhanov [Mon, 2 Mar 2015 19:41:09 +0000 (19:41 +0000)]
[ASan/Win] Work around PR22545: call LLVM global_dtors in the MD atexit()

llvm-svn: 231000

9 years ago[MSan] Remove explicit -m64 from RUN lines.
Alexey Samsonov [Mon, 2 Mar 2015 19:34:27 +0000 (19:34 +0000)]
[MSan] Remove explicit -m64 from RUN lines.

Target-specific flags should usually be configured by CMake/lit.

llvm-svn: 230999

9 years agoChange SystemZ large tests to use the existing long_tests property
David Blaikie [Mon, 2 Mar 2015 19:34:11 +0000 (19:34 +0000)]
Change SystemZ large tests to use the existing long_tests property

(this is already used in Clang for a couple of tests)

Reviewers: uweigand

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

llvm-svn: 230998

9 years ago[DFSan] Remove explicit -m64 from RUN lines.
Alexey Samsonov [Mon, 2 Mar 2015 19:34:06 +0000 (19:34 +0000)]
[DFSan] Remove explicit -m64 from RUN lines.

Target-specific flags should usually be configured by CMake/lit.

llvm-svn: 230997

9 years ago[Sanitizer] Restrict open_memstream to x86_64. Fixes PR22714.
Alexey Samsonov [Mon, 2 Mar 2015 19:34:02 +0000 (19:34 +0000)]
[Sanitizer] Restrict open_memstream to x86_64. Fixes PR22714.

llvm-svn: 230996

9 years ago[PerformanceTips] Document various items folks have suggested
Philip Reames [Mon, 2 Mar 2015 19:19:04 +0000 (19:19 +0000)]
[PerformanceTips] Document various items folks have suggested

This could stand to be expanded - patches welcome! - but let's at least write them down so they don't get forgotten.

llvm-svn: 230995

9 years agoAdd -fexceptions for targets which need it
Filipe Cabecinhas [Mon, 2 Mar 2015 19:12:51 +0000 (19:12 +0000)]
Add -fexceptions for targets which need it

llvm-svn: 230994

9 years agoApplying D7950 to four near copies of the file.
Chaoren Lin [Mon, 2 Mar 2015 19:12:18 +0000 (19:12 +0000)]
Applying D7950 to four near copies of the file.

Summary:
Using std::thread/random instead of pthread/rand.
Two of them also suffered from the synchronization problem in D7916.

Reviewers: clayborg, zturner, ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 230993

9 years agoAdd -fexceptions for targets where it isn't the default.
Filipe Cabecinhas [Mon, 2 Mar 2015 19:11:53 +0000 (19:11 +0000)]
Add -fexceptions for targets where it isn't the default.

It still tests that objc++-cpp-output turns on -fcxx-exceptions and
-fobjc-exceptions by being a c++ and objc(++) file.

llvm-svn: 230992

9 years agoAdd r230655 back with a fix.
Rafael Espindola [Mon, 2 Mar 2015 19:08:03 +0000 (19:08 +0000)]
Add r230655 back with a fix.

The issue is that now we have a diag handler during optimizations
and get forward every optimization remark, flooding stdout.

The same filtering should probably be done with or without a
custom handler, but for now just ignore remarks.

Original message:

gold-plugin: "Upgrade" debug info and handle its warnings.

The gold plugin never calls MaterializeModule, so any old debug info
was not deleted and could cause crashes.

Now that it is being "upgraded", the plugin also has to handle warnings
and create Modules with a nice id (it shows in the warning).

llvm-svn: 230991

9 years agoFor the dwarf expression code get the subtarget off of the current
Eric Christopher [Mon, 2 Mar 2015 19:01:47 +0000 (19:01 +0000)]
For the dwarf expression code get the subtarget off of the current
MachineFunction.

llvm-svn: 230990

9 years agoAdd clang support for Objective-C application extensions.
Bob Wilson [Mon, 2 Mar 2015 19:01:14 +0000 (19:01 +0000)]
Add clang support for Objective-C application extensions.

This adds the -fapplication-extension option, along with the
ios_app_extension and macosx_app_extension availability attributes.
Patch by Ted Kremenek

llvm-svn: 230989

9 years agoRestore LLVMLinkModules C API until it is properly deprecated.
Juergen Ributzka [Mon, 2 Mar 2015 18:59:38 +0000 (18:59 +0000)]
Restore LLVMLinkModules C API until it is properly deprecated.

Add the enum "LLVMLinkerMode" back for backwards-compatibility and add the
linker mode parameter back to the "LLVMLinkModules" function. The paramter is
ignored and has no effect.

Patch provided by: Filip Pizlo
Reviewed by: Rafael and Sean

llvm-svn: 230988

9 years agoR600: Use c++11 style for loop
Jan Vesely [Mon, 2 Mar 2015 18:56:52 +0000 (18:56 +0000)]
R600: Use c++11 style for loop

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 230987

9 years ago[Sanitizer] Fix StripPathPrefix function and improve test case.
Alexey Samsonov [Mon, 2 Mar 2015 18:55:46 +0000 (18:55 +0000)]
[Sanitizer] Fix StripPathPrefix function and improve test case.

llvm-svn: 230986

9 years agoRevert r230979, should apply to all X86 ELF.
Paul Robinson [Mon, 2 Mar 2015 18:50:18 +0000 (18:50 +0000)]
Revert r230979, should apply to all X86 ELF.

llvm-svn: 230985

9 years agoAdd -frtti and -fexceptions to tests that assume these are on.
Filipe Cabecinhas [Mon, 2 Mar 2015 18:49:37 +0000 (18:49 +0000)]
Add -frtti and -fexceptions to tests that assume these are on.

Summary:
We now have targets that don't enable rtti/exceptions by default, and the
ASTMatchers tests are assuming that these features are on (e.g: They use
dynamic_cast or try).

Reviewers: klimek, thakis, djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 230984

9 years ago[Windows] Fix getcwd() on Windows.
Zachary Turner [Mon, 2 Mar 2015 18:33:50 +0000 (18:33 +0000)]
[Windows] Fix getcwd() on Windows.

Windows doesn't define getcwd(), so this test executable failed
to compile.

Patch by Adrian McCarthy
Differential Revision: http://reviews.llvm.org/D7962

llvm-svn: 230983

9 years agoclang-tidy: Update test as underlying problem apparently was fixed.
Daniel Jasper [Mon, 2 Mar 2015 18:07:00 +0000 (18:07 +0000)]
clang-tidy: Update test as underlying problem apparently was fixed.

llvm-svn: 230982

9 years agoMaking the SO version major.minor instead of just major because ABI and API change...
Chris Bieneman [Mon, 2 Mar 2015 17:50:13 +0000 (17:50 +0000)]
Making the SO version major.minor instead of just major because ABI and API change between minor versions.

llvm-svn: 230981

9 years agoasan: fix windows build after commit 230978
Dmitry Vyukov [Mon, 2 Mar 2015 17:45:18 +0000 (17:45 +0000)]
asan: fix windows build after commit 230978

llvm-svn: 230980

9 years ago[PS4] Correct relocation for DWARF TLS references.
Paul Robinson [Mon, 2 Mar 2015 17:44:52 +0000 (17:44 +0000)]
[PS4] Correct relocation for DWARF TLS references.

llvm-svn: 230979

9 years agoasan: fix signal handling during stoptheworld
Dmitry Vyukov [Mon, 2 Mar 2015 17:36:02 +0000 (17:36 +0000)]
asan: fix signal handling during stoptheworld

The problem is that without SA_RESTORER flag, kernel ignores the handler. So tracer actually did not setup any handler.
Add SA_RESTORER flag when setting up handlers.
Add a test that causes SIGSEGV in stoptheworld callback.
Move SignalContext from asan to sanitizer_common to print better diagnostics about signal in the tracer thread.

http://reviews.llvm.org/D8005

llvm-svn: 230978

9 years agoexport.sh: Make sure umask is not too restrictive (PR22742)
Hans Wennborg [Mon, 2 Mar 2015 17:30:42 +0000 (17:30 +0000)]
export.sh: Make sure umask is not too restrictive (PR22742)

llvm-svn: 230977

9 years agoDetect malformed YAML sequence in yaml::Input::beginSequence()
Justin Bogner [Mon, 2 Mar 2015 17:26:43 +0000 (17:26 +0000)]
Detect malformed YAML sequence in yaml::Input::beginSequence()

When reading a yaml::SequenceTraits object, YAMLIO does not report an
error if the yaml item is not a sequence. Instead, YAMLIO reads an
empty sequence. For example:

---
seq:
    foo: 1
    bar: 2
...

If `seq` is a SequenceTraits object, then reading the above yaml will
yield `seq` as an empty sequence.

Fix this to report an error for the above mapping ("not a sequence")

Patch by William Fisher. Thanks!

llvm-svn: 230976

9 years agoRefactor DebugLocDWARFExpression so it doesn't require access to the
Adrian Prantl [Mon, 2 Mar 2015 17:21:06 +0000 (17:21 +0000)]
Refactor DebugLocDWARFExpression so it doesn't require access to the
TargetRegisterInfo. DebugLocEntry now holds a buffer with the raw bytes
of the pre-calculated DWARF expression.

Ought to be NFC, but it does slightly alter the output format of the
textual assembly.

This reapplies 230930 with a relaxed assertion in DebugLocEntry::finalize()
that allows for empty DWARF expressions for constant FP values.

llvm-svn: 230975

9 years ago[asan] Demote "trying to poison/unpoison memory region" messages...
Sergey Matveev [Mon, 2 Mar 2015 17:13:38 +0000 (17:13 +0000)]
[asan] Demote "trying to poison/unpoison memory region" messages...

... to verbosity level 3. Because log spam.

llvm-svn: 230974

9 years agoAccidentaly inverted the condition again. Sorry.
Benjamin Kramer [Mon, 2 Mar 2015 16:45:08 +0000 (16:45 +0000)]
Accidentaly inverted the condition again. Sorry.

llvm-svn: 230973

9 years agoAvoid assertion in MSVC 2013 debug builds.
Benjamin Kramer [Mon, 2 Mar 2015 16:42:56 +0000 (16:42 +0000)]
Avoid assertion in MSVC 2013 debug builds.

llvm-svn: 230972

9 years agoCodeGen: Fix passing of classes with only one AVX vector member in AVX registers
Benjamin Kramer [Mon, 2 Mar 2015 16:09:24 +0000 (16:09 +0000)]
CodeGen: Fix passing of classes with only one AVX vector member in AVX registers

isSingleElementStruct was a bit too tight in its definition of struct
so we got a mismatch between classify() and the actual code generation.
To make matters worse the code in GetByteVectorType still defaulted to
<2 x double> if it encountered a type it didn't know, making this a
silent miscompilation (PR22753).

Completely remove the "preferred type" stuff from GetByteVectorType and
make it fail an assertion if someone tries to use it with a type not
suitable for a vector register.

llvm-svn: 230971

9 years agoImplement step builtin
Tom Stellard [Mon, 2 Mar 2015 15:29:41 +0000 (15:29 +0000)]
Implement step builtin

This has been tested with piglit, OpenCV, and the ocl conformance tests.

llvm-svn: 230970

9 years agoImplement smoothstep builtin v2
Tom Stellard [Mon, 2 Mar 2015 15:29:39 +0000 (15:29 +0000)]
Implement smoothstep builtin v2

This has been tested with piglit, OpenCV, and the ocl conformance tests.

v2:
  - Fix typo in smoothstep.h

llvm-svn: 230969

9 years agoImplement radians builtin v2
Tom Stellard [Mon, 2 Mar 2015 15:29:37 +0000 (15:29 +0000)]
Implement radians builtin v2

This has been tested with piglit, OpenCV, and the ocl conformance tests.

v2:
  - Move to the common/ directory

llvm-svn: 230968

9 years agoImplement degrees builtin v2
Tom Stellard [Mon, 2 Mar 2015 15:29:35 +0000 (15:29 +0000)]
Implement degrees builtin v2

This has been tested with piglit, OpenCV, and the ocl conformance tests.

v2:
  - Move to the common/ directory

llvm-svn: 230967

9 years agoAsmWriter: Only print one space after the load type
Benjamin Kramer [Mon, 2 Mar 2015 15:24:41 +0000 (15:24 +0000)]
AsmWriter: Only print one space after the load type

Before: %x = load i32,  i32* %i
After:  %x = load i32, i32* %i

Purely cosmetic, so no new test case.

llvm-svn: 230966

9 years agoSLPVectorizer: Rewrite ArrayRef slice compare to be more idiomatic.
Benjamin Kramer [Mon, 2 Mar 2015 15:24:36 +0000 (15:24 +0000)]
SLPVectorizer: Rewrite ArrayRef slice compare to be more idiomatic.

NFC intended.

llvm-svn: 230965

9 years agoTblGen: Remove copy of SmallVector::operator==. NFC intended.
Benjamin Kramer [Mon, 2 Mar 2015 15:24:30 +0000 (15:24 +0000)]
TblGen: Remove copy of SmallVector::operator==. NFC intended.

llvm-svn: 230964

9 years agoReduce the number of components initialized by lldb-server to reduce static binary...
Robert Flack [Mon, 2 Mar 2015 15:14:50 +0000 (15:14 +0000)]
Reduce the number of components initialized by lldb-server to reduce static binary size.

Separate out the necessary component initialization for lldb-server such that the linker can greatly reduce the binary size. With this patch the size of lldb-server on my 64 bit linux release build drops from 46MB to 26MB.

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

llvm-svn: 230963

9 years agoAVX-512: Add assembly parser support for Rounding mode
Elena Demikhovsky [Mon, 2 Mar 2015 15:00:34 +0000 (15:00 +0000)]
AVX-512: Add assembly parser support for Rounding mode
By Asaf Badouh <asaf.badouh@intel.com>

llvm-svn: 230962

9 years ago[ASan/Win] Rename a test.
Timur Iskhodzhanov [Mon, 2 Mar 2015 14:49:44 +0000 (14:49 +0000)]
[ASan/Win] Rename a test.

I came up with the original name trying to test a different issue and forgot to rename afterwards

llvm-svn: 230961

9 years agoDo not model scalar accesses in non-affine subregions
Johannes Doerfert [Mon, 2 Mar 2015 14:06:01 +0000 (14:06 +0000)]
Do not model scalar accesses in non-affine subregions

  If a scalar was defined and used only in a non-affine subregion we do
  not need to model the accesses. However, if the scalar was defined
  inside the region and escapes the region we have to model the access.
  The same is true if the scalar was defined outside and used inside the
  region.

llvm-svn: 230960

9 years ago[FIX] Make parallel codegen aware of region statements
Johannes Doerfert [Mon, 2 Mar 2015 13:41:53 +0000 (13:41 +0000)]
[FIX] Make parallel codegen aware of region statements

llvm-svn: 230959

9 years agoFix build breakage on win7-msvc caused by r230955
Pavel Labath [Mon, 2 Mar 2015 13:39:39 +0000 (13:39 +0000)]
Fix build breakage on win7-msvc caused by r230955

llvm-svn: 230958

9 years agoNVPTX: Remove dead code.
Benjamin Kramer [Mon, 2 Mar 2015 13:16:28 +0000 (13:16 +0000)]
NVPTX: Remove dead code.

Fun fact: This file was never referenced since the initial checkin of
the NVPTX backend.

llvm-svn: 230957

9 years ago[mips] Optimize conditional moves where RHS is zero.
Vasileios Kalintiris [Mon, 2 Mar 2015 12:47:32 +0000 (12:47 +0000)]
[mips] Optimize conditional moves where RHS is zero.

Summary:
When the RHS of a conditional move node is zero, we can utilize the $zero
register by inverting the conditional move instruction and by swapping the
order of its True/False operands.

Reviewers: dsanders

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

llvm-svn: 230956

9 years agoFix handling of backslashes in Args parsing
Pavel Labath [Mon, 2 Mar 2015 12:46:22 +0000 (12:46 +0000)]
Fix handling of backslashes in Args parsing

Summary:
Presently Args::SetCommandString allows quotes to be escaped with backslash. However, the
backslash itself is not removed from the argument, nor there is a way to escape the backslash
itself. This leads to surprising results:

"a b" c"   -> 'a b', 'c'  # Here we actually have an unterminated quote, but that is ignored
"a b\" c"  -> 'a b\" c'   # We try to escape the quote. That works but the backslash is not removed.
"a b\\" c" -> 'a b\\" c'  # Escaping the backslash has no effect.

This change changes quote handling to be more shell-like:
- single quotes and backquotes are literal and there is no way to escape the closing quote or
  anything else inside;
- inside double quotes you can use backslash to escape the closing quote and another backslash
- outside any quotes, you can use backslash to escape quotes, spaces and itself.

This makes the parsing more consistent with what the user is familiar and increases the
probability that pasting the command line from shell to the "process launch" command "just work".

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 230955

9 years agoAVX-512: Simplified MOV patterns, no functional changes.
Elena Demikhovsky [Mon, 2 Mar 2015 12:46:21 +0000 (12:46 +0000)]
AVX-512: Simplified MOV patterns, no functional changes.

llvm-svn: 230954

9 years ago[llgo] debug: create replaceable type through DIBuilder
Andrew Wilkins [Mon, 2 Mar 2015 12:42:45 +0000 (12:42 +0000)]
[llgo] debug: create replaceable type through DIBuilder

Summary:
llgo was asserting in DebugInfo, which was interpreting
the temporary MDNodes we were creating as DIScopes instead
of DITypes (in DIScope::getRef).

This proposal changes llgo to use DIBuilder's
createReplaceableCompositeType method to create a DIType
that can be RAUW'd.

Reviewers: pcc

Reviewed By: pcc

Subscribers: llvm-commits

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

llvm-svn: 230953

9 years ago[clang-tidy] Refactor: Move llvm clang-tidy checks to namespace clang::tidy::llvm
Alexander Kornienko [Mon, 2 Mar 2015 12:39:18 +0000 (12:39 +0000)]
[clang-tidy] Refactor: Move llvm clang-tidy checks to namespace clang::tidy::llvm

clang-tidy checks are organized into modules. This refactoring moves the llvm
module checks to clang::tidy::llvm

http://reviews.llvm.org/D7995

Patch by Richard Thomson!

llvm-svn: 230952

9 years agobindings/go: expose DIBuilder::createReplaceableCompositeType
Andrew Wilkins [Mon, 2 Mar 2015 12:27:04 +0000 (12:27 +0000)]
bindings/go: expose DIBuilder::createReplaceableCompositeType

Summary:
We extend the DIBuilder type, adding a method for creating
replaceable composite types. This is necessary for creating
debug info describing self-referential types.

Reviewers: pcc

Reviewed By: pcc

Subscribers: axw, llvm-commits

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

llvm-svn: 230951

9 years ago[clang-tidy] Refactor: Move misc clang-tidy checks to namespace clang::tidy::misc
Alexander Kornienko [Mon, 2 Mar 2015 12:25:03 +0000 (12:25 +0000)]
[clang-tidy] Refactor: Move misc clang-tidy checks to namespace clang::tidy::misc

clang-tidy checks are organized into modules. This refactoring moves the misc
module checks into the namespace clang::tidy::misc

http://reviews.llvm.org/D7996

Patch by Richard Thomson!

llvm-svn: 230950

9 years agoReplace loop with equivalent ArrayRef function. NFC.
Benjamin Kramer [Mon, 2 Mar 2015 11:57:06 +0000 (11:57 +0000)]
Replace loop with equivalent ArrayRef function. NFC.

llvm-svn: 230949

9 years agoSimplify code. NFC.
Benjamin Kramer [Mon, 2 Mar 2015 11:57:04 +0000 (11:57 +0000)]
Simplify code. NFC.

llvm-svn: 230948

9 years ago[clang-tidy] Organized clang-tidy unit tests. NFC.
Alexander Kornienko [Mon, 2 Mar 2015 11:55:04 +0000 (11:55 +0000)]
[clang-tidy] Organized clang-tidy unit tests. NFC.

  * Moved unit tests for BracesAroundStatementsCheck to
    ReadabilityModuleTest.cpp.
  * Moved EXPECT_NO_CHANGES macro to ClangTidyTest.h to avoid defining it three
    times.

llvm-svn: 230947

9 years ago[clang-tidy] Refactor: Move readability checks to namespace clang::tidy::readability
Alexander Kornienko [Mon, 2 Mar 2015 11:43:00 +0000 (11:43 +0000)]
[clang-tidy] Refactor: Move readability checks to namespace clang::tidy::readability

clang-tidy checks are organized into modules. This refactoring moves the
readability module checks into the namespace clang::tidy::readability

http://reviews.llvm.org/D7997

Patch by Richard Thomson!

llvm-svn: 230946

9 years agoMake it possible to stop the operation thread in NativeProcessLinux
Tamas Berghammer [Mon, 2 Mar 2015 11:04:03 +0000 (11:04 +0000)]
Make it possible to stop the operation thread in NativeProcessLinux

Previously the operation thread is stopped with a cancel event but
pthread_cancel is not supported on android. This CL creates a custom
operation which asks the operation thread to exit without any pthread
call.

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

llvm-svn: 230945

9 years agoRename CMIDriver::LocalDebugSessionStartupInjectCommands to CMIDriver::LocalDebugSess...
Ilia K [Mon, 2 Mar 2015 10:58:02 +0000 (10:58 +0000)]
Rename CMIDriver::LocalDebugSessionStartupInjectCommands to CMIDriver::LocalDebugSessionStartupExecuteCommands after r230003

llvm-svn: 230944

9 years ago[clang-tidy] Assert related checkers
Alexander Kornienko [Mon, 2 Mar 2015 10:46:43 +0000 (10:46 +0000)]
[clang-tidy] Assert related checkers

This patch contains two assert related checkers. These checkers are the part of
those that is being open sourced by Ericsson
(http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-December/040520.html).

The checkers:

AssertSideEffect:
/// \brief Finds \c assert() with side effect.
///
/// The conition of \c assert() is evaluated only in debug builds so a condition
/// with side effect can cause different behaviour in debug / relesase builds.

StaticAssert:
/// \brief Replaces \c assert() with \c static_assert() if the condition is
/// evaluatable at compile time.
///
/// The condition of \c static_assert() is evaluated at compile time which is
/// safer and more efficient.

http://reviews.llvm.org/D7375

Patch by Szabolcs Sipos!

llvm-svn: 230943

9 years agoclang-format: Prefer wrapping a lambda's body over the lambda's return type.
Daniel Jasper [Mon, 2 Mar 2015 10:35:13 +0000 (10:35 +0000)]
clang-format: Prefer wrapping a lambda's body over the lambda's return type.

Before:
  aaaaaaaaaaaaaaaaaaaaaa(
      [](aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &aaa)
          -> aaaaaaaaaaaaaaaaaaaaa { return aaaaaaaaaaaaaaaaa; });

After:
  aaaaaaaaaaaaaaaaaaaaaa(
      [](aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &aaa) -> aaaaaaaaaaaaaaaaaaaaa {
        return aaaaaaaaaaaaaaaaa;
      });

llvm-svn: 230942

9 years agoTeach the verifier to enforce that the alignment argument of memory intrinsics must...
Owen Anderson [Mon, 2 Mar 2015 09:35:06 +0000 (09:35 +0000)]
Teach the verifier to enforce that the alignment argument of memory intrinsics must be a power of 2.

llvm-svn: 230941

9 years agoTeach DataLayout that alignments on basic types must be powers of two.
Owen Anderson [Mon, 2 Mar 2015 09:35:03 +0000 (09:35 +0000)]
Teach DataLayout that alignments on basic types must be powers of two.

Fixes assertion failures/crashes on bad datalayout specifications.

llvm-svn: 230940

9 years agoTeach DataLayout that ABI alignments for non-aggregate types must be non-zero.
Owen Anderson [Mon, 2 Mar 2015 09:34:59 +0000 (09:34 +0000)]
Teach DataLayout that ABI alignments for non-aggregate types must be non-zero.

This manifested as assertions and/or crashes in later phases of optimization,
depending on the build configuration.

llvm-svn: 230939

9 years agoTeach DataLayout that pointer ABI and preferred alignments are required to be powers...
Owen Anderson [Mon, 2 Mar 2015 06:33:51 +0000 (06:33 +0000)]
Teach DataLayout that pointer ABI and preferred alignments are required to be powers of two.

Previously this resulted in asserts and/or crashes (depending on build configuration) at various phases in the optimizer.

llvm-svn: 230938

9 years agoUpdate the list of relocations that need to be implemented.
Davide Italiano [Mon, 2 Mar 2015 06:17:38 +0000 (06:17 +0000)]
Update the list of relocations that need to be implemented.
While at it, point the correct document where the missing TLS
relocation(s) are described.

llvm-svn: 230937

9 years agoTeach DataLayout that zero-byte pointer sizes don't make sense.
Owen Anderson [Mon, 2 Mar 2015 06:00:02 +0000 (06:00 +0000)]
Teach DataLayout that zero-byte pointer sizes don't make sense.

Previously this would result in assertion failures or simply crashes
at various points in the optimizer when trying to create types of zero
bit width.

llvm-svn: 230936