Commit Graph

219415 Commits

Author SHA1 Message Date
Daniel Jasper d5ec65ba33 clang-format: [JS] Support more ES6 classes.
Before:
  foo = class {
      constructor() {}
  }
  ;

After:
  foo = class {
      constructor() {}
  };

llvm-svn: 257154
2016-01-08 07:06:07 +00:00
Xinliang David Li 872df22caa Add value site truncation unit test
llvm-svn: 257153
2016-01-08 06:54:27 +00:00
Dylan McKay cc6733aa83 [AVR] Added AVRSelectionDAGInfo header file
llvm-svn: 257152
2016-01-08 06:32:27 +00:00
Xinliang David Li ec58c819fa Use more strict checks for merge Profile results
llvm-svn: 257151
2016-01-08 06:18:18 +00:00
Craig Topper 048e700828 [AVX-512] Remove superfluous spaces from some asm strings.
llvm-svn: 257150
2016-01-08 06:09:20 +00:00
Craig Topper 04493fda81 [X86] Don't print the aliased version of CVTSD2SI64rm. This appears to be a mistake I made years ago.
llvm-svn: 257149
2016-01-08 06:09:18 +00:00
Craig Topper 29510c0430 [X86] Use \t instead of space after mnemonics in a bunch InstAliases for consistency.
llvm-svn: 257148
2016-01-08 06:09:13 +00:00
Xinliang David Li bfb5d7c71b [PGO] Use new macro introduced/NFC
llvm-svn: 257147
2016-01-08 06:03:19 +00:00
Xinliang David Li 6d464151a6 [PGO] Update test to match sorted output
llvm-svn: 257146
2016-01-08 05:45:54 +00:00
Xinliang David Li 062cde9cc3 [PGO] Ensure vp data in indexed profile always sorted
Done in  InstrProfWriter to eliminate the need for client
code to do the sorting. The operation is done once and reused 
many times so it is more efficient. Update unit test to remove
sorting. Also update expected output of affected tests.

llvm-svn: 257145
2016-01-08 05:45:21 +00:00
Junmo Park aa9243a25d Remove extra whitespace. NFC.
llvm-svn: 257144
2016-01-08 04:20:32 +00:00
Xinliang David Li 51dc04cff2 [PGO] Fix a bug in InstProfWriter addRecord
For a new record with weight != 1, only edge profiling
counters are scaled, VP data is not properly scaled.

This patch refactors the code and fixes the problem.
Also added sort by count interface (for follow up patch).

llvm-svn: 257143
2016-01-08 03:49:59 +00:00
Justin Lebar 652b97bcf7 [CUDA] Split out tests for unused-arg warnings from cuda-options.cu.
Summary: Trying to make this test a bit more manageable.

Reviewers: tra

Subscribers: cfe-commits

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

llvm-svn: 257142
2016-01-08 03:33:04 +00:00
Rui Ueyama 885260e480 ELF: Remove SIZE relocs from isRelRelative.
SIZE relocations are not PC-relative, so isRelRelative should return false.

llvm-svn: 257141
2016-01-08 03:25:26 +00:00
Rui Ueyama 2b0edc2fdc Add a comment.
llvm-svn: 257140
2016-01-08 02:41:35 +00:00
Mehdi Amini 599ebf2767 Remove static global GCNames from Function.cpp and move it to the Context
This remove the need for locking when deleting a function.

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 257139
2016-01-08 02:28:20 +00:00
Jason Molenda 7cb9d98cf9 Revert r257117 "Performance improvement: Change lldb so that it
puts a breakpoint" it is causing a regression in the TestStepNoDebug
test case on ubuntu 14.04 with gcc 4.9.2.  Thanks for the email
Siva.  I'll recommit when I've figured out the regression.

llvm-svn: 257138
2016-01-08 02:26:03 +00:00
Kyle Butt bfcff3856a Add call sequence start and end for __tls_get_addr
This is a fix for bug http://llvm.org/bugs/show_bug.cgi?id=25839.

For a PIC TLS variable access in a function, prologue (mflr followed by std and
stdu) gets scheduled after a tls_get_addr call. tls_get_addr messed up LR but
no one saves/restores it.

