1. Aug 14, 2019
    • Jessica Paquette's avatar
      Attempt to fix issue with unresolved lit test in TableGen · b28fa9ec
      Jessica Paquette authored
      Build bots are unhappy about the Common directory.
      
      Add an excludes list to lit.local.cfg.
      
      llvm-svn: 368760
      b28fa9ec
    • Aaron Smith's avatar
      Initial support for native debugging of x86/x64 Windows processes · 5146a9ea
      Aaron Smith authored
      Summary: Thanks to Hui Huang and the reviewers for all the help with this patch.
      
      Reviewers: labath, Hui, jfb, clayborg, amccarth
      
      Reviewed By: labath
      
      Subscribers: amccarth, compnerd, dexonsmith, mgorny, jfb, teemperor, lldb-commits
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D63165
      
      llvm-svn: 368759
      5146a9ea
    • Alex Langford's avatar
      [NFCI] Explicitly provide user-defined constructor for SectionRef · b809187a
      Alex Langford authored
      I am changing this to work around an issue that is being hit when
      building with clang 3.8. Specifically, clang 3.8 requires that we have a user
      defined default constructor for SectionRef for the default initialization of a
      const SectionRef.
      
      llvm-svn: 368758
      b809187a
    • Jessica Paquette's avatar
      [GlobalISel][NFC] Factor out common target code from GlobalISelEmitterTests · f41ce859
      Jessica Paquette authored
      Factor out commonly-used target code from the GlobalISelEmitter tests into
      a GlobalISelEmitterCommon.td file. This is tested by the original
      GlobalISelEmitter.td test.
      
      This reduces the amount of boilerplate code necessary for tests like this.
      
      Differential Revision: https://reviews.llvm.org/D65777
      
      llvm-svn: 368757
      f41ce859
    • Douglas Yung's avatar
    • Kristof Umann's avatar
      [analyzer][NFC] Make sure that the BugReport is not modified during the... · e1117add
      Kristof Umann authored
      [analyzer][NFC] Make sure that the BugReport is not modified during the construction of non-visitor pieces
      
      I feel this is kinda important, because in a followup patch I'm adding different
      kinds of interestingness, and propagating the correct kind in BugReporter.cpp is
      just one less thing to worry about.
      
      Differential Revision: https://reviews.llvm.org/D65578
      
      llvm-svn: 368755
      e1117add
    • Erik Pilkington's avatar
      Add a missing header comment, NFC · 6c97f889
      Erik Pilkington authored
      llvm-svn: 368754
      6c97f889
    • Aditya Nandakumar's avatar
    • Kristof Umann's avatar
      [analyzer][NFC] Refactoring BugReporter.cpp P6.: Completely get rid of interestingness propagation · 6c1b19ac
      Kristof Umann authored
      Apparently this does literally nothing.
      
      When you think about this, it makes sense. If something is really important,
      we're tracking it anyways, and that system is sophisticated enough to mark
      actually interesting statements as such. I wouldn't say that it's even likely
      that subexpressions are also interesting (array[10 - x + x]), so I guess even
      if this produced any effects, its probably undesirable.
      
      Differential Revision: https://reviews.llvm.org/D65487
      
      llvm-svn: 368752
      6c1b19ac
    • Jon Chesterfield's avatar
      Factor architecture dependent code out of loop.cu · ed3324f6
      Jon Chesterfield authored
      Summary:
      [libomptarget] Factor architecture dependent code out of loop.cu
      
      Related to the patch series starting D64217. Added subscribers to said series as reviewers. This effort is smaller in scope.
      
      This patch factors out just enough architecture dependent code from loop.cu to allow the same source to be used with amdgcn, given a different target_impl.h. Testing is that the same bitcode (modulo variable names) is generated for libomptarget before and after the refactor, for nvptx and the out of tree amdgcn.
      
      Reviewers: jdoerfert, ABataev, bollu, jfb, tra, grokos, Hahnfeld, guansong, xtian, gregrodgers, ronlieb, hfinkel, gtbercea, guraypp, arpith-jacob
      
      Reviewed By: jdoerfert, ABataev
      
      Subscribers: dexonsmith, openmp-commits
      
      Tags: #openmp
      
      Differential Revision: https://reviews.llvm.org/D65836
      
      llvm-svn: 368751
      ed3324f6
    • Guanzhong Chen's avatar
      [WebAssembly] Make clang emit correct va_arg code for structs · 8a503e43
      Guanzhong Chen authored
      Summary:
      In the WebAssembly backend, when lowering variadic function calls, non-single
      member aggregate type arguments are always passed by pointer.
      
      However, when emitting va_arg code in clang, the arguments are instead read as
      if they are passed directly. This results in the pointer being read as the
      actual structure.
      
      Fixes https://github.com/emscripten-core/emscripten/issues/9042.
      
      Reviewers: tlively, sbc100, kripken, aheejin, dschuff
      
      Reviewed By: dschuff
      
      Subscribers: dschuff, jgravelle-google, sunfish, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D66168
      
      llvm-svn: 368750
      8a503e43
    • Louis Dionne's avatar
      [libc++] Mark two <chrono> tests as unsupported on AppleClang 11 · 10f0668b
      Louis Dionne authored
      The operator""y and operator""d will eventually be supported by
      AppleClang, but no released version supports them at the moment.
      
      llvm-svn: 368749
      10f0668b
    • Michael Liao's avatar
      Remove the extra `;`. · 44e6c6bd
      Michael Liao authored
      llvm-svn: 368748
      44e6c6bd
    • Mark Lacey's avatar
      [GISel] Pass MachineRegisterInfo by const reference to matcher. · b058249a
      Mark Lacey authored
      Summary: NFC.
      
      Reviewers: aditya_nandakumar, volkan
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D65971
      
      llvm-svn: 368747
      b058249a
    • Jonas Devlieghere's avatar
      [DWARF] Guess the path style · 4d82fa68
      Jonas Devlieghere authored
      Try to guess the FileSpec path style before defaulting to native.
      
      llvm-svn: 368746
      4d82fa68
    • Kristof Umann's avatar
      [analyzer][NFC] Address inlines of D65484 · edb78859
      Kristof Umann authored
      llvm-svn: 368745
      edb78859
    • Xiangling Liao's avatar
      [AIX]Lowering global address for 32/64bit small/large code models · a8c624a1
      Xiangling Liao authored
          This patch implements global address lowering for 32/64 bit with small/large code models.
          1.For 32bit large code model on AIX, there are newly added pseudo opcode LWZtocL & ADDIStocHA32, the support of which on MC layer will be
             provided by future patches.
          2.The default code model on AIX should be small code model.
          3.Since AIX does not have medium code model, "report_fatal_error" when users specify it.
      
          Differential Revision: https://reviews.llvm.org/D63547
      
      llvm-svn: 368744
      a8c624a1
    • Shaurya Gupta's avatar
      [Refactor] Moving SourceExtraction header from lib to include · 52d0cfc9
      Shaurya Gupta authored
      Summary:
      - Moved the SourceExtraction header from lib to include so that it can be used in clangd.
      
      Reviewers: arphaman
      
      Subscribers: ilya-biryukov, dexonsmith, kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D65878
      
      llvm-svn: 368743
      52d0cfc9
    • Jonas Devlieghere's avatar
      [DWARF} Use LLVM's debug line parser in LLDB. · 23533935
      Jonas Devlieghere authored
      The line number table header was substantially revised in DWARF 5 and is
      not fully supported by LLDB's current debug line implementation.
      
      This patch replaces the LLDB debug line parser with its counterpart in
      LLVM. This was possible because of the limited contact surface between
      the code to parse the DWARF debug line section and the rest of LLDB.
      
      We pay a small cost in terms of performance and memory usage. This is
      something we plan to address in the near future.
      
      Differential revision: https://reviews.llvm.org/D62570
      
      llvm-svn: 368742
      23533935
    • Alex Langford's avatar
      [Symbol] Decouple clang from CompilerType · bddab07d
      Alex Langford authored
      Summary:
      Ideally CompilerType would have no knowledge of clang or any individual
      TypeSystem. Decoupling clang is relatively straightforward.
      
      Differential Revision: https://reviews.llvm.org/D66102
      
      llvm-svn: 368741
      bddab07d
    • Lang Hames's avatar
      [ORC] Fix BuildingAJIT tutorial code broken by r368707. · 0fed4945
      Lang Hames authored
      llvm-svn: 368740
      0fed4945
    • Alexey Bataev's avatar
      Don't use std::errc · 4a0328c9
      Alexey Bataev authored
      Summary:
      As noted on Errc.h:
      
      // * std::errc is just marked with is_error_condition_enum. This means that
      //   common patters like AnErrorCode == errc::no_such_file_or_directory take
      //   4 virtual calls instead of two comparisons.
      
      And on some libstdc++ those virtual functions conclude that
      
      ------------------------
      int main() {
        std::error_code foo = std::make_error_code(std::errc::no_such_file_or_directory);
        return foo == std::errc::no_such_file_or_directory;
      }
      -------------------------
      
      should exit with 0.
      
      Reviewers: thakis, rnk, jfb
      
      Reviewed By: thakis
      
      Subscribers: lebedev.ri, dexonsmith, xbolva00, cfe-commits, caomhin
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D66143
      
      llvm-svn: 368739
      4a0328c9
    • Dmitri Gribenko's avatar
      Revert "Fix crash on switch conditions of non-integer types in templates" · a5ef73cb
      Dmitri Gribenko authored
      This reverts commit r368706. It broke ClangTidy tests.
      
      llvm-svn: 368738
      a5ef73cb
    • Kristof Umann's avatar
      [analyzer][NFC] Refactoring BugReporter.cpp P5.: Compact mile long function... · f9d75bed
      Kristof Umann authored
      [analyzer][NFC] Refactoring BugReporter.cpp P5.: Compact mile long function invocations into objects
      
      In D65379, I briefly described the construction of bug paths from an
      ExplodedGraph. This patch is about refactoring the code processing the bug path
      into a bug report.
      
      A part of finding a valid bug report was running all visitors on the bug path,
      so we already have a (possibly empty) set of diagnostics for each ExplodedNode
      in it.
      Then, for each diagnostic consumer, we construct non-visitor diagnostic pieces.
      
      * We first construct the final diagnostic piece (the warning), then
      * We start ascending the bug path from the error node's predecessor (since the
      error node itself was used to construct the warning event). For each node
        * We check the location (whether its a CallEnter, CallExit) etc. We simultaneously
        keep track of where we are with the execution by pushing CallStack when we see a
        CallExit (keep in mind that everything is happening in reverse!), popping it
        when we find a CallEnter, compacting them into a single PathDiagnosticCallEvent.
      
      void f() {
        bar();
      }
      
      void g() {
        f();
        error(); // warning
      }
      
      === The bug path ===
      
      (root) -> f's CallEnter -> bar() -> f's CallExit -> (error node)
      
      === Constructed report ===
      
        f's CallEnter -> bar() -> f's CallExit
                 ^               /
                  \             V
      (root) --->  f's CallEvent --> (error node)
      
        * We also keep track of different PathPieces different location contexts
        * (CallEvent::path in the above example has f's LocationContext, while the
        CallEvent itself is in g's context) in a LocationContextMap object. Construct
        whatever piece, if any, is needed for the note.
        * If we need to generate edges (or arrows) do so. Make sure to also connect
        these pieces with the ones that visitors emitted.
        * Clean up the constructed PathDiagnostic by making arrows nicer, pruning
        function calls, etc.
      
      So I complained about mile long function invocations with seemingly the same
      parameters being passed around. This problem, as I see it, a natural candidate
      for creating classes and tying them all together.
      
      I tried very hard to make the implementation feel natural, like, rolling off the
      tongue. I introduced 2 new classes: PathDiagnosticBuilder (I mean, I kept the
      name but changed almost everything in it) contains every contextual information
      (owns the bug path, the diagnostics constructed but the visitors, the BugReport
      itself, etc) needed for constructing a PathDiagnostic object, and is pretty much
      completely immutable. BugReportContruct is the object containing every
      non-contextual information (the PathDiagnostic object we're constructing, the
      current location in the bug path, the location context map and the call stack I
      meantioned earlier), and is passed around all over the place as a single entity
      instead of who knows how many parameters.
      
      I tried to used constness, asserts, limiting visibility of fields to my
      advantage to clean up the code big time and dramatically improve safety. Also,
      whenever I found the code difficult to understand, I added comments and/or
      examples.
      
      Here's a complete list of changes and my design philosophy behind it:
      
      * Instead of construcing a ReportInfo object (added by D65379) after finding a
      valid bug report, simply return an optional PathDiagnosticBuilder object straight
      away. Move findValidReport into the class as a static method. I find
      GRBugReporter::generatePathDiagnostics a joy to look at now.
      * Rename generatePathDiagnosticForConsumer to generate (maybe not needed, but
      felt that way in the moment) and moved it to PathDiagnosticBuilder. If we don't
      need to generate diagnostics, bail out straight away, like we always should have.
      After that, construct a BugReportConstruct object, leaving the rest of the logic
      untouched.
      * Move all static methods that would use contextual information into
      PathDiagnosticBuilder, reduce their parameter count drastically by simply
      passing around a BugReportConstruct object.
      * Glance at the code I removed: Could you tell what the original
      PathDiagnosticBuilder::LC object was for? It took a gooood long while for me to
      realize that nothing really. It is always equal with the LocationContext
      associated with our current position in the bug path. Remove it completely.
      * The original code contains the following expression quite a bit:
      LCM[&PD.getActivePath()], so what does it mean? I said that we collect the
      contexts associated with different PathPieces, but why would we ever modify that,
      shouldn't it be set? Well, theoretically yes, but in the implementation, the
      address of PathDiagnostic::getActivePath doesn't change if we move to an outer,
      previously unexplored function. Add both descriptive method names and
      explanations to BugReportConstruct to help on this.
      * Add plenty of asserts, both for safety and as a poor man's documentation.
      
      Differential Revision: https://reviews.llvm.org/D65484
      
      llvm-svn: 368737
      f9d75bed
    • Tim Renouf's avatar
      [AMDGPU] Fix to 'Fold readlane from copy of SGPR or imm' · 10db641a
      Tim Renouf authored
      That change (r363670) could leave a copy from vgpr to sgpr. Fixed.
      
      Differential Revision: https://reviews.llvm.org/D66133
      
      Change-Id: I00c3fe6fda2e8e1e36f53195b881b1449c777ea4
      llvm-svn: 368736
      10db641a
    • Kristof Umann's avatar
      [analyzer][NFC] Refactoring BugReporter.cpp P4.: If it can be const, make it const · fc76d855
      Kristof Umann authored
      When I'm new to a file/codebase, I personally find C++'s strong static type
      system to be a great aid. BugReporter.cpp is still painful to read however:
      function calls are made with mile long parameter lists, seemingly all of them
      taken with a non-const reference/pointer. This patch fixes nothing but this:
      make a few things const, and hammer it until it compiles.
      
      Differential Revision: https://reviews.llvm.org/D65382
      
      llvm-svn: 368735
      fc76d855
    • Puyan Lotfi's avatar
      [NFC][clang] Adding argument based Phase list filtering to getComplicationPhases · e5ade767
      Puyan Lotfi authored
      This patch removes usage of FinalPhase from anywhere outside of the scope where
      it is used to do argument handling.  It also adds argument based trimming of
      the Phase list pulled out of the Types.def table.
      
      Differential Revision: https://reviews.llvm.org/D65993
      
      llvm-svn: 368734
      e5ade767
    • David Green's avatar
      [ARM] Add MVE beats vector cost model · a655393f
      David Green authored
      The MVE architecture has the idea of "beats", where a vector instruction can be
      executed over several ticks of the architecture. This adds a similar system
      into the Arm backend cost model, multiplying the cost of all vector
      instructions by a factor.
      
      This factor essentially becomes the expected difference between scalar code
      and vector code, on average. MVE Vector instructions can also overlap so the a
      true cost of them is often lower. But equally scalar instructions can in some
      situations be dual issued, or have other optimisations such as unrolling or
      make use of dsp instructions. The default is chosen as 2. This should not
      prevent vectorisation is a most cases (as the vector instructions will still be
      doing at least 4 times the work), but it will help prevent over vectorising in
      cases where the benefits are less likely.
      
      This adds things so far to the obvious places in ARMTargetTransformInfo, and
      updates a few related costs like not treating float instructions as cost 2 just
      because they are floats.
      
      Differential Revision: https://reviews.llvm.org/D66005
      
      llvm-svn: 368733
      a655393f
    • Jan Korous's avatar
      [clang] Refactor doc comments to Decls attribution · f31d8df1
      Jan Korous authored
      - Create ASTContext::attachCommentsToJustParsedDecls so we don't have to load external comments in Sema when trying to attach existing comments to just parsed Decls.
      - Keep comments ordered and cache their decomposed location - faster SourceLoc-based searching.
      - Optimize work with redeclarations.
      - Keep one comment per redeclaration chain (represented by canonical Decl) instead of comment per redeclaration.
      - For redeclaration chains with no comment attached keep just the last declaration in chain that had no comment instead of every comment-less redeclaration.
      
      Differential Revision: https://reviews.llvm.org/D65301
      
      llvm-svn: 368732
      f31d8df1
    • Wenlei He's avatar
      [llvm-profdata] Profile dump for compact binary format · d3289544
      Wenlei He authored
      Summary: Fix "llvm-profdata show" so it can work with compact binary format profile. The change is to mark all functions "used" so SampleProfileReaderCompactBinary::read will read in all profiles available for dumping. The function names will be MD5 hash for compact binary format.
      
      Reviewers: wmi, davidxl, danielcdh
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D65162
      
      llvm-svn: 368731
      d3289544
    • Steven Wu's avatar
      [AutoUpgrader] Make ArcRuntime Autoupgrader more conservative · 9e51fb6c
      Steven Wu authored
      Summary:
      This is a tweak to r368311 and r368646 which auto upgrades the calls to
      objc runtime functions to objc runtime intrinsics, in order to make sure
      that the auto upgrader does not trigger with up-to-date bitcode.
      
      It is possible for bitcode that is up-to-date to contain direct calls to
      objc runtime function and those are not inserted by compiler as part of
      ARC and they should not be upgraded. Now auto upgrader only triggers as
      when the old style of ARC marker is used so it is guaranteed that it
      won't trigger on update-to-date bitcode.
      
      This also means it won't do this upgrade for bitcode from llvm-8 and
      llvm-9, which preserves the behavior of those releases. Ideally they
      should be upgraded as well but it is more important to make sure
      AutoUpgrader will not trigger on up-to-date bitcode.
      
      Reviewers: ahatanak, rjmccall, dexonsmith, pete
      
      Reviewed By: dexonsmith
      
      Subscribers: hiraditya, jkorous, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D66153
      
      llvm-svn: 368730
      9e51fb6c
    • David Bolvansky's avatar
      [NFC] Fixed test · bbccb94d
      David Bolvansky authored
      llvm-svn: 368729
      bbccb94d
    • Nico Weber's avatar
      clang: Don't warn on unused momit-leaf-frame-pointer when frame pointers are off. · 2346b92f
      Nico Weber authored
      This fixes a regression from r365860: As that commit message
      states, there are 3 valid states targeted by the combination of
      -f(no-)omit-frame-pointer and -m(no-)omit-leaf-frame-pointer.
      
      After r365860 it's impossible to get from state 10 (omit just
      leaf frame pointers) to state 11 (omit all frame pointers)
      in a single command line without getting a warning.
      
      This change restores that functionality.
      
      Fixes PR42966.
      
      Differential Revision: https://reviews.llvm.org/D66142
      
      llvm-svn: 368728
      2346b92f
    • Heejin Ahn's avatar
      Use Register over unsigned in LateEHPrepare (NFC) · 64517a64
      Heejin Ahn authored
      Summary:
      While D65962 is pending for review, I landed D65475 that added one more
      use of `unsigned`. Changed it to `Register`.
      
      Reviewers: dsanders
      
      Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D66064
      
      llvm-svn: 368727
      64517a64
    • Jordan Rupprecht's avatar
      [util] Allow callsigns when running git llvm revert · 39bce250
      Jordan Rupprecht authored
      llvm-svn: 368726
      39bce250
    • David Bolvansky's avatar
      [NFC] Updated tests after r368724 · 97c35c9f
      David Bolvansky authored
      llvm-svn: 368725
      97c35c9f
    • David Bolvansky's avatar
      [SimplifyLibCalls] Add noalias from known callsites · 038d604f
      David Bolvansky authored
      Summary:
      Should be fine for memcpy, strcpy, strncpy.
      
      
      Reviewers: jdoerfert, efriedma
      
      Reviewed By: jdoerfert
      
      Subscribers: uenoku, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D66135
      
      llvm-svn: 368724
      038d604f
    • Nikita Popov's avatar
      [ValueTracking] Improve reverse assumption inference · 2a4f26b4
      Nikita Popov authored
      Use isGuaranteedToTransferExecutionToSuccessor() instead of
      isSafeToSpeculativelyExecute() when seeing whether we can propagate
      the information in an assume backwards in isValidAssumeForContext().
      The latter is more general - it also allows arbitrary loads/stores -
      and is also the condition we want: if our assume is guaranteed to
      execute, its condition not holding would be UB.
      
      Original patch by arielb1.
      
      Differential Revision: https://reviews.llvm.org/D37215
      
      llvm-svn: 368723
      2a4f26b4
    • David Bolvansky's avatar
      [NFC] Revisited/updated tests · dde10cd7
      David Bolvansky authored
      llvm-svn: 368722
      dde10cd7
    • Hubert Tong's avatar
      Reland r368691: "[AIX] Implement LR prolog/epilog save/restore" · 09967050
      Hubert Tong authored
      Trying again with the code changes (and not just the new test).
      
      Summary:
      This patch fixes the offsets of fields in the stack frame linkage save
      area for AIX.
      
      Reviewers: sfertile, hubert.reinterpretcast, jasonliu, Xiangling_L, xingxue, ZarkoCA, daltenty
      
      Reviewed By: hubert.reinterpretcast
      
      Subscribers: wuzish, nemanjai, hiraditya, kbarton, MaskRay, jsji, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D64424
      
      Patch by Chris Bowler!
      
      llvm-svn: 368721
      09967050