Commit Graph

195948 Commits

Author SHA1 Message Date
Ilia K 02e55ef3fb Add low-frame/high-frame options to -stack-list-arguments (MI)
Summary:
Add low-frame/high-frame options to -stack-list-arguments

All tests pass on OS X.

Reviewers: clayborg, abidh

Reviewed By: abidh

Subscribers: lldb-commits, clayborg, abidh

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

llvm-svn: 232048
2015-03-12 15:35:58 +00:00
Sanjay Patel 2db6d3899b IRBuilder: add a CreateShuffleVector function that takes an ArrayRef of int
This is a convenience function to ease mask creation of ShuffleVectors
in AutoUpgrade and other places.

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

llvm-svn: 232047
2015-03-12 15:27:07 +00:00
Andrea Di Biagio de2fb00a16 [X86] Fix wrong target specific combine on SETCC nodes.
Part of the folding logic implemented by function 'PerformISDSETCCCombine'
only worked under the assumption that the condition code in input could have
been either SETNE or SETEQ.
Unfortunately that assumption was incorrect, and in some cases the algorithm
ended up incorrectly folding SETCC nodes.

The incorrect folding only affected SETCC dag nodes where:
 - one of the operands was a build_vector of all zeroes;
 - the other operand was a SIGN_EXTEND from a vector of MVT:i1 elements;
 - the condition code was neither SETNE nor SETEQ.

Example:
  (setcc (v4i32 (sign_extend v4i1:%A)), (v4i32 VectorOfAllZeroes), setge)

Before this patch, the entire dag node sequence from the example was
incorrectly folded to node %A.

With this patch, the dag node sequence is folded to a
  (xor %A, (v4i1 VectorOfAllOnes)).

Added test setcc-combine.ll.

Thanks to Greg Bedwell for spotting this issue.

llvm-svn: 232046
2015-03-12 15:16:58 +00:00
Sanjay Patel af1846c097 [X86, AVX] replace vextractf128 intrinsics with generic shuffles
Now that we've replaced the vinsertf128 intrinsics, 
do the same for their extract twins.

This is very much like D8086 (checked in at r231794):
We want to replace as much custom x86 shuffling via intrinsics
as possible because pushing the code down the generic shuffle
optimization path allows for better codegen and less complexity
in LLVM.

This is also the LLVM sibling to the cfe D8275 patch.

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

llvm-svn: 232045
2015-03-12 15:15:19 +00:00
Daniel Jasper b754a747be clang-format: When putting */& next to types, also wrap before them.
Before:
  LoooooooooooongType *
      loooooooooooongVariable;

After:
  LoooooooooooongType
      *loooooooooooongVariable;

llvm-svn: 232044
2015-03-12 15:04:53 +00:00
Hafiz Abid Qadeer d5d496a55d Removed an unused global variable.
This variable "g_debugger_name" is not used anywhere. It also causes a warning.
I was first going to change its type to fix the warning then noticed that it 
is not being used. So removing it.

Committed as Obvious. 

llvm-svn: 232043
2015-03-12 14:54:44 +00:00
Daniel Jasper 6acf513099 clang-format: [Java] Support anonymous classes after = and return.
Before:
  A a = new A(){public String toString(){return "NotReallyA";
  }
  }
  ;

After:
  A a = return new A() {
    public String toString() {
      return "NotReallyA";
    }
  };

This fixes llvm.org/PR22878.

llvm-svn: 232042
2015-03-12 14:44:29 +00:00
Pavel Labath bbdb712765 Remove unused variable
llvm-svn: 232041
2015-03-12 14:41:40 +00:00
Benjamin Kramer 8610cae98a Sema: Don't emit a missing prototype warning for deleted functions.
This is a bit more involved than I anticipated, so here's a breakdown
of the changes:
  1. Call ActOnFinishFunctionBody _after_ we parsed =default and
     =delete specifiers. Saying that we finished the body before parsing
     =default is just wrong. Changing this allows us to use isDefaulted
     and isDeleted on a decl in ActOnFinishFunctionBody.
  2. Check for -Wmissing-prototypes after we parsed the function body.
  3. Disable -Wmissing-prototypes when the Decl isDeleted.

