[PATCH] Addition of -fexhaustive-register-search option to allow an exhaustive search during last chance recoloring

MAYUR PANDEY mayur.p at samsung.com
Wed Apr 9 01:41:38 PDT 2014


Hi Quentin,

Made the modifications to the TC by adding a case for fexhaustive-register-search in ragreedy-last-chance-recoloring.ll. Please review.

Thanks,
Mayur

------- Original Message -------
Sender : Quentin Colombet<qcolombet at apple.com>
Date : Apr 08, 2014 01:34 (GMT+09:00)
Title : Re: [PATCH] Addition of -fexhaustive-register-search option to allow an exhaustive search during last chance recoloring

Hi Mayur,


LGTM with one minor thing, sorry for not letting you know before.


Could you add a test case for the option?


E.g., add a RUN line in the existing test case with very small cutoffs (like you did for the diagnostic things) and this option to make sure it overrides any cutoffs set.


Thanks,
-Quentin


On Apr 7, 2014, at 5:52 AM, MAYUR PANDEY <mayur.p at samsung.com> wrote:


Hi Quentin,

Made the necessary verbose changes as suggested by you. Please review.

Thanks,
Mayur

------- Original Message -------
Sender : Quentin Colombet<qcolombet at apple.com>
Date : Apr 05, 2014 05:06 (GMT+09:00)
Title : Re: [PATCH] Addition of -fexhaustive-register-search option to allow an exhaustive search during last chance recoloring

Hi Mayur,


The short answer is yes, I think it is the right way of doing it.


The long answer is:
I had initially something more complicated in mind that would perform the last chance recoloring with the cut-offs first and then if it fails, do it again without the cut-offs. The idea was not to blow the compile time when the regular last chance recoloring works and the complicate part would be to not  check again solution that were already tested.


Now, I think your approach is the right way, because we can assume that if someone is using that option, then it is likely the regular process with cut-offs failed, thus we can directly go for the expensive checks anyway.




Regarding the patch itself, a couple of comments:
+                 cl::desc("Exhaustive Search for registers bypassing the depth"
+                          "and interference cutoffs"));


The description does not make super clear that this is related to the last chance recoloring thing. Maybe adding the cutoffs “of last chance recoloring”.


+      Ctx.emitError("register allocation failed: maximum depth for recoloring "
+                    "reached. Use -fexhaustive-register-search "
+                    "for recoloring without cutoffs");


The messages are a bit too verbose.
Can we shorten it?


E.g., Use -fexhaustive-register-search to skip cutoffs.


Thanks,
-Quentin


On Apr 4, 2014, at 3:47 AM, MAYUR PANDEY <mayur.p at samsung.com> wrote:


Hi Quentin,

Added -fexhaustive-register-search option for exhaustive register search. Please review whether this is the right way of doing it. 

Thanks,
Mayur<fexhaustive-register-search.patch><fexhaustive-register-search.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fexhaustive-register-search.patch
Type: application/octet-stream
Size: 4200 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140409/de1188cc/attachment.obj>


More information about the llvm-commits mailing list