[PATCH] D11782: RFC: Target-specific loop idiom recognition

Krzysztof Parzyszek kparzysz at codeaurora.org
Wed Aug 5 14:40:34 PDT 2015


kparzysz created this revision.
kparzysz added a subscriber: llvm-commits.
kparzysz set the repository for this revision to rL LLVM.
Herald added a subscriber: ted.

Hexagon has certain library functions and intrinsics that are specific to that target, and that are equivalent to a code written using loops.  To fully exploit these features, the loop-idiom recognition pass would be the best candidate to handle these opportunities, but since it is a target-independent pass, polluting it with target-specific code does not seem like a good idea.

I'm guessing that Hexagon is likely not the only platform with these properties, and certainly there is nothing in the way for any other target to provide their own implementation of some common loop idioms (via hand-optimized library functions, for example).

This is an attempt to create a target-independent interface by which individual targets can provide their own functions to recognize loop idioms.  Also, included is a do-nothing demo of how a Hexagon's pass could be hooked up using this interface.


Repository:
  rL LLVM

http://reviews.llvm.org/D11782

Files:
  include/llvm/Analysis/TargetTransformInfo.h
  include/llvm/Analysis/TargetTransformInfoImpl.h
  lib/Analysis/TargetTransformInfo.cpp
  lib/Target/Hexagon/CMakeLists.txt
  lib/Target/Hexagon/HexagonLoopIdiomRecognize.cpp
  lib/Target/Hexagon/HexagonLoopIdiomRecognize.h
  lib/Target/Hexagon/HexagonTargetMachine.cpp
  lib/Target/Hexagon/HexagonTargetTransformInfo.h
  lib/Transforms/Scalar/LoopIdiomRecognize.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11782.31396.patch
Type: text/x-patch
Size: 8748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150805/8e58ef2c/attachment.bin>


More information about the llvm-commits mailing list