llvm-svn: 232040
2015-03-12 14:28:47 +00:00
Benjamin Kramer e4812148e1 Use Sema's PrintingPolicy when diagnosing DeclSpecs.
Sema overrides ASTContext's policy on the first emitted diagnostic
(doesn't matter if it's ignored or not). This means changing the order
of diagnostic emission in Sema suddenly changes the text of diagnostic
emitted from the parser.

In the test case -Wmissing-prototypes (ignored) was the culprit, use
'int main' to suppress that warning so we see when this regresses.
Also move it into Sema/ as it's not testing any C++.

llvm-svn: 232039
2015-03-12 14:28:38 +00:00
Aaron Ballman e9f931f974 Reverting r232034, as it broke one of the bots with link errors. Details at: http://bb.pgr.jp/builders/ninja-clang-x64-mingw64-RA/builds/6352/steps/build/logs/stdio
llvm-svn: 232038
2015-03-12 14:14:48 +00:00
Aaron Ballman 0c22d5a339 Instead of dereferencing std::vector::end() (which is UB and causes failed assertions in debug builds with Visual Studio), use data() + size() to calculate the end iterator. Amends r231952.
llvm-svn: 232037
2015-03-12 13:49:45 +00:00
Alexander Musman 92bdaabf97 [OPENMP] CodeGen - 'omp for' with dynamic schedule kinds.
Differential Revision: http://reviews.llvm.org/D7138

llvm-svn: 232036
2015-03-12 13:37:50 +00:00
Aaron Ballman c579d66b9a Silencing an "enumeral and non-enumeral type in conditional expression" warning; NFC.
llvm-svn: 232035
2015-03-12 13:24:06 +00:00
Aaron Ballman 12865302b7 Added some matchers for objective c selectors and messages to ASTMatchers.h. Minor mods to ASTMatchersTest.h to allow test files with ".m" extension in addition to ".cpp". New tests added to ASTMatchersTest.c.
Patch by Dean Sutherland, reviewed by Manuel Klimek. From http://reviews.llvm.org/D7710

llvm-svn: 232034
2015-03-12 13:21:19 +00:00
Simon Pilgrim 4952a0cba2 [X86][AVX2] Added missing palignr stack folding test
llvm-svn: 232033
2015-03-12 13:12:33 +00:00
Dmitry Vyukov b75212878f tsan: fix a bug in MetaMap::ResetRange
The bug was uncovered by NegativeTests.MmapTest from
data-race-test suite, so port it as well.

llvm-svn: 232032
2015-03-12 12:48:19 +00:00
Alexander Kornienko 8d6c3571b4 [clang-tidy] Remove an empty destructor.
llvm-svn: 232031
2015-03-12 12:30:10 +00:00
Iain Sandoe 832472a2ad Fix configure & make build by adding support for the ExampleSubTarget.
llvm-svn: 232030
2015-03-12 11:47:51 +00:00
Dmitry Vyukov a60829a1b6 tsan: fix crash during __tsan_java_move
Munmap interceptor did not reset meta shadow for the range,
and __tsan_java_move crashed because it encountered
non-zero meta shadow for the destination.

llvm-svn: 232029
2015-03-12 11:24:16 +00:00
Daniel Sanders 41c072e63b Add infrastructure for support of multiple memory constraints.
Summary:
The operand flag word for ISD::INLINEASM nodes now contains a 15-bit
memory constraint ID when the operand kind is Kind_Mem. This constraint
ID is a numeric equivalent to the constraint code string and is converted
with a target specific hook in TargetLowering.

This patch maps all memory constraints to InlineAsm::Constraint_m so there
is no functional change at this point. It just proves that using these
previously unused bits in the encoding of the flag word doesn't break anything.

The next patch will make each target preserve the current mapping of
everything to Constraint_m for itself while changing the target independent
implementation of the hook to return Constraint_Unknown appropriately. Each
target will then be adapted in separate patches to use appropriate Constraint_*
values.

Reviewers: hfinkel

Reviewed By: hfinkel

Subscribers: hfinkel, jholewinski, llvm-commits

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

llvm-svn: 232027
2015-03-12 11:00:48 +00:00
Kuba Brecka 656e184f6c Adding the implementation of atos and dladdr symbolizers for OS X.
They are currently still *not* used, "llvm-symbolizer" is still the default symbolizer on OS X.

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

