Skip to content
  1. Aug 21, 2018
    • Marcello Maggioni's avatar
      883fe455
    • Florian Hahn's avatar
      [CodeExtractor] Use 'normal destination' BB as insert point to store invoke results. · 7cdf52e4
      Florian Hahn authored
      Currently CodeExtractor tries to use the next node after an invoke to
      place the store for the result of the invoke, if it is an out parameter
      of the region. This fails, as the invoke terminates the current BB.
      In that case, we can place the store in the 'normal destination' BB, as
      the result will only be available in that case.
      
      
      Reviewers: davidxl, davide, efriedma
      
      Reviewed By: davidxl
      
      Differential Revision: https://reviews.llvm.org/D51037
      
      llvm-svn: 340331
      7cdf52e4
    • Craig Topper's avatar
      [InstCombine] Pull simple checks above a more complicated one. NFCI · 3d8fe39c
      Craig Topper authored
      I'm assuming its easier to make sure the RHS of an XOR is all ones than it is to check for the many select patterns we have. So lets check that first. Same with the one use check.
      
      llvm-svn: 340321
      3d8fe39c
    • Florian Hahn's avatar
      [GVN] Assign new value number to calls reading memory, if there is no MemDep info. · 9583d4fa
      Florian Hahn authored
      Currently we assign the same value number to two calls reading the same
      memory location if we do not have MemoryDependence info. Without MemDep
      Info we cannot guarantee that there is no store between the two calls, so we
      have to assign a new number to the second call.
      
      It also adds a new option EnableMemDep to enable/disable running
      MemoryDependenceAnalysis and also renamed NoLoads to NoMemDepAnalysis to
      be more explicit what it does. As it also impacts calls that read memory,
      NoLoads is a bit confusing.
      
      Reviewers: efriedma, sebpop, john.brawn, wmi
      
      Reviewed By: efriedma
      
      Differential Revision: https://reviews.llvm.org/D50893
      
      llvm-svn: 340319
      9583d4fa
    • Philip Reames's avatar
      [AST] Remove notion of volatile from alias sets [NFCI] · c3c23e8c
      Philip Reames authored
      Volatility is not an aliasing property. We used to model volatile as if it had extremely conservative aliasing implications, but that hasn't been true for several years now. So, it doesn't make sense to be in AliasSet.
      
      It also turns out the code is entirely a noop. Outside of the AST code to update it, there was only one user: load store promotion in LICM. L/S promotion doesn't need the check since it walks all the users of the address anyway. It already checks each load or store via !isUnordered which causes us to bail for volatile accesses. (Look at the lines immediately following the two remove asserts.)
      
      There is the possibility of some small compile time impact here, but the only case which will get noticeably slower is a loop with a large number of loads and stores to the same address where only the last one we inspect is volatile. This is sufficiently rare it's not worth optimizing for..
      
      llvm-svn: 340312
      c3c23e8c
    • Craig Topper's avatar
      [BypassSlowDivision] Teach bypass slow division not to interfere with div by... · b172b888
      Craig Topper authored
      [BypassSlowDivision] Teach bypass slow division not to interfere with div by constant where constants have been constant hoisted, but not moved from their basic block
      
      DAGCombiner doesn't pay attention to whether constants are opaque before doing the div by constant optimization. So BypassSlowDivision shouldn't introduce control flow that would make DAGCombiner unable to see an opaque constant. This can occur when a div and rem of the same constant are used in the same basic block. it will be hoisted, but not leave the block.
      
      Longer term we probably need to look into the X86 immediate cost model used by constant hoisting and maybe not mark div/rem immediates for hoisting at all.
      
      This fixes the case from PR38649.
      
      Differential Revision: https://reviews.llvm.org/D51000
      
      llvm-svn: 340303
      b172b888
    • Anna Thomas's avatar
      [LV] Vectorize loops where non-phi instructions used outside loop · b02b0ad8
      Anna Thomas authored
      Summary:
      Follow up change to rL339703, where we now vectorize loops with non-phi
      instructions used outside the loop. Note that the cyclic dependency
      identification occurs when identifying reduction/induction vars.
      
      We also need to identify that we do not allow users where the PSCEV information
      within and outside the loop are different. This was the fix added in rL307837
      for PR33706.
      
      Reviewers: Ayal, mkuper, fhahn
      
      Subscribers: javed.absar, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50778
      
      llvm-svn: 340278
      b02b0ad8
    • Max Kazantsev's avatar
      [LICM] Hoist guards with invariant conditions · 097ef691
      Max Kazantsev authored
      This patch teaches LICM to hoist guards from the loop if they are guaranteed to execute and
      if there are no side effects that could prevent that.
      
      Differential Revision: https://reviews.llvm.org/D50501
      Reviewed By: reames
      
      llvm-svn: 340256
      097ef691
    • Reid Kleckner's avatar
      Re-land r334313 "[asan] Instrument comdat globals on COFF targets" · 85a8c12d
      Reid Kleckner authored
      If we can use comdats, then we can make it so that the global metadata
      is thrown away if the prevailing definition of the global was
      uninstrumented. I have only tested this on COFF targets, but in theory,
      there is no reason that we cannot also do this for ELF.
      
      This will allow us to re-enable string merging with ASan on Windows,
      reducing the binary size cost of ASan on Windows.
      
      I tested this change with ASan+PGO, and I fixed an issue with the
      __llvm_profile_raw_version symbol. With the old version of my patch, we
      would attempt to instrument that symbol on ELF because it had a comdat
      with external linkage. If we had been using the linker GC-friendly
      metadata scheme, everything would have worked, but clang does not enable
      it by default.
      
      llvm-svn: 340232
      85a8c12d
    • Craig Topper's avatar
      [InstCombine] Add splat vector constant support to foldICmpAddOpConst. · bee74793
      Craig Topper authored
      Differential Revision: https://reviews.llvm.org/D50946
      
      llvm-svn: 340231
      bee74793
    • Michael Berg's avatar
      extend binop folds for selects to include true and false binops flag intersection · 0b838ded
      Michael Berg authored
      Summary: This change address bug 38641
      
      Reviewers: spatel, wristow
      
      Reviewed By: spatel
      
      Differential Revision: https://reviews.llvm.org/D50996
      
      llvm-svn: 340222
      0b838ded
  2. Aug 20, 2018
  3. Aug 17, 2018
    • Jun Lim's avatar
      Test commit · da5864c7
      Jun Lim authored
      I just removed a blank space.
      
      llvm-svn: 340069
      da5864c7
    • Evandro Menezes's avatar
      [InstCombine] Refactor the simplification of pow() (NFC) · 4b39010a
      Evandro Menezes authored
      Refactor all cases dealing with `exp{,2,10}()` into one function in
      preparation for D49273.  Otherwise, NFC.
      
      llvm-svn: 340061
      4b39010a
    • Teresa Johnson's avatar
      [ThinLTO] Add option for printing import failure reasons · cb9a82fc
      Teresa Johnson authored
      Summary:
      Adds the option for the printing of summary information about functions
      considered but rejected for importing during the thin link.
      
      Reviewers: davidxl
      
      Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50881
      
      llvm-svn: 340047
      cb9a82fc
    • Florian Hahn's avatar
      [InstrSimplify,NewGVN] Add option to ignore additional instr info when simplifying. · 19f9e32f
      Florian Hahn authored
      NewGVN uses InstructionSimplify for simplifications of leaders of
      congruence classes. It is not guaranteed that the metadata or other
      flags/keywords (like nsw or exact) of the leader is available for all members
      in a congruence class, so we cannot use it for simplification.
      
      This patch adds a InstrInfoQuery struct with a boolean field
      UseInstrInfo (which defaults to true to keep the current behavior as
      default) and a set of helper methods to get metadata/keywords for a
      given instruction, if UseInstrInfo is true. The whole thing might need a
      better name, to avoid confusion with TargetInstrInfo but I am not sure
      what a better name would be.
      
      The current patch threads through InstrInfoQuery to the required
      places, which is messier then it would need to be, if
      InstructionSimplify and ValueTracking would share the same Query struct.
      
      The reason I added it as a separate struct is that it can be shared
      between InstructionSimplify and ValueTracking's query objects. Also,
      some places do not need a full query object, just the InstrInfoQuery.
      
      It also updates some interfaces that do not take a Query object, but a
      set of optional parameters to take an additional boolean UseInstrInfo.
      
      See https://bugs.llvm.org/show_bug.cgi?id=37540.
      
      Reviewers: dberlin, davide, efriedma, sebpop, hiraditya
      
      Reviewed By: hiraditya
      
      Differential Revision: https://reviews.llvm.org/D47143
      
      llvm-svn: 340031
      19f9e32f
    • Anna Thomas's avatar
      [LICM] Add a diagnostic analysis for identifying alias information · 1962621a
      Anna Thomas authored
      Summary:
      Currently, in LICM, we use the alias set tracker to identify if the
      instruction (we're interested in hoisting) aliases with instruction that
      modifies that memory location.
      
      This patch adds an LICM alias analysis diagnostic tool that checks the
      mod ref info of the instruction we are interested in hoisting/sinking,
      with every instruction in the loop.  Because of O(N^2) complexity this
      is now only a diagnostic tool to show the limitation we have with the
      alias set tracker and is OFF by default.
      
      Test cases show the difference with the diagnostic analysis tool, where
      we're able to hoist out loads and readonly + argmemonly calls from the
      loop, where the alias set tracker analysis is not able to hoist these
      instructions out.
      
      Reviewers: reames, mkazantsev, fedor.sergeev, hfinkel
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50854
      
      llvm-svn: 340026
      1962621a
    • Andrea Di Biagio's avatar
      [InstCombine] Remove unused method FAddCombine::createFDiv(). NFC · f874607f
      Andrea Di Biagio authored
      This commit fixes a (gcc 7.3.0) [-Wunused-function] warning caused by the
      presence of unused method FaddCombine::createFDiv().
      The last use of that method was removed at r339519.
      
      llvm-svn: 340014
      f874607f
    • Chen Zheng's avatar
      [MISC]Fix wrong usage of std::equal() · e2d47dd1
      Chen Zheng authored
      Differential Revision: https://reviews.llvm.org/D49958
      
      llvm-svn: 340000
      e2d47dd1
    • Sanjay Patel's avatar
      [InstCombine] add reflection fold for tan(-x) · 8ba631d9
      Sanjay Patel authored
        
      This is a follow-up suggested with rL339604.
      For tan(), we don't have a corresponding LLVM 
      intrinsic -- unlike sin/cos -- so this is the 
      only way/place that we can do this fold currently.
      
      llvm-svn: 339958
      8ba631d9
    • Vedant Kumar's avatar
      [InstrProf] Use atomic profile counter updates for TSan · ee6c233a
      Vedant Kumar authored
      Thread sanitizer instrumentation fails to skip all loads and stores to
      profile counters. This can happen if profile counter updates are merged:
      
        %.sink = phi i64* ...
        %pgocount5 = load i64, i64* %.sink
        %27 = add i64 %pgocount5, 1
        %28 = bitcast i64* %.sink to i8*
        call void @__tsan_write8(i8* %28)
        store i64 %27, i64* %.sink
      
      To suppress TSan diagnostics about racy counter updates, make the
      counter updates atomic when TSan is enabled. If there's general interest
      in this mode it can be surfaced as a clang/swift driver option.
      
      Testing: check-{llvm,clang,profile}
      
      rdar://40477803
      
      Differential Revision: https://reviews.llvm.org/D50867
      
      llvm-svn: 339955
      ee6c233a
  4. Aug 16, 2018
  5. Aug 15, 2018
Loading