nitg: Use gcc special attributes and directives.

`noreturn` tags `show_backtrace` as no return
ie. `__attribute__ ((noreturn))`

`likely` tags runtime error checks with `unlikely`
ie. `__builtin_expect((x),0)`

These special C annotations can be disabled with --no-gcc-directive
The additional `--no-gcc-directive correct-likely` invert the
`__builtin_expect` target.

Signed-off-by: Jean Privat <jean@pryen.org>
nitg-s: collect static statistics about the invocation mechanism used

They are displayed on `-v -v`.

Signed-off-by: Jean Privat <jean@pryen.org>
model: add `MMethodDef::is_intern`

Signed-off-by: Jean Privat <jean@pryen.org>
nitg-s: use is_intern instead of crazy AST stuff

Signed-off-by: Jean Privat <jean@pryen.org>
nitgs: add --direct-call-monomorph and --inline-some-methods

These code-generation-level global optimizations allow the separate
compiler to:

* first, use a direct call, instead of a VFT call when RTA gives inform
  that a callsite is monomorph (and that the receiver is a nonnull
  non parametric type)
* second, to inline static call when the mmethoddef is tagged accordingly
  (we reuse the `can_inline` service of the global compiler)

**DISCLAMER**
The point of these optimizations is to evaluate some extreme optimizations,
thus to bound the gain of much less aggressive optimizations.
Real direct call and inlining optimizations SHOULD be applied on the AST
or (some intermediate code level) to be combinable with other optimizations.

Some numbers for `nitg --separate nitg.nit`:

# base (no option)
total number of invocations: 45833
invocations by VFT send:     34556 (75.39%)
invocations by direct call:  9955 (21.72%)
invocations by inlinning:    1322 (2.88%)
user time	0m10.2s

# with --direct-call-monomorph
total number of invocations: 45833
invocations by VFT send:     9259 (20.20%)
invocations by direct call:  35199 (76.79%)
invocations by inlinning:    1375 (3.00%)
user	0m10.1s

# with --direct-call-monomorph and --inline-some-methods
total number of invocations: 46657
invocations by VFT send:     9701 (20.79%)
invocations by direct call:  26239 (56.23%)
invocations by inlinning:    10717 (22.96%)
user	0m10.0s

Discussion about the number:
Something is fishy, while there is a high reduction of VFT or direct calls,
there is no real gain in CPU time. Points to investigate:

* the optimized invocations are not in the hot path
  TODO gather dynamic numbers
* my CPU is very efficient when dealing with direct call and indirect calls
  TODO test on pratchett
* some issues with the measurements or with the measurer
  TODO go to sleep

Signed-off-by: Jean Privat <jean@pryen.org>
benchs: protect mangle groups of options in `bench_nitg*_options`

Signed-off-by: Jean Privat <jean@pryen.org>
benchs: add --no-gcc-directive to bench_nitg-s_options-slower

Signed-off-by: Jean Privat <jean@pryen.org>
benchs: add --inline-some-methods and --direct-call-monomorph to bench_nitg-s_options-faster

Signed-off-by: Jean Privat <jean@pryen.org>
nitgs: add option --invocation-metrics to count things dynamically

Signed-off-by: Jean Privat <jean@pryen.org>
nitgs: extract `before_send` from `table_send`

This isolate all the locally specific behaviors in a helper function

Signed-off-by: Jean Privat <jean@pryen.org>
nitgs: opt_direct_call_monomorph call `before_send` to deal with special cases

Thus null receiver and other special case are correctly handled in the
optimized path.

Signed-off-by: Jean Privat <jean@pryen.org>
Merge: Nitgs optims

Some optimizations on the nitg-s side (low level).

Some use the new call-graph mechanism.

Pull-Request: #372
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>