Lines Matching defs:Load
32 #define DEBUG_TYPE "load-combine"
46 : Load(L), POP(P), InsertOrder(O) {}
47 LoadInst *Load;
49 /// \brief The new load needs to be created before the first load in IR order.
138 BaseLoad = L.Load;
140 PrevSize = L.Load->getModule()->getDataLayout().getTypeStoreSize(
141 L.Load->getType());
145 if (L.Load->getAlignment() > BaseLoad->getAlignment())
148 // No other load will be combinable
156 // This load is offset less than the size of the last load.
160 PrevSize = L.Load->getModule()->getDataLayout().getTypeStoreSize(
161 L.Load->getType());
169 /// \brief Given a list of combinable load. Combine the maximum number of them.
174 TotalSize += L.Load->getType()->getPrimitiveSizeInBits();
176 TotalSize -= Loads.pop_back_val().Load->getType()->getPrimitiveSizeInBits();
183 dbgs() << L.POP.Offset << ": " << *L.Load << "\n";
187 // Find first load. This is where we put the new load.
197 Builder->SetInsertPoint(FirstLP.Load);
206 Twine(Loads[0].Load->getName()) + ".combined", false,
207 Loads[0].Load->getAlignment(), FirstLP.Load);
210 Builder->SetInsertPoint(L.Load);
212 L.Load->getModule()->getDataLayout(), NewLoad,
213 cast<IntegerType>(L.Load->getType()),
215 L.Load->replaceAllUsesWith(V);
275 INITIALIZE_PASS_BEGIN(LoadCombine, "load-combine", "Combine Adjacent Loads",
278 INITIALIZE_PASS_END(LoadCombine, "load-combine", "Combine Adjacent Loads",