[PATCH] D24451: [LoopUnroller] Replace UnrollingPreferences::Force with ForceMaxCount + SystemZ getUnrollingPreferences().

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 04:59:06 PDT 2016


jonpa created this revision.
jonpa added reviewers: uweigand, chandlerc, hfinkel, evstupac.
jonpa added a subscriber: llvm-commits.
Herald added subscribers: mzolotukhin, sanjoy.

This is an implementation of TargetTransformInfo::getUnrollingPreferences() for SystemZ.

In addition, there is a also a change in the UnrollingPreferences so that the Force member is instead ForceMaxCount. The motivation behind this is that it is important to get rid of tiny loops on SystemZ, and this is beneficial even with forced unrolling (cloned iterations). However, this should only be done with two or three iterations, so that the resulting loop is at least 6-8 instructions (the branch predictor can only handle a taken branch every other cycle). In order to achieve this, it is necessary to limit this with ForceMaxCount.

Somebody, please take a look at the common code change that was introduced here.


https://reviews.llvm.org/D24451

Files:
  include/llvm/Analysis/TargetTransformInfo.h
  include/llvm/Transforms/Utils/UnrollLoop.h
  lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
  lib/Target/SystemZ/SystemZTargetTransformInfo.h
  lib/Transforms/Scalar/LoopUnrollPass.cpp
  lib/Transforms/Utils/LoopUnroll.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24451.70991.patch
Type: text/x-patch
Size: 8805 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160912/9e946614/attachment.bin>


More information about the llvm-commits mailing list