1. Mar 04, 2018
  2. Mar 03, 2018
    • Philip Pfaffe's avatar
      Revert "[Acc] Fix for PR33208" · 4d50ab86
      Philip Pfaffe authored
      This reverts commit r326643. Fix didn't really fix anything.
      
      llvm-svn: 326656
      4d50ab86
    • Kamil Rytarowski's avatar
      Revert D44035 · 980d0f89
      Kamil Rytarowski authored
      Broken syntax.
      
      llvm-svn: 326655
      980d0f89
    • Kamil Rytarowski's avatar
      Hotfix for D44035 · baddcfd7
      Kamil Rytarowski authored
      Try to fix the syntax.
      
      llvm-svn: 326654
      baddcfd7
    • Kamil Rytarowski's avatar
      Support OpenBSD in common interceptors · 13e0063e
      Kamil Rytarowski authored
      Summary:
      Extract  INIT_PTHREAD_ATTR_GET_SCHED from INIT_PTHREAD_ATTR_GET,
      as the former is not supported on OpenBSD.
      
      Supported interceptors
      getdetachstate, getguardsize, getscope, getstacksize, getgrouplist and getstack
      Unsupported
      getschedparam, getgroupmembership and getschedpolicy
      
      Patch by David CARLIER
      
      Reviewers: krytarowski, vitalybuka
      
      Reviewed By: vitalybuka
      
      Subscribers: fedor.sergeev, srhines, kubamracek, mgorny, llvm-commits, #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D44035
      
      llvm-svn: 326653
      13e0063e
    • Kamil Rytarowski's avatar
      Disable tests of -fsanitize on OpenBSD · 51965f87
      Kamil Rytarowski authored
      This causes failures on buildbots:
      /export/users/atombot/llvm/clang-atom-d525-fedora-rel/llvm/tools/clang/test/Driver/fsanitize.c:18:29: error: expected string not found in input
      // CHECK-UNDEFINED-OPENBSD: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|float-divide-by-zero|shift-base|shift-exponent|unreachable|return|vla-bound|alignment|null|pointer-overflow|float-cast-overflow|array-bounds|enum|bool|builtin|returns-nonnull-attribute|nonnull-attribute),?){18}"}}
                                  ^
      <stdin>:1:1: note: scanning from here
      clang version 7.0.0 (trunk 326648)
      ^
      
      This will be investigated.
      
      llvm-svn: 326652
      51965f87
    • Kamil Rytarowski's avatar
      OpenBSD UBsan support enabling SANITIZER_OPENBSD widely · 310cd250
      Kamil Rytarowski authored
      Summary: Adding OpenBSD platform
      
      Patch by: David CARLIER
      
      Reviewers: krytarowski, vitalybuka
      
      Reviewed By: vitalybuka
      
      Subscribers: srhines, kubamracek, fedor.sergeev, llvm-commits, #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D44049
      
      llvm-svn: 326651
      310cd250
    • Kamil Rytarowski's avatar
      OpenBSD UBsan support / common · c18102fe
      Kamil Rytarowski authored
      Summary:
      Sanitizer common, enable OpenBSD platform.
      - Enable common interceptors as possible and create few distinct ones.
      - Create necessary sanitizer_struct types.
      
      Patch by: David CARLIER
      
      Reviewers: krytarowski, vitalybuka, visa, kettenis
      
      Reviewed By: vitalybuka
      
      Subscribers: emaste, srhines, kubamracek, mgorny, fedor.sergeev, llvm-commits, #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D43909
      
      llvm-svn: 326650
      c18102fe
    • Kamil Rytarowski's avatar
      [msan] Restrict -ftls-model=initial-exec to FreeBSD · 8ec95868
      Kamil Rytarowski authored
      Noted by <eugenis> in D43613
      
      llvm-svn: 326649
      8ec95868
    • Kamil Rytarowski's avatar
      OpenBSD Driver basic sanitiser support · 3f7f960a
      Kamil Rytarowski authored
      Summary:
      Basic support of Sanitiser to follow-up ubsan support in compiler-rt.
      Needs to use lld instead of base ld to be fully workable.
      
      Patch by: David CARLIER
      
      Reviewers: krytarowski, vitalybuka, kettenis
      
      Reviewed By: vitalybuka
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D43961
      
      llvm-svn: 326648
      3f7f960a
    • Kamil Rytarowski's avatar
      Sanitiser common, using u64 type for GetTid on posix systems · d14a955c
      Kamil Rytarowski authored
      Summary: Moving from ptr to u64 for GetTid posix implementation.
      [FreeBSD] Moving from pthread_self to thr_self more appropriate to get thread ID.
      
      Patch by: David CARLIER
      
      Reviewers: krytarowski, vitalybuka
      
      Reviewed By: vitalybuka
      
      Subscribers: kubamracek, llvm-commits, #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D43998
      
      llvm-svn: 326647
      d14a955c
    • Kamil Rytarowski's avatar
      OpenBSD UBsan support, cmake part · 0d58e0f6
      Kamil Rytarowski authored
      Summary:
      On OpenBSD no multi arch support
      Enabling only UBsan and disabling Asan.
      
      Patch by: David CARLIER
      
      Reviewers: krytarowski, vitalybuka
      
      Reviewed By: vitalybuka
      
      Subscribers: srhines, mgorny, fedor.sergeev, llvm-commits, #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D44017
      
      llvm-svn: 326646
      0d58e0f6
    • Kamil Rytarowski's avatar
      Better OpenBSD frontend support · 150a3777
      Kamil Rytarowski authored
      Summary:
      - Like other *BSD, conditioning certain flags to pass
      - To prepare future OpenBSD sanitisers.
      
      Patch by: David CARLIER
      
      Reviewers: dlj, krytarowski, vitalybuka
      
      Reviewed By: vitalybuka
      
      Subscribers: krytarowski, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D43818
      
      llvm-svn: 326645
      150a3777
    • Kamil Rytarowski's avatar
      Adding Msan support to FreeBSD · 3d7fbb05
      Kamil Rytarowski authored
      Summary:
      Enabling the memory sanitizer support for FreeBSD, most of unit tests are compatible.
      - Adding fstat and stressor_r interceptors.
      - Updating the struct link_map access since most likely the struct Obj_Entry had been updated since.
      - Disabling few unit tests until further work is needed (or we can assume it can work in real world code).
      
      Patch by: David CARLIER
      
      Reviewers: vitalybuka, krytarowski
      
      Reviewed By: vitalybuka
      
      Subscribers: eugenis, dim, srhines, emaste, kubamracek, mgorny, fedor.sergeev, hintonda, llvm-commits, #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D43080
      
      llvm-svn: 326644
      3d7fbb05
    • Philip Pfaffe's avatar
      [Acc] Fix for PR33208 · a8f7cc8e
      Philip Pfaffe authored
      During codegen, Polly attempts to clear all loops from ScalarEvolution
      and LoopInfo, and it does so one block at a time. This causes undefined
      behaviour, since this way a loop header might be removed from a loop
      before the entire loop is erased, causing ScalarEvolution to run into an
      error.
      
      Instead, just delete the entire loop atomically. This fixes currently
      failing testcases.
      
      llvm-svn: 326643
      a8f7cc8e
    • Craig Topper's avatar
      [X86] Remove 'else' after return. NFC · d4b66016
      Craig Topper authored
      llvm-svn: 326642
      d4b66016
    • Rafael Espindola's avatar
      Simplify. NFC. · e3a60628
      Rafael Espindola authored
      Since r321982 we don't set VersionId in scanShlibUndefined, which
      makes InVersionScript redundant.
      
      llvm-svn: 326641
      e3a60628
    • Adrian Prantl's avatar
      f318ddc9
    • Manoj Gupta's avatar
      Do not generate calls to fentry with __attribute__((no_instrument_function)) · 886b4505
      Manoj Gupta authored
      Summary:
      Currently only calls to mcount were suppressed with
      no_instrument_function attribute.
      Linux kernel requires that calls to fentry should also not be
      generated.
      This is an extended fix for PR PR33515.
      
      Reviewers: hfinkel, rengolin, srhines, rnk, rsmith, rjmccall, hans
      
      Reviewed By: rjmccall
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D43995
      
      llvm-svn: 326639
      886b4505
    • Chandler Carruth's avatar
      [ThinLTO] Revert r325320: Import global variables · a4619d99
      Chandler Carruth authored
      This caused some links to fail with ThinLTO due to missing symbols as
      well as causing some binaries to have failures at runtime. We're working
      with the author to get a test case, but want to get the tree green
      again.
      
      Further, it appears to introduce a data race. While the test usage of
      threads was disabled in r325361 & r325362, that isn't an acceptable fix.
      I've reverted both of these as well. This code needs to be thread safe.
      Test cases for this are already on the original commit thread.
      
      llvm-svn: 326638
      a4619d99
    • Craig Topper's avatar
      [LegalizeVectorTypes] When scalarizing the operand of a unary op like TRUNC,... · dbf75c9c
      Craig Topper authored
      [LegalizeVectorTypes] When scalarizing the operand of a unary op like TRUNC, use a SCALAR_TO_VECTOR rather than a single element BUILD_VECTOR to convert back to a vector type.
      
      X86 considers v1i1 a legal type under AVX512 and as such a truncate from a v1iX type to v1i1 can be turned into a scalar truncate plus a conversion to v1i1. We would much prefer a v1i1 SCALAR_TO_VECTOR over a one element BUILD_VECTOR.
      
      During lowering we were detecting the v1i1 BUILD_VECTOR as a splat BUILD_VECTOR like we try to do for v2i1/v4i1/etc. In this case we create (select i1 splat_elt, v1i1 all-ones, v1i1 all-zeroes). That goes through some more legalization and we end up with a CMOV choosing between 0 and 1 in scalar and a scalar_to_vector.
      
      Arguably we could detect the v1i1 BUILD_VECTOR and do this better in X86 target code. But just using a SCALAR_TO_VECTOR in legalization is much easier.
      
      llvm-svn: 326637
      dbf75c9c
    • Dmitry Mikulin's avatar
      Implementation of MRI "delete" command. · 702c14fd
      Dmitry Mikulin authored
      Differential Revision: https://reviews.llvm.org/D43989
      
      llvm-svn: 326636
      702c14fd
    • Vedant Kumar's avatar
      [AggressiveInstCombine] Use use_empty() instead of !getNumUses(), NFC · 7fc591f8
      Vedant Kumar authored
      use_empty() runs in O(1), whereas getNumUses() runs in O(# uses).
      
      llvm-svn: 326635
      7fc591f8
    • Adrian Prantl's avatar
      Don't compile testcase with clang modules enabled. · beb60253
      Adrian Prantl authored
      It isn't actually necessary for what we are testing here and should
      fix the test on the Linux bots.
      
      llvm-svn: 326634
      beb60253
    • Eugene Zelenko's avatar
      [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use... · e029a2ff
      Eugene Zelenko authored
      [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
      
      llvm-svn: 326633
      e029a2ff
    • Sanjay Patel's avatar
      [InstCombine] rearrange visitFMul; NFCI · e29375d0
      Sanjay Patel authored
      Put the simplest non-FMF folds first, so it's easier to
      see what's left to fix/group/add with the FMF folds.
      
      llvm-svn: 326632
      e29375d0
    • Adrian Prantl's avatar
      Add DBG_VALUE support to the linear DAG scheduler · dfe15f36
      Adrian Prantl authored
      The fast/linear DAG scheduler doesn't lower DBG_VALUEs except for
      function entry nodes.
      
      Patch by Joshua Cranmer!
      
      Differential Revision: https://reviews.llvm.org/D43028
      
      llvm-svn: 326631
      dfe15f36
    • Francis Ricci's avatar
      [llvm-symbolizer] Use correct path when resolving .gnu_debuglink in .debug · fe6cbcee
      Francis Ricci authored
      Summary:
      The symbolizer was checking for .debug as a subdirectory of the
      binary file itself, not of the directory containing the binary. This led to
      a failure to find split debug info when it was contained in a .debug directory.
      
      Reviewers: rnk, glider, zturner
      
      Subscribers: llvm-commits, aprantl
      
      Differential Revision: https://reviews.llvm.org/D44025
      
      llvm-svn: 326630
      fe6cbcee
    • Vedant Kumar's avatar
      [Utils] Salvage debug info in block simplification · f69baf64
      Vedant Kumar authored
      In stage2 -O3 builds of llc, this results in small but measurable
      increases in the number of variables with locations, and in the number
      of unique source variables overall.
      
      (According to llvm-dwarfdump --statistics, there are 123 additional
      variables with locations, which is just a 0.006% improvement).
      
      The size of the .debug_loc section of the llc dsym increases by 0.004%.
      
      llvm-svn: 326629
      f69baf64
    • Adrian Prantl's avatar
      Make the clang module cache setting available without a target · 235354be
      Adrian Prantl authored
      It turns out that setting the clang module cache after LLDB has a
      Target can be too late. In particular, the Swift language plugin needs
      to know the setting without having access to a Target. This patch
      moves the setting into the *LLDB* module cache, where it is a global
      setting that is available before any Target is created and more
      importantly, is shared between all Targets.
      
      rdar://problem/37944432
      
      Differential Revision: https://reviews.llvm.org/D43984
      
      llvm-svn: 326628
      235354be
    • Krzysztof Parzyszek's avatar
      e3e96323
    • Sameer AbuAsal's avatar
      [RISCV] Implement MC relaxations for compressed instructions. · 2646a41e
      Sameer AbuAsal authored
      Summary:
           This patch implements relaxation for RISCV in the MC layer.
            The following relaxations are currently handled:
            1) Relax C_BEQZ to BEQ and C_BNEZ to BNEZ in RISCV.
            2) Relax and C_J $imm  to JAL x0, $imm  and CJAL to JAL ra, $imm.
      
      Reviewers: asb, llvm-commits, efriedma
      
      Reviewed By: asb
      
      Subscribers: shiva0217
      
      Differential Revision: https://reviews.llvm.org/D43055
      
      llvm-svn: 326626
      2646a41e
    • Rui Ueyama's avatar
      Make llvm::djbHash an inline function. · e403c862
      Rui Ueyama authored
      Differential Revision: https://reviews.llvm.org/D43644
      
      llvm-svn: 326625
      e403c862
    • Richard Smith's avatar
      PR36581: Support data recursion over Stmts in AST matchers. · cbf060f9
      Richard Smith authored
      llvm-svn: 326624
      cbf060f9
    • Erich Keane's avatar
      Remove -i command line option, add -imultilib · 0c4457b9
      Erich Keane authored
      I discovered that '-i' is a command line option for the driver,
      however it actually does not do anything and is not supported by any
      other compiler. In fact, it is completely undocumented for Clang.
      
      I found a couple of instances of people confusing it with one of
      the variety of other command line options that control the driver.
      Because of this, we should delete this option so that it is clear
      that it isn't valid.
      
      HOWEVER, I found that GCC DOES support -imultilib, which the -i
      was hiding our lack of support for. We currently only use imultilib
      for the purpose of forwarding to gfortran (in a specific test written
        by chandlerc for this purpose).
      
        imultilib is a rarely used (if ever?) feature that I could find no
        references to on the internet, and in fact, my company's massive test
        suite has zero references to it ever being used.
      
        SO, this patch removes the -i option so that we will now give an error
        on its usage (so that it won't be confused with -I), and replaces it with
        -imultilib, which is now specified as a gfortran_group option.
      
      Differential Revision: https://reviews.llvm.org/D44032
      
      llvm-svn: 326623
      0c4457b9