1. Feb 27, 2018
    • Petr Hosek's avatar
      [Driver] Add SafeStack to a map of incompatible sanitizers · a459dab9
      Petr Hosek authored
      This allows reporting an error when user tries to use SafeStack with
      incompatible sanitizers.
      
      Differential Revision: https://reviews.llvm.org/D43606
      
      llvm-svn: 326151
      a459dab9
    • Kuba Mracek's avatar
      d2af423b
    • Vitaly Buka's avatar
      [asan] Fix build for Android · 78577341
      Vitaly Buka authored
      llvm-svn: 326149
      78577341
    • Sanjay Patel's avatar
    • Evandro Menezes's avatar
      [AArch64] Harden test cases · 717941e1
      Evandro Menezes authored
      NFC
      
      llvm-svn: 326147
      717941e1
    • Eugene Zelenko's avatar
      [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use... · e580d831
      Eugene Zelenko authored
      [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
      
      llvm-svn: 326146
      e580d831
    • Volodymyr Sapsai's avatar
      Fix which Darwin versions have ObjC runtime with full subscripting support. · dade3277
      Volodymyr Sapsai authored
      Update min deployment target in some tests so that they don't try
      to link against libarclite and don't fail when it's not available.
      
      rdar://problem/29253617
      
      Reviewers: vsk, kubamracek
      
      Reviewed By: vsk
      
      Subscribers: jkorous-apple, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D43787
      
      llvm-svn: 326145
      dade3277
    • Reid Kleckner's avatar
      Fix codeview-column-info.c test with a triple · a54daa6d
      Reid Kleckner authored
      llvm-svn: 326144
      a54daa6d
    • Volodymyr Sapsai's avatar
      Fix which Darwin versions have ObjC runtime with full subscripting support. · 9ef00ed4
      Volodymyr Sapsai authored
      Update min deployment target in some tests so that they don't try
      to link against libarclite and don't fail when it's not available.
      
      rdar://problem/29253617
      
      Reviewers: vsk, kubamracek
      
      Reviewed By: vsk
      
      Subscribers: jkorous-apple, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D43787
      
      llvm-svn: 326143
      9ef00ed4
    • Aditya Nandakumar's avatar
      [GISel]: Don't assert when constraining RegisterOperands which are uses. · 59999053
      Aditya Nandakumar authored
      Currently we assert that only non target specific opcodes can have
      missing RegisterClass constraints in the MCDesc. The backend can have
      instructions with register operands but don't have RegisterClass
      constraints (say using unknown_class) in which case the instruction
      defining the register will constrain it.
      Change the assert to only fire if a def has no regclass.
      
      https://reviews.llvm.org/D43409
      
      llvm-svn: 326142
      59999053
    • Reid Kleckner's avatar
      Re-land "Emit proper CodeView when -gcodeview is passed without the cl driver." · 54af3e7e
      Reid Kleckner authored
      Reverts r326116 and re-lands r326113 with a fix to ASan so that it
      enables column info in its test suite.
      
      llvm-svn: 326141
      54af3e7e
    • Adrian Prantl's avatar
      Add a sanity check for inline testcases. · 87a000da
      Adrian Prantl authored
      When writing an inline test, there is no way to make sure that any of
      the inline commands are actually executed, so this patch adds a sanity
      check that at least one breakpoint was hit. This avoids a test with no
      breakpoints being hit passing.
      
      Differential Revision: https://reviews.llvm.org/D43694
      
      llvm-svn: 326140
      87a000da
    • Ed Maste's avatar
      Revert r326134 due to broken buildbot · 6ebb0792
      Ed Maste authored
      llvm-svn: 326139
      6ebb0792
    • Craig Topper's avatar
      [ValueTracking] Teach cannotBeOrderedLessThanZeroImpl to handle vector constants. · 69c8972f
      Craig Topper authored
      Summary: This allows vector fabs to be removed in more cases.
      
      Reviewers: spatel, arsenm, RKSimon
      
      Reviewed By: spatel
      
      Subscribers: wdng, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D43739
      
      llvm-svn: 326138
      69c8972f
    • Rafael Espindola's avatar
      Keep flags from phantom synthetic sections. · 79c23eec
      Rafael Espindola authored
      This fixes pr36475.
      
      I think this code can be simplified a bit, but I would like to check
      in the more direct fix if we are in agreement on the direction and
      then refactor.
      
      This is not something that bfd does. The issue is not noticed in bfd
      because it keeps fewer sections from the linkerscript in the output.
      
      The reasons why it seems reasonable to do this:
      
      - As George noticed, we would still keep the flags if the output
        section had both an empty synthetic section and a regular section
      - We need an heuristic to find the flags of output sections. Using the
        flags of a synthetic section that would have been there seems a
        reasonable heuristic.
      
      llvm-svn: 326137
      79c23eec
    • George Karpenkov's avatar
      [analyzer] Exploration strategy prioritizing unexplored nodes first · 6dcbc1db
      George Karpenkov authored
      See D42775 for discussion.  Turns out, just exploring nodes which
      weren't explored first is not quite enough, as e.g. the first quick
      traversal resulting in a report can mark everything as "visited", and
      then subsequent traversals of the same region will get all the pitfalls
      of DFS.
      Priority queue-based approach in comparison shows much greater
      increase in coverage and even performance, without sacrificing memory.
      
      Differential Revision: https://reviews.llvm.org/D43354
      
      llvm-svn: 326136
      6dcbc1db
    • George Karpenkov's avatar
      [analyzer] Do not analyze bison-generated files · 1d3e49e7
      George Karpenkov authored
      Bison/YACC generated files result in a very large number of (presumably)
      false positives from the analyzer.
      These false positives are "true" in a sense of the information analyzer
      sees: assuming that the lexer can return any token at any point a number
      of uninitialized reads does occur.
      (naturally, the analyzer can not capture a complex invariant that
      certain tokens can only occur under certain conditions).
      
      Current fix simply stops analysis on those files.
      I have examined a very large number of such auto-generated files, and
      they do all start with such a comment.
      Conversely, user code is very unlikely to contain such a comment.
      
      rdar://33608161
      
      Differential Revision: https://reviews.llvm.org/D43421
      
      llvm-svn: 326135
      1d3e49e7
    • Ed Maste's avatar
      Mark test_*int*_t_dwarf as failing on FreeBSD · 24f9794d
      Ed Maste authored
      Further investigation required; tests will be enabled on the buildbot
      worker soon. Marking failing tests for now in order to start with a
      green buildbot while investigation takes place.
      
      llvm.org/pr36527
      
      llvm-svn: 326134
      24f9794d
    • Simon Pilgrim's avatar
      [X86][SSE] Reduce FADD/FSUB/FMUL costs on later targets (PR36280) · 9929f907
      Simon Pilgrim authored
      Agner's tables indicate that for SSE42+ targets (Core2 and later) we can reduce the FADD/FSUB/FMUL costs down to 1, which should fix the Himeno benchmark.
      
      Note: the AVX512 FDIV costs look rather dodgy, but this isn't part of this patch.
      
      Differential Revision: https://reviews.llvm.org/D43733
      
      llvm-svn: 326133
      9929f907
    • Vitaly Buka's avatar
      [asan] Intercept std::rethrow_exception indirectly · 781ef03e
      Vitaly Buka authored
      Summary:
      Fixes Bug 32434
      See https://bugs.llvm.org/show_bug.cgi?id=32434
      
      Short summary:
      std::rethrow_exception does not use __cxa_throw to rethrow the exception, so if
      it is called from uninstrumented code, it will leave the stack poisoned. This
      can lead to false positives.
      
      Long description:
      
      For functions which don't return normally (e.g. via exceptions), asan needs to
      unpoison the entire stack. It is not known before a call to such a function
      where execution will continue, some function which don't contain cleanup code
      like destructors might be skipped. After stack unwinding, execution might
      continue in uninstrumented code.
      
      If the stack has been poisoned before such a function is called, but the stack
      is unwound during the unconventional return, then zombie redzones (entries) for
      no longer existing stack variables can remain in the shadow memory. Normally,
      this is avoided by asan generating a call to asan_handle_no_return before all
      functions marked as [[noreturn]]. This asan_handle_no_return unpoisons the
      entire stack. Since these [[noreturn]] functions can be called from
      uninstrumented code, asan also introduces interceptor functions which call
      asan_handle_no_return before running the original [[noreturn]] function;
      for example, cxa_throw is intercepted.
      
      If a [[noreturn]] function is called from uninstrumented code (so the stack is
      left poisoned) and additionally, execution continues in uninstrumented code, new
      stack variables might be introduced and overlap with the stack variables
      which have been removed during stack unwinding. Since the redzones are not
      cleared nor overwritten by uninstrumented code, they remain but now contain
      invalid data.
      
      Now, if the redzones are checked against the new stack variables, false
      positive reports can occur. This can happen for example by the uninstrumented
      code calling an intercepted function such as memcpy, or an instrumented
      function.
      
      Intercepting std::rethrow_exception directly is not easily possible since it
      depends on the C++ standard library implementation (e.g. libcxx vs libstdc++)
      and the mangled name it produces for this function. As a rather simple
      workaround, we're intercepting _Unwind_RaiseException for libstdc++. For
      libcxxabi, we can intercept the ABI function __cxa_rethrow_primary_exception.
      
      Patch by Robert Schneider.
      
      Reviewers: kcc, eugenis, alekseyshl, vitalybuka
      
      Reviewed By: vitalybuka
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D42644
      
      llvm-svn: 326132
      781ef03e
    • George Karpenkov's avatar
      Revert "[analyzer] Quickfix: do not overflow in calculating offset in RegionManager" · 5d3b0e38
      George Karpenkov authored
      This reverts commit df306c4c5ab4a6b8d3c47432346d1f9b90c328b4.
      
      Reverting until I can figured out the reasons for failures.
      
      llvm-svn: 326131
      5d3b0e38
    • Adrian McCarthy's avatar
      Partial fix for TestConflictingSymbol.py on Windows · 00cc735a
      Adrian McCarthy authored
      Without this fix, the test ERRORs because the link of the inferior fails. This
      patch adds the LLDB_TEST_API macro where needed and uses the new -2 magic
      value for num_expected_locations to account for lazy-loading of module symbols
      on Windows.
      
      With this fix, the test itself still fails:  conflicting_symbol isn't in the
      debug info nor the export table, and Windows binaries don't have an equivalent
      of the ELF .symtab.  We need to understand why the test works to keep the
      symbol out of the debug info.  In the mean time, having the test fail at this
      point is a better indication of the remaining problem than a build error.
      
      Differential Revision: https://reviews.llvm.org/D43688
      
      llvm-svn: 326130
      00cc735a
    • Scott Linder's avatar
      [DebugInfo] Remove target-specific instructions in test · a04793eb
      Scott Linder authored
      This AsmParser test is target-agnostic, but contained some target-specific
      instructions, which broke on SystemZ.
      
      llvm-svn: 326129
      a04793eb
    • Craig Topper's avatar
      [X86] Add constant folding to combineMOVMSK. · e5d39e42
      Craig Topper authored
      There's still some shortcoming in our ability to combine binops of constants with different sizes separated by an extend. I'll try to look at that next.
      
      llvm-svn: 326128
      e5d39e42
    • Adam Nemet's avatar
      [opt-viewer] Kill parser processes before moving onto rendering · 713eb05c
      Adam Nemet authored
      The main benefit is that they release the memory they were holding onto.
      
      llvm-svn: 326127
      713eb05c
    • Adam Nemet's avatar
      opt-diff: Support splitting to multiple output files · 9dea9b49
      Adam Nemet authored
      When reading the resulting files back with opt-viewer, they will be parsed in
      parallel.
      
      llvm-svn: 326126
      9dea9b49
    • Adam Nemet's avatar
      [opt-viewer] Set title for the source pages · f7778892
      Adam Nemet authored
      llvm-svn: 326125
      f7778892
    • Adam Nemet's avatar
      opt-viewer: also find thinlto opt.yaml files · cb651c05
      Adam Nemet authored
      llvm-svn: 326124
      cb651c05
    • Adam Nemet's avatar
      opt-viewer: output index first · 6fd19ca7
      Adam Nemet authored
      One can start looking at the index while the pages are still generating
      
      llvm-svn: 326123
      6fd19ca7
    • George Karpenkov's avatar
      [analyzer] Quickfix: do not overflow in calculating offset in RegionManager · 585dc5db
      George Karpenkov authored
      Addresses https://bugs.llvm.org/show_bug.cgi?id=36206
      
      rdar://37159026
      
      A proper fix would be much harder, and would involve changing the
      appropriate code in ExprEngine to be aware of the size limitations of
      the type used for addressing.
      
      Differential Revision: https://reviews.llvm.org/D43218
      
      llvm-svn: 326122
      585dc5db
    • Davide Italiano's avatar
      [Darwin] Specify DWARF 2/4 when running apple accelerator tests. · 58c707d1
      Davide Italiano authored
      These sections will be retired. Also, explicitly list llvm-objdump
      as a dependency. This should've been done in the previous commit,
      but I failed to squash the two changes together.
      
      Thanks to Adrian for pointing the first problem out in a comment.
      
      llvm-svn: 326121
      58c707d1
    • Stephan T. Lavavej's avatar
      [libcxx] [test] Fix MSVC warnings and errors. · c1fcd97e
      Stephan T. Lavavej authored
      test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp
      test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp
      test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp
      test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp
      test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp
      test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp
      test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp
      test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp
      Fix MSVC x64 truncation warnings.
      warning C4267: conversion from 'size_t' to 'int', possible loss of data
      
      test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp
      Fix MSVC uninitialized memory warning.
      warning C6001: Using uninitialized memory 'vl'.
      
      test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp
      Include <cassert> for the assert() macro.
      
      Fixes D43273.
      
      llvm-svn: 326120
      c1fcd97e
    • Craig Topper's avatar
      [X86] Add a custom legalization for (i16 (bitcast v16i1)) and (i32 (bitcast... · 5e0ceb88
      Craig Topper authored
      [X86] Add a custom legalization for (i16 (bitcast v16i1)) and (i32 (bitcast v32i1)) without AVX512 to prevent scalarization
      
      Summary:
      We have an early DAG combine to turn these patterns into MOVMSK, but that combine doesn't work if the vXi1 type has more elements than the widest legal vXi8 type. Type legalization will eventually split it down to v16i1 or v32i1 and then the bitcast gets legalized to a truncstore and a scalar load. The truncstore will get lowered to a series of extracts and bit math.
      
      This patch adds a custom legalization to use a sign extend and MOVMSK instead. This prevents the eventual scalarization.
      
      Reviewers: spatel, RKSimon, zvi
      
      Reviewed By: RKSimon
      
      Subscribers: mgorny, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D43593
      
      llvm-svn: 326119
      5e0ceb88
    • David Zarzycki's avatar
      Fix for LLVM r326109 · 6daad9da
      David Zarzycki authored
      llvm-svn: 326118
      6daad9da
    • Alexey Bataev's avatar
      [SLP] Added new test + fixed some checks, NFC. · b44e2b75
      Alexey Bataev authored
      llvm-svn: 326117
      b44e2b75
    • Zachary Turner's avatar
      Revert "Emit proper CodeView when -gcodeview is passed without the cl driver." · 13e3520d
      Zachary Turner authored
      This reverts commit e17911006548518634fad66bb8648bcad49a1d64.
      
      This is failing on ASAN bots because asan expects column info,
      and it's also failing on some linux bots for unknown reasons which
      i need to investigate.
      
      llvm-svn: 326116
      13e3520d
    • Craig Topper's avatar
      [InstCombine] Add test cases with vector constants to fpextend.ll · 43fb1cde
      Craig Topper authored
      llvm-svn: 326115
      43fb1cde
    • Craig Topper's avatar
      b284e8b9
    • Zachary Turner's avatar
      Emit proper CodeView when -gcodeview is passed without the cl driver. · 9eee7bb7
      Zachary Turner authored
      Windows debuggers don't work properly when column info is emitted
      with lines.  We handled this by checking if the driver mode was
      cl, but it's possible to cause the gcc driver to emit codeview as
      well, and in that path we were emitting column info with codeview.
      
      Differential Revision: https://reviews.llvm.org/D43700
      
      llvm-svn: 326113
      9eee7bb7
    • Pavel Labath's avatar
      Add "lldb-test breakpoint" command and convert the case-sensitivity test to use it · 7c94582f
      Pavel Labath authored
      Summary:
      The command takes two input arguments: a module to use as a debug target
      and a file containing a list of commands. The command will execute each
      of the breakpoint commands in the file and dump the breakpoint state
      after each one.
      
      The commands are expected to be breakpoint set/remove/etc. commands, but
      I explicitly allow any lldb command here, so you can do things like
      change setting which impact breakpoint resolution, etc. There is also a
      "-persistent" flag, which causes lldb-test to *not* automatically clear
      the breakpoint list after each command. Right now I don't use it, but
      the idea behind it was that it could be used to test more complex
      combinations of breakpoint commands (set+modify, set+disable, etc.).
      
      Right now the command prints out only the basic breakpoint state, but
      more information can be easily added there.  To enable easy matching of
      the "at least one breakpoint location found" state, the command
      explicitly prints out the string "At least one breakpoint location.".
      
      To enable testing of breakpoints set with an absolute paths, I add the
      ability to perform rudimentary substitutions on the commands: right now
      the string %p is replaced by the directory which contains the command
      file (so, under normal circumstances, this will perform the same
      substitution as lit would do for %p).
      
      I use this command to rewrite the TestBreakpointCaseSensitivity test --
      the test was checking about a dozen breakpoint commands, but it was
      launching a new process for each one, so it took about 90 seconds to
      run. The new test takes about 0.3 seconds for me, which is approximately
      a 300x speedup.
      
      Reviewers: davide, zturner, jingham
      
      Subscribers: luporl, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D43686
      
      llvm-svn: 326112
      7c94582f