Commit Graph

188720 Commits

Author SHA1 Message Date
Roman Divacky a8206fc00c Silene -Wreorder warning.
llvm-svn: 224279
2014-12-15 21:41:59 +00:00
Matthias Braun c3a72c2e5f Revert "LiveRangeCalc: Rewrite subrange calculation"
Revert until I find out why non-subreg enabled targets break.

This reverts commit 6097277eefb9c5fb35a7f493c783ee1fd1b9d6a7.

llvm-svn: 224278
2014-12-15 21:36:35 +00:00
Michael Ilseman 1c38396db7 Revert of r223763, in spirit.
r223763 was made to work around a temporary issue where a user of the
JIT was passing down a declaration (incorrectly). This shouldn't
occur, so assert rather than silently continue.

llvm-svn: 224277
2014-12-15 21:36:29 +00:00
Duncan P. N. Exon Smith 4a7fddca0d Update lib/profile tests for metadata assembly change
Running the upgrade script from PR21532.  Hopefully this will unstick
compiler-rt bots [1] after r224257.

[1]: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA_check/181/

llvm-svn: 224276
2014-12-15 21:34:19 +00:00
Enrico Granata a6a1d5a623 Provide a SBFrame.register/.reg helper on the Python side of SBFrame to vend a flattened view of registers
Our actual view of registers is a set of register sets, each one of which contains a subset of the actual registers
This makes trivial scripting operations tedious ("I just want to read r7!")

This helper allows things like: print lldb.frame.reg["r7"]

Fixes rdar://19185662

llvm-svn: 224275
2014-12-15 21:30:36 +00:00
Mark Heffernan acbed5e530 Clarify HowFarToZero computation when the step is a positive power of two. Functionally this should be identical to the existing code except for the case where Step is maximally negative (eg, INT_MIN). We now punt in that one corner case to make reasoning about the code easier.
llvm-svn: 224274
2014-12-15 21:19:53 +00:00
Colin LeMahieu 4a46429305 [Hexagon] Adding misc multiply encodings and tests.
llvm-svn: 224273
2014-12-15 21:17:03 +00:00
Matthias Braun 0352201e15 LiveRangeCalc: Rewrite subrange calculation
This changes subrange calculation to calculate subranges sequentially
instead of in parallel. The code is easier to understand that way and
addresses the code review issues raised about LiveOutData being
hard to understand/needing more comments by removing them :)

llvm-svn: 224272
2014-12-15 21:16:21 +00:00
Reid Kleckner aac43c6a77 Handle errors in lambda prototype instantiation correctly
Previously we would attempt to build a TypeSourceInfo for a null type,
and then we would forget to pop the function scope before returning an
error.

Reviewers: rsmith

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

llvm-svn: 224271
2014-12-15 21:07:16 +00:00
Justin Bogner 42be29f748 profile: Add the relevant parts of lib/profile to cc_kext on darwin
Patch by Lawrence D'Anna. Thanks!

llvm-svn: 224270
2014-12-15 20:44:05 +00:00
Duncan P. N. Exon Smith bd62edb20d Run upgrade script from PR21532 to match LLVM changes
Update tests for LLVM assembly format change in r224257 using the script
attached to PR21532.  I'm hoping this unsticks the bot [1].

[1]: http://lab.llvm.org:8011/builders/polly-amd64-linux/builds/25432

llvm-svn: 224269
2014-12-15 20:28:50 +00:00
Daniel Marjamaki 368590094a Sema: Cleanup and improve string-plus-char checking.
Patch by Anders Rönnholm

llvm-svn: 224268
2014-12-15 20:22:33 +00:00
Colin LeMahieu 26f884aedf [Hexagon] Adding doubleworld accumulating multiplies of halfwords.
llvm-svn: 224267
2014-12-15 20:17:46 +00:00
Colin LeMahieu 572c53e258 [Hexagon] Adding accumulating half word multiplies.
llvm-svn: 224266
2014-12-15 20:10:28 +00:00
Colin LeMahieu d1704cdc07 [Hexagon] Adding multiply with rnd/sat/rndsat
llvm-svn: 224265
2014-12-15 20:01:59 +00:00
Ahmed Bougacha b9d92194dc [X86] And also test INSERTPS shuffle mask pretty-printing.
For r224260.

llvm-svn: 224264
2014-12-15 19:47:35 +00:00
Matthias Braun 42fab34ffb LiveRangeCalc: use more range based for loops; NFC
llvm-svn: 224263
2014-12-15 19:40:46 +00:00
Adrian Prantl 98f1f27810 Update this testcase for the new metadata assembler syntax.
llvm-svn: 224262
2014-12-15 19:25:33 +00:00
Colin LeMahieu fe4012a969 [Hexagon] Adding encoding bits for halfword multiplies.
llvm-svn: 224261
2014-12-15 19:22:07 +00:00
Ahmed Bougacha c2a87ddf01 [X86] Also pretty-print shuffle mask for INSERTPS rm variants.
llvm-svn: 224260
2014-12-15 19:17:54 +00:00
Duncan P. N. Exon Smith b3a66691f8 IR: Make metadata typeless in assembly, clang side
Match LLVM changes from r224257.

llvm-svn: 224259
2014-12-15 19:10:08 +00:00
Hafiz Abid Qadeer fcbc3cdf3c Replace ioctl with select to reduce processor usage by lldb-mi on OSX.
This saga started with a hang on OSX. 2 solutions were proposed.
1) 'select' based solution works ok on OSX but slows down test completion time
on Linux many times.
2) 'ioctl' base solution also works but it causes heavy processor usage on OSX
as reported by Ilia K.

But as the original hang did not occur on Linux so this commit re-introduces the
'select' in conditional code so that it only runs for OSX. There is no need for
this 'fix' to run on Linux.

Initial patch by Ilia K <ki.stfu@gmail.com>. A few changes were made by me. 

llvm-svn: 224258
2014-12-15 19:09:40 +00:00
Duncan P. N. Exon Smith be7ea19b58 IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly.  These
are the matching assembly changes for the metadata/value split in
r223802.

  - Only use the `metadata` type when referencing metadata from a call
    intrinsic -- i.e., only when it's used as a `Value`.

  - Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
    when referencing it from call intrinsics.

So, assembly like this:

    define @foo(i32 %v) {
      call void @llvm.foo(metadata !{i32 %v}, metadata !0)
      call void @llvm.foo(metadata !{i32 7}, metadata !0)
      call void @llvm.foo(metadata !1, metadata !0)
      call void @llvm.foo(metadata !3, metadata !0)
      call void @llvm.foo(metadata !{metadata !3}, metadata !0)
      ret void, !bar !2
    }
    !0 = metadata !{metadata !2}
    !1 = metadata !{i32* @global}
    !2 = metadata !{metadata !3}
    !3 = metadata !{}

turns into this:

    define @foo(i32 %v) {
      call void @llvm.foo(metadata i32 %v, metadata !0)
      call void @llvm.foo(metadata i32 7, metadata !0)
      call void @llvm.foo(metadata i32* @global, metadata !0)
      call void @llvm.foo(metadata !3, metadata !0)
      call void @llvm.foo(metadata !{!3}, metadata !0)
      ret void, !bar !2
    }
    !0 = !{!2}
    !1 = !{i32* @global}
    !2 = !{!3}
    !3 = !{}

I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines).  I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.

This is part of PR21532.

llvm-svn: 224257
2014-12-15 19:07:53 +00:00
Paul Robinson 30e41fb4da Warn when attribute 'optnone' conflicts with attributes on a
different declaration of the same function.

llvm-svn: 224256
2014-12-15 18:57:28 +00:00
Michael Ilseman addddc441f Silence more static analyzer warnings.
Add in definedness checks for shift operators, null checks when
pointers are assumed by the code to be non-null, and explicit
unreachables.

llvm-svn: 224255
2014-12-15 18:48:43 +00:00
Reid Kleckner b736bf3899 Move mips1 tests to test/MC/Disassembler/Mips/mips1
This matches the pattern of the mips2 and 3 tests, as well as our normal
conventions.

llvm-svn: 224254
2014-12-15 17:56:02 +00:00
Vladimir Medic d7ecf49e97 Add disassembler tests for mips3 platform. There are no functional changes.
llvm-svn: 224253
2014-12-15 16:19:34 +00:00
Vladimir Medic 19703a0bd6 Add disassembler tests for mips2 platform. There are no functional changes.
llvm-svn: 224252
2014-12-15 15:58:20 +00:00
Vladimir Medic a67937331d This is the first in a series of patches that add missing disassembler tests for mips platform. The patches are divided per version of mips CPU to keep the patches smaller and ease the review. There are no functional changes, code is changed only if new tests reveal a bug.This patch adds disassembler tests for mips1 CPU.
llvm-svn: 224251
2014-12-15 15:22:33 +00:00
Samuel Benzaquen b405c08bdb Add voidType() matcher.
Summary: Add voidType() matcher.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

llvm-svn: 224250
2014-12-15 15:09:22 +00:00
Aaron Ballman 2d67fd6d64 Changing a cast from unsigned to uint64_t, should be NFC in practice.
llvm-svn: 224249
2014-12-15 14:25:12 +00:00
Elena Demikhovsky bf74736290 Added a test related to 224247 revision
llvm-svn: 224248
2014-12-15 14:14:10 +00:00
Elena Demikhovsky a5599bfd72 Sink store based on alias analysis
- by Ella Bolshinsky
The alias analysis is used define whether the given instruction
is a barrier for store sinking. For 2 identical stores, following
instructions are checked in the both basic blocks, to determine
whether they are sinking barriers.

http://reviews.llvm.org/D6420

llvm-svn: 224247
2014-12-15 14:09:53 +00:00
Michael Kuperstein 47c97157ef [X86] Break false dependencies before partial register updates when the source operand is in memory
Adds the various "rm" instruction variants into the list of instructions that have a partial register update. Also adds all variants of SQRTSD that were missing in the original list.

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

llvm-svn: 224246
2014-12-15 13:18:21 +00:00
Rui Ueyama 7da4037c81 Replace ReaderError with DynamicError.
ReaderErrorCategory was used only at one place. We now have a
DynamicErrorCategory for this kind of one-time error, so use it.
The calling function doesn't really care the type of an error, so
ReaderErrorCategory was actually dead code.

llvm-svn: 224245
2014-12-15 12:20:13 +00:00
Suyog Sarda 2b27fc78a2 Typo Correction in Test Case. NFC.
llvm-svn: 224244
2014-12-15 12:19:46 +00:00
Kumar Sukhani 3176f9b65d [ubsan][arm] supporting misaligned testcase
After previous commit: http://reviews.llvm.org/rL224242, misaligned testcase is now supported on ARM also

llvm-svn: 224243
2014-12-15 12:16:36 +00:00
Kumar Sukhani fef606cf0a [UBSan][MIPS] Adding support of MIPS64 in UBSan testing
On mips64 addresses are 40-bit. Where as a 48 bit address is used in TypeCheck/misaligned.cpp.
Using regular expression for that address.

reviewed by : samsonov
submitted by: sagar

llvm-svn: 224242
2014-12-15 10:52:06 +00:00
Elena Demikhovsky 72860c341e AVX-512: Added EXPAND instructions and intrinsics.
llvm-svn: 224241
2014-12-15 10:03:52 +00:00
David Majnemer 7e21745e22 Sema: Don't diagnose string + int if the int is value dependent
Don't send a value dependent expression into the expression evaluator,
HandleSizeof would crash.  Making HandleSizeof handle dependent types
would noisily warn about the operation even if everything turns out OK
after instantiation.

This fixes PR21848.

llvm-svn: 224240
2014-12-15 10:00:35 +00:00
Kumar Sukhani 79c79e3e8a [UBSan][MIPS] Adding support for MIPS64
No MIPS64 architecture dependant code

reviewed by : samsonov
submitted by: sagar

llvm-svn: 224239
2014-12-15 09:20:06 +00:00
David Majnemer d616362fe3 Preprocessor: Recover instead of mutating a token in ExpandBuiltinMacro
We would CreateString on arbitrary garbage instead of just skipping to
the end of the builtin macro.  Eventually, this would cause us to crash
because we would end up replacing the contents of a character token with
a numeric literal.

This fixes PR21825.

llvm-svn: 224238
2014-12-15 09:03:58 +00:00
David Majnemer 418ad3ff10 Sema: Don't leave switch stack inconsistent when recovering
We would exit Sema::ActOnFinishSwitchStmt early if we didn't have a
body.  This would leave an extra SwitchStmt on the SwitchStack.

This fixes PR21841.

llvm-svn: 224237
2014-12-15 07:46:12 +00:00
Rui Ueyama c1eeb310d4 Remove dead code.
This field was not even initialized properly.

llvm-svn: 224236
2014-12-15 07:22:29 +00:00
Rui Ueyama 0a2c2dbfc2 Protect doParse() because that's not a public interface.
llvm-svn: 224235
2014-12-15 07:14:32 +00:00
Alexander Musman 51eb1308bd Test for 'omp for' (for r224233).
llvm-svn: 224234
2014-12-15 07:08:38 +00:00
Alexander Musman c638868bdf First patch with codegen of the 'omp for' directive. It implements
the simplest case, which is used when no chunk_size is specified in
the schedule(static) or no 'schedule' clause is specified - the
iteration space is divided by the library into chunks that are
approximately equal in size, and at most one chunk is distributed
to each thread. In this case, we do not need an outer loop in each
thread - each thread requests once which iterations range it should
handle (using __kmpc_for_static_init runtime call) and then runs the
inner loop on this range.

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

llvm-svn: 224233
2014-12-15 07:07:06 +00:00
David Majnemer ecabbc52d5 Parse: Don't reorder tokens using ConsumeToken
ConsumeToken doesn't work with special tokens.  Instead, just use PP.Lex
to eat the token.

This fixes PR21817.

llvm-svn: 224232
2014-12-15 07:00:05 +00:00
Alexey Bataev a47ae907e8 Fixed test/CodeGen/atomic_ops.c for compatibility with hexagon target
llvm-svn: 224231
2014-12-15 06:12:42 +00:00
Alexey Bataev 452d8e1133 Bugfix for Codegen of atomic load/store/other ops.
Currently clang fires assertions on x86-64 on any atomic operations for long double operands. Patch fixes codegen for such operations.
Differential Revision: http://reviews.llvm.org/D6499

llvm-svn: 224230
2014-12-15 05:25:25 +00:00