Commit Graph

187524 Commits

Author SHA1 Message Date
Erik Eckstein 2190cd9ffa Revert "Peephole optimization in switch table lookup: reuse the guarding table comparison if possible."
It is breaking the clang bootstrag.

llvm-svn: 222877
2014-11-27 10:59:08 +00:00
Suyog Sarda c3024c75e0 Use FileCheck instead of grep. Change by Sonam.
Differential Revision: http://reviews.llvm.org/D6432

llvm-svn: 222876
2014-11-27 10:57:24 +00:00
Tobias Grosser 68c497fb22 autoconf: Move libraries later to ensure that all symbols are found
This fixes llvm.org/PR19540

llvm-svn: 222874
2014-11-27 10:14:27 +00:00
Hafiz Abid Qadeer e7914cfb0e Add test for MI tokens.
This file tests the sequence of digits that can come before
an MI command.

Patch from dawn@burble.org.

llvm-svn: 222873
2014-11-27 09:19:46 +00:00
Erik Eckstein e73e308ab9 Peephole optimization in switch table lookup: reuse the guarding table comparison if possible.
This optimization tries to reuse the generated compare instruction, if there is a comparison against the default value after the switch.
Example:
    if (idx < tablesize)
       r = table[idx]; // table does not contain default_value
    else
       r = default_value;
    if (r != default_value)
       ...
Is optimized to:
    cond = idx < tablesize;
    if (cond)
       r = table[idx];
    else
       r = default_value;
    if (cond)
       ...
\endcode
Jump threading will then eliminate the second if(cond).

llvm-svn: 222872
2014-11-27 08:33:51 +00:00
David Majnemer 40157d5c4d InstCombine: Restore optimizations lost in r210006
This restores our ability to optimize:
(X & C) == 0 ? X ^ C : X  into  X | C
(X & C) != 0 ? X ^ C : X  into  X & ~C

llvm-svn: 222871
2014-11-27 07:25:21 +00:00
NAKAMURA Takumi 5d50b1a432 Add LLVMObject to LLVMExecutionEngine.
llvm-svn: 222869
2014-11-27 06:36:22 +00:00
David Majnemer c6a5e1dd4f InstSimplify: Restore optimizations lost in r210006
This restores our ability to optimize:
(X & C) ? X & ~C : X  into  X & ~C
(X & C) ? X : X & ~C  into  X
(X & C) ? X | C : X  into  X
(X & C) ? X : X | C  into  X | C

llvm-svn: 222868
2014-11-27 06:32:46 +00:00
Lang Hames a5cd950c73 [MCJIT] Remove the local symbol table from RuntimeDlyd - it's not needed.
All symbols have to be stored in the global symbol to enable
cross-rtdyld-instance linking, so the local symbol table content is
redundant.

llvm-svn: 222867
2014-11-27 05:40:13 +00:00
Lang Hames 9b38ec248a [MCJIT] Update CMakeLists.txt for llvm-rtdyld to add Object as a requirement.
Hopefully this will fix
http://bb.pgr.jp/builders/clang-3stage-x86_64-linux/builds/8271/steps/stage1_build/logs/stdio

llvm-svn: 222866
2014-11-27 04:18:50 +00:00
Richard Smith 83d3f150c8 [c++1z] Remove terse range-based for loops; they've been removed from
consideration for C++17 for now. Update C++ status page to match.

llvm-svn: 222865
2014-11-27 01:54:27 +00:00
Lang Hames 7ea98e142b [MCJIT] Replace JITEventListener::anchor (temporarily removed in r222861), and
move GDBRegistrationListener into ExecutionEngine to avoid layering violation.

llvm-svn: 222864
2014-11-27 01:41:16 +00:00
Richard Trieu c321b931c0 When checking for uninitialized values, do not confuse "std::move" with every
other function named "move".

llvm-svn: 222863
2014-11-27 01:29:32 +00:00
Oleksiy Vyalov e13d71c57c Refactor SocketAddress::getaddrinfo - avoid calling IsValid if ::getaddrinfo has failed.
Otherwise, IsValid crashes on assertation in GetFamilyLength.

llvm-svn: 222862
2014-11-27 00:32:54 +00:00
Lang Hames a662d16314 [MCJIT] Remove JITEventListener's anchor until I can determine the right place
to put it. This should unbreak the Mips bots.

llvm-svn: 222861
2014-11-27 00:15:28 +00:00
Peter Collingbourne a4f0bd7857 Teach LLVM about llgo subproject.
llvm-svn: 222860
2014-11-27 00:15:21 +00:00
Lang Hames bf6952c87a [MCJIT] Move get-any-symbol-load-address logic out of RuntimeDyld and into
RuntimeDyldChecker.

