[PATCH] Support for microMIPS relocations 1/3

Jack Carter Jack.Carter at imgtec.com
Tue Oct 1 11:50:55 PDT 2013

There are 2 tools using the same code. Can they both use it correctly? Are the calls through both AsmPrinter and AsmParser going to get a correct result? The long term customer use will be to use direct object emission. To not test it directly is ill advised.

The only way to be sure is to test the output both of the products, and to test them with independent tools.

If this will block us from checking in the patch, I will relent for expediency sake, but not testing the output of both tools is basically wrong.

From: Rafael EspĂ­ndola [rafael.espindola at gmail.com]
Sent: Tuesday, October 01, 2013 10:51 AM
To: Jack Carter
Cc: Zoran Jovanovic; llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH] Support for microMIPS relocations 1/3

On 1 October 2013 13:39, Jack Carter <Jack.Carter at imgtec.com> wrote:
> This is testing the direct object emitter which shares some code with
> llvm-mc, but is a different tool and has different paths.
> The ideal tests for this would be to have 2 tests, one with llc and the
> other with llvm-mc.

Short of very rare cases the code path is the same. Why is there
different code paths in here? It is not obvious on the patch that
there are and even less obvious that there should be.

We should only have llc producing objects directly when we cannot test
a particular path with two independent tests (.ll to .s and .s to .o).
Those cases should be very clearly documented as to why they cannot be


More information about the llvm-commits mailing list