Commit Graph

200548 Commits

Author SHA1 Message Date
Daniel Jasper 5fc133e71e clang-format: Fix hanging nested blocks in macros.
Before:
  #define MACRO()                     \
    Debug(aaa, /* force line break */ \
          {                           \
      int i;                          \
      int j;                          \
          })

After:
  #define MACRO()                     \
    Debug(aaa, /* force line break */ \
          {                           \
            int i;                    \
            int j;                    \
          })

llvm-svn: 237108
2015-05-12 10:16:02 +00:00
Elena Demikhovsky 6f30dc18d3 AVX-512: asm parser errors check
I reverted the error check that was removed in 236416.
I put the it in a separate file.

llvm-svn: 237107
2015-05-12 09:47:23 +00:00
Elena Demikhovsky c1ac5d7bd5 AVX-512: select operation for i1 vectors
like: select i1 %cond, <16 x i1> %a, <16 x i1> %b.
I added pseudo-CMOV patterns to resolve the "select".
Added tests for KNL and SKX.

llvm-svn: 237106
2015-05-12 09:36:52 +00:00
Ilia K 93df5d9c69 Fix MiDataTestCase.test_lldbmi_data_disassemble test on Linux (bug 23489)
llvm-svn: 237105
2015-05-12 09:24:24 +00:00
Manuel Klimek 3d3ea84a4f Refactor clang-format's formatter.
Summary:
a) Pull out a class LevelIndentTracker whose responsibility is to keep track
   of the indent of levels across multiple annotated lines.
b) Put all responsibility for merging lines into the LineJoiner; make the
   LineJoiner iterate over the lines so we never operate on a line that might
   be merged later; this makes the interface safer to use.
c) Move formatting of the end-of-file whitespace into formatFirstToken.

Fix bugs that became obvious after the refactoring:
1. We would not format lines with offsets correctly inside nested blocks if
   only the outer expression was affected:
   int x = s({ // clang-format only this line
     class X {
       public:
    // ^ this starts at the non-modified indnent level; previously we would
    //   not fix this, now we correctly outdent it.
       void f();
     };
   });
2. We would incorrectly align comments across lines that do not have comments
   for lines with nested blocks:
   int expression; // with comment
   int x = s({
     int y; // comment
     int z; // we would incorrectly align this comment with the comment on
            // 'expression'
   });

llvm-svn: 237104
2015-05-12 09:23:57 +00:00
Pavel Labath 108c325d6e Remove handling of eStateStopped from NativeProcessLinux::Resume
Summary:
NPL::Resume attempted to handle eStateStopped as a resume action. However:
- GDBRemoteCommunicationServerLLGS (the only user of NPL) never sets this action
- it could set this action in response to a vCont:t packet, but LLDB never produces this packet
- gdb-remote protocol documentation says vCont:t packet is used only in non-stop mode, but LLDB
  does not support non-stop mode
- even if LLDB supported non-stop mode, this implementation of eStateStopped does something
  different from what the spec says it should (according to spec, it should stop the specified
  thread, but this seems to want to stop all threads).

Given the facts above, I believe we should remove this unused and untested code, as it probably
doesn't even work and removing it makes the rest of the code noticably simpler.

Reviewers: ovyalov, chaoren

Subscribers: lldb-commits

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

llvm-svn: 237103
2015-05-12 09:03:18 +00:00
Alexey Bataev 0c024df9d1 [OPENMP] Allow using of threadprivate variables as loop-control variables in lop based directives.
llvm-svn: 237102
2015-05-12 09:02:07 +00:00
Pavel Labath 1dbc6c9cd6 [NativeProcessLinux] Remove event mutex and clean functions using it
Summary:
Since the former-TSC events are now processed synchronously, there is no need for to protect them
with a separate mutex - all the actions are now guarded by the big m_threads_mutex.

With the mutex gone, the following functions, no longer have any purpose and were removed:
NotifyThreadCreate: replaced by direct calls to ThreadWasCreated
NotifyThreadStop: replaced by direct calls to ThreadDidStop
NotifyThreadDeath: folded into StopTrackingThread
ResetForExec: inlined as it consisted of a single line of code
RequestThreadResume(AsNeeded): replaced by direct calls to ResumeThread
StopThreads: removed, as it was never called

Test Plan: tests continue to pass

Reviewers: ovyalov, chaoren

