[LLVMdev] Data/Address registers

Ivan Llopard ivanllopard at gmail.com
Sat Mar 3 04:48:04 PST 2012


Hi,

I'm facing a problem in llvm while porting it to a new target and I'll 
need some support.
We have 2 kind of register, one for general purposes (i.e. arithmetic, 
comparisons, etc.) and the other for memory addressing. Cross copies are 
not allowed (no data path). We use clang 3.0 to produce assembler code.
Because both registers have the same size and type (i16), I don't know 
what would be the best solution to distinguish them in order to match 
the right instructions. Moreover, the standard pointer arithmetic is not 
enough for us (we need to support modulo operations also).
I thought that I could manually match every arithmetic operation while 
matching the addressing mode but it doesn't work because intermediate 
results are sometimes reused for other purposes (e.g. comparisons).
Do I need to add another type to clang/llvm ?

Thanks in advance,

Ivan



More information about the llvm-dev mailing list