1. Jul 23, 2022
    • Thomas Raoux's avatar
      [mlir][vector] NFC change to improve doc of vector distribution op · c53ee73b
      Thomas Raoux authored
      Improve doc based on post commit review from https://reviews.llvm.org/D123703
      Add more details on the op semantic, explicitly mention what part are parallel
      and what parts are serial.
      
      Differential Revision: https://reviews.llvm.org/D125227
      c53ee73b
    • Greg Clayton's avatar
      [NFC] Improve FileSpec internal APIs and usage in preparation for adding... · 9429b67b
      Greg Clayton authored
      [NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute.
      
      The FileSpect APIs allow users to modify instance variables directly by getting a non const reference to the directory and filename instance variables. This makes it impossibly to control all of the times the FileSpec object is modified so we can clear the cache. This patch modifies the APIs of FileSpec so no one can modify the directory or filename directly by adding set accessors and by removing the get accessors that are non const.
      
      Many clients were using FileSpec::GetCString(...) which returned a unique C string from a ConstString'ified version of the result of GetPath() which returned a std::string. This caused many locations to use this convenient function incorrectly and could cause many strings to be added to the constant string pool that didn't need to. Most clients were converted to using FileSpec::GetPath().c_str() when possible. Other clients were modified to use the newly renamed version of this function which returns an actualy ConstString:
          ConstString FileSpec::GetPathAsConstString(bool denormalize = true) const;
      
      This avoids the issue where people were getting an already uniqued "const char *" that came from a ConstString only to put the "const char *" back into a "ConstString" object. By returning the ConstString instead of a "const char *" clients can be more efficient with the result.
      
      The patch:
      - Removes the non const GetDirectory() and GetFilename() get accessors
      - Adds set accessors to replace the above functions: SetDirectory() and SetFilename().
      - Adds ClearDirectory() and ClearFilename() to replace usage of the FileSpec::GetDirectory().Clear()/FileSpec::GetFilename().Clear() call sites
      - Fixed all incorrect usage of FileSpec::GetCString() to use FileSpec::GetPath().c_str() where appropriate, and updated other call sites that wanted a ConstString to use the newly returned ConstString appropriately and efficiently.
      
      Differential Revision: https://reviews.llvm.org/D130309
      9429b67b
    • Thomas Raoux's avatar
      [mlir][vector] Extend transfer_write to read propagation · 9f6ba4be
      Thomas Raoux authored
      Folding of transfer_write into transfer_read is already supported but
      this requires the read and write to have the same permuation map.
      After linalg vectorization it is common to have different ppermuation
      map for write followed by read even though the cases could be
      propagated.
      This canonicalization handle cases where the permuation maps are
      different but the data read and written match and replace the transfer
      ops with broadcast and permuation
      
      Differential Revision: https://reviews.llvm.org/D130135
      9f6ba4be
    • Alex Brachet's avatar
      [llvm-driver] Fix build after 07b74980 · 3878973b
      Alex Brachet authored
      The llvm-driver build is not enabled on any bots so this
      wasn't caught earlier.
      3878973b
    • Dylan Fleming's avatar
      [Flang] Generate documentation for compiler flags · 846439dd
      Dylan Fleming authored
      This patch aims to create a webpage to document
      Flang's command line options on https://flang.llvm.org/docs/
      in a similar way to Clang's
      https://clang.llvm.org/docs/ClangCommandLineReference.html
      
      This is done by using clang_tablegen to generate an .rst
      file from Options.td (which is current shared with Clang)
      For this to work, ClangOptionDocEmitter.cpp was updated
      to allow specific Flang flags to be included,
      rather than bulk excluding clang flags.
      
      Note:
      Some headings in the generated documentation will incorrectly
      contain references to Clang, e.g.
      "Flags controlling the behaviour of Clang during compilation"
      This is because Options.td (Which is shared between both Clang and Flang)
      contains hard-coded DocBrief sections. I couldn't find a non-intrusive way
      to make this target-dependant, as such I've left this as is, and it will need revisiting later.
      
      Reviewed By: awarzynski
      
      Differential Revision: https://reviews.llvm.org/D129864
      846439dd
    • Alex Brachet's avatar
      [libc] Don't call user comparator function for equal pointers · 5e2d5071
      Alex Brachet authored
      The standard says two equal pointers must compare equal
      so there is no need to call the user comparator function
      in this case.
      
      Differential Revision: https://reviews.llvm.org/D130310
      5e2d5071
    • zhijian's avatar
    • Konstantin Varlamov's avatar
      14cf74d6
    • tlattner's avatar
      Remove references to old mailing lists that have moved to discourse. Replace... · 44f81dfb
      tlattner authored
      Remove references to old mailing lists that have moved to discourse. Replace with links to discourse.
      
      Reviewed By: #libc_abi, ldionne
      
      Differential Revision: https://reviews.llvm.org/D129675
      44f81dfb
    • Jacques Pienaar's avatar
      [mlir][tosa] Flip accessors used to prefixed form (NFC) · 13448db0
      Jacques Pienaar authored
      Follow up from dialect flip, just flipping accessors. Both forms still
      generated.
      13448db0
    • Stefan Pintilie's avatar
      [PowerPC][NFC] Convert the MMA test cases to use opaque pointers. · 475a39fb
      Stefan Pintilie authored
      This patch modifies only test cases.
      Converted the MMA test cases to use opaque pointers.
      
      Reviewed By: lei, amyk
      
      Differential Revision: https://reviews.llvm.org/D130090
      475a39fb
    • Simon Pilgrim's avatar
      [AArch64] Use neon instructions for i64/i128 ISD::PARITY calculation · 939cf9b1
      Simon Pilgrim authored
      As noticed on D129765 and reported on Issue #56531 - aarch64 targets can use the neon ctpop + add-reduce instructions to speed up scalar ctpop instructions, but we fail to do this for parity calculations.
      
      I'm not sure where the cutoff should be for specific CPUs, but i64 (+ i128 special case) shows a definite reduction in instruction count. i32 is about the same (but scalar <-> neon transfers are probably more costly?), and sub-i32 promotion looks to be a definite regression compared to parity expansion optimized for those widths.
      
      Differential Revision: https://reviews.llvm.org/D130246
      939cf9b1
    • Simon Pilgrim's avatar
      8f0ba6c4
    • Mircea Trofin's avatar
      [NFC] FunctionSamples::getEntrySamples -> getHeadSamplesEstimate · 7b81a81d
      Mircea Trofin authored
      The name `getEntrySamples` was misleading for 2 reasons. One, it's
      close in name to `Function::getEntryCount`, but the equivalent here is
      `getHeadSamples`; second, as opposed to the other get* APIs in
      `FunctionSamples`, it performs an estimate/heuristic rather than just
      retrieving raw data (or a non-heuristic derivate off that data, like
      `getMaxCountInside`)
      
      The new name should more clearly communicate its intent; and, being
      close (in name) to `getHeadSamples`, it should allow the reader discover
      the relation between them.
      
      Also updated the doc comments for both `getHeadSamples[Estimate]` so a
      reader may better understand the relation between them.
      
      Differential Revision: https://reviews.llvm.org/D130281
      7b81a81d
    • Slava Zakharin's avatar
      [flang] Try to lower math intrinsics to math operations first. · f5759add
      Slava Zakharin authored
      This commit changes how math intrinsics are lowered: we, first,
      try to lower them into MLIR operations or libm calls via
      mathOperations table and only then fallback to pgmath runtime calls.
      
      The pgmath fallback is needed, because mathOperations does not
      support all intrinsics that pgmath supports. The main purpose
      of this change is to get rid of llvmIntrinsics table so that
      we do not have to update both llvmIntrinsics and mathOperations
      when adding new intrinsic support.
      
      mathOperations lowering should phase out pgmath lowering, when
      more operations are available (e.g. power operations being
      added in D129809 and D129811; complex type operations from
      Complex dialect).
      
      Differential Revision: https://reviews.llvm.org/D130129
      f5759add
  2. Jul 22, 2022