[PATCH] Use ".arch_extension" ARM directive to specify the additional CPU features

Eric Christopher echristo at gmail.com
Wed Feb 4 10:46:05 PST 2015


Ah. Thanks.

Here you go.


================
Comment at: lib/Target/ARM/ARMAsmPrinter.cpp:682
@@ +681,3 @@
+  // Enable hwdiv through ".arch_extension idiv"
+  if (Subtarget->isKrait() && (Subtarget->hasDivide()
+      || Subtarget->hasDivideInARMMode()))
----------------
rengolin wrote:
> shouldn't you check here based on the instruction set you're using? Something like:
> 
>     if (Subtarget->isKrait() && (
>         Subtarget->hasDivide() ||
>         (!Subtarget->isThumb() && Subtarget->hasDivideInARMMode())
>       )
> 
> To make sure we don't turn it on when it's thumb and it only has div on ARM.
Using subtargets here is not going to be allowed as soon as I can separate the code out so I'd prefer you come up with another way of figuring out the ISA here.

Honestly a loop over all functions in the module and collecting cpu information is probably how we're going to need to go and should be simple. I'm not sure how ARM attribute merging works between functions so if someone could detail that it would be appreciated.

http://reviews.llvm.org/D7316

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list