Subscribers: lldb-commits

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

llvm-svn: 237101
2015-05-12 08:35:33 +00:00
Alexey Bataev 040d540940 [OPENMP] Fixed support for 'schedule' clause with non-constant chunk size.
'schedule' clause for combined directives requires additional processing. Special helper variable is generated, that is captured in the outlined parallel region for 'parallel for' region. This captured variable is used to store chunk expression from the 'schedule' clause in this 'parallel for' region.

llvm-svn: 237100
2015-05-12 08:35:28 +00:00
Tobias Grosser 09d3069740 Rename IslCodeGeneration to CodeGeneration
Besides class, function and file names, we also change the command line option
from -polly-codegen-isl to just -polly-codegen. The isl postfix is a leftover
from the times when we still had the CLooG based -polly-codegen. Today it is
just redundant and we drop it.

llvm-svn: 237099
2015-05-12 07:45:52 +00:00
Ilia K b2b61a2422 Skip MiDataTestCase.test_lldbmi_data_disassemble test to get Linux build green
llvm-svn: 237098
2015-05-12 07:35:06 +00:00
Michael Kuperstein 6f5ff6905c [X86] DAGCombine should not assume arbitrary vector types are simple
The X86-specific DAGCombine for stores should not assume vector types are always simple.
This fixes PR23476.

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

llvm-svn: 237097
2015-05-12 07:33:07 +00:00
Ilia K 56aa294652 Improve MiStartupOptionsTestCase.test_lldbmi_executable_option_file test (MI)
llvm-svn: 237096
2015-05-12 06:49:49 +00:00
Justin Bogner 2fd95f6b92 Driver: Fix a -Wshadow issue from r237091
The MachO toolchain has an isTargetIOSBased method, but it isn't
virtual so it isn't very meaningful to call it. After thinking about
this, I guess that putting this logic in the MachO class is a bit of a
layering violation anyway. Do this more like how we handle
AddLinkRuntimeLibArgs instead.

llvm-svn: 237095
2015-05-12 06:30:48 +00:00
Ilia K d84713bd86 Show error message from failed evaluation when doing -var-create
Summary:
When -var-create fails, we will now show the error message from the failed evaluation if it is available.

Patch from chuckr@microsoft.com

Test Plan: I fixed the MiVarTestCase.test_lldbmi_eval test to expect the new error string. All MI tests passing on OS X.

Reviewers: abidh, ChuckR

Subscribers: greggm, lldb-commits, paulmaybee

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

llvm-svn: 237094
2015-05-12 06:15:16 +00:00
Craig Topper 5d3097eeb3 Remove unnecessary forward declaration.
llvm-svn: 237093
2015-05-12 06:09:57 +00:00
Ilia K f44ab29e05 Escape strings in disassembly comments.
Summary: Patch from chuckr@microsoft.com

Reviewers: abidh, ChuckR

Subscribers: paulmaybee, lldb-commits

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

llvm-svn: 237092
2015-05-12 05:55:23 +00:00
Justin Bogner c7701240ed Re-apply "Driver: Make profiling flags work with -nostdlib on Darwin"
This time without a stray "true" in an argument list.

This reverts r237077, restoring r237074.

llvm-svn: 237091
2015-05-12 05:44:36 +00:00
Craig Topper a0ff540b7e Remove unnecessary variables by folding calls into for loop header. NFC.
llvm-svn: 237090
2015-05-12 05:25:10 +00:00
Vince Harron a9c2a380b3 TestPublicAPIHeaders.py - Changed expectedFailureDarwin to skipIfDarwin
expectedFailure doesn't work if the failure is in a teardown step.

llvm-svn: 237089
2015-05-12 05:18:06 +00:00
Kostya Serebryany 123e3eb0be revert r237081 -- bad idea (-lcrypt may not be present)
llvm-svn: 237086
2015-05-12 03:10:42 +00:00
Vince Harron 069391ac15 Working on getting the OSX build green
Added missing SBLanguageRuntime.h to lldb.xcodeproj, set to Public (fixed compile error in TestPublicAPIHeaders)
Removed reference to (temporarily) missing gtest.xcodeproj
Fixed TestDeadStrip compile error
XFAIL TestPublicAPIHeaders - test passes but teardown command 'settings remove target.env-vars DYLD_LIBRARY_PATH' fails
XFAIL TestCModules - use of undeclared identifier 'MIN'
XFAIL TestModulesAutoImport - clang: error: unknown argument: '-gmodules'
XFAIL TestObjCNewSyntax - expr -- @((char*)"Hello world" + 6) cannot box a string value because NSString has not been declared

