1. Jun 02, 2014
    • Rui Ueyama's avatar
      Simplify markLive(). · 6ffe42ee
      Rui Ueyama authored
      Reference::target() never returns a nullptr, so NULL check
      is not needed and is more harmful than doing nothing.
      No functionality change.
      
      llvm-svn: 210008
      6ffe42ee
    • Dinesh Dwivedi's avatar
      Added inst combine tarnsform for (1 << X) & C pattrens where C is (some PowerOf2 - 1) · ce5d35a9
      Dinesh Dwivedi authored
      This patch can handles following cases from http://nondot.org/sabre/LLVMNotes/InstCombine.txt
        "((1 << X) & 7) == 0" ==> "X > 2"
        "((1 << X) & 7) != 0" ==> "X < 3".
      
      Differential Revision: http://reviews.llvm.org/D3678
      
      llvm-svn: 210007
      ce5d35a9
    • Dinesh Dwivedi's avatar
      Added inst combine transforms for single bit tests from Chris's note · 43e127bd
      Dinesh Dwivedi authored
      if ((x & C) == 0) x |= C becomes x |= C
      if ((x & C) != 0) x ^= C becomes x &= ~C
      if ((x & C) == 0) x ^= C becomes x |= C
      if ((x & C) != 0) x &= ~C becomes x &= ~C
      if ((x & C) == 0) x &= ~C becomes nothing
      
      Differential Revision: http://reviews.llvm.org/D3777
      
      llvm-svn: 210006
      43e127bd
    • Alp Toker's avatar
      Silence -Wreturn-type warning · 1feec4b8
      Alp Toker authored
      llvm-svn: 210005
      1feec4b8
    • Simon Atanasyan's avatar
      [Mips] Reduce number of input files used my Mips tests. · 2c248644
      Simon Atanasyan authored
      No functional changes.
      
      llvm-svn: 210004
      2c248644
    • Alp Toker's avatar
      GraphWriter: tweak the program fallback order · 54b6ab0e
      Alp Toker authored
      Amend r210001 to use the classic fallback order behaviour if the requested
      graphing program isn't found.
      
      llvm-svn: 210003
      54b6ab0e
    • Marshall Clow's avatar
      Preparation for <string_view>. More helper functions that can be shared... · 5f0701f2
      Marshall Clow authored
      Preparation for <string_view>. More helper functions that can be shared between <string> and <string_view>. No functionality change
      
      llvm-svn: 210002
      5f0701f2
    • Alp Toker's avatar
      GraphWriter: detect graph viewer programs at runtime · 125be846
      Alp Toker authored
      Replace the crufty build-time configure checks for program paths with
      equivalent runtime logic.
      
      This lets users install graphing tools as needed without having to reconfigure
      and rebuild LLVM, while eliminating a long chain of inappropriate compile
      dependencies that included GUI programs and the windowing system.
      
      Additional features:
      
       * Support the OS X 'open' command to view graphs generated by any of the
         Graphviz utilities. This is an alternative to the Graphviz OS X UI which is
         no longer available on Mountain Lion.
      
       * Produce informative log output upon failure to indicate which programs can
         be installed to view graphs.
      
      Ping me if this doesn't work for your particular environment.
      
      llvm-svn: 210001
      125be846
    • NAKAMURA Takumi's avatar
      Instruction::isIdenticalToWhenDefined(): Check getNumOperands() in advance of... · aaffd706
      NAKAMURA Takumi authored
      Instruction::isIdenticalToWhenDefined(): Check getNumOperands() in advance of std::equal(op) to appease MSVC Debug build.
      
      MSVC Debug build is confused with (possibly invalid) op_begin(), if op_begin() == op_end().
      
      llvm-svn: 210000
      aaffd706
    • Saleem Abdulrasool's avatar
      Support: add 6-parameter format · 0021013b
      Saleem Abdulrasool authored
      Since we cannot yet use variadic templates, add a specialisation for
      6-parameters to format.  This is motivated by a need for the additional
      parameter for formatting information for an unwind decoder for Windows on ARM.
      
      llvm-svn: 209999
      0021013b
    • Saleem Abdulrasool's avatar
      Support: add Windows ARM EH data structures · b327103f
      Saleem Abdulrasool authored
      Introduce the support structures necessary to deal with the Windows ARM EH data.
      These definitions are extremely aggressive about assertions to aid future use
      for generation of the entries and subsequent decoding.
      
      The names for the various fields are meant to reflect the names used by the
      Visual Studio toolchain to aid communication.
      
      Due to the complexity in reading a few of the values, there are a couple of
      additional utility functions to decode the information.
      
      In general, there are two ways to encode the unwinding information:
      - packed, which places the data inline into the
        _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY structure.
      - unpacked, which places the data into auxiliary structures placed into the
        .xdata section.
      
      The set of structures allow reading of data in either encoding, with the minor
      caveat that epilogue scopes need to be decoded manually by constructing the
      structure from the data returned by the RuntimeFunction structure.
      
      These definitions are meant for read-only access at the current point as the
      first use of them will be to decode the exception information.
      
      llvm-svn: 209998
      b327103f
    • Alp Toker's avatar
      Revert "Fix the undefined-but-used odr-use marker (DR48)" · 7f02e53f
      Alp Toker authored
      Wrong patch got committed (this one isn't ready for prime time).
      
      This reverts commit r209996.
      
      llvm-svn: 209997
      7f02e53f
    • Alp Toker's avatar
      Fix the undefined-but-used odr-use marker (DR48) · 71c53d47
      Alp Toker authored
      We should treat tentative definitions as undefined for the purpose of
      ODR-use linkage checking.
      
      This broke somewhere around r149731 when tests were disabled.
      
      Note that test coverage for these diagnostics is generally lacking due to a
      separate issue (PR19910: Don't suppress unused/undefined warnings when there
      are errors).
      
      llvm-svn: 209996
      71c53d47
    • Alp Toker's avatar
      Fix typos · c2d5e611
      Alp Toker authored
      llvm-svn: 209995
      c2d5e611
    • Alp Toker's avatar
      Add initial CMake build system · 7198f529
      Alp Toker authored
      This is not yet supported for production builds but can already produce working
      binaries on OS X and Linux with clang and gcc.
      
      The intention is to improve support to the point where it can integrate with
      the LLVM runtime platform, cover all platforms, runtime/release build
      configurations and run the tests.
      
      Patch by Jack Howarth!
      
      llvm-svn: 209994
      7198f529
    • Rafael Espindola's avatar
      Don't compare an error_code with nullptr. · 8390a257
      Rafael Espindola authored
      llvm-svn: 209993
      8390a257
    • Faisal Vali's avatar
      Fix PR18498: Support explicit template arguments with variadic generic lambdas · 3628cb9c
      Faisal Vali authored
      http://llvm.org/bugs/show_bug.cgi?id=18498
      
      This code was resulting in a crash:
      
      auto L = [](auto ... v) { };
      L.operator()<int>(3);
      
      The reason is that the partially-substituted-pack is incorrectly retained within the current-instantiation-scope during template-argument-finalization, and because lambda's are local, there parent instantiation scopes are merged, which leads to the expansion-pattern being retained in the finalized specialization.
      
      This patch ensures that once we have finalized deduction of a parameter-pack, we remove the partially-substituted-pack so that it doesn't cause CheckParameterPacksForExpansion to incorrectly inform the caller that it needs to retain the expansion pattern.
      
      
      Thanks to Richard Smith for the review!
      
      http://reviews.llvm.org/D2135
      
      llvm-svn: 209992
      3628cb9c
  2. Jun 01, 2014
    • Rafael Espindola's avatar
      Test fixes and improvements. · d6f11a70
      Rafael Espindola authored
      Remove redundant -fno-stack-protector run with openbsd.
      Add -target to the -fstack-protector tests so they pass on openbsd.
      
      Patch by Brad Smith.
      
      llvm-svn: 209991
      d6f11a70
    • Christian Pirker's avatar
      ARMEB: Fix function return type f64 · 762b2c62
      Christian Pirker authored
      Reviewed at http://reviews.llvm.org/D3968
      
      llvm-svn: 209990
      762b2c62
    • Elena Demikhovsky's avatar
      Updates in IntelJITEventListener.cpp - by Arch Robison. · 639625e9
      Elena Demikhovsky authored
      This patch updates IntelJITEventListener.cpp to account for revision 206654, which removed some methods from DILineInfo.
      
      llvm-svn: 209989
      639625e9
    • Matt Arsenault's avatar
      R600: Set all float vector expands in the same place · 616a8e42
      Matt Arsenault authored
      llvm-svn: 209988
      616a8e42
    • Simon Atanasyan's avatar
      [Mips] Implement .{ctors,dtors}.<priority> sections ordering. · b635d045
      Simon Atanasyan authored
      Arrange .ctors/.dtors sections in the following order:
        .ctors from crtbegin.o or crtbegin?.o
        .ctors from regular object files
        .ctors.* (sorted) from regular object files
        .ctors from crtend.o or crtend?.o
      
      This order is specific for MIPS traget. For example, on X86
      the .ctors.* sections are merged into the .init_array section.
      
      llvm-svn: 209987
      b635d045
    • Saleem Abdulrasool's avatar
      compiler-rt: prefer .rodata for non MachO targets · 2fd910dc
      Saleem Abdulrasool authored
      Place constants into .rdata if targeting ELF or COFF/PE.  This should be
      functionally identical, however, the data would be placed into a different
      section.  This is purely a cleanup change.
      
      llvm-svn: 209986
      2fd910dc
    • Saleem Abdulrasool's avatar
      compiler-rt: whitespace and uniformity for arm · 57aa97f5
      Saleem Abdulrasool authored
      Make the whitespace a bit more uniform in the various assembly routines.  This
      also makes the assembly files a bit more uniform on the ARM side by explicitly
      stating that it is using the unified syntax and that the contents of the code is
      in the text section (or segment).  No functional change.
      
      llvm-svn: 209985
      57aa97f5
    • David Blaikie's avatar
      DebugInfo: Assert that DbgVariables have associated DIEs · 23b4ecbf
      David Blaikie authored
      This was previously committed in r209680 and reverted in r209683 after
      it caused sanitizer builds to crash.
      
      The issue seems to be that the DebugLoc associated with dbg.value IR
      intrinsics isn't necessarily accurate. Instead, we duplicate the
      DIVariables and add an InlinedAt field to them to record their
      location.
      
      We were using this InlinedAt field to compute the LexicalScope for the
      variable, but not using it in the abstract DbgVariable construction and
      mapping. This resulted in a formal parameter to the current concrete
      function, correctly having no InlinedAt information, but incorrectly
      having a DebugLoc that described an inlined location within the
      function... thus an abstract DbgVariable was created for the variable,
      but its DIE was never constructed (since the LexicalScope had no such
      variable). This DbgVariable was silently ignored (by testing for a
      non-null DIE on the abstract DbgVariable).
      
      So, fix this by using the right scoping information when constructing
      abstract DbgVariables.
      
      In the long run, I suspect we want to undo the work that added this
      second kind of location tracking and fix the places where the DebugLoc
      propagation on the dbg.value intrinsic fails. This will shrink debug
      info (by not duplicating DIVariables), make it more efficient (by not
      having to construct new DIVariable metadata nodes to try to map back to
      a single variable), and benefit all instructions.
      
      But perhaps there are insurmountable issues with DebugLoc quality that
      I'm unaware of... I just don't know how we can't /just keep the DebugLoc
      from the dbg.declare to the dbg.values and never get this wrong/.
      
      Some history context:
      
      http://llvm.org/viewvc/llvm-project?view=revision&revision=135629
      http://llvm.org/viewvc/llvm-project?view=revision&revision=137253
      
      llvm-svn: 209984
      23b4ecbf
    • Alp Toker's avatar
      Don't add examples to the check-clang dependencies unless requested · 1a58ff24
      Alp Toker authored
      The tests were correctly getting skipped but the targets still mistakenly got
      built.
      
      llvm-svn: 209983
      1a58ff24
    • Alp Toker's avatar
      Fix typos · da0c7933
      Alp Toker authored
      llvm-svn: 209982
      da0c7933
    • Alp Toker's avatar
      ExecutionEngine: avoid NDEBUG in headers · 322db9ea
      Alp Toker authored
      llvm-svn: 209981
      322db9ea
    • Alp Toker's avatar
      Update a couple of header inclusion guards · 5f83e477
      Alp Toker authored
      llvm-svn: 209980
      5f83e477
    • Matt Arsenault's avatar
      R600/SI: Remove redundant patterns · b9e1eec3
      Matt Arsenault authored
      These patterns are already handled in the instruction definition.
      
      llvm-svn: 209979
      b9e1eec3
    • Alp Toker's avatar
      Preprocessor: make C++ operator names as macro identifiers a compatible extension · e03e9e15
      Alp Toker authored
      With recent changes, this is now a compatible language extension and can be
      safely enabled with -ms-extensions instead of requiring the full
      -ms-compatibility MSVC drop-in mode. As such we can now also emit an extension
      warning under -Wmicrosoft to help users port their code.
      
      llvm-svn: 209978
      e03e9e15
    • Adam Nemet's avatar
      [SelectionDAG] Force cycle detection in AssignTopologicalOrder before aborting · b4690e3f
      Adam Nemet authored
      DAG cycle detection is only enabled with ENABLE_EXPENSIVE_CHECKS.  However we
      can run it just before we would crash in order to provide more informative
      diagnostics.
      
      Now in addition to the "Overran sorted position" message we also get the Node
      printed if a cycle was detected.
      
      Tested by building several configs: Debug+Assert, Debug+Assert+Check (this is
      ENABLE_EXPENSIVE_CHECKS), Release+Assert and Release.  Also tried that the
      AssignTopologicalOrder assert produces the expected results.
      
      llvm-svn: 209977
      b4690e3f
    • Adam Nemet's avatar
      [SelectionDAG] Pass DAG to checkForCycles · 7d39430a
      Adam Nemet authored
      Pass the DAG down to checkForCycles from all callers where we have it.  This
      allows target-specific nodes to be printed properly.
      
      Also print some missing newlines.
      
      llvm-svn: 209976
      7d39430a
    • Adam Nemet's avatar
      [SelectionDAG] Remove duplicate declaration · 1db90bcf
      Adam Nemet authored
      Prefer the decl in SelectionDAGNodes.h because it's used there and
      SelectionDAG.h includes SelectionDAGNodes.h.
      
      llvm-svn: 209975
      1db90bcf
  3. May 31, 2014