1. Nov 18, 2017
    • Rafael Espindola's avatar
      Use TempFile in the implementation of LockFileManager. · 51c63bb7
      Rafael Espindola authored
      This move some of the complexity over to the lower level TempFile.
      
      It also makes it a bit more explicit where errors are ignored since we
      now have a call to consumeError.
      
      llvm-svn: 318550
      51c63bb7
    • Chandler Carruth's avatar
      [PM/Unswitch] Teach SimpleLoopUnswitch to do non-trivial unswitching, · 693eedb1
      Chandler Carruth authored
      making it no longer even remotely simple.
      
      The pass will now be more of a "full loop unswitching" pass rather than
      anything substantively simpler than any other approach. I plan to rename
      it accordingly once the dust settles.
      
      The key ideas of the new loop unswitcher are carried over for
      non-trivial unswitching:
      1) Fully unswitch a branch or switch instruction from inside of a loop to
         outside of it.
      2) Update the CFG and IR. This avoids needing to "remember" the
         unswitched branches as well as avoiding excessively cloning and
         reliance on complex parts of simplify-cfg to cleanup the cfg.
      3) Update the analyses (where we can) rather than just blowing them away
         or relying on something else updating them.
      
      Sadly, #3 is somewhat compromised here as the dominator tree updates
      were too complex for me to want to reason about. I will need to make
      another attempt to do this now that we have a nice dynamic update API
      for dominators. However, we do adhere to #3 w.r.t. LoopInfo.
      
      This approach also adds an important principls specific to non-trivial
      unswitching: not *all* of the loop will be duplicated when unswitching.
      This fact allows us to compute the cost in terms of how much *duplicate*
      code is inserted rather than just on raw size. Unswitching conditions
      which essentialy partition loops will work regardless of the total loop
      size.
      
      Some remaining issues that I will be addressing in subsequent commits:
      - Handling unstructured control flow.
      - Unswitching 'switch' cases instead of just branches.
      - Moving to the dynamic update API for dominators.
      
      Some high-level, interesting limitationsV that folks might want to push
      on as follow-ups but that I don't have any immediate plans around:
      - We could be much more clever about not cloning things that will be
        deleted. In fact, we should be able to delete *nothing* and do
        a minimal number of clones.
      - There are many more interesting selection criteria for which branch to
        unswitch that we might want to look at. One that I'm interested in
        particularly are a set of conditions which all exit the loop and which
        can be merged into a single unswitched test of them.
      
      Differential revision: https://reviews.llvm.org/D34200
      
      llvm-svn: 318549
      693eedb1
    • Peter Collingbourne's avatar
      COFF: Stop emitting a non-standard COFF symbol table into PEs. · 5e80bdeb
      Peter Collingbourne authored
      Now that our support for PDB emission is reasonably good, there is
      no longer a need to emit a COFF symbol table.
      
      Also fix a bug where we would fail to emit a string table for long
      section names if /debug was not specified.
      
      Differential Revision: https://reviews.llvm.org/D40189
      
      llvm-svn: 318548
      5e80bdeb
    • Reid Kleckner's avatar
      All .xdata sections are eligble for ICF · d99ac29a
      Reid Kleckner authored
      Summary:
      Many small functions have identical unwind info because they push the
      same sets of CSRs in the same order and have the same stack and prologue
      size. The VC linker merges duplicate .xdata, and so should LLD.
      
      This reduces the .xdata section size of clang.exe from 1.8MB to 94KB.
      
      Reviewers: pcc, ruiu
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D40160
      
      llvm-svn: 318547
      d99ac29a
    • Peter Collingbourne's avatar
      Enable PDB generation with lld in asan and cfi tests on Windows. · dd01ddbe
      Peter Collingbourne authored
      PDB emission now works well enough that we can rely on it for these
      tests to pass.
      
      Differential Revision: https://reviews.llvm.org/D40188
      
      llvm-svn: 318546
      dd01ddbe
    • Ahmed Bougacha's avatar
      [CodeGen] Compute the objc EH vtable address point using inbounds GEP. · 5d0199a2
      Ahmed Bougacha authored
      The object is provided by the objc runtime and is never visible in the
      module itself, but even so, the address point we compute points into it,
      and "+16" is guaranteed not to overflow.
      
      This matches the c++ vtable IRGen.
      
      Note that I'm not entirely convinced the 'i8*' type is correct here: at
      the IR level, we're accessing memory that's outside the global object.
      But we don't control the allocation, so it's not obviously wrong either.
      But either way, this is only in a global initializer, so I don't think
      it's going to be mucked with.  Filed PR35352 to discuss that.
      
      llvm-svn: 318545
      5d0199a2
    • Ilya Biryukov's avatar
      [clangd] Release the old preamble before building a new one. · 11a02528
      Ilya Biryukov authored
      llvm-svn: 318544
      11a02528
    • Justin Bogner's avatar
      MIRParser: Avoid reading uninitialized memory on generic vregs · 6c7663fd
      Justin Bogner authored
      If a vreg's bank is specified in the registers block and one of its
      defs or uses also specifies the bank, we end up checking that the
      RegBank is equal to diagnose conflicting banks. The problem comes up
      for generic vregs, where we weren't fully initializing the VRegInfo
      when parsing the registers block, so we'd end up comparing a null
      pointer to uninitialized memory.
      
      This fixes a non-deterministic failure when round tripping through MIR
      with generic vregs.
      
      llvm-svn: 318543
      6c7663fd
    • Simon Pilgrim's avatar
      [X86] Merge scheduling tests for SHLD/SHRD · 78340097
      Simon Pilgrim authored
      Reduces spsce used and makes it easier to compare the 2 values for the equivalent instructions
      
      llvm-svn: 318541
      78340097
    • Volodymyr Sapsai's avatar
      [ThinLTO] Remove too aggressive assertion in building function call graph. · 8b46ff16
      Volodymyr Sapsai authored
      The assertion was introduced in r317853 but there are cases when a call
      isn't handled either as direct or indirect. In this case we add a
      reference graph edge but not a call graph edge.
      
      Reviewers: tejohnson
      
      Reviewed By: tejohnson
      
      Subscribers: mehdi_amini, inglorion, eraman, hiraditya, efriedma, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D40056
      
      llvm-svn: 318540
      8b46ff16
    • Sam Clegg's avatar
      [WebAssembly] Initial wasm linker implementation · c94d393a
      Sam Clegg authored
      This linker backend is still a work in progress but is
      enough to link simple programs including linking against
      library archives.
      
      Differential Revision: https://reviews.llvm.org/D34851
      
      llvm-svn: 318539
      c94d393a
    • Eugene Zelenko's avatar
      [AST] Partially revert r318341 to fix two broken tests on... · ae304b07
      Eugene Zelenko authored
      [AST] Partially revert r318341 to fix two broken tests on llvm-clang-x86_64-expensive-checks-win (NFC).
      
      llvm-svn: 318538
      ae304b07
    • Martin Probst's avatar
      clang-format: remove trailing lines in lamdas and arrow functions. · a004b3f5
      Martin Probst authored
      Summary:
      clang-format already removes empty lines at the beginning & end of
      blocks:
      
          int x() {
      
            foo();  // lines before and after will be removed.
      
          }
      
      However because lamdas and arrow functions are parsed as expressions,
      the existing logic to remove empty lines in UnwrappedLineFormatter
      doesn't handle them.
      
      This change special cases arrow functions in ContinuationIndenter to
      remove empty lines:
      
          x = []() {
      
            foo();  // lines before and after will now be removed.
      
          };
      
      Reviewers: djasper
      
      Subscribers: klimek, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D40178
      
      llvm-svn: 318537
      a004b3f5
    • Alexey Bataev's avatar
      [OPENMP] Codegen for `target simd` construct. · f8365375
      Alexey Bataev authored
      Added codegen support for `target simd` directive.
      
      llvm-svn: 318536
      f8365375
    • Rafael Espindola's avatar
      Try to fix the windows build. · e28e9c0d
      Rafael Espindola authored
      llvm-svn: 318535
      e28e9c0d
    • Rafael Espindola's avatar
      Use TempFile in dsymutil. · a78286f9
      Rafael Espindola authored
      I don't think there is any functionality change, but the code is
      easier to understand IMHO.
      
      llvm-svn: 318534
      a78286f9
    • Rafael Espindola's avatar
      Revert "[MC] Fix regression tests on Windows when git “core.autocrlf” is set to true." · e8270241
      Rafael Espindola authored
      This reverts commit r318528.
      
      MC/AsmParser/preserve-comments-crlf.s fails on linux.
      
      llvm-svn: 318533
      e8270241
    • Michal Gorny's avatar
      [CMake] Allow for Solaris ld -V output on stdout · 0eaaf27f
      Michal Gorny authored
      In recent versions of Solaris 11.4 (previously 12), ld -V output went to
      stdout instead of stderr. Since AddLLVM.cmake only expects it on stderr,
      Solaris ld wasn't properly detected and options not understood by it are
      passed during the build.
      
      The following patch fixes this, allowing for both variants.
      
      Tested on i386-pc-solaris2.11.4 (on top of D35755 which is needed for
      proper Solaris support).
      
      Patch by Rainer Orth.
      
      Differential Revision: https://reviews.llvm.org/D39601
      
      llvm-svn: 318532
      0eaaf27f
    • Evandro Menezes's avatar
      [AArch64] Adjust the cost model for Exynos M1 and M2 · 4b964f2b
      Evandro Menezes authored
      Improve the accuracy of the model by specifying the proper number of uops.
      
      llvm-svn: 318531
      4b964f2b
    • Stephan Bergmann's avatar
      Indent code blocks so they are actually treated as such · 15b87c6d
      Stephan Bergmann authored
      llvm-svn: 318530
      15b87c6d
    • Dave Lee's avatar
      Fix skipping of flags in getClangStripDependencyFileAdjuster · 984964a0
      Dave Lee authored
      Summary:
      The ArgumentsAdjuster returned from `getClangStripDependencyFileAdjuster` will
      skip dependency flags, and also their associated values for those flags that
      take an argument. This change corrects the handling of the `-MD` and `-MMD`
      flags, which do not take an argument.
      
      Reviewers: saugustine, klimek, alexshap
      
      Reviewed By: alexshap
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D40024
      
      llvm-svn: 318529
      984964a0
    • Zhen Cao's avatar
      ac358137
  2. Nov 17, 2017