1. Dec 09, 2020
  2. Dec 08, 2020
    • Gabor Marton's avatar
      [analyzer][StdLibraryFunctionsChecker] Make close and mmap to accept -1 as fd · d14c6316
      Gabor Marton authored
      close:
      It is quite often that users chose to call close even if the fd is
      negative. Theoretically, it would be nicer to close only valid fds, but
      in practice the implementations of close just returns with EBADF in case
      of a non-valid fd param. So, we can eliminate many false positives if we
      let close to take -1 as an fd. Other negative values are very unlikely,
      because open and other fd factories return with -1 in case of failure.
      
      mmap:
      In the case of MAP_ANONYMOUS flag (which is supported e.g. in Linux) the
      mapping is not backed by any file; its contents are initialized to zero.
      The fd argument is ignored; however, some implementations require fd to
      be -1 if MAP_ANONYMOUS (or MAP_ANON) is specified, and portable
      applications should ensure this.
      Consequently, we must allow -1 as the 4th arg.
      
      Differential Revision: https://reviews.llvm.org/D92764
      d14c6316
    • Valentin Clement's avatar
      [flang][openacc] Add clause validity tests for the update directive · 1dd24e6a
      Valentin Clement authored
      Add couple of clause validity tests for the update directive and check for
      the restriction where at least self, host or device clause must appear on the directive.
      
      Reviewed By: sameeranjoshi
      
      Differential Revision: https://reviews.llvm.org/D92447
      1dd24e6a
    • Teresa Johnson's avatar
      [ICP] Don't promote when target not defined in module · 77b50971
      Teresa Johnson authored
      This guards against cases where the symbol was dead code eliminated in
      the binary by ThinLTO, and we have a sample profile collected for one
      binary but used to optimize another.
      
      Most of the benefit from ICP comes from inlining the target, which we
      can't do with only a declaration anyway. If this is in the pre-ThinLTO
      link step (e.g. for instrumentation based PGO), we will attempt the
      promotion again in the ThinLTO backend after importing anyway, and we
      don't need the early promotion to facilitate that.
      
      Differential Revision: https://reviews.llvm.org/D92804
      77b50971
    • Christian Sigg's avatar
      [mlir] Tighten access of RewritePattern methods. · 02c90501
      Christian Sigg authored
      In RewritePattern, only expose `matchAndRewrite` as a public function. `match` can be protected (but needs to be protected because we want to call it from an override of `matchAndRewrite`). `rewrite` can be private.
      
      For classes deriving from RewritePattern, all 3 functions can be private.
      
      Side note: I didn't understand the need for the `using RewritePattern::matchAndRewrite` in derived classes, and started poking around. They are gone now, and I think the result is (only very slightly) cleaner.
      
      Reviewed By: ftynse
      
      Differential Revision: https://reviews.llvm.org/D92670
      02c90501
    • Stefan Pintilie's avatar
      [PowerPC] Fix missing nop after call to weak callee. · 2812c151
      Stefan Pintilie authored
      Weak functions can be replaced by other functions at link time. Previously it
      was assumed that no matter what the weak callee function was replaced with it
      would still share the same TOC as the caller. This is no longer true as a weak
      callee with a TOC setup can be replaced by another function that was compiled
      with PC Relative and does not have a TOC at all.
      
      This patch makes sure that all calls to functions defined as weak from a caller
      that has a valid TOC have a nop after the call to allow a place for the linker
      to restore the TOC.
      
      Reviewed By: NeHuang
      
      Differential Revision: https://reviews.llvm.org/D91983
      2812c151
    • Simon Pilgrim's avatar
      [X86] Regenerate vector-shift-*.ll tests · 45878ede
      Simon Pilgrim authored
      Replace X32 check prefixes with X86 - X32 is generally used for gnux triple tests
      45878ede
    • Simon Pilgrim's avatar
      [X86] Regenerate store-narrow.ll tests · e18f8d63
      Simon Pilgrim authored
      Replace X32 check prefixes with X86 - X32 is generally used for gnux triple tests
      e18f8d63
    • Simon Pilgrim's avatar
      [X86] Regenerate bmi-intrinsics-fast-isel.ll tests · 0785f12e
      Simon Pilgrim authored
      Replace X32 check prefixes with X86 - X32 is generally used for gnux triple tests
      0785f12e
    • Simon Pilgrim's avatar
      [X86] Regenerate addcarry2.ll tests · 3204282a
      Simon Pilgrim authored
      Replace X32 check prefixes with X86 - X32 is generally used for gnux triple tests
      3204282a
    • Simon Pilgrim's avatar
      [X86] Regenerate sttni.ll tests · dcff846f
      Simon Pilgrim authored
      Replace X32 check prefixes with X86 - X32 is generally used for gnux triple tests
      dcff846f
    • Simon Pilgrim's avatar
      [X86] Regenerate clzero.ll tests · bbc5c4bf
      Simon Pilgrim authored
      Replace X32 check prefixes with X86 - X32 is generally used for gnux triple tests
      bbc5c4bf