llvm-svn: 232026
2015-03-12 10:53:18 +00:00
Kuba Brecka 3c53266ca8 Make the UBSan coverage-levels.cc test be Linux specific
Reviewed at http://reviews.llvm.org/D8278

llvm-svn: 232025
2015-03-12 10:44:34 +00:00
Tamas Berghammer 6698d84286 Limit the lenght of the file name of the log file for tests
If a test have very long name and the compiler specified with (a long)
full path then the name of the log file name can exceed 255 characters.
This change replace the full compiler path with just the compiler name
if the prior would cause a too long file name.

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

llvm-svn: 232024
2015-03-12 10:24:11 +00:00
Pavel Labath 3f5df53fde Fix ProcessIO test failures
Summary:
There was a race condition regarding the output of the inferior process. The reading of the
output is performed on a separate thread, and there was no guarantee that the output will get
eventually consumed. Because of that, it was happening that calling Process::GetSTDOUT was not
returning anything even though the process was terminated and would definitely not produce any
further output. This was usually happening only under very heavy system load, but it can be
reproduced by placing an usleep in the stdio thread (Process::STDIOReadThreadBytesReceived).

This patch addresses this by adding synchronization capabilities to the Communication thread.
After calling Communication::SynchronizeWithReadThread one can be sure that all pending input has
been processed by the read thread. This function is then called after every public event which
stops the process to obtain the entire process output.

Test Plan: TestProcessIO.py should now succeed every time instead of flaking in and out.

Reviewers: clayborg, jingham

Subscribers: lldb-commits

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

llvm-svn: 232023
2015-03-12 10:12:41 +00:00
Bhushan D. Attarde 9425b329c8 Test Commit: Spell correction
llvm-svn: 232022
2015-03-12 09:17:22 +00:00
Alexey Bataev 2df54a07bf [OPENMP] Initial codegen for 'omp sections' and 'omp section' directives.
If only one section is found in the sections region, it is emitted just like single region.
Otherwise it is emitted as a static non-chunked loop.

#pragma omp sections
{
#pragma omp section
  {1}
  ...
  #pragma omp section
  {n}
}
is translated to something like

i32 <iter_var>
i32 <last_iter> = 0
i32 <lower_bound> = 0
i32 <upper_bound> = n-1
i32 <stride> = 1
call void @__kmpc_for_static_init_4(<loc>, i32 <gtid>, i32 34/*static non-chunked*/, i32* <last_iter>, i32* <lower_bound>, i32* <upper_bound>, i32* <stride>, i32 1/*increment always 1*/, i32 1/*chunk always 1*/)
<upper_bound> = min(<upper_bound>, n-1)
<iter_var> = <lb>
check:
br <iter_var> <= <upper_bound>, label cont, label exit
continue:
switch (IV) {
  case 0:
  {1};
  break;
  ...
  case <NumSection> - 1:
  {n};
  break;
  }
  ++<iter_var>
  br label check
  exit:
  call void @__kmpc_for_static_fini(<loc>, i32 <gtid>)
Differential Revision: http://reviews.llvm.org/D8244

llvm-svn: 232021
2015-03-12 08:53:29 +00:00
Davide Italiano ae586d27ff [Object/ELF] Add support for setVisibility()
This is a prerequisite to implement symbol visibility for ELF
in lld.

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

llvm-svn: 232020
2015-03-12 07:48:25 +00:00
Ilia K ba6d7b6004 Add lldb-mi/lldb-server test folders to PATH before in dotest.py
Summary:
This patch allows not specify search path in each lldb-mi test. It makes tests easier.

This fix was requested by vharron.

All test pass on OS X.

Reviewers: vharron, clayborg

Subscribers: lldb-commits, vharron

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

llvm-svn: 232019
2015-03-12 07:32:32 +00:00
Elena Demikhovsky 5d06b4c80c AVX-512: Added encoding tests for VPROR, VPROL instructions,
fixed opcode.

