[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LICM.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Oct 13 00:05:04 PDT 2003
Changes in directory llvm/lib/Transforms/Scalar:
LICM.cpp updated: 1.37 -> 1.38
---
Log message:
Wrap code at 80 columns
---
Diffs of the changes: (+10 -6)
Index: llvm/lib/Transforms/Scalar/LICM.cpp
diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.37 llvm/lib/Transforms/Scalar/LICM.cpp:1.38
--- llvm/lib/Transforms/Scalar/LICM.cpp:1.37 Sun Oct 12 16:52:27 2003
+++ llvm/lib/Transforms/Scalar/LICM.cpp Mon Oct 13 00:04:27 2003
@@ -38,12 +38,14 @@
#include <algorithm>
namespace {
- cl::opt<bool> DisablePromotion("disable-licm-promotion", cl::Hidden,
- cl::desc("Disable memory promotion in LICM pass"));
+ cl::opt<bool>
+ DisablePromotion("disable-licm-promotion", cl::Hidden,
+ cl::desc("Disable memory promotion in LICM pass"));
Statistic<> NumHoisted("licm", "Number of instructions hoisted out of loop");
Statistic<> NumHoistedLoads("licm", "Number of load insts hoisted");
- Statistic<> NumPromoted("licm", "Number of memory locations promoted to registers");
+ Statistic<> NumPromoted("licm",
+ "Number of memory locations promoted to registers");
struct LICM : public FunctionPass, public InstVisitor<LICM> {
virtual bool runOnFunction(Function &F);
@@ -98,8 +100,9 @@
///
void hoist(Instruction &I);
- /// SafeToHoist - Only hoist an instruction if it is not a trapping instruction
- /// or if it is a trapping instruction and is guaranteed to execute
+ /// SafeToHoist - Only hoist an instruction if it is not a trapping
+ /// instruction or if it is a trapping instruction and is guaranteed to
+ /// execute.
///
bool SafeToHoist(Instruction &I);
@@ -140,7 +143,8 @@
///
friend class InstVisitor<LICM>;
void visitBinaryOperator(Instruction &I) {
- if (isLoopInvariant(I.getOperand(0)) && isLoopInvariant(I.getOperand(1)) && SafeToHoist(I))
+ if (isLoopInvariant(I.getOperand(0)) &&
+ isLoopInvariant(I.getOperand(1)) && SafeToHoist(I))
hoist(I);
}
void visitCastInst(CastInst &CI) {
More information about the llvm-commits
mailing list