Skip to content
  1. Aug 14, 2019
    • John McCall's avatar
      Extend coroutines to support a "returned continuation" lowering. · 94010b2b
      John McCall authored
      A quick contrast of this ABI with the currently-implemented ABI:
      
      - Allocation is implicitly managed by the lowering passes, which is fine
        for frontends that are fine with assuming that allocation cannot fail.
        This assumption is necessary to implement dynamic allocas anyway.
      
      - The lowering attempts to fit the coroutine frame into an opaque,
        statically-sized buffer before falling back on allocation; the same
        buffer must be provided to every resume point.  A buffer must be at
        least pointer-sized.
      
      - The resume and destroy functions have been combined; the continuation
        function takes a parameter indicating whether it has succeeded.
      
      - Conversely, every suspend point begins its own continuation function.
      
      - The continuation function pointer is directly returned to the caller
        instead of being stored in the frame.  The continuation can therefore
        directly destroy the frame when exiting the coroutine instead of having
        to leave it in a defunct state.
      
      - Other values can be returned directly to the caller instead of going
        through a promise allocation.  The frontend provides a "prototype"
        function declaration from which the type, calling convention, and
        attributes of the continuation functions are taken.
      
      - On the caller side, the frontend can generate natural IR that directly
        uses the continuation functions as long as it prevents IPO with the
        coroutine until lowering has happened.  In combination with the point
        above, the frontend is almost totally in charge of the ABI of the
        coroutine.
      
      - Unique-yield coroutines are given some special treatment.
      
      llvm-svn: 368788
      94010b2b
    • Joel E. Denny's avatar
      [FileCheck] Document FILECHECK_OPTS in -help · dbb757f4
      Joel E. Denny authored
      Reviewed By: thopre
      
      Differential Revision: https://reviews.llvm.org/D65707
      
      llvm-svn: 368787
      dbb757f4
    • Joel E. Denny's avatar
      [FileCheck] Move -dump-input diagnostic to first line · 608f2bfd
      Joel E. Denny authored
      Without this patch, `-dump-input` prints a diagnostic at the end of
      its marker range.  For example:
      
      ```
               1: Start.
      check:1     ^~~~~~
               2: Bad.
      next:2      X~~~
               3: Many lines
      next:2      ~~~~~~~~~~
               4: of input.
      next:2      ~~~~~~~~~
               5: End.
      next:2      ~~~~ error: no match found
      ```
      
      This patch moves it to the beginning like this:
      
      ```
               1: Start.
      check:1     ^~~~~~
               2: Bad.
      next:2      X~~~ error: no match found
               3: Many lines
      next:2      ~~~~~~~~~~
               4: of input.
      next:2      ~~~~~~~~~
               5: End.
      next:2      ~~~~
      ```
      
      The former somehow looks nicer because the diagnostic doesn't appear
      to be somewhere within the marker range.  However, the latter is more
      practical, especially when the marker range includes the remainder of
      a very long dump.  First, in the case of an error, this patch enables
      me to search the dump for `error:` and usually immediately land where
      the detected error began.  Second, when trying to follow FileCheck's
      logic, it's best to read top down, so this patch enables me to see
      each diagnostic as soon as I encounter its marker.
      
      Reviewed By: thopre
      
      Differential Revision: https://reviews.llvm.org/D65702
      
      llvm-svn: 368786
      608f2bfd
    • Richard Smith's avatar
      Add __has_builtin support for builtin function-like type traits. · dac3ea4e
      Richard Smith authored
      Summary:
      Previously __has_builtin(__builtin_*) would return false for
      __builtin_*s that we modeled as keywords rather than as functions
      (because they take type arguments). With this patch, all builtins
      that are called with function-call-like syntax return true from
      __has_builtin (covering __builtin_* and also the __is_* and __has_* type
      traits and the handful of similar builtins without such a prefix).
      
      Update the documentation on __has_builtin and on type traits to match.
      While doing this I noticed the type trait documentation was out of date
      and incomplete; that's fixed here too.
      
      Reviewers: aaron.ballman
      
      Subscribers: jfb, kristina, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D66100
      
      llvm-svn: 368785
      dac3ea4e
    • Fangrui Song's avatar
      [ELF] Initialize 2 fields of Symbol in SymbolTable::insert · f1d538cc
      Fangrui Song authored
      A new symbol is added to elf::symtab in 3 steps:
      
      1) SymbolTable::insert creates a placeholder.
      2) Symbol::mergeProperties
      3) Symbol::replace
      
      Fields referenced by steps 2) and 3) should be initialized in
      SymbolTable::insert.  `traced` and `referenced` were missed previously.
      This did not cause problems because compilers generated code that
      initialized them (bit fields) to 0.
      
      Reviewed By: grimar
      
      Differential Revision: https://reviews.llvm.org/D66130
      
      llvm-svn: 368784
      f1d538cc
    • Sam Clegg's avatar
      [libcxxabi] Define _LIBCXXABI_GUARD_ABI_ARM on WebAssembly · cee41ce2
      Sam Clegg authored
      This matches ItaniumCXXABI.cpp.
      
      Fixes PR42680
      
      Differential Revision: https://reviews.llvm.org/D64961
      
      llvm-svn: 368783
      cee41ce2
    • Jonas Devlieghere's avatar
      Fix warning: suggest braces around initialization of subobject · b6946a2d
      Jonas Devlieghere authored
      This patch adds braces to the DEFINE_XMM macro.
      
      llvm-svn: 368782
      b6946a2d
    • Aditya Nandakumar's avatar
    • Alex Langford's avatar
      [analyzer] Don't delete TaintConfig copy constructor · 21872bc9
      Alex Langford authored
      Summary:
      Explicitly deleting the copy constructor makes compiling the function
      `ento::registerGenericTaintChecker` difficult with some compilers. When we
      construct an `llvm::Optional<TaintConfig>`, the optional is constructed with a
      const TaintConfig reference which it then uses to invoke the deleted TaintConfig
      copy constructor.
      
      I've observered this failing with clang 3.8 on Ubuntu 16.04.
      
      Reviewers: compnerd, Szelethus, boga95, NoQ, alexshap
      
      Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, Charusso, llvm-commits, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D66192
      
      llvm-svn: 368779
      21872bc9
    • Douglas Yung's avatar
      [ORC] Fix clang-interpreter example code broken by r368707. · 5ee4d7a8
      Douglas Yung authored
      llvm-svn: 368778
      5ee4d7a8
    • Kristof Umann's avatar
      [analyzer][NFC] Prepare visitors for different tracking kinds · 3f7c66d5
      Kristof Umann authored
      When we're tracking a variable that is responsible for a null pointer
      dereference or some other sinister programming error, we of course would like to
      gather as much information why we think that the variable has that specific
      value as possible. However, the newly introduced condition tracking shows that
      tracking all values this thoroughly could easily cause an intolerable growth in
      the bug report's length.
      
      There are a variety of heuristics we discussed on the mailing list[1] to combat
      this, all of them requiring to differentiate in between tracking a "regular
      value" and a "condition".
      
      This patch introduces the new `bugreporter::TrackingKind` enum, adds it to
      several visitors as a non-optional argument, and moves some functions around to
      make the code a little more coherent.
      
      [1] http://lists.llvm.org/pipermail/cfe-dev/2019-June/062613.html
      
      Differential Revision: https://reviews.llvm.org/D64270
      
      llvm-svn: 368777
      3f7c66d5
    • Aaron Smith's avatar
      Update Python tests for lldb-server on Windows · 2a39024a
      Aaron Smith authored
      Summary: Thanks to Hui Huang and reviewers for all the help with this patch!
      
      Reviewers: labath, jfb, clayborg
      
      Reviewed By: labath
      
      Subscribers: Hui, clayborg, dexonsmith, lldb-commits
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D61687
      
      llvm-svn: 368776
      2a39024a
    • Amara Emerson's avatar
      [AArch64][GlobalISel] RBS: Treat s128s like vectors when unmerging. · 2a312fc9
      Amara Emerson authored
      The destinations should be FPRs (for now).
      
      Differential Revision: https://reviews.llvm.org/D66184
      
      llvm-svn: 368775
      2a312fc9
    • Aaron Smith's avatar
      Enable lldb-server on Windows · 216944ee
      Aaron Smith authored
      Summary:
      This commit contains three small changes to enable lldb-server on Windows.
      
      - Add lldb-server for Windows to the build
      - Disable pty redirection on Windows for the initial lldb-server bring up
      - Add a support to get the parent pid for a process on Windows
      - Ifdef some signals which aren't supported on Windows
      
      Thanks to Hui Huang for the help with this patch!
      
      Reviewers: labath
      
      Reviewed By: labath
      
      Subscribers: JDevlieghere, compnerd, Hui, amccarth, xiaobai, srhines, mgorny, lldb-commits
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D61686
      
      llvm-svn: 368774
      216944ee
    • Kristof Umann's avatar
      [analyzer] Track the right hand side of the last store regardless of its value · 0df9c8c5
      Kristof Umann authored
      Summary:
      The following code snippet taken from D64271#1572188 has an issue: namely,
      because `flag`'s value isn't undef or a concrete int, it isn't being tracked.
      
      int flag;
      bool coin();
      
      void foo() {
        flag = coin();
      }
      
      void test() {
        int *x = 0;
        int local_flag;
        flag = 1;
      
        foo();
        local_flag = flag;
        if (local_flag)
          x = new int;
      
        foo();
        local_flag = flag;
        if (local_flag)
          *x = 5;
      }
      
      This, in my opinion, makes no sense, other values may be interesting too.
      Originally added by rC185608.
      
      Differential Revision: https://reviews.llvm.org/D64287
      
      llvm-svn: 368773
      0df9c8c5
    • Jonas Devlieghere's avatar
      [DebugLine] Be more robust in geussing the path style · 3cb3aa2e
      Jonas Devlieghere authored
      My previous change didn't fix the Windows bot. This patch is an attempt
      to make guessing the path style more robust by first looking at the
      compile dir and falling back to the actual file if that's unsuccessful.
      
      llvm-svn: 368772
      3cb3aa2e
    • Kristof Umann's avatar
      [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value · 46929df7
      Kristof Umann authored
      During the evaluation of D62883, I noticed a bunch of totally
      meaningless notes with the pattern of "Calling 'A'" -> "Returning value"
      -> "Returning from 'A'", which added no value to the report at all.
      
      This patch (not only affecting tracked conditions mind you) prunes
      diagnostic messages to functions that return a value not constrained to
      be 0, and are also linear.
      
      Differential Revision: https://reviews.llvm.org/D64232
      
      llvm-svn: 368771
      46929df7
    • Eli Friedman's avatar
      [AArch64] Remove incorrect usage of MONonTemporal. · b5eb3e1e
      Eli Friedman authored
      This has no effect at the moment, but might matter if we try to
      implement non-temporal loads in the future.
      
      llvm-svn: 368770
      b5eb3e1e
    • Artem Dergachev's avatar
      [analyzer] exploded-graph-rewriter: Implement displaying Store pointers. · daf41722
      Artem Dergachev authored
      They're useful when trying to understand what's going on
      inside your LazyCompoundValues.
      
      Differential Revision: https://reviews.llvm.org/D65427
      
      llvm-svn: 368769
      daf41722
    • Artem Dergachev's avatar
      [analyzer] exploded-graph-rewriter: Implement manual graph trimming. · 9289681e
      Artem Dergachev authored
      When -trim-egraph is unavailable (say, when you're debugging a crash on
      a real-world code that takes too long to reduce), it makes sense to view
      the untrimmed graph up to the crashing node's predecessor, then dump the ID
      (or a pointer) of the node in the attached debugger, and then trim
      the dumped graph in order to keep only paths from the root to the node.
      
      The newly added --to flag does exactly that:
      
      $ exploded-graph-rewriter.py ExprEngine.dot --to 0x12229acd0
      
      Multiple nodes can be specified. Stable IDs of nodes can be used
      instead of pointers.
      
      Differential Revision: https://reviews.llvm.org/D65345
      
      llvm-svn: 368768
      9289681e
    • Artem Dergachev's avatar
      [analyzer] exploded-graph-rewriter: NFC: Refactor explorers into trimmers. · 0b26891f
      Artem Dergachev authored
      Explorers aren't the right abstraction. For the purposes of displaying svg files
      we don't care in which order do we explore the nodes. We may care about this for
      other analyses, but we're not there yet.
      
      The function of cutting out chunks of the graph is performed poorly by
      the explorers, because querying predecessors/successors on the explored nodes
      yields original successors/predecessors even if they aren't being explored.
      
      Introduce a new entity, "trimmers", that do one thing but to it right: cut out
      chunks of the graph. Trimmers mutate the graph, so stale edges aren't even
      visible to their consumers in the pipeline. Additionally, trimmers are
      intrinsically composable: multiple trimmers can be applied to the graph
      sequentially.
      
      Refactor the single-path explorer into the single-path trimmer.
      Rename the test file for consistency.
      
      Differential Revision: https://reviews.llvm.org/D65344
      
      llvm-svn: 368767
      0b26891f
    • Artem Dergachev's avatar
      [analyzer] exploded-graph-rewriter: Open the converted graph immediately. · e9e36354
      Artem Dergachev authored
      Change the default behavior: the tool no longer dumps the rewritten .dot file
      to stdout, but instead it automatically converts it into an .html file
      (which essentially wraps an .svg file) and immediately opens it with
      the default web browser.
      
      This means that the tool should now be fairly easy to use:
      
        $ exploded-graph-rewriter.py /tmp/ExprEngine.dot
      
      The benefits of wrapping the .svg file into an .html file are:
      
          - It'll open in a web browser, which is the intended behavior.
            An .svg file would be open with an image viewer/editor instead.
          - It avoids the white background around the otherwise dark svg area
            in dark mode.
      
      The feature can be turned off by passing a flag '--rewrite-only'.
      The LIT substitution is updated to enforce the old mode because
      we don't want web browsers opening on our buildbots.
      
      Differential Revision: https://reviews.llvm.org/D65250
      
      llvm-svn: 368766
      e9e36354
    • Artem Dergachev's avatar
      [analyzer] Disable the checker-plugins test on Darwin. · f5a60e59
      Artem Dergachev authored
      Fixes a buildbot.
      
      llvm-svn: 368765
      f5a60e59
    • Lang Hames's avatar
      [ORC] Fix SpeculativeJIT example code broken by r368707. · 810b574d
      Lang Hames authored
      llvm-svn: 368764
      810b574d
    • Michael Kruse's avatar
      [Polly-ACC] Fix test after IR-printer change. · cc0f0582
      Michael Kruse authored
      After r367755, even unnamed parameters are printed in IR dumps. Change
      the test to expect te additional %0 in the line.
      
      llvm-svn: 368763
      cc0f0582
    • Jan Korous's avatar
      [clang][DirectoryWatcher] Fix Windows stub after LLVM change · 9a13852e
      Jan Korous authored
      r367979 changed DirectoryWatcher::Create to return an llvm::Expected.
      Adjust the Windows stub accordingly.
      
      (upstreamed from github.com/apple/swift-clang)
      
      llvm-svn: 368762
      9a13852e
    • Jan Korous's avatar
      [clang] DirectoryWatcher for Windows stubs (to fix build break). · b724f3d4
      Jan Korous authored
      This is just a code skeleton for DirectoryWatcher-windows.cpp so the
      build on Windows stops breaking.
      
      (upstreamed from github.com/apple/swift-clang)
      
      llvm-svn: 368761
      b724f3d4
    • 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
  2. Aug 13, 2019
Loading