Support for always-inlined functions.
Support for always-inlined functions.

The tracer turns off the function inlining optimization in clang, but we
can force the compiler to inline specific functions, overriding
-fno-inline, by adding the always_inline attribute to the function
declaration. However, this affects the labelmap, since now all labels in
the inlined function now belong to the calling function.

This patch detects always-inlined functions and finds all of its callers
(except when it is called through a function pointer). When the labelmap
is printed, all calling functions are appended as a space-separated list
to that line of the labelmap.

This enables users to perform function inlining (which eliminates Call
nodes and their associated dependencies) and specify directives
using the ORIGINAL function and label names, while telling the tool that
the inlined labels will actually appear in the trace under their
original function names, but rather the functions that they were inlined
into.

Example code (with line numbers):

  1:  __attribute__ ((always_inline))
  2:  int inlined_function(int x) {
  3:    mylabel:
  4:    return x + 1;
  5:  }
  6:  void kernel() {
  7:    inlined_function(3);
  8:  }

Output trace labelmap:

  %%%% LABEL MAP START %%%%
  inlined_function/mylabel 3 inline kernel
  %%%% LABEL MAP END %%%%

  0,3,kernel,0:0,2,8,0
  2,32,1,0, ,
  1,32,1,1,1,
  r,32,2,1,2,

Note that even though inlined_function was cloned into kernel, the line
number of the add operation is still 3 instead of 7 (the cloned
location).

Change-Id: I2d2ad0794f86f3a572c38bf3a50c511ec96db008

rgly/LLVM-Tracer,rgly/LLVM-Tracer,rgly/LLVM-Tracer