>
> - llvm::BasicBlock *MonotonicBB, *AcquireBB, *ReleaseBB, *AcqRelBB,
> *SeqCstBB;
> + llvm::BasicBlock *MonotonicBB = 0, *AcquireBB = 0, *ReleaseBB = 0,
> + *AcqRelBB = 0, *SeqCstBB = 0;
>
Just curious - why were these all declared up-front like this, rather than
at the scopes they were used? You don't seem to actually use the null values
at all & duplicate the condition basically like:
T *x;
stuff1();
if (cond)
x = init();
stuff2();
if (cond)
use(x)
rather than
stuff1();
stuff2();
if (cond) {
T *x = init();
use(x);
}
seems like excess scope, initialization, etc - or is there a reason the
basic blocks need to be constructed in a particular order up front? (I had a
patch to move these initializations/declarations down as in my second
example but I didn't get around to running the tests on it to see if the
block creation order change broke anything)
- David
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits