Commit Graph

200562 Commits

Author SHA1 Message Date
Yaron Keren eac8a1e328 Remove superfluous SmallString cast.
llvm-svn: 237123
2015-05-12 12:47:05 +00:00
Andrea Di Biagio 454f7909c6 [X86] Remove useless target specific combine on TRUNCATE dag nodes.
Before revision 171146, function 'PerformTruncateCombine' used to perform
a premature lowering of TRUNCATE dag nodes.
Revision 171146 then moved all the logic implemented by PerformTruncateCombine
to a custom lowering hook. However, that revision forgot to delete
function PerformTruncateCombine from the code.

This patch removes function 'PerformTruncateCombine' since it has no effect
on the SelectionDAG. No functional change intended.

llvm-svn: 237122
2015-05-12 12:34:22 +00:00
Vasileios Kalintiris b48c905613 [mips][FastISel] Handle calls with non legal types i8 and i16.
Summary: Allow calls with non legal integer types based on i8 and i16 to be processed by mips fast-isel.

Based on a patch by Reed Kotler.

Test Plan:
"Make check" test forthcoming.
Test-suite passes at O0/O2 and with mips32 r1/r2

Reviewers: rkotler, dsanders

Subscribers: llvm-commits, rfuhler

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

llvm-svn: 237121
2015-05-12 12:29:17 +00:00
Alexander Kornienko bdaa681fc6 [clang-tidy] Treat all types with non-trivial destructors as RAII.
This solves some false negatives at a cost of adding some false positives that
can be fixed easily and (almost) automatically.

llvm-svn: 237120
2015-05-12 12:17:20 +00:00
Vasileios Kalintiris c07f848785 [mips][FastISel] Simplify callabi.ll by using multiple check prefixes.
Reviewers: dsanders

Subscribers: llvm-commits

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

llvm-svn: 237119
2015-05-12 12:17:11 +00:00
Ilia K feda0b7ea9 Disable GCC optimizations for builtin functions in lldb tests
This patch adds new default flag -fno-builtin which forces gcc to not optimize builtin functions.
For example, without this flag GCC replaces printf("hello\n") -> puts("hello") even if -O0 was specified

Also this patch fixes the MiDataTestCase.test_lldbmi_data_disassemble test on Linux/gcc.

llvm-svn: 237118
2015-05-12 12:13:12 +00:00
Vasileios Kalintiris 32cd69a2eb [mips][FastISel] Allow computation of addresses from constant expressions.
Summary:
Try to compute addresses when the offset from a memory location is a constant
expression.

Based on a patch by Reed Kotler.

Test Plan:
Passes test-suite for -O0/O2 and mips 32 r1/r2

Reviewers: rkotler, dsanders

Subscribers: llvm-commits, aemerson, rfuhler

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

llvm-svn: 237117
2015-05-12 12:08:31 +00:00
Nikola Smiljanic 90476a5d90 Fix misleading parameter name for PPCallbacks::FileSkipped.
Patch thanks to Vladimir Voskresensky.

llvm-svn: 237116
2015-05-12 11:48:21 +00:00
Nikola Smiljanic fb891fcef6 Fix misleading parameter name for PPCallbacks::FileSkipped.
Patch thanks to Vladimir Voskresensky.

llvm-svn: 237115
2015-05-12 11:48:05 +00:00
Daniel Jasper 56807c19ac clang-format: Make member introduced in r237108 const.
llvm-svn: 237114
2015-05-12 11:14:06 +00:00
Renato Golin cb3b0c6eeb Change TargetParser enum names to avoid macro conflicts (clang)
sys/time.h on Solaris (and possibly other systems) defines "SEC" as "1"
using a cpp macro.  The result is that this fails to compile.

Fixes https://llvm.org/PR23482

llvm-svn: 237113
2015-05-12 10:34:10 +00:00
Renato Golin 35de35d03f Change TargetParser enum names to avoid macro conflicts (llvm)
sys/time.h on Solaris (and possibly other systems) defines "SEC" as "1"
using a cpp macro.  The result is that this fails to compile.

Fixes https://llvm.org/PR23482

llvm-svn: 237112
2015-05-12 10:33:58 +00:00
Tamas Berghammer 1f14920437 Return the correct user register count for arm from NativeRegisterContext
The defult implementation falls back to GetRegisterCount what
includes the debug registers also what shouldn't be displayed to
the user.

llvm-svn: 237111
2015-05-12 10:27:45 +00:00
Daniel Jasper 99b5a4648c clang-format: Fix */& detection for lambdas in macros.
Before:
  #define MACRO() [](A * a) { return 1; }

After:
  #define MACRO() [](A *a) { return 1; }

llvm-svn: 237109
2015-05-12 10:20:32 +00:00
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