Skip to content
  1. Dec 16, 2018
  2. Dec 15, 2018
    • Craig Topper's avatar
      [X86] Autogenerate complete checks. NFC · 392edb62
      Craig Topper authored
      llvm-svn: 349287
      392edb62
    • Simon Pilgrim's avatar
      [X86] Begin cleaning up combineOr -> SHLD/SHRD. NFCI. · 52c98240
      Simon Pilgrim authored
      In preparation for converting to funnel shifts.
      
      llvm-svn: 349286
      52c98240
    • Simon Pilgrim's avatar
      [X86] Lower to SHLD/SHRD on slow machines for optsize · ef7b5949
      Simon Pilgrim authored
      Use consistent rules for when to lower to SHLD/SHRD for slow machines - fixes a weird issue where funnel shift gets expanded but then X86ISelLowering's combineOr sees the optsize and combines to SHLD/SHRD, but now with the modulo amount guard......
      
      llvm-svn: 349285
      ef7b5949
    • Simon Pilgrim's avatar
      [X86] Add optsize SHLD/SHRD tests · 53c8b1b6
      Simon Pilgrim authored
      llvm-svn: 349284
      53c8b1b6
    • Kristof Umann's avatar
      a82810c5
    • Jason Molenda's avatar
      Update the vFile:open: description to note that the flags · fbdb8b2e
      Jason Molenda authored
      in the packet are lldb enum values, not the open(2) oflags -- 
      forgot about that wrinkle.  Also added a comment to File.h 
      noting that the existing values cannot be modified or we'll
      have a compatibilty break with any alternative platform
      implementations, or older versions of lldb-server.
      
      llvm-svn: 349282
      fbdb8b2e
    • Kristof Umann's avatar
      [analyzer][MallocChecker][NFC] Document and reorganize some functions · cf6bb77f
      Kristof Umann authored
      This patch merely reorganizes some things, and features no functional change.
      
      In detail:
      
      * Provided documentation, or moved existing documentation in more obvious
      places.
      * Added dividers. (the //===----------===// thing).
      * Moved getAllocationFamily, printAllocDeallocName, printExpectedAllocName and
      printExpectedDeallocName in the global namespace on top of the file where
      AllocationFamily is declared, as they are very strongly related.
      * Moved isReleased and MallocUpdateRefState near RefState's definition for the
      same reason.
      * Realloc modeling was very poor in terms of variable and structure naming, as
      well as documentation, so I renamed some of them and added much needed docs.
      * Moved function IdentifierInfos to a separate struct, and moved isMemFunction,
      isCMemFunction adn isStandardNewDelete inside it. This makes the patch affect
      quite a lot of lines, should I extract it to a separate one?
      * Moved MallocBugVisitor out of MallocChecker.
      * Preferred switches to long else-if branches in some places.
      * Neatly organized some RUN: lines.
      
      Differential Revision: https://reviews.llvm.org/D54823
      
      llvm-svn: 349281
      cf6bb77f
    • Kristof Umann's avatar
      [analyzer][NFC] Merge ClangCheckerRegistry to CheckerRegistry · b0be2ab4
      Kristof Umann authored
      Now that CheckerRegistry lies in Frontend, we can finally eliminate
      ClangCheckerRegistry. Fortunately, this also provides us with a
      DiagnosticsEngine, so I went ahead and removed some parameters from it's
      methods.
      
      Differential Revision: https://reviews.llvm.org/D54437
      
      llvm-svn: 349280
      b0be2ab4
    • Kristof Umann's avatar
      Link examples/clang-interpreter against clangSerialization · 22163d8c
      Kristof Umann authored
      llvm-svn: 349279
      22163d8c
    • Kristof Umann's avatar
      Fix a compilation error in examples/ · be5bbaeb
      Kristof Umann authored
      llvm-svn: 349278
      be5bbaeb
    • Kamil Rytarowski's avatar
      Add NetBSD support in needsRuntimeRegistrationOfSectionRange. · 21e270a4
      Kamil Rytarowski authored
      Use linker script magic to get data/cnts/name start/end.
      
      llvm-svn: 349277
      21e270a4
    • Kamil Rytarowski's avatar
      Register kASan shadow offset for NetBSD/amd64 · 15ae738b
      Kamil Rytarowski authored
      The NetBSD x86_64 kernel uses the 0xdfff900000000000 shadow
      offset.
      
      llvm-svn: 349276
      15ae738b
    • Kristof Umann's avatar
      [analyzer][NFC] Move CheckerRegistry from the Core directory to Frontend · 76a21502
      Kristof Umann authored
      ClangCheckerRegistry is a very non-obvious, poorly documented, weird concept.
      It derives from CheckerRegistry, and is placed in lib/StaticAnalyzer/Frontend,
      whereas it's base is located in lib/StaticAnalyzer/Core. It was, from what I can
      imagine, used to circumvent the problem that the registry functions of the
      checkers are located in the clangStaticAnalyzerCheckers library, but that
      library depends on clangStaticAnalyzerCore. However, clangStaticAnalyzerFrontend
      depends on both of those libraries.
      
      One can make the observation however, that CheckerRegistry has no place in Core,
      it isn't used there at all! The only place where it is used is Frontend, which
      is where it ultimately belongs.
      
      This move implies that since
      include/clang/StaticAnalyzer/Checkers/ClangCheckers.h only contained a single function:
      
      class CheckerRegistry;
      
      void registerBuiltinCheckers(CheckerRegistry &registry);
      
      it had to re purposed, as CheckerRegistry is no longer available to
      clangStaticAnalyzerCheckers. It was renamed to BuiltinCheckerRegistration.h,
      which actually describes it a lot better -- it does not contain the registration
      functions for checkers, but only those generated by the tblgen files.
      
      Differential Revision: https://reviews.llvm.org/D54436
      
      llvm-svn: 349275
      76a21502
    • Kristof Umann's avatar
      [analyzer] Prefer returns values to out-params in CheckerRegistry.cpp · f282d272
      Kristof Umann authored
      Renaming collectCheckers to getEnabledCheckers
      Changing the functionality to acquire all enabled checkers, rather then collect
      checkers for a specific CheckerOptInfo (for example, collecting all checkers for
      { "core", true }, which meant enabling all checkers from the core package, which
      was an unnecessary complication).
      Removing CheckerOptInfo, instead of storing whether the option was claimed via a
      field, we handle errors immediately, as getEnabledCheckers can now access a
      DiagnosticsEngine. Realize that the remaining information it stored is directly
      accessible through AnalyzerOptions.CheckerControlList.
      Fix a test with -analyzer-disable-checker -verify accidentally left in.
      
      llvm-svn: 349274
      f282d272
    • Dinar Temirbulatov's avatar
      [CodeGen] Enhance machine PHIs optimization · 8c8724dd
      Dinar Temirbulatov authored
      Summary:
      Make machine PHIs optimization to work for single value register taken from
      several different copies. This is the first step to fix PR38917. This change
      allows to get rid of redundant PHIs (see opt_phis2.mir test) to make
      the subsequent optimizations (like CSE) possible and simpler.
      
      For instance, before this patch the code like this:
      
      %b = COPY %z
      ...
      %a = PHI %bb1, %a; %bb2, %b
      could be optimized to:
      
      %a = %b
      but the code like this:
      
      %c = COPY %z
      ...
      %b = COPY %z
      ...
      %a = PHI %bb1, %a; %bb2, %b; %bb3, %c
      would remain unchanged.
      With this patch the latter case will be optimized:
      
      %a = %z```.
      
      Committed on behalf of: Anton Afanasyev anton.a.afanasyev@gmail.com
      
      Reviewers: RKSimon, MatzeB
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54839
      
      llvm-svn: 349271
      8c8724dd
    • Simon Pilgrim's avatar
      Regenerate neon copy tests. NFCI. · bfbe510d
      Simon Pilgrim authored
      llvm-svn: 349270
      bfbe510d
    • Pavel Labath's avatar
      lldb-test: Improve newline handling · d211d1a5
      Pavel Labath authored
      Summary:
      Previously lldb-test's LinePrinter would output the indentation spaces
      even on completely empty lines. This is not nice, as trailing spaces get
      flagged as errors in some tools/editors, and it prevents FileCheck's
      CHECK-EMPTY from working.
      
      Equally annoying was the fact that the LinePrinter did not terminate
      it's output with a newline (instead it would leave the unterminated hanging
      indent from the last NewLine() command), which meant that the shell prompt
      following the lldb-test command came out wrong.
      
      This fixes both issues by changing how newlines are handled. NewLine(),
      which was ending the previous line ('\n') *and* begging the next line by
      printing the indent, is now "demoted" to just printing literal "\n".
      Instead, lines are now delimited via a helper Line object, which makes
      sure the line is indented and terminated in an RAII fashion. The typical
      usage would be:
      Printer.line() << "This text will be indented and terminated";
      If one needs to do more work than it will fit into a single statement,
      one can also assign the result of the line() function to a local
      variable. The line will then be terminated when that object goes out of
      scope.
      
      Reviewers: zturner
      
      Subscribers: lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D55597
      
      llvm-svn: 349269
      d211d1a5
    • Pavel Labath's avatar
      ELF: more section creation cleanup · 62a8254f
      Pavel Labath authored
      Summary:
      This patch attempts to move as much code as possible out of the
      CreateSections function to make room for future improvements there. Some
      of this may be slightly over-engineered (VMAddressProvider), but I
      wanted to keep the logic of this function very simple, because once I
      start taking segment headers into acount (as discussed in D55356), the
      function is going to grow significantly.
      
      While in there, I also added tests for various bits of functionality.
      
      This should be NFC, except that I changed the order of hac^H^Heuristicks
      for determining section type slightly. Previously, name-based deduction
      (.symtab -> symtab) would take precedence over type-based (SHT_SYMTAB ->
      symtab) one. In fact we would assert if we ran into a .text section with
      type SHT_SYMTAB. Though unlikely to matter in practice, this order
      seemed wrong to me, so I have inverted it.
      
      Reviewers: clayborg, krytarowski, espindola
      
      Subscribers: emaste, arichardson, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D55706
      
      llvm-svn: 349268
      62a8254f
    • Pavel Labath's avatar
      Remove /proc/pid/maps parsing code from NativeProcessLinux · c8e364e8
      Pavel Labath authored
      A utility function doing this was added in r349182, so use that instead.
      
      llvm-svn: 349267
      c8e364e8
    • Gabor Horvath's avatar
      [analyzer] Assume that we always have a SubEngine available · 21aa8db6
      Gabor Horvath authored
      The removed codepath was dead.
      
      Differential Revision: https://reviews.llvm.org/D55697
      
      llvm-svn: 349266
      21aa8db6
    • Simon Pilgrim's avatar
      Fix -Wunused-variable warning. NFCI. · 9831d405
      Simon Pilgrim authored
      llvm-svn: 349265
      9831d405
    • Simon Pilgrim's avatar
      1e1fd9c7
    • Kamil Rytarowski's avatar
      Enable test/msan/pthread_getname_np.cc for NetBSD · 7970eccc
      Kamil Rytarowski authored
      llvm-svn: 349263
      7970eccc
    • Kamil Rytarowski's avatar
      Enable SANITIZER_INTERCEPT_PTHREAD_GETNAME_NP for NetBSD · 17751e14
      Kamil Rytarowski authored
      llvm-svn: 349262
      17751e14
    • Nikita Popov's avatar
      [InstSimplify] Add tests for saturating add/sub + icmp; NFC · f61567f4
      Nikita Popov authored
      If a saturating add/sub with a constant operand is compared to
      another constant, we should be able to determine that the condition
      is always true/false in some cases (but currently don't).
      
      llvm-svn: 349261
      f61567f4
    • Roman Lebedev's avatar
      [OpenMP] Fixes for LIBOMP_OMP_VERSION=45/40 · 781a0896
      Roman Lebedev authored
      Summary:
      I have discovered this because i wanted to experiment with
      building static libomp (with openmp-4.0 support only)
      for debugging purposes.
      
      There are three kinds of problems here:
      1. `__kmp_compare_and_store_acq()` simply does not exist.
         It was added in D47903 by @jlpeyton.
         I'm guessing `__kmp_atomic_compare_store_acq()` was meant.
      2. In `__kmp_is_ticket_lock_initialized()`,
         `lck->lk.initialized` is `std::atomic<bool>`,
         while `lck` is `kmp_ticket_lock_t *`.
         Naturally, they can't be equality-compared.
         Either, it should return the value read from `lck->lk.initialized`,
         or do what `__kmp_is_queuing_lock_initialized()` does,
         compare the passed pointer with the field in the struct
         pointed by the pointer. I think the latter is correct-er choice here.
      3. Tests were not versioned.
         They assume that `LIBOMP_OMP_VERSION` is at the latest version.
      
      This does not touch LIBOMP_OMP_VERSION=30. That is still broken.
      
      Reviewers: jlpeyton, Hahnfeld, AndreyChurbanov
      
      Reviewed By: AndreyChurbanov
      
      Subscribers: guansong, jfb, openmp-commits, jlpeyton
      
      Tags: #openmp
      
      Differential Revision: https://reviews.llvm.org/D55496
      
      llvm-svn: 349260
      781a0896
    • Fangrui Song's avatar
      [libclang] Add dependency on clangSerialization to unbreak... · 7643f42b
      Fangrui Song authored
      [libclang] Add dependency on clangSerialization to unbreak -DBUILD_SHARED_LIBS=1 build after rC349237
      
      Frontend headers have undefined reference on the symbol `clang::PCHContainerOperations::PCHContainerOperations()` through some shared_ptr usage. Any dependents will get the undefined reference which can only be resolved by explicit dependency on clangSerialization (due to -z defs).
      
      llvm-svn: 349259
      7643f42b
Loading