llvm-svn: 232018
2015-03-12 07:28:41 +00:00
Ilia K e4af28b7e9 Fix SDK selection using "platform select" when --sysroot/--version/--build options were specified
Summary:
This patch fixes SDK selection in the following case:
```
platform select remote-ios --sysroot "/Users/IliaK/Library/Developer/Xcode/iOS DeviceSupport/8.1.2 (12B440)" --build 12B440 --version 8.1.2
target create --arch arm64 "~/Project1.app"
```

Currently the lldb selects a first SDK version (in name order) in directory and then updates it after the device is connected. This approach ignores user's arguments and actually "platform select" command doesn't make sense.

After this patch, lldb takes a SDK which matches to user's arguments.

Reviewers: jasonmolenda, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, clayborg, jasonmolenda, aemerson

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

llvm-svn: 232017
2015-03-12 07:21:25 +00:00
Ilia K d9953052e3 Skip AsanTestCase and AsanTestReportDataCase on Darwin
Summary:
This patch skips tests which cause the following error:
```
1: test_with_dsym (TestMemoryHistory.AsanTestCase) ... 
os command: make clean ; make MAKE_DSYM=YES ARCH=x86_64 CC="/Users/IliaK/p/llvm/build_ninja/bin/clang" 
with pid: 9475
stdout: rm -f "a.out"  main.o main.d main.d.tmp  
rm -f -r "a.out.dSYM"
/Users/IliaK/p/llvm/build_ninja/bin/clang  -fsanitize=address -fsanitize-address-field-padding=1 -g -arch x86_64   -I/Users/IliaK/p/llvm/tools/lldb/test/make/../../include   -c -o main.o main.c
/Users/IliaK/p/llvm/build_ninja/bin/clang  main.o  -fsanitize=address -fsanitize-address-field-padding=1 -g -arch x86_64   -I/Users/IliaK/p/llvm/tools/lldb/test/make/../../include   -o "a.out"

stderr: clang: error: unknown argument: '-fsanitize-address-field-padding=1'
clang: error: unsupported argument 'address' to option 'fsanitize='
ld: file not found: /Users/IliaK/p/llvm/build_ninja/bin/../lib/clang/3.7.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [a.out] Error 1

retcode: 2


ERROR

os command: make clean 
with pid: 9521
stdout: rm -f "a.out"  main.o main.d main.d.tmp  
rm -f -r "a.out.dSYM"

stderr: 
retcode: 0


Restore dir to: /Users/IliaK/p/llvm/tools/lldb

======================================================================
ERROR: test_with_dsym (TestMemoryHistory.AsanTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 612, in wrapper
    func(*args, **kwargs)
  File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 456, in wrapper
    return func(self, *args, **kwargs)
  File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/asan/TestMemoryHistory.py", line 24, in test_with_dsym
    self.buildDsym (None, compiler)
  File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 1496, in buildDsym
    if not module.buildDsym(self, architecture, compiler, dictionary, clean):
  File "/Users/IliaK/p/llvm/tools/lldb/test/plugins/builder_darwin.py", line 16, in buildDsym
    lldbtest.system(commands, sender=sender)
  File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 370, in system
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command 'make clean ; make MAKE_DSYM=YES ARCH=x86_64 CC="/Users/IliaK/p/llvm/build_ninja/bin/clang" ' returned non-zero exit status 2
Config=x86_64-clang
----------------------------------------------------------------------
```

Also this patch fixes findBuiltClang() by looking a clang in the build folder.

BTW, another patch was made in October 2014, but it wasn't committed: http://reviews.llvm.org/D6272.

Reviewers: abidh, zturner, emaste, jingham, jasonmolenda, granata.enrico, DougSnyder, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, DougSnyder, granata.enrico, jasonmolenda, jingham, emaste, zturner, abidh, clayborg

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

llvm-svn: 232016
2015-03-12 07:19:41 +00:00
Justin Bogner 14d34ef050 Avoid an unused variable warning when assertions are off
Patch by Mike Edwards. Thanks!

llvm-svn: 232015
2015-03-12 06:50:54 +00:00
Eric Christopher 234a1ec404 Remove some unnecessary forward declarations and put a couple more
where they're supposed to reside.

llvm-svn: 232014
2015-03-12 06:07:16 +00:00
Eric Christopher 8bb838ac07 Remove the need to cache the subtarget in the Sparc TargetRegisterInfo
classes.

