Skip to content
  1. Jan 25, 2018
  2. Jan 24, 2018
    • Kostya Kortchinsky's avatar
      [scudo] Remove SANITIZER_LINUX requirement for the malloc interceptors · fc45e4a3
      Kostya Kortchinsky authored
      Summary:
      Currently all platforms are using the `scudo_interceptors.cpp` interceptors.
      
      We might to come up with platform specific interceptors when/if we get Apple &
      Windows, but as of now, that allows for Fuchsia to use them.
      
      `scudo_new_delete.cpp` didn't have the `#if SANITIZER_LINUX` so it's good to go.
      
      Reviewers: alekseyshl, flowerhack
      
      Reviewed By: flowerhack
      
      Subscribers: delcypher, #sanitizers, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D42506
      
      llvm-svn: 323386
      fc45e4a3
    • Marshall Clow's avatar
    • Amara Emerson's avatar
      [GlobalISel] Add a requires: asserts to a test. · 5ee03988
      Amara Emerson authored
      llvm-svn: 323384
      5ee03988
    • Benjamin Kramer's avatar
      [TableGen] Add a way of getting the number of generic opcodes without... · 4890a71f
      Benjamin Kramer authored
      [TableGen] Add a way of getting the number of generic opcodes without including modular CodeGen headers.
      
      This is a bit of a hack, but removes a cycle that broke modular builds
      of LLVM. Of course the cycle is still there in form of a dependency
      on the .def file.
      
      llvm-svn: 323383
      4890a71f
    • Alexander Shaposhnikov's avatar
      [analyzer] Do not attempt to get the pointee of void* · 0c352b15
      Alexander Shaposhnikov authored
      Do not attempt to get the pointee of void* while generating a bug report 
      (otherwise it will trigger an assert inside RegionStoreManager::getBinding 
      assert(!T->isVoidType() && "Attempting to dereference a void pointer!")).
      
      Test plan: make check-all
      
      Differential revision: https://reviews.llvm.org/D42396
      
      llvm-svn: 323382
      0c352b15
    • Brian Gesiak's avatar
      [coroutines] Pass coro func args to promise ctor · 61f4ac98
      Brian Gesiak authored
      Summary:
      Use corutine function arguments to initialize a promise type, but only
      if the promise type defines a constructor that takes those arguments.
      Otherwise, fall back to the default constructor.
      
      Test Plan: check-clang
      
      Reviewers: rsmith, GorNishanov, eric_niebler
      
      Reviewed By: GorNishanov
      
      Subscribers: toby-allsopp, lewissbaker, EricWF, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D41820
      
      llvm-svn: 323381
      61f4ac98
    • Eric Fiselier's avatar
      [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple. · 292617e7
      Eric Fiselier authored
      Summary:
      See https://bugs.llvm.org/show_bug.cgi?id=20855
      
      Libc++ goes out of it's way to diagnose `std::tuple` constructions which are UB due to lifetime bugs caused by reference creation. For example:
      
      ```
      // The 'const std::string&' is created *inside* the tuple constructor, and its lifetime is over before the end of the constructor call.
      std::tuple<int, const std::string&> t(std::make_tuple(42, "abc"));
      ```
      
      However, we are over-aggressive and we incorrectly diagnose cases such as:
      
      ```
      void foo(std::tuple<int const&, int const&> const&);
      foo(std::make_tuple(42, 42));
      ```
      
      This patch fixes the incorrectly diagnosed cases, as well as converting the diagnostic to use the newly added Clang trait `__reference_binds_to_temporary`. The new trait allows us to diagnose cases we previously couldn't such as:
      
      ```
      std::tuple<int, const std::string&> t(42, "abc");
      ```
      
      Reviewers: rsmith, mclow.lists
      
      Reviewed By: rsmith
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D41977
      
      llvm-svn: 323380
      292617e7
    • Sam Clegg's avatar
      [WebAssembly] Don't duplicate functions in table output · 67abf539
      Sam Clegg authored
      Previously, we were ensuring that the "output index" for
      InputFunctions was unique across all symbols that referenced
      a function body, but allowing the same function body to have
      multiple table indexes.
      
      Now, we use the same mechanism for table indexes as we already
      do for output indexes, ensuring that each InputFunction is only
      placed in the table once.
      
      This makes the LLD output table denser and smaller, but should
      not change the behaviour.
      
      Note that we still need the `Symbol::TableIndex` member, to
      store the table index for function Symbols that don't have an
      InputFunction, i.e. for address-taken imports.
      
      Patch by Nicholas Wilson!
      
      Differential Revision: https://reviews.llvm.org/D42476
      
      llvm-svn: 323379
      67abf539
    • Sam Clegg's avatar
      [WebAssembly] Always start table index at 1, even for relocatable output · 48bbd63f
      Sam Clegg authored
      Previously llvm was using 0 as the first table index for wasm object
      files but now that has switched to 1 we can have the output of lld
      do the same and simplify the code.
      
      Patch by Nicholas Wilson!
      
      Differential Revision: https://reviews.llvm.org/D42096
      
      llvm-svn: 323378
      48bbd63f
    • Sanjay Patel's avatar
      [InstCombine] fix datalayout in test file · 60c13c77
      Sanjay Patel authored
      The only part of the datalayout that should matter for these tests
      is the part that specifies the legal int widths ('n*'). But there
      was a bug - that part of the string was not correctly separated with
      the expected '-' character, so we were testing as if there were no
      legal int widths at all. Removed the leading cruft so we have some 
      legal ints to test with.
      
      I noticed this while testing a potential change to the way we 
      transform shifts and sexts in D42424.
      
      llvm-svn: 323377
      60c13c77
    • Artem Dergachev's avatar
      [analyzer] NFC: Run many existing C++ tests with a custom operator new(). · d3c54313
      Artem Dergachev authored
      In order to provide more test coverage for inlined operator new(), add more
      run-lines to existing test cases, which would trigger our fake header
      to provide a body for operator new(). Most of the code should still behave
      reasonably. When behavior intentionally changes, #ifs are provided.
      
      Differential Revision: https://reviews.llvm.org/D42221
      
      llvm-svn: 323376
      d3c54313
    • Lang Hames's avatar
      [ORC] Add a LambdaSymbolResolver convenience class and docs for SymbolResolver. · 7f20eacf
      Lang Hames authored
      This patch adds a LambdaSymbolResolver convenience utility that can create an
      orc::SymbolResolver from a pair of function objects that supply the behavior for
      the lookupFlags and lookup methods.
      
      This class plays the same role for orc::SymbolResolver as the legacy
      LambdaResolver class plays for LegacyJITSymbolResolver, and will replace the
      latter class once all ORC APIs are migrated to orc::SymbolResolver.
      
      This patch also adds some documentation for the orc::SymbolResolver class as
      this was left out of the original commit.
      
      llvm-svn: 323375
      7f20eacf
    • Krzysztof Parzyszek's avatar
      [Hexagon] Replace EmitFunctionEntryCode with a DAG preprocessing code · 14f3ef1f
      Krzysztof Parzyszek authored
      The code in EmitFunctionEntryCode needs to know the maximum stack
      alignment, but it runs very early in the selection process (before
      lowering). The final stack alignment may change during lowering, so
      the code needs to be moved to where the alignment is known.
      
      llvm-svn: 323374
      14f3ef1f
    • Artem Dergachev's avatar
      [analyzer] Enable c++-allocator-inlining by default. · a396df34
      Artem Dergachev authored
      This allows the analyzer to analyze ("inline") custom operator new() calls and,
      even more importantly, inline constructors of objects that were allocated
      by any operator new() - not necessarily a custom one.
      
      All changes in the tests in the current commit are intended improvements,
      even if they didn't carry any explicit FIXME flag.
      
      It is possible to restore the old behavior via
      
        -analyzer-config c++-allocator-inlining=false
      
      (this flag is supported by scan-build as well, and it can be into a clang
      --analyze invocation via -Xclang .. -Xclang ..). There is no intention to
      remove the old behavior for now.
      
      Differential Revision: https://reviews.llvm.org/D42219
      rdar://problem/12180598
      
      llvm-svn: 323373
      a396df34
    • Daniel Sanders's avatar
      [globalisel] Fix long lines from r323342 · 538921dc
      Daniel Sanders authored
      They would be fixed in a later patch but they shouldn't have been introduced.
      
      llvm-svn: 323372
      538921dc
    • Amara Emerson's avatar
      [AArch64][GlobalISel] Fall back during AArch64 isel if we have a volatile load. · 4f84f886
      Amara Emerson authored
      The tablegen imported patterns for sext(load(a)) don't check for single uses
      of the load or delete the original after matching. As a result two loads are
      left in the generated code. This particular issue will be fixed by adding
      support for a G_SEXTLOAD opcode in future.
      
      There are however other potential issues around this that wouldn't be fixed by
      a G_SEXTLOAD, so until we have a proper solution we don't try to handle volatile
      loads at all in the AArch64 selector.
      
      Fixes/works around PR36018.
      
      llvm-svn: 323371
      4f84f886
    • Artem Dergachev's avatar
      [analyzer] Assume that the allocated value is non-null before construction. · 50e0372f
      Artem Dergachev authored
      I.e. not after. In the c++-allocator-inlining=true mode, we need to make the
      assumption that the conservatively evaluated operator new() has returned a
      non-null value. Previously we did this on CXXNewExpr, but now we have to do that
      before calling the constructor, because some clever constructors are sometimes
      assuming that their "this" is null and doing weird stuff. We would also crash
      upon evaluating CXXNewExpr when the allocator was inlined and returned null and
      had a throw specification; this is UB even for custom allocators, but we still
      need not to crash.
      
      Added more FIXME tests to ensure that eventually we fix calling the constructor
      for null return values.
      
      Differential Revision: https://reviews.llvm.org/D42192
      
      llvm-svn: 323370
      50e0372f
    • Amara Emerson's avatar
      [GlobalISel] Don't fall back to FastISel. · f386e2b0
      Amara Emerson authored
      Apparently checking the pass structure isn't enough to ensure that we don't fall
      back to FastISel, as it's set up as part of the SelectionDAGISel.
      
      llvm-svn: 323369
      f386e2b0
    • Vassil Vassilev's avatar
      Revert r323051 "[cmake] Use CLANG_BINARY_DIR to determine the build directory." · e1515016
      Vassil Vassilev authored
      This broke swift builds.
      
      Thanks for the post-commit review of Chris Bieneman and Davide Italiano!
      
      llvm-svn: 323368
      e1515016
    • Simon Pilgrim's avatar
      [X86][SSE] Aggressively use PMADDWD for v4i32 multiplies with 17 or more leading zeros · 9f551ad6
      Simon Pilgrim authored
      As discussed in D41484, PMADDWD for 'zero extended' vXi32 is nearly always a better option than PMULLD:
      On SNB it will result in code that isn't any faster, but not any slower so we may as well keep it.
      On KNL it only has half the throughput, so I've disabled it on there - ideally there'd be a better way than this.
      
      Differential Revision: https://reviews.llvm.org/D42258
      
      llvm-svn: 323367
      9f551ad6
    • Rafael Espindola's avatar
      Fix lld crash introduced by r321154. · a9263c89
      Rafael Espindola authored
      Since SyntheticSection::getParent() may return null, dereferencing
      this pointer in ARMExidxSentinelSection::empty() call from
      removeUnusedSyntheticSections() results in crashes when linking ARM
      binaries.
      
      Patch by vit9696!
      
      llvm-svn: 323366
      a9263c89
    • Rafael Espindola's avatar
      Simplify. NFC. · 349fe0aa
      Rafael Espindola authored
      Thanks to Teresa Johnson for the suggestion.
      
      llvm-svn: 323365
      349fe0aa
Loading