forked from OSchip/llvm-project
parent
4e621cd861
commit
216c7b8aed
|
@ -487,7 +487,7 @@ a report that looks like this:<p>
|
||||||
49 cee - Number of setcc instruction eliminated
|
49 cee - Number of setcc instruction eliminated
|
||||||
532 gcse - Number of loads removed
|
532 gcse - Number of loads removed
|
||||||
2919 gcse - Number of instructions removed
|
2919 gcse - Number of instructions removed
|
||||||
86 indvars - Number of cannonical indvars added
|
86 indvars - Number of canonical indvars added
|
||||||
87 indvars - Number of aux indvars removed
|
87 indvars - Number of aux indvars removed
|
||||||
25 instcombine - Number of dead inst eliminate
|
25 instcombine - Number of dead inst eliminate
|
||||||
434 instcombine - Number of insts combined
|
434 instcombine - Number of insts combined
|
||||||
|
|
|
@ -308,7 +308,7 @@ OPTIONS:
|
||||||
-gcse - Global Common Subexpression Elimination
|
-gcse - Global Common Subexpression Elimination
|
||||||
-globaldce - Dead Global Elimination
|
-globaldce - Dead Global Elimination
|
||||||
<b>-hello - Hello World Pass</b>
|
<b>-hello - Hello World Pass</b>
|
||||||
-indvars - Cannonicalize Induction Variables
|
-indvars - Canonicalize Induction Variables
|
||||||
-inline - Function Integration/Inlining
|
-inline - Function Integration/Inlining
|
||||||
-instcombine - Combine redundant instructions
|
-instcombine - Combine redundant instructions
|
||||||
...
|
...
|
||||||
|
|
|
@ -100,7 +100,7 @@ Pass *createGCSEPass();
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// InductionVariableSimplify - Transform induction variables in a program to all
|
// InductionVariableSimplify - Transform induction variables in a program to all
|
||||||
// use a single cannonical induction variable per loop.
|
// use a single canonical induction variable per loop.
|
||||||
//
|
//
|
||||||
Pass *createIndVarSimplifyPass();
|
Pass *createIndVarSimplifyPass();
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ bool ConstantMerge::run(Module &M) {
|
||||||
if (I == CMap.end()) { // Nope, add it to the map
|
if (I == CMap.end()) { // Nope, add it to the map
|
||||||
CMap.insert(I, std::make_pair(Init, GV));
|
CMap.insert(I, std::make_pair(Init, GV));
|
||||||
} else { // Yup, this is a duplicate!
|
} else { // Yup, this is a duplicate!
|
||||||
// Make all uses of the duplicate constant use the cannonical version...
|
// Make all uses of the duplicate constant use the canonical version...
|
||||||
GV->replaceAllUsesWith(I->second);
|
GV->replaceAllUsesWith(I->second);
|
||||||
|
|
||||||
// Delete the global value from the module... and back up iterator to
|
// Delete the global value from the module... and back up iterator to
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
Statistic<> NumSetCCRemoved("cee", "Number of setcc instruction eliminated");
|
Statistic<> NumSetCCRemoved("cee", "Number of setcc instruction eliminated");
|
||||||
Statistic<> NumOperandsCann("cee", "Number of operands cannonicalized");
|
Statistic<> NumOperandsCann("cee", "Number of operands canonicalized");
|
||||||
Statistic<> BranchRevectors("cee", "Number of branches revectored");
|
Statistic<> BranchRevectors("cee", "Number of branches revectored");
|
||||||
|
|
||||||
class ValueInfo;
|
class ValueInfo;
|
||||||
|
@ -950,7 +950,7 @@ void CEE::IncorporateInstruction(Instruction *Inst, RegionInfo &RI) {
|
||||||
// X and a constant C, we can replace all uses of X with C in the region we are
|
// X and a constant C, we can replace all uses of X with C in the region we are
|
||||||
// interested in. We generalize this replacement to replace variables with
|
// interested in. We generalize this replacement to replace variables with
|
||||||
// other variables if they are equal and there is a variable with lower rank
|
// other variables if they are equal and there is a variable with lower rank
|
||||||
// than the current one. This offers a cannonicalizing property that exposes
|
// than the current one. This offers a canonicalizing property that exposes
|
||||||
// more redundancies for later transformations to take advantage of.
|
// more redundancies for later transformations to take advantage of.
|
||||||
//
|
//
|
||||||
void CEE::ComputeReplacements(RegionInfo &RI) {
|
void CEE::ComputeReplacements(RegionInfo &RI) {
|
||||||
|
@ -1019,7 +1019,7 @@ bool CEE::SimplifyBasicBlock(BasicBlock &BB, const RegionInfo &RI) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// SimplifyInstruction - Inspect the operands of the instruction, converting
|
// SimplifyInstruction - Inspect the operands of the instruction, converting
|
||||||
// them to their cannonical form if possible. This takes care of, for example,
|
// them to their canonical form if possible. This takes care of, for example,
|
||||||
// replacing a value 'X' with a constant 'C' if the instruction in question is
|
// replacing a value 'X' with a constant 'C' if the instruction in question is
|
||||||
// dominated by a true seteq 'X', 'C'.
|
// dominated by a true seteq 'X', 'C'.
|
||||||
//
|
//
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
//
|
//
|
||||||
// This is a simple worklist driven algorithm.
|
// This is a simple worklist driven algorithm.
|
||||||
//
|
//
|
||||||
// This pass guarantees that the following cannonicalizations are performed on
|
// This pass guarantees that the following canonicalizations are performed on
|
||||||
// the program:
|
// the program:
|
||||||
// 1. If a binary operator has a constant operand, it is moved to the RHS
|
// 1. If a binary operator has a constant operand, it is moved to the RHS
|
||||||
// 2. Bitwise operators with constant operands are always grouped so that
|
// 2. Bitwise operators with constant operands are always grouped so that
|
||||||
|
|
|
@ -332,7 +332,7 @@ void LICM::visitLoadInst(LoadInst &LI) {
|
||||||
///
|
///
|
||||||
void LICM::PromoteValuesInLoop() {
|
void LICM::PromoteValuesInLoop() {
|
||||||
// PromotedValues - List of values that are promoted out of the loop. Each
|
// PromotedValues - List of values that are promoted out of the loop. Each
|
||||||
// value has an alloca instruction for it, and a cannonical version of the
|
// value has an alloca instruction for it, and a canonical version of the
|
||||||
// pointer.
|
// pointer.
|
||||||
std::vector<std::pair<AllocaInst*, Value*> > PromotedValues;
|
std::vector<std::pair<AllocaInst*, Value*> > PromotedValues;
|
||||||
std::map<Value*, AllocaInst*> ValueToAllocaMap; // Map of ptr to alloca
|
std::map<Value*, AllocaInst*> ValueToAllocaMap; // Map of ptr to alloca
|
||||||
|
|
|
@ -77,7 +77,7 @@ bool PiNodeInserter::runOnFunction(Function &F) {
|
||||||
Value *TrueRep = 0, *FalseRep = 0;
|
Value *TrueRep = 0, *FalseRep = 0;
|
||||||
|
|
||||||
// Make sure the the constant is the second operand if there is one...
|
// Make sure the the constant is the second operand if there is one...
|
||||||
// This fits with our cannonicalization patterns used elsewhere in the
|
// This fits with our canonicalization patterns used elsewhere in the
|
||||||
// compiler, without depending on instcombine running before us.
|
// compiler, without depending on instcombine running before us.
|
||||||
//
|
//
|
||||||
if (isa<Constant>(SCI->getOperand(0)) &&
|
if (isa<Constant>(SCI->getOperand(0)) &&
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
// DEBUG_MERGE_TYPES - Enable this #define to see how and when derived types are
|
// DEBUG_MERGE_TYPES - Enable this #define to see how and when derived types are
|
||||||
// created and later destroyed, all in an effort to make sure that there is only
|
// created and later destroyed, all in an effort to make sure that there is only
|
||||||
// a single cannonical version of a type.
|
// a single canonical version of a type.
|
||||||
//
|
//
|
||||||
//#define DEBUG_MERGE_TYPES 1
|
//#define DEBUG_MERGE_TYPES 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue