This draft patch assigns probabilistic metadata to the branch for the required block placement
This resolves https://github.com/llvm/llvm-project/issues/50529
TODO - Add unit tests.
Paths
| Differential D130757
Sub-optimal placement of loop exit blocks Needs ReviewPublic Authored by rajkrthakur on Jul 29 2022, 4:33 AM.
Details
Summary This draft patch assigns probabilistic metadata to the branch for the required block placement This resolves https://github.com/llvm/llvm-project/issues/50529 TODO - Add unit tests.
Diff Detail Event Timelineefriedma added inline comments.
Revision Contents
Diff 448577 llvm/lib/Transforms/Utils/LoopUnroll.cpp
|
Please avoid using the LLVM C API from C++ code. Please just use the C++ API (for example, MDString::get).
You can get the LLVMContext with something like LatchBI->getContext().