Commit Graph

182154 Commits

Author SHA1 Message Date
Jan Vesely a5a3b023b4 add isfinite builtin
v2: simplify and remove isinf leftovers
    remove trailing newline

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217243
2014-09-05 13:59:06 +00:00
James Molloy 163b1ba471 [ARMv8] Add support for 32-bit MIN/MAXNM and directed rounding.
This patch adds support for the 32bit numeric max/min and directed round-to-integral NEON intrinsics that were added as part of v8, along with unit tests.

Patch by Graham Hunter!

llvm-svn: 217242
2014-09-05 13:50:34 +00:00
Renato Golin 65336d0a82 Mark ms-inline-asm as xfail on ARM
llvm-svn: 217241
2014-09-05 13:29:23 +00:00
Chandler Carruth 19cbf0e2c4 [x86] Factor out the zero vector insertion logic in the new vector
shuffle lowering for integer vectors and share it from v4i32, v8i16, and
v16i8 code paths.

Ironically, the SSE2 v16i8 code for this is now better than the SSSE3!
=] Will have to fix the SSSE3 code next to just using a single pshufb.

llvm-svn: 217240
2014-09-05 10:36:31 +00:00
Daniel Jasper 90ebc98e3d clang-format: [JS] Format embedded function literals more efficently.
Before:
  return {
    a: a,
    link:
        function() {
          f();  //
        },
    link:
        function() {
          f();  //
        }
  };

After:
  return {
    a: a,
    link: function() {
      f();  //
    },
    link: function() {
      f();  //
    }
  };

llvm-svn: 217238
2014-09-05 09:27:38 +00:00
Daniel Jasper 3a038de3c8 clang-format: [JS] JavaScript does not have the */&/&& madness.
Before:
  e&& e.SomeFunction();

After:
  e && e.SomeFunction();

Yeah, this might be useful for C++, too, but it is not such a frequent
pattern there (plus the fix is much harder).

llvm-svn: 217237
2014-09-05 08:53:45 +00:00
Daniel Jasper 3f69ba1075 clang-format: [JS] Better support for empty function literals.
Before:
  SomeFunction(function(){});

After:
  SomeFunction(function() {});

llvm-svn: 217236
2014-09-05 08:42:27 +00:00
Daniel Jasper 97bfb7b1ba clang-format: [JS] Fix indentation in dict literals.
Before:
  return {
    'finish':
        //
        a
        };

After:
  return {
    'finish':
        //
        a
  };

llvm-svn: 217235
2014-09-05 08:29:31 +00:00
NAKAMURA Takumi 634c355e35 clang/test/CXX/drs/dr5xx.cpp: Fix up assumption of thiscall. It affects not x64 but x86.
Note, i686-cygwin doesn't use thiscall.

llvm-svn: 217234
2014-09-05 08:18:53 +00:00
Tim Northover c879d06a85 ARM: cover all sub-architecture enumerators to keep compiler happy.
No change in behaviour (hopefully).

llvm-svn: 217233
2014-09-05 07:56:46 +00:00
Frederic Riss 0982e69fb8 [dwarfdump] Dump DW_AT_(decl|call)_line attribute values as decimal values.
llvm-svn: 217232
2014-09-05 07:21:50 +00:00
Frederic Riss 1a3736f4f6 Reapply "[dwarfdump] Add missing DW_LANG_Mips_Assembler case to LanguageString()"
This commit was reverted in r217183, but is OK to go in again now that its dependency is commited (as of r217186).

llvm-svn: 217231
2014-09-05 07:21:40 +00:00
Matthew Gardiner 9232ea6ac5 Removed white-space
llvm-svn: 217230
2014-09-05 07:17:15 +00:00
Matthew Gardiner 3b15a89a2b Adding kalimba variants as Triple sub-architectures.
Reviewed in:

http://reviews.llvm.org/D5115

llvm-svn: 217229
2014-09-05 06:46:43 +00:00
Alexander Potapenko 869342c1cb [ASan] disable zero_page_pc.cc on Android.
Bug: https://code.google.com/p/address-sanitizer/issues/detail?id=336

llvm-svn: 217228
2014-09-05 06:26:08 +00:00
David Majnemer 6fe6ea740c InstCombine: Remove a special case pattern
The special case did not work when run under -reassociate and can easily
be expressed by a further generalization of an existing pattern.

llvm-svn: 217227
2014-09-05 06:09:24 +00:00
Andrew Trick c0f7933512 Minor typo.
llvm-svn: 217226
2014-09-05 04:56:43 +00:00
Saleem Abdulrasool 5c70de1072 MC: correct DWARF header for PE/COFF assembly input
The header contains an offset to the DWARF line table for the CU.  The offset
must be section relative for COFF and absolute for others.  The non-assembly
code path for the DWARF header generation already has the correct emission for
the headers.  This corrects the assembly input path.

This was identified by BFD objecting to the LLVM generated DWARF information.