Also added a test for save/restore clobbered registers during calling __tls_get_addr.

Patch by Tim Shen

llvm-svn: 257137
2016-01-08 02:06:19 +00:00
Peter Collingbourne f6594a06f7 profile: Do not pass -fPIC on Windows.
Unbreaks clang-cl build (cl warns on this flag, clang-cl errors on it).

llvm-svn: 257136
2016-01-08 02:03:25 +00:00
Kyle Butt 436ff85b63 [PPC] Add long long/double support for vec_cts, vec_ctu and vec_ctf
Add long long/double support for vec_cts, vec_ctu and vec_ctf.

Similar to this change in GCC:
https://gcc.gnu.org/ml/gcc-patches/2014-08/msg02653.html

Patch by Tim Shen.

llvm-svn: 257135
2016-01-08 02:00:48 +00:00
Kyle Butt a02ce98bd4 [Vectorization] Actually return from error case in isStridedPtr
The early return seems to be missed. This causes a radical and wrong loop
optimization on powerpc. It isn't reproducible on x86_64, because
"UseInterleaved" is false.

Patch by Tim Shen.

llvm-svn: 257134
2016-01-08 01:55:13 +00:00
Sanjay Patel d72a458d28 [InstCombine] insert a new shuffle in a safe place (PR25999)
Limit this transform to a basic block and guard against PHIs.
Hopefully, this fixes the remaining failures in PR25999:
https://llvm.org/bugs/show_bug.cgi?id=25999

llvm-svn: 257133
2016-01-08 01:39:16 +00:00
Stephane Sezer 506ecac085 Fix dwarf sequence insertions
Summary:
If two dwarf sequences begin with entries that have identical addresses,
it is possible for the comparator to order the first entry of the new
sequence between the first and second entries of the existing sequence.

This will result in an attempted insertion of the second sequence inside
of the first sequence, which is invalid.

Ensure that insertions only occur in between existing sequences.

Reviewers: andrew.w.kaylor, clayborg

Subscribers: sas, lldb-commits

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

Change by Francis Ricci <fjricci@fb.com>

llvm-svn: 257132
2016-01-08 01:39:14 +00:00
Dan Gohman 4ef99433aa [WebAssembly] Minor code cleanups. NFC.
llvm-svn: 257131
2016-01-08 01:18:00 +00:00
Matthias Braun 7c66afb887 IntEqClasses: Let join() return the new leader
The new leader is known anyway so we can return it for some micro
optimization in code where it is easy to pass along the result to the
next join().

llvm-svn: 257130
2016-01-08 01:16:39 +00:00
Matthias Braun bf47f63b74 LiveInterval: A LiveRange is enough for ConnectedVNInfoEqClasses::Classify()
llvm-svn: 257129
2016-01-08 01:16:35 +00:00
Dan Gohman 35e4a28947 [WebAssembly] Minor code cleanups. NFC.
llvm-svn: 257128
2016-01-08 01:06:00 +00:00
Dan Gohman 8633eedb30 [WebAssembly] Remove an unused def : Pat.
WebAssemblyISelLowering.cpp does not wrap jump table nodes inside of
WebAssemblywrapper nodes, so this pattern is not currently used.

llvm-svn: 257127
2016-01-08 00:50:33 +00:00
Vedant Kumar 750a629555 [profile] Add comments to portability macros for readability (NFC)
llvm-svn: 257126
2016-01-08 00:49:34 +00:00
Dan Gohman cceedf79b4 [WebAssembly] Remove unused arguments, unused functions. NFC.
llvm-svn: 257125
2016-01-08 00:43:54 +00:00
Xinliang David Li d2fb0f68f4 Sync up InstrProfData.inc
llvm-svn: 257124
2016-01-08 00:39:51 +00:00
Xinliang David Li c5f994f686 [PGO] : Removing trailing space/define new macro/NFC
llvm-svn: 257123
2016-01-08 00:38:53 +00:00
Eric Christopher b793230797 Add some testing for thumb1 and thumb2 inline asm immediate constraints
and fix a couple of bugs on inspection.

Also fixes PR26061.

