1. Jan 21, 2022
    • Philip Reames's avatar
    • Michael Kruse's avatar
      [OpenMPIRBuilder] Detect and fix ambiguous InsertPoints for createParallel. · 616f7717
      Michael Kruse authored
      When a Builder methods accepts multiple InsertPoints, when both point to
      the same position, inserting instructions at one position will "move" the
      other after the inserted position since the InsertPoint is pegged to the
      instruction following the intended InsertPoint. For instance, when
      creating a parallel region at Loc and passing the same position as AllocaIP,
      creating instructions at Loc will "move" the AllocIP behind the Loc
      position.
      
      To avoid this ambiguity, add an assertion checking this condition and
      fix the unittests.
      
      In case of AllocaIP, an alternative solution could be to implicitly
      split BasicBlock at InsertPoint, using the first as AllocaIP, the second
      for inserting the instructions themselves. However, this solution is
      specific to AllocaIP since AllocaIP will always have to be first. Hence,
      this is an argument to generally handling ambiguous InsertPoints as API
      sage error.
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D117226
      616f7717
    • Nico Weber's avatar
      [gn build] (manually) port f29256a6 · 91eca967
      Nico Weber authored
      91eca967
  2. Jan 20, 2022