7 Commits

Author SHA1 Message Date
Gulfem Savrun Yeniceri
73d78973fe Revert "[CGData] llvm-cgdata (#89884)"
This reverts commit d3fb41dddc11b0ebc338a3b9e6a5ab7288ff7d1d
and forward fix patches because of the issue explained in:
https://github.com/llvm/llvm-project/pull/89884#issuecomment-2244348117.

Revert "Fix tests for https://github.com/llvm/llvm-project/pull/89884
(#100061)"

This reverts commit 67937a3f969aaf97a745a45281a0d22273bff713.

Revert "Fix build break for https://github.com/llvm/llvm-project/pull/89884 (#100050)"

This reverts commit c33878c5787c128234d533ad19d672dc3eea19a8.

Revert "[CGData] Fix -Wpessimizing-move in CodeGenDataReader.cpp (NFC)"

This reverts commit 1f8b2b146141f3563085a1acb77deb50857a636d.
2024-07-23 11:40:20 +00:00
Shilei Tian
1eec5942a2 [CGData] Fix link error introduced in #89884 2024-07-22 23:40:10 -04:00
Kyungwoo Lee
c33878c578
Fix build break for https://github.com/llvm/llvm-project/pull/89884 (#100050)
- A missing header
2024-07-23 11:05:44 +09:00
Jie Fu
1f8b2b1461 [CGData] Fix -Wpessimizing-move in CodeGenDataReader.cpp (NFC)
/llvm-project/llvm/lib/CodeGenData/CodeGenDataReader.cpp:78:12:
error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move]
    return std::move(E);
           ^
/llvm-project/llvm/lib/CodeGenData/CodeGenDataReader.cpp:78:12: note: remove std::move call here
    return std::move(E);
           ^~~~~~~~~~ ~
1 error generated.
2024-07-23 09:33:47 +08:00
Kyungwoo Lee
d3fb41dddc
[CGData] llvm-cgdata (#89884)
The llvm-cgdata tool has been introduced to handle reading and writing
of codegen data. This data includes an optimistic codegen summary that
can be utilized to enhance subsequent codegen. Currently, the tool
supports saving and restoring the outlined hash tree, facilitating
machine function outlining across modules. Additional codegen summaries
can be incorporated into separate sections as required. This patch
primarily establishes basic support for the reader and writer, similar
to llvm-profdata.

The high-level operations of llvm-cgdata are as follows:
1. It reads local raw codegen data from a custom section (for example,
__llvm_outline) embedded in native binary files
2. It merges local raw codegen data into an indexed codegen data,
complete with a suitable header.
3. It handles reading and writing of the indexed codegen data into a
standalone file.

This depends on https://github.com/llvm/llvm-project/pull/89792.
This is a patch for
https://discourse.llvm.org/t/rfc-enhanced-machine-outliner-part-2-thinlto-nolto/78753.

---------

Co-authored-by: Kyungwoo Lee <kyulee@fb.com>
2024-07-23 10:25:51 +09:00
Kyungwoo Lee
d9d977f6e4
Fix assert for [CGData] Outlined Hash Tree #89792 (#98383) 2024-07-11 14:03:47 +09:00
Kyungwoo Lee
d00f1c14dc
[CGData] Outlined Hash Tree (#89792)
This defines the OutlinedHashTree class.
It contains sequences of stable hash values of instructions that have
been outlined. This OutlinedHashTree can be used to track the outlined
instruction sequences across modules. A trie structure is used in its
implementation, allowing for a compact sharing of common prefixes.

This is a patch for
https://discourse.llvm.org/t/rfc-enhanced-machine-outliner-part-2-thinlto-nolto/78753.
2024-07-07 09:15:54 +09:00