[PATCH] D21991: [libunwind][ARM] Improve unwinder stack usage - Make WMMX support optional

Asiri Rathnayake via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 12 01:12:11 PDT 2016

rmaprath added inline comments.

Comment at: src/Registers.hpp:1497
@@ -1479,3 +1496,3 @@
     _LIBUNWIND_ABORT("unsupported arm register");
compnerd wrote:
> rmaprath wrote:
> > compnerd wrote:
> > > Early returns would be nicer imo.
> > Not sure if I follow, did you mean to check the bounds of `regNum` the first thing and `_LIBUNWIND_ABORT` sooner than later? Might convolute the code given the conditional on `__ARM_WMMX` and I'm not sure what benefit it brings? Or perhaps I misunderstood you?
> > 
> > I'll commit the current patch as it is for the moment and then do a clean-up (once I understand what you mean).
> > 
> > Thanks.
> Oh, that was meant, as, we can write the code a slight bit nicer, which is beyond the scope of your change.  If you don't mind doing a bit more clean up -- a follow up patch to improve this would be appreciated!
> Basically, we have a number of if/else if cases with a unreachable.  We should replace this with a series of
>     if (<condition>) {
>       <operation>
>       return;
>     }
Fixed in r274840



/ Asiri



More information about the cfe-commits mailing list