http://reviews.llvm.org/D9643

llvm-svn: 237085
2015-05-12 02:20:27 +00:00
Oleksiy Vyalov 5e30f0e02d Apply LLDB_API modifier to SBPlatform and SBPlatformShellCommand.
llvm-svn: 237084
2015-05-12 02:04:26 +00:00
Kostya Serebryany d8c54724a8 [lib/Fuzzer] remove the -dfsan=1 flag, just use -use_traces=1 (w/ or w/o dfsan)
llvm-svn: 237083
2015-05-12 01:58:34 +00:00
Kostya Serebryany cd7629caec [lib/Fuzzer] detach the pulse thread instad of joining it
llvm-svn: 237082
2015-05-12 01:43:20 +00:00
Kostya Serebryany 5c79fda912 add -lcrypto to clang and clang-format fuzzers (lib/Fuzzer will soon require it)
llvm-svn: 237081
2015-05-12 01:29:04 +00:00
Eric Christopher 9e172d20f0 Remove the code that pulled soft float attributes out of the feature
strings and remove the setting of TargetOptions::UseSoftFloat to
match the code change in llvm r237079.

llvm-svn: 237080
2015-05-12 01:26:21 +00:00
Eric Christopher 824f42f209 Migrate existing backends that care about software floating point
to use the information in the module rather than TargetOptions.

We've had and clang has used the use-soft-float attribute for some
time now so have the backends set a subtarget feature based on
a particular function now that subtargets are created based on
functions and function attributes.

For the one middle end soft float check go ahead and create
an overloadable TargetLowering::useSoftFloat function that
just checks the TargetSubtargetInfo in all cases.

Also remove the command line option that hard codes whether or
not soft-float is set by using the attribute for all of the
target specific test cases - for the generic just go ahead and
add the attribute in the one case that showed up.

llvm-svn: 237079
2015-05-12 01:26:05 +00:00
Vince Harron 8b33567189 Get lldb-server building on android-9
Build lldb-server with an android-9 sysroot.

llvm-svn: 237078
2015-05-12 01:10:56 +00:00
Justin Bogner 7b6c0e02ac Revert "Driver: Make profiling flags work with -nostdlib on Darwin"
This revert r237074. These tests are failing all over the place.

llvm-svn: 237077
2015-05-12 01:04:33 +00:00
Vince Harron 19e300fbde Change session log filename pattern: test before arch
This is a very minor change.

Just reshuffle the elements of the log filename so that the test name
comes before the arch/compiler

Before:
Failure-x86_64-clang-TestCModules.CModulesTestCase.test_expr_with_dwarf.log

After:
Failure-TestCModules.CModulesTestCase.test_expr_with_dwarf-x86_64-clang.log

This way, results are grouped by test name, not by arch. I think this
is much more useful.

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

llvm-svn: 237076
2015-05-12 00:50:54 +00:00
Ed Maste fefbdb82ae Remove Triple Vendor check when creating FreeBSD Platform
This is equivalent to r237052 in PlatformLinux.cpp.

llvm-svn: 237075
2015-05-12 00:43:45 +00:00
Justin Bogner f44ddae71e Driver: Make profiling flags work with -nostdlib on Darwin
Compiler-rt's Profiling library isn't part of the stdlib, so -nostdlib
shouldn't prevent it from being linked. This makes Darwin behave like
other toolchains, and link in the profile runtime irrespective of
-nostdlib, since the resulting program can't be run unless you link
this.

I've also added a test to show that other toolchains already behave
like this.

llvm-svn: 237074
2015-05-12 00:31:33 +00:00
Steven Wu 18bbe191cd Allow empty assembly string literal with -fno-gnu-inline-asm
Empty assembly string will not introduce assembly code in the output
binary and it is often used as a trick in the header to disable
optimizations. It doesn't conflict with the purpose of the option so it
is allowed with -fno-gnu-inline-asm flag.

