[PATCH] D18604: Target hook to control Switch lowering.

Marcello Maggioni via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 08:28:47 PDT 2016


kariddi created this revision.
kariddi added a reviewer: hans.
kariddi added a subscriber: llvm-commits.
kariddi set the repository for this revision to rL LLVM.

This patch adds a target hook to control the lowering of switch instructions in our default switch lowering pass.

The assumption is that there are certain kinds of switch instructions that can more efficiently lowered by the target because of how the targets handles control-flow.
Certain GPUs for example could lower switch more efficiently in certain cases than using a tree of conditions.

Repository:
  rL LLVM

http://reviews.llvm.org/D18604

Files:
  include/llvm/Analysis/TargetTransformInfo.h
  include/llvm/Analysis/TargetTransformInfoImpl.h
  lib/Analysis/TargetTransformInfo.cpp
  lib/Transforms/Utils/LowerSwitch.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18604.52065.patch
Type: text/x-patch
Size: 4386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160330/2dabf5af/attachment.bin>


More information about the llvm-commits mailing list