forked from OSchip/llvm-project
parent
0e15a77d40
commit
e77c7de459
|
@ -63,9 +63,9 @@ FunctionPass *llvm::createConstantPropagationPass() {
|
||||||
bool ConstantPropagation::runOnFunction(Function &F) {
|
bool ConstantPropagation::runOnFunction(Function &F) {
|
||||||
// Initialize the worklist to all of the instructions ready to process...
|
// Initialize the worklist to all of the instructions ready to process...
|
||||||
std::set<Instruction*> WorkList;
|
std::set<Instruction*> WorkList;
|
||||||
for(inst_iterator i = inst_begin(F), e = inst_end(F); i != e; ++i) {
|
for (Instruction &I: instructions(&F))
|
||||||
WorkList.insert(&*i);
|
WorkList.insert(&I);
|
||||||
}
|
|
||||||
bool Changed = false;
|
bool Changed = false;
|
||||||
const DataLayout &DL = F.getParent()->getDataLayout();
|
const DataLayout &DL = F.getParent()->getDataLayout();
|
||||||
TargetLibraryInfo *TLI =
|
TargetLibraryInfo *TLI =
|
||||||
|
|
Loading…
Reference in New Issue