llvm-svn: 217222
2014-09-05 04:15:00 +00:00
Jiangning Liu 1a486da543 [AArch64] Add pass to enable additional comparison optimizations by CSE.
Patched by Sergey Dmitrouk.

This pass tries to make consecutive compares of values use same operands to
allow CSE pass to remove duplicated instructions. For this it analyzes
branches and adjusts comparisons with immediate values by converting:

GE -> GT
GT -> GE
LT -> LE
LE -> LT

and adjusting immediate values appropriately. It basically corrects two
immediate values towards each other to make them equal.

llvm-svn: 217220
2014-09-05 02:55:24 +00:00
Rui Ueyama 2feff785fc [PECOFF] Run lib.exe with /machine:x64.
llvm-svn: 217219
2014-09-05 01:35:23 +00:00
Alexey Samsonov ead5b9314a [CMake] Add -fno-sanitize=function to UBSan bootstrap
llvm-svn: 217217
2014-09-05 01:17:30 +00:00
Kostya Serebryany 1fb81720ec [asan] relax the assertion around array cookie load; still need to extract a reproducer where this assertion fails...
llvm-svn: 217215
2014-09-05 01:16:30 +00:00
Rui Ueyama 30a6bc286b [PECOFF] Run cvtres.exe with /machine:x64.
If we are creating a PE+ executable, we need to run cvtres with
/machine:x64 instead of /machine:x86. Otherwise the resulting executable
would be invalid.

llvm-svn: 217214
2014-09-05 00:26:28 +00:00
Richard Smith 8c9d2c7cc5 Remove suppression of dr547 test and instead test that deduction succeeds if we
use __thiscall. (This doesn't actually work for MSVC; they don't allow the
__thiscall qualifier here, but it's sufficient to demonstrate that we do
implement the intent of the DR.)

llvm-svn: 217213
2014-09-05 00:17:00 +00:00
David Blaikie a48a53cc8e unique_ptrify AnalysisConsumer.cpp::CreateUbiViz
llvm-svn: 217212
2014-09-05 00:14:57 +00:00
Rafael Espindola 7eb3b06ca2 Disable the fix for pr20793 because of a gnu ld bug.
llvm-svn: 217211
2014-09-05 00:14:12 +00:00
David Blaikie ad464dbf0b Remove a use of raw pointer ownership (then non-ownership) in TrimmedGraph::popNextReportGraph
(just cleaning up unique_ptr stuff by finding interesting 'reset' calls
at the moment)

llvm-svn: 217210
2014-09-05 00:11:25 +00:00
David Blaikie bc48abf43d Fix comment indentation.
llvm-svn: 217209
2014-09-05 00:07:20 +00:00
David Blaikie b564d1fb43 unique_ptrify ExplodedGraph::trim
llvm-svn: 217208
2014-09-05 00:04:19 +00:00
Rafael Espindola 7c7d7b92df Refactor to avoid code duplication. NFC.
llvm-svn: 217207
2014-09-05 00:02:50 +00:00
David Blaikie 7c35f6194f unique_ptrify the result of ConstraintManagerCreator and StoreManagerCreator
llvm-svn: 217206
2014-09-04 23:54:37 +00:00
David Blaikie 91e7902622 unique_ptrify BugReporter::visitors
llvm-svn: 217205
2014-09-04 23:54:33 +00:00
Hans Wennborg 8323394017 clang/test/CXX/drs/dr5xx.cpp: Suppress dr547 also for MinGW
This is a follow-up to r216841.

llvm-svn: 217204
2014-09-04 23:48:47 +00:00
Richard Trieu 2a07c96737 Stop double visiting some expressions during self reference checking.
Originally, self reference checking made a double pass over some expressions
to handle reference type checking.  Now, allow HandleValue to also check
reference types, and fallback to Visit for unhandled expressions.

llvm-svn: 217203
2014-09-04 23:19:34 +00:00
Rafael Espindola c4b4253f7c Fix pr20793.
With this patch the third field of llvm.global_ctors is also used on ELF.

llvm-svn: 217202
2014-09-04 23:03:58 +00:00
Hans Wennborg fece4c6cd5 Try to make VS 2012 happy after r217155
It was failing with:

C:\bb-win7\ninja-clang-i686-msc17-R\llvm-project\llvm\include\llvm/Support/ErrorOr.h(102) : error C3861: 'make_error_code': identifier not found

        C:\bb-win7\ninja-clang-i686-msc17-R\llvm-project\clang-tools-extra\clang-tidy\ClangTidyOptions.cpp(153) : see reference to function template instantiation 'llvm::ErrorOr<T>::ErrorOr<std::errc::errc>(E,void *)' being compiled

        with
        [
            T=clang::tidy::ClangTidyOptions,
            E=std::errc::errc
        ]

llvm-svn: 217201
2014-09-04 22:41:03 +00:00
Hans Wennborg 93dbeae0f7 Don't allow inline asm statements to reference parameters in naked functions
Differential Revision: http://reviews.llvm.org/D5183

