[LLVMdev] Q about instruction pattern matching

Andreas Fredriksson deplinenoise at gmail.com
Mon Sep 24 01:12:53 PDT 2007


On 9/24/07, Evan Cheng <evan.cheng at apple.com> wrote:

> I am going to suggest something shocking. :) Since you will end up writing a
> bunch of target specific code anyway, you might a well write a target
> specific pass that change generic instructions into data register variant
> ones when necessary.

Hi Evan,
wouldn't this generate fairly terrible code if each address register
use has to be preceded by instructions to make an address register
hold the right value?

I'm a bit confused here, wouldn't this run after the register
allocator, or is there a way to have the register allocator run after
I've gone through and "target-legalized" all instructions?

Thanks,
// A



More information about the llvm-dev mailing list