RuntimeDyld instances should only provide lookup for locally defined
symbols.

llvm-svn: 222859
2014-11-27 00:12:28 +00:00
Peter Collingbourne 594c10de22 Initial commit of llgo third_party.
llvm-svn: 222858
2014-11-27 00:12:26 +00:00
Peter Collingbourne ad9841e8ac Initial commit of llgo.
llvm-svn: 222857
2014-11-27 00:06:42 +00:00
David Majnemer 5468e86469 Revert "Added inst combine transforms for single bit tests from Chris's note"
This reverts commit r210006, it miscompiled libapr which is used in who
knows how many projects.

A test has been added to ensure that we don't regress again.

I'll work on a rewrite of what the optimization was trying to do later.

llvm-svn: 222856
2014-11-26 23:00:38 +00:00
Sean Silva 1af7886abf Add a small "usage:" comment at the top of not.cpp
Mostly pulled from Rafael's r185678 commit message.

llvm-svn: 222855
2014-11-26 22:53:46 +00:00
Peter Collingbourne 9c1d4f744d Create directories for llgo subproject.
llvm-svn: 222854
2014-11-26 22:50:16 +00:00
Tim Northover 8603941057 OpenCL: fix test for lack of names in release builds
llvm-svn: 222853
2014-11-26 22:33:04 +00:00
Rui Ueyama 98fe58a3a7 Object/COFF: Fix off-by-one error for object having lots of relocations
llvm-objdump printed out an error message for this off-by-one error,
but because it always exits with 0 whether or not it found an error,
the test (llvm-objdump/coff-many-relocs.test) succeeded.
I made llvm-objdump exit with EXIT_FAILURE when an error is found.

llvm-svn: 222852
2014-11-26 22:17:25 +00:00
Anton Yartsev 0a18fca007 [analyzer] Indented code within the DisplayHelp sub.
llvm-svn: 222851
2014-11-26 21:53:39 +00:00
Matt Arsenault fcdddf9602 R600/SI: Use ZeroOrNegativeOneBooleanContent
This sort of doesn't matter since the setcc type is i1, but
this previously was using the default UndefinedBooleanContent. This
makes it more consistent with R600. This enables more optimizations
which typically give up on UndefinedBooleanContent. For example,
there is already a special case target DAG combine for
setcc + sext which can be eliminated in favor of what the generic
DAG combiner can do if it assumes boolean values are sign extended.
Since -1 is an inline immediate, using it is basically free and the
backend already uses it when a boolean value is needed in a wider type.

llvm-svn: 222850
2014-11-26 21:23:15 +00:00
Colin LeMahieu 6e0f9f8d61 [Hexagon] Adding cmp* immediate form instructions.
llvm-svn: 222849
2014-11-26 19:43:12 +00:00
Richard Smith 42ea81f655 Fix buildbot failure on LLP64 platforms like MSVC x86_64.
llvm-svn: 222848
2014-11-26 19:37:39 +00:00
Jozef Kolek 315e7eca1b [mips][microMIPS] Implement disassembler support for 16-bit instructions LBU16, LHU16, LW16, SB16, SH16 and SW16
Differential Revision: http://reviews.llvm.org/D6405

llvm-svn: 222847
2014-11-26 18:56:38 +00:00
Colin LeMahieu 31abe33726 [Hexagon] Adding and64, or64, and xor64 instructions.
llvm-svn: 222846
2014-11-26 18:55:59 +00:00
Oleksiy Vyalov dc4067c852 Fix several test failures on Linux/FreeBSD caused by compiler configuration and invalid environment.
http://reviews.llvm.org/D6392

llvm-svn: 222845
2014-11-26 18:30:04 +00:00
Matt Arsenault b935089576 R600/SI: Create e64 versions of and/or/xor in SILowerI1Copies
This fixes moving boolean constants into registers before operating
on them. They get permuted and shrunk down to e32 anyway later. This
is a temporary fix until the patch that removes these pseudos is
committed.

llvm-svn: 222844
2014-11-26 18:18:28 +00:00
Daniel Jasper 9b9e07608d clang-format: [Java] Don't line-wrap package declarations.
This fixes llvm.org/PR21677.

llvm-svn: 222843
2014-11-26 18:03:42 +00:00
JF Bastien adec3407b8 libc++: integral types trap on PNaCl
Reviewers: dschuff, danalbert

    Subscribers: jfb, cfe-commits

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