llvm-svn: 237073
2015-05-12 00:16:37 +00:00
Andrew Kaylor 0ddaf2bfb9 Fixing memory leak
llvm-svn: 237072
2015-05-12 00:13:51 +00:00
Eric Christopher 5eaf3815c0 Update initialization of a class variable and comment.
llvm-svn: 237071
2015-05-12 00:04:20 +00:00
Sanjoy Das 3d705e37c3 Refactoring gc_relocate related code in CodeGenPrepare.cpp
Summary:
The original code inserted new instructions by following a
Create->Remove->ReInsert flow. This patch removes the unnecessary
Remove->ReInsert part by setting up the InsertPoint correctly at the
very beginning. This change does not introduce any functionality change.

Patch by Chen Li!

Reviewers: reames, AndyAyers, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

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

llvm-svn: 237070
2015-05-11 23:47:30 +00:00
Sanjoy Das 5665c999c2 Rename variables in gc_relocate related functions to follow LLVM's naming conventions.
Summary:
This patch is to rename some variables to CamelCase in gc_relocate
related functions. There is no functionality change.

Patch by Chen Li!

Reviewers: reames, AndyAyers, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

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

llvm-svn: 237069
2015-05-11 23:47:27 +00:00
James Dennett 570043310e Typo fix: s/initialzier/initializer/ in a doc comment.
No functional change.

llvm-svn: 237068
2015-05-11 23:25:54 +00:00
Kostya Serebryany 8817e86efd [lib/Fuzzer] don't record traces when trace collection is off
llvm-svn: 237067
2015-05-11 23:25:28 +00:00
Ahmed Bougacha b61696656e [MemCpyOpt] Look at any dependency -not just source- for memset+memcpy.
This fixes another miscompile introduced by r235232: when there was a
dependency on the memcpy destination other than the memset, we would
ignore it, because we only looked at the source dependency.

It was a mistake to use SrcDepInfo.  Instead, just use DepInfo.

llvm-svn: 237066
2015-05-11 23:09:46 +00:00
David Blaikie 96b481959f Simplify a return expression and an access to an alloca's allocated type
llvm-svn: 237065
2015-05-11 23:09:25 +00:00
Richard Smith b0b68010c5 PR20625: Instantiate static constexpr member function of a local struct in a function template earlier.
This is necessary in order to allow the use of a constexpr member function, or
a member function with deduced return type, of a local class within a
surrounding instantiated function template specialization.

Patch by Michael Park!

This re-commits r236063, which was reverted in r236134, along with a fix for a
delayed template parsing bug that was exposed by this change.

llvm-svn: 237064
2015-05-11 23:09:06 +00:00
Andrew Kaylor cc14f387e8 [WinEH] Handle nested landing pads that return directly to the parent function.
Differential Revision: http://reviews.llvm.org/D9684

llvm-svn: 237063
2015-05-11 23:06:02 +00:00
Richard Smith 1196033451 Add more missing #includes, found by modules build.
llvm-svn: 237062
2015-05-11 22:41:07 +00:00
Richard Smith 931c49ffdb Add missing #include, found by modules build.
llvm-svn: 237061
2015-05-11 22:32:06 +00:00
Richard Smith b2b51d4fce Add missing #includes, found by modules build.
llvm-svn: 237060
2015-05-11 22:31:40 +00:00
David Blaikie 46c561c19e Readdress r236990, use of static members on a non-static variable.
The TargetRegistry is just a namespace-like class, instantiated in one
place to use a range-based for loop. Instead, expose access to the
registry via a range-based 'targets()' function instead. This makes most
uses a bit awkward/more verbose - but eventually we should just add a
range-based find_if function which will streamline these functions. I'm
happy to mkae them a bit awkward in the interim as encouragement to
improve the algorithms in time.

llvm-svn: 237059
2015-05-11 22:20:48 +00:00
James Y Knight e452e27129 Fix tablegen's PrintFatalError function to run registered file
cleanups.

Also, change code in tablegen which printed a message and then called
"exit(1)" to use PrintFatalError, instead.

This fixes instances where an empty output file was left behind after
a failed tablegen invocation, which would confuse subsequent ninja
runs into not attempting to rebuild.

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

llvm-svn: 237058
2015-05-11 22:17:13 +00:00
Peter Collingbourne bf59c34bfd Move sanitizer parser and group expander from Driver to Basic.
No functional change.

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

llvm-svn: 237056
2015-05-11 21:39:20 +00:00