sparse, llvm: fix phi generation

PHI in LLVM is different from that in sparse.  LLVM requires PHI "for
each predecessor basic block of the current block" even if the current
block doesn't use it.  It's tricky to correctly place PHI.

This patch implements a simpler and safer strategy:
1) allocate an alloca for each phi, and
2) translate phi/phisrc to load/store alloca.
LLVM optimizations will promote load/store to registers.

Cc: Christopher Li <sparse@chrisli.org>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
sparse, llvm: simplify function generation

Remove repeated code, such as get_func_type() vs sym_func_type(),
pseudo_type() vs symbol_type().

Fix generating variadic functions.

Add a test case using printf().

Cc: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>