llvm-svn: 222842
2014-11-26 17:51:58 +00:00
Lang Hames 40db56cc6d [MCJIT] Fix missing return statement.
llvm-svn: 222841
2014-11-26 17:21:41 +00:00
Lang Hames b5c7b1ff83 [MCJIT] Reapply r222828 and r222810-r222812 with fix for MSVC move-op issues.
llvm-svn: 222840
2014-11-26 16:54:40 +00:00
Nico Weber 450425c980 clang-format: Tweak -style=Chromium for Java files.
For Java, don't do any of the deviations from Google Style that Chromium style
does for C++.

Chromium's Java follows Android Java style [1], which is roughly Google Java
style with an indent of 4 and a continuation indent of 8.

1: https://source.android.com/source/code-style.html
llvm-svn: 222839
2014-11-26 16:43:18 +00:00
Hafiz Abid Qadeer be6992c7d3 Improve lldb-mi tests.
summary of changes:
  Cleanup: Use "line_number" API instead of hardcoded source lines
  Combine child.sendline with previous child.send command.
  test_lldbmi_tokens: Add test for MI tokens.
  test_lldbmi_badpathexe: Remove check for prompt so test for bad path can be enabled.

Patch from dawn@burble.org.

llvm-svn: 222838
2014-11-26 16:37:51 +00:00
Aaron Ballman eda0373900 Adding an explicit triple to this test to get it to pass all build bots.
llvm-svn: 222837
2014-11-26 16:17:20 +00:00
Evgeniy Stepanov b52e3aba3f [asan] Disable preload tests on Android.
They don't test what they claim to because LD_PRELOAD applies to "not" instead
of the actual test binary. And all Android tests run with LD_PRELOAD anyway.

llvm-svn: 222835
2014-11-26 15:44:15 +00:00
Anastasia Stulova 5d8ad8a7b8 [OpenCL] Implemented restrictions for pointer conversions specified in OpenCL v2.0.
OpenCL v2.0 s6.5.5 restricts conversion of pointers to different address spaces:
- the named address spaces (__global, __local, and __private) => __generic - implicitly converted;
- __generic => named - with an explicit cast;
- named <=> named - disallowed;
- __constant <=> any other - disallowed.

llvm-svn: 222834
2014-11-26 15:36:41 +00:00
Aaron Ballman 9fb411431d Reverting r222828 and r222810-r222812 as they broke the build on Windows.
http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/11753

llvm-svn: 222833
2014-11-26 15:27:39 +00:00
Anastasia Stulova 248f1e5156 [OpenCL] Generic address space parsing and diagnostics test (forgotten previously)
llvm-svn: 222832
2014-11-26 14:14:05 +00:00
Anastasia Stulova 2c8dcfbae6 [OpenCL] Generic address space has been added in OpenCL v2.0.
To support it in the frontend, the following has been added:  
- generic address space type attribute;
- documentation for the OpenCL address space attributes;
- parsing of __generic(generic) keyword;
- test code for the parser and diagnostics.

llvm-svn: 222831
2014-11-26 14:10:06 +00:00
Aaron Ballman c53ead03ce Removing a spurious semicolon; NFC
llvm-svn: 222830
2014-11-26 13:55:55 +00:00
Daniel Jasper 375815d24b clang-format: [Java] Improve formatting of throws declarations.
Before:
  public void doSoooooooooo() throws LoooooooooongException,
      LooooooooooongException {}

After:
  public void doSoooooooooo()
      throws LoooooooooongException, LooooooooooongException {}

llvm-svn: 222829
2014-11-26 12:31:19 +00:00
Evgeniy Stepanov 2a783392d4 Add missing "override".
Fixes compilation failure in r222810.

llvm-svn: 222828
2014-11-26 12:26:03 +00:00
Daniel Jasper 4f56b0bb88 clang-format: [Java] Improve cast detection.
Before:
  a[b >> 1] = (byte)(c() << 4);

After:
  a[b >> 1] = (byte) (c() << 4);

llvm-svn: 222827
2014-11-26 12:23:10 +00:00
Viktor Kutuzov fb61eae0e4 [Asan] Fix the heavy_uar_test.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D6406

llvm-svn: 222826
2014-11-26 11:38:45 +00:00
Daniel Jasper 07013a42d2 clang-format: [Java] Fix breaking after annotations.
Before:
  @Annotation1 // comment
  @Annotation2 class C {}

After:
  @Annotation1 // comment
  @Annotation2
  class C {}

llvm-svn: 222825
2014-11-26 11:20:43 +00:00