This is an archive of the discontinued LLVM Phabricator instance.

[Devirtualization] statistic for number of devirtualized calls
Changes PlannedPublic

Authored by Prazek on Apr 24 2017, 6:42 AM.

Details

Event Timeline

Prazek created this revision.Apr 24 2017, 6:42 AM
davide requested changes to this revision.Apr 24 2017, 7:49 AM
davide added a subscriber: davide.

Testcase? (-stats + REQUIRE: asserts)

This revision now requires changes to proceed.Apr 24 2017, 7:49 AM

It turned out that this is invalid way of collecting this statistic, because we don't count devirtualization that happens without previous inlining like:

define void @devirtualize(i8* %p) {
%x = bitcast i8* %p to void()**
store void()* @foo, void()** %x
%c = load void()*, void()** %x
call void %c()
call void @foo()
call void %c()
ret void
}

The stat probably will need to be collected in GVN instead.

Prazek planned changes to this revision.Apr 27 2017, 3:56 AM