Skip to content
  1. May 13, 2020
  2. May 12, 2020
  3. May 11, 2020
    • Johannes Doerfert's avatar
      [Attributor][FIX] Disallow function signature rewrite for casted calls · 8d94d3c3
      Johannes Doerfert authored
      We will now ensure ensure the return type of called function is the type
      of all call sites we are going to rewrite. This avoids a problem
      partially fixed by D79680. The part that was not covered is a use of
      this "weird" casted call site (see `@func3` in `misc_crash.ll`).
      
      misc_crash.ll checks are auto-generated now.
      8d94d3c3
    • Johannes Doerfert's avatar
      [Attributor] Make AAIsDead dependences optional to prevent top state · c115a78f
      Johannes Doerfert authored
      We should never give up on AAIsDead as it guards other AAs from
      unreachable code (in which SSA properties are meaningless). We did
      however use required dependences on some queries in AAIsDead which
      caused us to invalidate AAIsDead if the queried AA got invalidated.
      We now use optional dependences instead. The bug that exposed this is
      added to the liveness.ll test and other test changes show the impact.
      
      Bug report by @sdmitriev.
      c115a78f
    • Johannes Doerfert's avatar
      [Attributor] Force update of "newly live" abstract attributes · c86fd333
      Johannes Doerfert authored
      During an update of AAIsDead, new instructions become live. If we query
      information from them, the result is often just the initial state, e.g.,
      for call site `noreturn` and `nounwind`. We will now trigger an update
      for cached attributes during the AAIsDead update, though other AAs might
      later use the same API.
      c86fd333
    • Sanjay Patel's avatar
      [VectorCombine] account for extra uses in scalarization cost · 5f730b64
      Sanjay Patel authored
      Follow-up to D79452.
      Mimics the extra use cost formula for the inverse transform with extracts.
      5f730b64
    • Mircea Trofin's avatar
      [llvm][NFC] Move inlining decision-related APIs in InliningAdvisor. · 48fa355e
      Mircea Trofin authored
      Summary: Factoring out in preparation to https://reviews.llvm.org/D79042
      
      Reviewers: dblaikie, davidxl
      
      Subscribers: mgorny, eraman, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D79613
      48fa355e
    • Sergey Dmitriev's avatar
      [Attributor] Fix for a crash on RAUW when rewriting function signature · 3df40007
      Sergey Dmitriev authored
      Reviewers: jdoerfert, sstefan1, uenoku
      
      Reviewed By: uenoku
      
      Subscribers: hiraditya, uenoku, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D79680
      3df40007
    • Tyker's avatar
      [AssumeBundles] fix crashes · 78d85c20
      Tyker authored
      Summary:
      this patch fixe crash/asserts found in the test-suite.
      the AssumeptionCache cannot be assumed to have all assumes contrary to what i tought.
      prevent generation of information for terminators, because this can create broken IR in transfromation where we insert the new terminator before removing the old one.
      
      Reviewers: jdoerfert
      
      Reviewed By: jdoerfert
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D79458
      78d85c20
    • OCHyams's avatar
      [NFC][DwarfDebug] Add test for variables with a single location which · da100de0
      OCHyams authored
      don't span their entire scope.
      
      The previous commit (6d1c40c1) is an older version of the test.
      
      Reviewed By: aprantl, vsk
      
      Differential Revision: https://reviews.llvm.org/D79573
      da100de0
    • Xun Li's avatar
      Remove an unused Module param · 44e5aaf9
      Xun Li authored
      Summary:
      In D65848 the function getFuncNameInModule was refactored to no longer use module.
      This diff removes the parameter and rename the function name to avoid confusion.
      
      Reviewers: wenlei, wmi, davidxl
      
      Reviewed By: wenlei
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D79310
      44e5aaf9
    • Johannes Doerfert's avatar
      [Attributor] Merge the query set into AbstractAttribute · 3a8740bd
      Johannes Doerfert authored
      The old QuerriedAAs contained two vectors, one for required one for
      optional dependences (=queries). We now use a single vector and encode
      the kind directly in the pointer.
      
      This reduces memory consumption and makes the connection between
      abstract attributes and their dependences clearer.
      
      No functional change is intended, changes in the test are due to
      different order in the query map. Neither the order before nor now is in
      any way special.
      
      ---
      
      Single run of the Attributor module and then CGSCC pass (oldPM)
      for SPASS/clause.c (~10k LLVM-IR loc):
      
      Before:
      ```
      calls to allocation functions: 543734 (329735/s)
      temporary memory allocations: 105895 (64217/s)
      peak heap memory consumption: 19.19MB
      peak RSS (including heaptrack overhead): 102.26MB
      total memory leaked: 269.10KB
      ```
      
      After:
      ```
      calls to allocation functions: 513292 (341511/s)
      temporary memory allocations: 106028 (70544/s)
      peak heap memory consumption: 13.35MB
      peak RSS (including heaptrack overhead): 95.64MB
      total memory leaked: 269.10KB
      ```
      
      Difference:
      ```
      calls to allocation functions: -30442 (208506/s)
      temporary memory allocations: 133 (-910/s)
      peak heap memory consumption: -5.84MB
      peak RSS (including heaptrack overhead): 0B
      total memory leaked: 0B
      ```
      
      ---
      
      Reviewed By: uenoku
      
      Differential Revision: https://reviews.llvm.org/D78729
      3a8740bd
    • Johannes Doerfert's avatar
      [Attributor][FIX] Carefully handle/ignore/forget `argmemonly` · 5e06b251
      Johannes Doerfert authored
      When we have an existing `argmemonly` or `inaccessiblememorargmemonly`
      we used to "know" that information. However, interprocedural constant
      propagation can invalidate these attributes. We now ignore and remove
      these attributes for internal functions (which may be affected by IP
      constant propagation), if we are deriving new attributes for the
      function.
      5e06b251
    • Johannes Doerfert's avatar
      [Attributor] Use "simplify to constant" in genericValueTraversal · 713ee3aa
      Johannes Doerfert authored
      As we replace values with constants interprocedurally, we also need to
      do this "look-through" step during the generic value traversal or we
      would derive properties from replaced values. While this is often not
      problematic, it is when we use the "kind" of a value for reasoning,
      e.g., accesses to arguments allow `argmemonly`.
      713ee3aa
    • Johannes Doerfert's avatar
      [Attributor] Ignore illegal accesses to `null` · 513ac6e9
      Johannes Doerfert authored
      When we categorize a pointer value we bailed at `null` before. If we
      know `null` is not a valid memory location we can ignore it as there
      won't be an access at all.
      513ac6e9
    • Johannes Doerfert's avatar
      [Attributor] Use existing helpers to determine IR facts · 31c03b92
      Johannes Doerfert authored
      We now use getPointerDereferenceableBytes to determine `nonnull` and
      `dereferenceable` facts from the IR. We also use getPointerAlignment in
      AAAlign for the same reason. The latter can interfere with callbacks so
      we do restrict it to non-function-pointers for now.
      31c03b92
    • Johannes Doerfert's avatar
      a9ee8b49
    • Fangrui Song's avatar
      [gcov] Default coverage version to '407*' and delete CC1 option -coverage-cfg-checksum · 25544ce2
      Fangrui Song authored
      Defaulting to -Xclang -coverage-version='407*' makes .gcno/.gcda
      compatible with gcov [4.7,8)
      
      In addition, delete clang::CodeGenOptionsBase::CoverageExtraChecksum and GCOVOptions::UseCfgChecksum.
      We can infer the information from the version.
      
      With this change, .gcda files produced by `clang --coverage a.o` linked executable can be read by gcov 4.7~7.
      We don't need other -Xclang -coverage* options.
      There may be a mismatching version warning, though.
      
      (Note, GCC r173147 "split checksum into cfg checksum and line checksum"
       made gcov 4.7 incompatible with previous versions.)
      25544ce2
  4. May 10, 2020
  5. May 09, 2020
  6. May 08, 2020
    • Layton Kifer's avatar
      [TRE][NFC] Refactor shared state into member variables. · 23cbea9a
      Layton Kifer authored
      Separate functions that require shared state into a class to avoid
      needing to pass them though multiple functions just to be available
      where needed.
      
      The main motivation for this is that we would like to remove the
      limitation that accumulator values be dynamic constant, which would
      require additional shared state between call eliminations in the same
      function, compounding this issue.
      
      Differential Revision: https://reviews.llvm.org/D79299
      23cbea9a
    • Sanjay Patel's avatar
      [VectorCombine] scalarize binop of inserted elements into vector constants · 0d2a0b44
      Sanjay Patel authored
      As with the extractelement patterns that are currently in vector-combine,
      there are going to be several possible variations on this theme. This
      should be the clearest, simplest example.
      
      Scalarization is the right direction for target-independent canonicalization,
      and InstCombine has some of those folds already, but it doesn't do this.
      I proposed a similar transform in D50992. Here in vector-combine, we can
      check the cost model to be sure it's profitable, so there should be less risk.
      
      Differential Revision: https://reviews.llvm.org/D79452
      0d2a0b44
Loading