llvm-svn: 257122
2016-01-08 00:34:44 +00:00
Jason Molenda 26d84e8097 Change the key name for the libdispatch queue serial number from
"qserial" to "qserialnum" because "qserial" looks a lot like the
queue type (either 'serial' or 'concurrent') and can be confusing
to read through.  debugserver passes these up either in the questionmark
("T") packet, or in the response to the jThreadsInfo packet.

llvm-svn: 257121
2016-01-08 00:20:48 +00:00
Jim Ingham 962260c852 Fix a glitch in the Driver's batch mode when used with "attach".
Batch mode is supposed to stop execution and return control to the user when an
exceptional stop occurs (crash, signal or instrumentation).  But attach always stops
with a SIGSTOP on OSX (maybe on Linux too?) which would short circuit the rest of the
commands given.

This change allows a command result object to indicate that it expected to leave the 
process stopped with an exceptional stop reason, and it is okay for batch mode to keep going.

<rdar://problem/22243143>

llvm-svn: 257120
2016-01-08 00:20:47 +00:00
Rui Ueyama 3a7c2f6f44 ELF: Simplify Target::isSizeReloc and add comments.
All non-trivial relocation decisions need explanations like this
to help readers understand not only how relocations are handled but
why they are handled these ways. This is a start.

llvm-svn: 257119
2016-01-08 00:13:23 +00:00
Vedant Kumar b626231a50 [cmake] Indentation fix (NFC)
llvm-svn: 257118
2016-01-08 00:07:50 +00:00
Jason Molenda b4a8b4c401 Performance improvement: Change lldb so that it puts a breakpoint
on the first branch instruction after a function return (or the end
of a source line), instead of a breakpoint on the return address,
to skip an extra stop & start of the inferior process.

I changed Process::AdvanceAddressToNextBranchInstruction to not
take an optional InstructionList argument - no callers are providing
a cached InstructionList today, and if this function was going to
do that, the right thing to do would be to fill out / use a
DisassemblerSP which is a disassembler with the InstructionList for
this address range.


http://reviews.llvm.org/D15708
<rdar://problem/23309838> 

llvm-svn: 257117
2016-01-08 00:06:03 +00:00
Stephane Sezer 6f45529046 Make sure we don't send qModuleInfo packets unnecessarily.
Summary:
Some debug servers don't support it so there's no point in spamming
this.

Reviewers: clayborg

Subscribers: fjricci, lldb-commits

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

llvm-svn: 257116
2016-01-08 00:00:17 +00:00
Mike Aizatsky 54a7c69a34 [llvm-symbolizer] Print out non-address lines verbatim.
Differential Revision: http://reviews.llvm.org/D15876

llvm-svn: 257115
2016-01-07 23:57:41 +00:00
Alexey Samsonov 117b104166 [LiveDebugValues] Replace several lines of code with operator[].
llvm-svn: 257114
2016-01-07 23:38:45 +00:00
Siva Chandra 9293fc4185 Better scheme to lookup alternate mangled name when looking up function address.
Summary:
This change is relevant for inferiors compiled with GCC. GCC does not
emit complete debug info for std::basic_string<...>, and consequently, Clang
(the LLDB compiler) does not generate correct mangled names for certain
functions.

This change removes the hard-coded alternate names in
ItaniumABILanguageRuntime.cpp.

Before the hard-coded names were put in ItaniumABILanguageRuntime.cpp, one could
not evaluate std::string methods (ex. std::string::length). After putting in
the hard-coded names, one could evaluate them. However, it did not still
enable one to call methods on, say for example, std::vector<string>.
This change makes that possible.

There is some amount of incompleteness in this change. Consider the
following example:

std::string hello("hello"), world("world");
std::map<std::string, std::string> m;
m[hello] = world;

One can still not evaluate the expression "m[hello]" in LLDB. Will
address this issue in another pass.

Reviewers: jingham, vharron, evgeny777, spyffe, dawn

Subscribers: clayborg, dawn, lldb-commits

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

llvm-svn: 257113
2016-01-07 23:32:34 +00:00
Aditya Nandakumar f94c149f7f Instructions to be redone only if from the same BB
While adding instructions(possible roots) to be redone, make sure they
are from the same basic block.

