This is an archive of the discontinued LLVM Phabricator instance.

Don't extract code containing an indirect jump from a callbr
AbandonedPublic

Authored by void on Dec 2 2019, 3:14 PM.

Details

Summary

The callbr instruction's indirect destinations are expected to be within
the current function. Extracting them will cause chaos as the callbr
will then want to branch to a label in another function, which isn't
allowed.

Event Timeline

void created this revision.Dec 2 2019, 3:14 PM
vsk added a comment.Dec 2 2019, 3:19 PM

Could you add a test?

llvm/lib/Transforms/IPO/HotColdSplitting.cpp
135

nit: const BasicBlock &PredBB : predecessors(BB)?

void updated this revision to Diff 231788.Dec 2 2019, 3:20 PM

Use range-based for loop.

void added a comment.Dec 2 2019, 3:21 PM
In D70929#1766125, @vsk wrote:

Could you add a test?

Strange. There was a test, but somehow it wasn't included. I'll re-add it.

void abandoned this revision.Apr 6 2023, 2:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2023, 2:31 PM
Herald added a subscriber: ormris. · View Herald Transcript