llvm-svn: 217200
2014-09-04 22:16:48 +00:00
Hans Wennborg d62cdd2c14 Don't allow non-ASM statements in naked functions
Naked functions don't have prologues or epilogues, so doing
codegen for anything other than inline assembly would be completely
hit or miss.

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

llvm-svn: 217199
2014-09-04 22:16:40 +00:00
Hans Wennborg d71907dd07 Don't emit prologues or epilogues for naked functions (PR18791, PR20028)
For naked functions with parameters, Clang would still emit stores in the prologue
that would clobber the stack, because LLVM doesn't set up a stack frame. (This
shows up in -O0 compiles, because the stores are optimized away otherwise.)

For example:

  __attribute__((naked)) int f(int x) {
    asm("movl $42, %eax");
    asm("retl");
  }

Would result in:

  _Z1fi:
  movl    12(%esp), %eax
  movl    %eax, (%esp)    <--- Oops.
  movl    $42, %eax
  retl

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

llvm-svn: 217198
2014-09-04 22:16:33 +00:00
Richard Smith 8d082d187e PR20844: If we fail to list-initialize a reference, map to the referenced type
before retrying the initialization to produce diagnostics. Otherwise, we may
fail to produce any diagnostics, and silently produce invalid AST in a -Asserts
build. Also add a note to this codepath to make it more clear why we were
trying to create a temporary.

llvm-svn: 217197
2014-09-04 22:13:39 +00:00
Hans Wennborg 1b23158ce4 MS format strings: allow the 'h' length modifier with C, C, s and S (PR20808)
llvm-svn: 217196
2014-09-04 21:39:52 +00:00
Hans Wennborg 68f42b9515 MS format strings: support the 'w' length modifier (PR20808)
llvm-svn: 217195
2014-09-04 21:39:46 +00:00
Alexey Samsonov f537aeaea1 [ASan] Remove the call to GetPageSizeCached from fast path of FastPoisonShadow
llvm-svn: 217194
2014-09-04 20:47:27 +00:00
Yaron Keren c2e09253bd Post-JIT light cleanup of ExecutionEngine.h: edited comments about the JIT,
removed runJITOnFunction and isLazyCompilationDisabled.

Deleted CodeGen\MachineCodeInfo.h which was used by runJITOnFunction() only.

llvm-svn: 217193
2014-09-04 20:37:02 +00:00
Reid Kleckner 579c9513cb Add triple to ms-inline-asm-return.cpp test
llvm-svn: 217192
2014-09-04 20:16:12 +00:00
Nick Kledzik 635f9c7158 [mach-o] Let darwin driver infer arch from .o files if -arch not used.
Mach-O has a "fat" (or "universal") variant where the same contents built for
different architectures are concatenated into one file with a table-of-contents
header at the start.  But this leaves a dilemma for the linker - which
architecture to use.

Normally, the linker command line -arch is used to force which slice of any fat
files are used.  The clang compiler always passes -arch to the linker when
invoking it.  But some Makefiles invoke the linker directly and don’t specify
the -arch option.  For those cases, the linker scans all input files in command
line order and finds the first non-fat object file.  Whatever architecture it
is becomes the architecture for the link.

llvm-svn: 217189
2014-09-04 20:08:30 +00:00
Reid Kleckner 9b3e3dfc54 MS inline asm: Allow __asm blocks to set a return value
If control falls off the end of a function after an __asm block, MSVC
assumes that the inline assembly filled the EAX and possibly EDX
registers with an appropriate return value. This functionality is used
in inline functions returning 64-bit integers in system headers, so we
need some amount of compatibility.

This is implemented in Clang by adding extra output constraints to every
inline asm block, and storing the resulting output registers into the
return value slot. If we see an asm block somewhere in the function
body, we emit a normal epilogue instead of marking the end of the
function with a return type unreachable.

Normal returns in functions not using this functionality will overwrite
the return value slot, and in most cases LLVM should be able to
eliminate the dead stores.

Fixes PR17201.

Reviewed By: majnemer

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

llvm-svn: 217187
2014-09-04 20:04:38 +00:00
Frederic Riss 878065bb21 [ dwarfdump ] Add symbolic dump of known DWARF attribute values.
Reviewed By: dblaikie

Subscribers: llvm-commits

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

llvm-svn: 217186
2014-09-04 19:39:20 +00:00
Todd Fiala ebecb38d47 Fix up lldb build for llvm r217172.
Changes reference to 4th element in version_min_command from reserved to sdk.

llvm-svn: 217185
2014-09-04 19:31:52 +00:00
Frederic Riss 28f3d4186d Revert "[dwarfdump] Add missing DW_LANG_Mips_Assembler case to LanguageString()"
This reverts commit 93c7e6161e1adbd2c7ac81fa081823183035cb64.

This commit got approved first, but was dependant on another one going in (The one pretty printing attribute values). I'll reapply when the other one is in.

llvm-svn: 217183
2014-09-04 18:55:46 +00:00