llvm-svn: 257112
2016-01-07 23:22:55 +00:00
JF Bastien b9ec4c6cea WebAssembly: use .skip instead of .zero directive
.zero is confusing when used with two arguments. Documentation:

  This directive emits SIZE 0-valued bytes.  SIZE must be an absolute
  expression.  This directive is actually an alias for the '.skip'
  directive so in can take an optional second argument of the value to
  store in the bytes instead of zero.  Using '.zero' in this way would be
  confusing however.

Ref: https://sourceware.org/bugzilla/show_bug.cgi?id=18353

Hexagon and Sparc do the same, and it's all the same to WebAssembly so
let's pick the less confusing of the two.

llvm-svn: 257111
2016-01-07 23:18:29 +00:00
Vedant Kumar c5b779cb92 [cmake] Add InstrProfilingWriter to libclang_rt on Darwin
llvmBufferWriter and a few related symbols were missing from libclang_rt
on Darwin (PR26002). This should fix the problem.

Patch by Dan Peebles!

llvm-svn: 257110
2016-01-07 22:54:46 +00:00
Xinliang David Li 911a4fb324 Sync up InstrProfData.inc file
llvm-svn: 257109
2016-01-07 22:47:04 +00:00
Xinliang David Li 1054a85a28 [PGO] Minor refactoring /NFC
Move common defs into common header files.

llvm-svn: 257108
2016-01-07 22:46:29 +00:00
Keno Fischer ea33a25816 Temporarily revert r257105 "[Verifier] Check that debug values have proper size"
Looks like there's a case where clang generates debug info that triggers
the new verifier check. Reverting while investigating.

llvm-svn: 257107
2016-01-07 22:39:11 +00:00
Dimitry Andric 6e8526358f Ensure safestack overflow test doesn't segfault
Summary:
In rL255491, the safestack overflow test was disabled for aarch64, since
it "is currently failing on an AArch64 buildbot with a segfault, but it
is currently passing on other configuration".

While testing on FreeBSD on x86, I also encountered a segfault.  This is
because the `fct()` function actually writes before and after `buffer`,
and on FreeBSD this crashes because `buffer` is usually allocated at the
end of a page.  That this runs correctly on Linux is probably just by
accident.

I propose to fix this by adding a pre and post buffer, to act as a
safety zone.  The pre and post buffers must be accessed in an 'unsafe'
way, otherwise -fsanitize=safestack will allocate them on the safe
stack, and they will not bookend `buffer` itself.  Therefore, I create
them large enough for `fct()`, and call it on both of them.

On FreeBSD, this makes the test run as expected, without segfaulting,
and I suppose this will also fix the segfault on AArch64.  I do not have
AArch64 testing capabilities, so if someone could try that out, I would
be much obliged.

Reviewers: pcc, kcc, zatrazz

Subscribers: llvm-commits, aemerson, emaste

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

llvm-svn: 257106
2016-01-07 22:19:12 +00:00
Keno Fischer b3326be6ad [Verifier] Check that debug values have proper size
Summary:
Teach the Verifier to make sure that the storage size given to llvm.dbg.declare
or the value size given to llvm.dbg.value agree with what is declared in
DebugInfo. This is implicitly assumed in a number of passes (e.g. in SROA).
Additionally this catches a number of common mistakes, such as passing a
pointer when a value was intended or vice versa.

One complication comes from stack coloring which modifies the original IR when
it merges allocas in order to make sure that if AA falls back to the IR it gets
the correct result. However, given this new invariant, indiscriminately
replacing one alloca by a different (differently sized one) is no longer valid.
Fix this by just undefing out any use of the alloca in a dbg.declare in this
case.

Additionally, I had to fix a number of test cases. Of particular note:
- I regenerated dbg-changes-codegen-branch-folding.ll from the given source as
  it was affected by the bug fixed in r256077
- two-cus-from-same-file.ll was changed to avoid having a variable-typed debug
  variable as that would depend on the target, even though this test is
  supposed to be generic
- I had to manually declared size/align for reference type. See also the
  discussion for D14275/r253186.
- fpstack-debuginstr-kill.ll required changing `double` to `long double`
- most others were just a question of adding OP_deref

Reviewers: aprantl
Differential Revision: http://reviews.llvm.org/D14276

llvm-svn: 257105
2016-01-07 22:18:37 +00:00