This is an archive of the discontinued LLVM Phabricator instance.

[Profile] Propagate branch metadata properly in InstCombine
ClosedPublic

Authored by davidxl on Aug 16 2016, 4:51 PM.

Details

Summary

More test cases are also added to cover cases that are currently working.

Diff Detail

Event Timeline

davidxl updated this revision to Diff 68286.Aug 16 2016, 4:51 PM
davidxl retitled this revision from to [Profile] Propagate branch metadata properly in InstCombine.
davidxl updated this object.
davidxl added a reviewer: spatel.
davidxl added a subscriber: llvm-commits.
davidxl updated this revision to Diff 68315.Aug 16 2016, 11:59 PM

Updated the patch to fix more bugs in inst-combine that drops profile meta data.

spatel added inline comments.Aug 17 2016, 7:12 AM
lib/Transforms/InstCombine/InstCombineSelect.cpp
416

"SwapBranchWeights" -> "swapBranchWeights"

On 2nd thought, can we refactor/reuse copyMetadata() from LoopUnswitch.cpp instead of duplicating?

davidxl marked an inline comment as done.Aug 23 2016, 9:00 AM
davidxl added inline comments.
lib/Transforms/InstCombine/InstCombineSelect.cpp
416

Refactored the APIs.

davidxl updated this revision to Diff 69005.Aug 23 2016, 9:01 AM
davidxl marked an inline comment as done.

Patch updated using new meta data API.

spatel edited edge metadata.Aug 23 2016, 9:05 AM

Patch updated using new meta data API.

LGTM. Thanks!

This revision was automatically updated to reflect the committed changes.