Skip to content
  1. Apr 07, 2022
  2. Jan 05, 2022
  3. Dec 10, 2021
  4. Oct 18, 2021
  5. May 24, 2021
  6. Apr 29, 2021
    • Florian Hahn's avatar
      [VPlan] Add getVPSingleValue helper. · a0e1313c
      Florian Hahn authored
      As suggested in D99294, this adds a getVPSingleValue helper to use for
      recipes that are guaranteed to define a single value. This replaces uses
      of getVPValue() which used to default to I = 0.
      a0e1313c
  7. Apr 26, 2021
  8. Apr 25, 2021
  9. Apr 23, 2021
    • Florian Hahn's avatar
      [VPlan] Add GraphTraits impl to traverse through VPRegionBlock. · 89c4dda0
      Florian Hahn authored
      This patch adds a new iterator to traverse through VPRegionBlocks and a
      GraphTraits specialization using the iterator to traverse through
      VPRegionBlocks.
      
      Because there is already a GraphTraits specialization for VPBlockBase *
      and co, a new VPBlockRecursiveTraversalWrapper helper is introduced.
      This allows us to provide a new GraphTraits specialization for that
      type. Users can use the new recursive traversal by using this wrapper.
      
      The graph trait visits both the entry block of a region, as well as all
      its successors. Exit blocks of a region implicitly have their parent
      region's successors. This ensures all blocks in a region are visited
      before any blocks in a successor region when doing a reverse post-order
      traversal of the graph.
      
      Reviewed By: a.elovikov
      
      Differential Revision: https://reviews.llvm.org/D100175
      89c4dda0
  10. Apr 15, 2021
  11. Apr 06, 2021
    • Florian Hahn's avatar
      [VPlan] Print VPValue operands for VPWidenPHI if possible. · a6b06b78
      Florian Hahn authored
      For VPWidenPHIRecipes that model all incoming values as VPValue
      operands, print those operands instead of printing the original PHI.
      
      D99294 updates recipes of reduction PHIs to use the VPValue for the
      incoming value from the loop backedge, making use of this new printing.
      a6b06b78
  12. Mar 19, 2021
  13. Mar 18, 2021
    • Mehdi Amini's avatar
      Revert "[VPlan] Add plain text (not DOT's digraph) dumps" · 3614df35
      Mehdi Amini authored
      This reverts commit 6b053c98.
      The build is broken:
      
      ld.lld: error: undefined symbol: llvm::VPlan::printDOT(llvm::raw_ostream&) const
      >>> referenced by LoopVectorize.cpp
      >>>               LoopVectorize.cpp.o:(llvm::LoopVectorizationPlanner::printPlans(llvm::raw_ostream&)) in archive lib/libLLVMVectorize.a
      3614df35
    • Andrei Elovikov's avatar
      [VPlan] Add plain text (not DOT's digraph) dumps · 6b053c98
      Andrei Elovikov authored
      I foresee two uses for this:
      1) It's easier to use those in debugger.
      2) Once we start implementing more VPlan-to-VPlan transformations (especially
         inner loop massaging stuff), using the vectorized LLVM IR as CHECK targets in
         LIT test would become too obscure. I can imagine that we'd want to CHECK
         against VPlan dumps after multiple transformations instead. That would be
         easier with plain text dumps than with DOT format.
      
      Reviewed By: fhahn
      
      Differential Revision: https://reviews.llvm.org/D96628
      6b053c98
  14. Mar 17, 2021
    • Max Kazantsev's avatar
      [BasicAA] Drop dependency on Loop Info. PR43276 · a6074b09
      Max Kazantsev authored
      BasicAA stores a reference to LoopInfo inside. This imposes an implicit
      requirement of keeping it up to date whenever we modify the IR (in particular,
      whenever we modify terminators of blocks that belong to loops). Failing
      to do so leads to incorrect state of the LoopInfo.
      
      Because general AA does not require loop info updates and provides to API to
      update it properly, the users of AA reasonably assume that there is no need to
      update the loop info. It may be a reason of bugs, as example in PR43276 shows.
      
      This patch drops dependence of BasicAA on LoopInfo to avoid this problem.
      
      This may potentially pessimize the result of queries to BasicAA.
      
      Differential Revision: https://reviews.llvm.org/D98627
      Reviewed By: nikic
      a6074b09
  15. Mar 10, 2021
  16. Feb 22, 2021
  17. Feb 12, 2021
  18. Jan 27, 2021
    • Sanjay Patel's avatar
      [LoopVectorize] use IR fast-math-flags exclusively (not FP function attributes) · ab93c18c
      Sanjay Patel authored
      I am trying to untangle the fast-math-flags propagation logic
      in the vectorizers (see a6f02212 for SLP).
      
      The loop vectorizer has a mix of checking FP function attributes,
      IR-level FMF, and just wrong assumptions.
      
      I am trying to avoid regressions while fixing this, and I think
      the IR-level logic is good enough for that, but it's hard to say
      for sure. This would be the 1st step in the clean-up.
      
      The existing test that I changed to include 'fast' actually shows
      a miscompile: the function only had the equivalent of nnan, but we
      created new instructions that had fast (all FMF set). This is
      similar to the example in https://llvm.org/PR35538
      
      Differential Revision: https://reviews.llvm.org/D95452
      ab93c18c
  19. Jan 11, 2021
    • Florian Hahn's avatar
      [VPlan] Unify value/recipe printing after VPDef transition. · eb0371e4
      Florian Hahn authored
      This patch unifies the way recipes and VPValues are printed after the
      transition to VPDef.
      
      VPSlotTracker has been updated to iterate over all recipes and all
      their defined values to number those. There is no need to number
      values in Value2VPValue.
      
      It also updates a few places that only used slot numbers for
      VPInstruction. All recipes now can produce numbered VPValues.
      eb0371e4
  20. Jan 08, 2021
    • David Green's avatar
      [LV] Don't sink into replication regions · 72fb5ba0
      David Green authored
      The new test case here contains a first order recurrences and an
      instruction that is replicated. The first order recurrence forces an
      instruction to be sunk _into_, as opposed to after the replication
      region. That causes several things to go wrong including registering
      vector instructions multiple times and failing to create dominance
      relations correctly.
      
      Instead we should be sinking to after the replication region, which is
      what this patch makes sure happens.
      
      Differential Revision: https://reviews.llvm.org/D93629
      72fb5ba0
  21. Dec 21, 2020
  22. Dec 03, 2020
  23. Nov 29, 2020
  24. Nov 25, 2020
  25. Nov 17, 2020
    • Florian Hahn's avatar
      [VPlan] Add VPDef class. · 52f3714d
      Florian Hahn authored
      This patch introduces a new VPDef class, which can be used to
      manage VPValues defined by recipes/VPInstructions.
      
      The idea here is to mirror VPUser for values defined by a recipe. A
      VPDef can produce either zero (e.g. a store recipe), one (most recipes)
      or multiple (VPInterleaveRecipe) result VPValues.
      
      To traverse the def-use chain from a VPDef to its users, one has to
      traverse the users of all values defined by a VPDef.
      
      VPValues now contain a pointer to their corresponding VPDef, if one
      exists. To traverse the def-use chain upwards from a VPValue, we first
      need to check if the VPValue is defined by a VPDef. If it does not have
      a VPDef, this means we have a VPValue that is not directly defined
      iniside the plan and we are done.
      
      If we have a VPDef, it is defined inside the region by a recipe, which
      is a VPUser, and the upwards def-use chain traversal continues by
      traversing all its operands.
      
      Note that we need to add an additional field to to VPVAlue to link them
      to their defs. The space increase is going to be offset by being able to
      remove the SubclassID field in future patches.
      
      Reviewed By: Ayal
      
      Differential Revision: https://reviews.llvm.org/D90558
      52f3714d
  26. Oct 05, 2020
    • Florian Hahn's avatar
      [VPlan] Clean up uses/operands on VPBB deletion. · 348d85a6
      Florian Hahn authored
      Update the code responsible for deleting VPBBs and recipes to properly
      update users and release operands.
      
      This is another preparation for D84680 & following patches towards
      enabling modeling def-use chains in VPlan.
      348d85a6
  27. Oct 04, 2020
  28. Oct 03, 2020
  29. Sep 30, 2020
    • Florian Hahn's avatar
      [VPlan] Change recipes to inherit from VPUser instead of a member var. · d8563654
      Florian Hahn authored
      Now that VPUser is not inheriting from VPValue, we can take the next
      step and turn the recipes that already manage their operands via VPUser
      into VPUsers directly. This is another small step towards traversing
      def-use chains in VPlan.
      
      This is NFC with respect to the generated code, but makes the interface
      more powerful.
      d8563654
  30. Jun 06, 2020
  31. Mar 31, 2020
  32. Mar 29, 2020
  33. Mar 18, 2020
  34. Mar 05, 2020
    • Florian Hahn's avatar
      [VPlan] Use consecutive numbers to print VPValues instead of addresses. · 40e7bfc4
      Florian Hahn authored
      Currently when printing VPValues we use the object address, which makes
      it hard to distinguish VPValues as they usually are large numbers with
      varying distance between them.
      
      This patch adds a simple slot tracker, similar to the ModuleSlotTracker
      used for IR values. In order to dump a VPValue or anything containing a
      VPValue, a slot tracker for the enclosing VPlan needs to be created. The
      existing VPlanPrinter can take care of that for the existing code. We
      assign consecutive numbers to each VPValue we encounter in a reverse
      post order traversal of the VPlan.
      
      Reviewers: rengolin, hsaito, fhahn, Ayal, dorit, gilr
      
      Reviewed By: gilr
      
      Differential Revision: https://reviews.llvm.org/D73078
      40e7bfc4
  35. Mar 03, 2020
    • Florian Hahn's avatar
      [VPlan] Add getPlan() to VPBlockBase. · 05afa555
      Florian Hahn authored
      This patch adds a getPlan accessor to VPBlockBase, which finds the entry
      block of the plan containing the block and returns the plan set for this
      block.
      
      VPBlockBase contains a VPlan pointer, but it should only be set for
      the entry block of a plan. This allows moving blocks without updating
      the pointer for each moved block and in the future we might introduce a
      parent relationship between plans and blocks, similar to the one in LLVM IR.
      
      Reviewers: rengolin, hsaito, fhahn, Ayal, dorit, gilr
      
      Reviewed By: gilr
      
      Differential Revision: https://reviews.llvm.org/D74445
      05afa555
Loading