[llvm-commits] [llvm] r122815 - /llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp
Cameron Zwarich
zwarich at apple.com
Tue Jan 4 10:19:20 PST 2011
Author: zwarich
Date: Tue Jan 4 12:19:19 2011
New Revision: 122815
URL: http://llvm.org/viewvc/llvm-project?rev=122815&view=rev
Log:
Switch to the new style of asterisk placement.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp?rev=122815&r1=122814&r2=122815&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopInstSimplify.cpp Tue Jan 4 12:19:19 2011
@@ -33,9 +33,9 @@
initializeLoopInstSimplifyPass(*PassRegistry::getPassRegistry());
}
- bool runOnFunction(Function&);
+ bool runOnFunction(Function &);
- virtual void getAnalysisUsage(AnalysisUsage& AU) const {
+ virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
AU.addRequired<LoopInfo>();
AU.addPreserved<LoopInfo>();
@@ -57,10 +57,10 @@
return new LoopInstSimplify();
}
-bool LoopInstSimplify::runOnFunction(Function& F) {
- DominatorTree* DT = getAnalysisIfAvailable<DominatorTree>();
- LoopInfo* LI = &getAnalysis<LoopInfo>();
- const TargetData* TD = getAnalysisIfAvailable<TargetData>();
+bool LoopInstSimplify::runOnFunction(Function &F) {
+ DominatorTree *DT = getAnalysisIfAvailable<DominatorTree>();
+ LoopInfo *LI = &getAnalysis<LoopInfo>();
+ const TargetData *TD = getAnalysisIfAvailable<TargetData>();
bool Changed = false;
bool LocalChanged;
@@ -70,10 +70,10 @@
for (df_iterator<BasicBlock*> DI = df_begin(&F.getEntryBlock()),
DE = df_end(&F.getEntryBlock()); DI != DE; ++DI)
for (BasicBlock::iterator BI = DI->begin(), BE = DI->end(); BI != BE;) {
- Instruction* I = BI++;
+ Instruction *I = BI++;
// Don't bother simplifying unused instructions.
if (!I->use_empty()) {
- Value* V = SimplifyInstruction(I, TD, DT);
+ Value *V = SimplifyInstruction(I, TD, DT);
if (V && LI->replacementPreservesLCSSAForm(I, V)) {
I->replaceAllUsesWith(V);
LocalChanged = true;
More information about the llvm-commits
mailing list