devirt.cc

Line Hotness Pass Source Function / Inlining Chain
1
#include "shared.h"
2
3
class base
4
{
5
public:
6
  virtual void meth () = 0;
7
};
8
9
class subclass : public base
10
{
11
public:
12
  void meth () {}
13
};
14
15
static void test (base *ptr)
16
{
17
  //subclass obj;
18
  for (int i = 0; i < 10000; i++)
19
    ptr->meth ();
einline
              ^folding virtual function call to virtual void subclass::meth()
              
  • void test(base*)
  • inlined from void devirt_cc_body() at devirt.cc:26:8
20
  //obj.meth ();
21
}
22
23
void devirt_cc_body ()
24
{
25
  subclass obj;
26
  test (&obj);
einline
       ^inlining void test(base*) into void devirt_cc_body()
       
  • void devirt_cc_body()
einline
       ^Inlining void test(base*)/1 to void devirt_cc_body()/8 with frequency 1.00
       
  • void devirt_cc_body()
27
}