llvm.org GIT mirror llvm / 52e539c
DEBUGify some DOUTs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78887 91177308-0d34-0410-b5e6-96231b3b80d8 Andreas Bolka 10 years ago
1 changed file(s) with 8 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
142142 // Enforce the threshold.
143143 if (UnrollThreshold != NoThreshold) {
144144 unsigned LoopSize = ApproximateLoopSize(L);
145 DOUT << " Loop Size = " << LoopSize << "\n";
145 DEBUG(errs() << " Loop Size = " << LoopSize << "\n");
146146 uint64_t Size = (uint64_t)LoopSize*Count;
147147 if (TripCount != 1 && Size > UnrollThreshold) {
148 DOUT << " Too large to fully unroll with count: " << Count
149 << " because size: " << Size << ">" << UnrollThreshold << "\n";
148 DEBUG(errs() << " Too large to fully unroll with count: " << Count
149 << " because size: " << Size << ">" << UnrollThreshold << "\n");
150150 if (UnrollAllowPartial) {
151151 // Reduce unroll count to be modulo of TripCount for partial unrolling
152152 Count = UnrollThreshold / LoopSize;
154154 Count--;
155155 }
156156 if (Count < 2) {
157 DOUT << " could not unroll partially\n";
157 DEBUG(errs() << " could not unroll partially\n");
158158 return false;
159159 } else {
160 DOUT << " partially unrolling with count: " << Count << "\n";
160 DEBUG(errs() << " partially unrolling with count: "
161 << Count << "\n");
161162 }
162163 } else {
163 DOUT << " will not try to unroll partially because "
164 << "-unroll-allow-partial not given\n";
164 DEBUG(errs() << " will not try to unroll partially because "
165 << "-unroll-allow-partial not given\n");
165166 return false;
166167 }
167168 }