mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Use the new DEBUG(x) macro to allow debugging code to be enabled on the commandline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2713 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "llvm/Transforms/Scalar.h"
|
||||
#include "llvm/Analysis/InductionVariable.h"
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
#include "llvm/Analysis/Writer.h"
|
||||
#include "llvm/iPHINode.h"
|
||||
#include "llvm/iOther.h"
|
||||
#include "llvm/Type.h"
|
||||
@@ -19,10 +20,6 @@
|
||||
static Statistic<> NumRemoved ("indvars\t\t- Number of aux indvars removed");
|
||||
static Statistic<> NumInserted("indvars\t\t- Number of cannonical indvars added");
|
||||
|
||||
#if 0
|
||||
#define DEBUG
|
||||
#include "llvm/Analysis/Writer.h"
|
||||
#endif
|
||||
|
||||
// InsertCast - Cast Val to Ty, setting a useful name on the cast if Val has a
|
||||
// name...
|
||||
@@ -116,9 +113,7 @@ static bool TransformLoop(LoopInfo *Loops, Loop *Loop) {
|
||||
Changed = true;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
cerr << "Induction variables:\n";
|
||||
#endif
|
||||
DEBUG(cerr << "Induction variables:\n");
|
||||
|
||||
// Get the current loop iteration count, which is always the value of the
|
||||
// cannonical phi node...
|
||||
@@ -131,9 +126,9 @@ static bool TransformLoop(LoopInfo *Loops, Loop *Loop) {
|
||||
unsigned InsertPos = IndVars.size();
|
||||
for (unsigned i = 0; i < IndVars.size(); ++i) {
|
||||
InductionVariable *IV = &IndVars[i];
|
||||
#ifdef DEBUG
|
||||
cerr << IndVars[i];
|
||||
#endif
|
||||
|
||||
DEBUG(cerr << IV);
|
||||
|
||||
// Don't modify the cannonical indvar or unrecognized indvars...
|
||||
if (IV != Cannonical && IV->InductionType != InductionVariable::Unknown) {
|
||||
Instruction *Val = IterCount;
|
||||
|
||||
Reference in New Issue
Block a user