This is an archive of the discontinued LLVM Phabricator instance.

Enable InsertFreeze flag of JumpThreading when used in LTO
ClosedPublic

Authored by aqjune on Aug 7 2020, 9:19 AM.

Details

Summary

This patch enables inserting freeze when JumpThreading converts a select to
a conditional branch when it is run in LTO.

Diff Detail

Event Timeline

aqjune created this revision.Aug 7 2020, 9:19 AM
aqjune requested review of this revision.Aug 7 2020, 9:19 AM

D84940 has landed; if this patch looks good, I'll merge this patch too.

nikic accepted this revision.Sep 10 2020, 12:38 AM

LGTM. Hopefully this will go away soon...

llvm/lib/Passes/PassBuilder.cpp
1511

Please use the full name...

This revision is now accepted and ready to land.Sep 10 2020, 12:38 AM
This revision was landed with ongoing or failed builds.Sep 10 2020, 3:06 AM
This revision was automatically updated to reflect the committed changes.
Jim added a subscriber: Jim.Mar 18 2021, 7:10 PM

Hi,
This flag is enabled in LTO. I met a failure on my test program.
It shows

Unsupported instruction encountered
llvm/lib/Analysis/CFLGraph.h:260!

It looks like that CFLGraph is unable to support FreezeInst.
Could you give me some suggesion to fix it?
Thanks

In D85534#2636321, @Jim wrote:

Hi,
This flag is enabled in LTO. I met a failure on my test program.
It shows

Unsupported instruction encountered
llvm/lib/Analysis/CFLGraph.h:260!

It looks like that CFLGraph is unable to support FreezeInst.
Could you give me some suggesion to fix it?
Thanks

Hi,
I'll look into this and make a patch today.