OSDN Git Service

[PlaceSafepoints] Make the width of a counted loop settable.
authorSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 15 Sep 2015 01:42:48 +0000 (01:42 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 15 Sep 2015 01:42:48 +0000 (01:42 +0000)
commitd7e1379fc2f8d01b7763cb2986686f78bc4d5455
tree91767544b7223e08005c7d2ab56fc623856adfa5
parent270e6f8a27d535d22ab84b05936889430b0f0be6
[PlaceSafepoints] Make the width of a counted loop settable.

Summary:
This change lets a `PlaceSafepoints` client change how wide the trip
count of a loop has to be for the loop to be considerd "counted", via
`CountedLoopTripWidth`.  It also removes the boolean `SkipCounted` flag
and the `upperTripBound` constant -- we can get the old behavior of
`SkipCounted` == `false` by setting `CountedLoopTripWidth` to `13` (2 ^
13 == 8192).

Reviewers: reames

Subscribers: llvm-commits, sanjoy

Differential Revision: http://reviews.llvm.org/D12789

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247656 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/PlaceSafepoints.cpp
test/Transforms/PlaceSafepoints/finite-loops.ll