4 Commits

Author SHA1 Message Date
JOE1994
884221eddb [mlir] Tidy uses of llvm::raw_stream_ostream (NFC)
As specified in the docs,
1) raw_string_ostream is always unbuffered and
2) the underlying buffer may be used directly

( 65b13610a5226b84889b923bae884ba395ad084d for further reference )

* Don't call raw_string_ostream::flush(), which is essentially a no-op.
* Avoid unneeded calls to raw_string_ostream::str(), to avoid excess indirection.
2024-09-16 23:23:25 -04:00
Mehdi Amini
b82f3747da Revert "Minor fixes on the MLIR ActionProfiler (NFC)"
This reverts commit 0502d83470202de6412d4b310692c7b06f1791cb.

This introduces a race condition on the printComma variable.
2023-10-03 12:15:35 -07:00
Mehdi Amini
0502d83470 Minor fixes on the MLIR ActionProfiler (NFC)
Ensure the stream flushed to the string before acquiring the mutext.
No need to flush the output stream, the goal of the mutex is to sync
ahead before content is added to the stream.
2023-10-02 20:11:18 -07:00
Antonio Cortes Perez
f33afea260
[mlir] Add an Observer for profiling actions to a stream. (#67251)
The profile is stored in the Chrome trace event format.

Added the --profile-action-to=<file> option to mlir-opt.
2023-10-02 20:07:10 -07:00