llvm-svn: 232013
2015-03-12 05:55:26 +00:00
Eric Christopher a20c3cf85d Remove the need to cache the subtarget in the Mips TargetRegisterInfo
classes.

llvm-svn: 232012
2015-03-12 05:43:57 +00:00
Kevin Qin 49bc764310 Reapply 'Run LICM pass after loop unrolling pass.'
It's firstly committed at r231630, and reverted at r231635.

Function pass InstructionSimplifier is inserted as barrier to
make sure loop unroll pass won't affect on LICM pass.

llvm-svn: 232011
2015-03-12 05:36:01 +00:00
Eric Christopher 34085832f8 Remove the need to cache the subtarget in the ARM TargetRegisterInfo
classes. Replace the frame pointer initialization with a static function
that'll look it up via the subtarget on the MachineFunction.

llvm-svn: 232010
2015-03-12 05:12:31 +00:00
Justin Bogner 0ea61e91dc docs: Fix a typo in my previous commit
llvm-svn: 232009
2015-03-12 04:43:01 +00:00
Ilia K 299819c458 Fix PATH_MAX definition after remarks in r231917 (MI)
llvm-svn: 232008
2015-03-12 04:18:47 +00:00
Justin Bogner 92f473927f docs: Document the llvm-cov show and report commands
Add a basic synopsis of how to work with instrprof based coverage
using the llvm-cov tools.

llvm-svn: 232007
2015-03-12 04:18:21 +00:00
Eric Christopher 09696d3fea Remove the need to cache the subtarget in the AArch64 TargetRegisterInfo
classes. Replace it with a cache to the Triple and use that
where applicable at the moment.

llvm-svn: 232005
2015-03-12 02:04:46 +00:00
Jingyue Wu e8290f21b5 [NVPTXAsmPrinter] do not print .align on function headers
Summary:
PTX does not allow .align directives on function headers.

Fixes PR21551.

Test Plan: test/Codegen/NVPTX/function-align.ll

Reviewers: eliben, jholewinski

Reviewed By: eliben, jholewinski

Subscribers: llvm-commits, eliben, jpienaar, jholewinski

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

llvm-svn: 232004
2015-03-12 01:50:30 +00:00
Reid Kleckner 52b07790ff Make llvm.eh.actions an intrinsic and add docs for it
These docs *don't* match the way WinEHPrepare uses them yet, and
verifier support isn't implemented either. The implementation will come
after the documentation text is reviewed and agreed upon.

llvm-svn: 232003
2015-03-12 01:45:37 +00:00
Eric Christopher ea178cf48f Remove the need to cache the subtarget in the PowerPC TargetRegisterInfo
classes. Replace it with a cache to the TargetMachine and use that
where applicable at the moment.

llvm-svn: 232002
2015-03-12 01:42:51 +00:00
Justin Bogner 22b9f6a12d docs: Try to fix a couple of internal links in the llvm-profdata manual
These links seem broken on llvm.org/docs. Change them to use the
sphinx-recommended style to see if that helps.

llvm-svn: 232001
2015-03-12 01:38:50 +00:00
Reid Kleckner e1b22ece4c Remove some CHECK-NOT lines in favor of CHECK-NEXT
NFC, this is just shorter.

llvm-svn: 232000
2015-03-12 01:38:48 +00:00
Tanya Lattner cfeff2d237 Update copyright year to 2015.
llvm-svn: 231999
2015-03-12 01:36:10 +00:00
Eric Christopher a1bafae91f Update for a new year.
Patch by Tanya Lattner.

llvm-svn: 231998
2015-03-12 01:25:29 +00:00
Justin Bogner 0cb14759fc Driver: Keep -isysroot flags in crash scripts if we're dumping a VFS
For crashes with a VFS (ie, with modules), the -isysroot flag is often
necessary to reproduce the crash. This is especially true if some
modules need to be rebuilt, since without the sysroot they'll try to
read headers that are outside of the VFS.

I find it likely that we should keep some of the other -i flags in
this case as well, but I haven't seen that come up in practice yet so
it seems better to be conservative.

llvm-svn: 231997
2015-03-12 00:52:56 +00:00