brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 3e10416 Raw
32 lines · plain
1Date: Fri, 6 Jul 2001 16:56:56 -05002From: Vikram S. Adve <vadve@cs.uiuc.edu>3To: Chris Lattner <lattner@cs.uiuc.edu>4Subject: lowering the IR5 6BTW, I do think that we should consider lowering the IR as you said.  I7didn't get time to raise it today, but it comes up with the SPARC8move-conditional instruction.  I don't think we want to put that in the core9VM -- it is a little too specialized.  But without a corresponding10conditional move instruction in the VM, it is pretty difficult to maintain a11close mapping between VM and machine code.  Other architectures may have12other such instructions.13 14What I was going to suggest was that for a particular processor, we define15additional VM instructions that match some of the unusual opcodes on the16processor but have VM semantics otherwise, i.e., all operands are in SSA17form and typed.  This means that we can re-generate core VM code from the18more specialized code any time we want (so that portability is not lost).19 20Typically, a static compiler like gcc would generate just the core VM, which21is relatively portable.  Anyone (an offline tool, the linker, etc., or even22the static compiler itself if it chooses) can transform that into more23specialized target-specific VM code for a particular architecture.  If the24linker does it, it can do it after all machine-independent optimizations.25This would be the most convenient, but not necessary.26 27The main benefit of lowering will be that we will be able to retain a close28mapping between VM and machine code.29 30--Vikram31 32