On Thu, May 16, 2013 at 9:33 AM, Xi Wang <xi.wang@xxxxxxxxx> wrote: > 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: Pekka Enberg <penberg@xxxxxxxxxx> > Cc: Christopher Li <sparse@xxxxxxxxxxx> > Cc: Jeff Garzik <jgarzik@xxxxxxxxxx> > Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> > Cc: Jonathan Neuschäfer <j.neuschaefer@xxxxxxx> > Signed-off-by: Xi Wang <xi.wang@xxxxxxxxx> Jonathan, Jeff, comments? -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html