[PATCH] D21991: [libunwind][ARM] Improve unwinder stack usage - Make WMMX support optional
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 7 17:51:46 PDT 2016
compnerd added inline comments.
================
Comment at: src/Registers.hpp:1497
@@ -1479,3 +1496,3 @@
_LIBUNWIND_ABORT("unsupported arm register");
}
----------------
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;
}
Repository:
rL LLVM
http://reviews.llvm.org/D21991
More information about the cfe-commits
mailing list