llvm.org GIT mirror llvm / 8926038
Infer mayload git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45819 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 11 years ago
1 changed file(s) with 13 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
204204
205205 InstAnalyzer(CDP, mayStore, mayLoad,NeverHasSideEffects).Analyze(Inst.TheDef);
206206
207 // InstAnalyzer only correctly analyzes mayStore so far.
207 // InstAnalyzer only correctly analyzes mayStore/mayLoad so far.
208208 if (Inst.mayStore) { // If the .td file explicitly sets mayStore, use it.
209209 // If we decided that this is a store from the pattern, then the .td file
210210 // entry is redundant.
216216 mayStore = true;
217217 }
218218
219 // These two override everything.
220 mayLoad = Inst.mayLoad;
219 if (Inst.mayLoad) { // If the .td file explicitly sets mayLoad, use it.
220 // If we decided that this is a load from the pattern, then the .td file
221 // entry is redundant.
222 if (mayLoad)
223 fprintf(stderr,
224 "Warning: mayLoad flag explicitly set on instruction '%s'"
225 " but flag already inferred from pattern.\n",
226 Inst.TheDef->getName().c_str());
227 mayLoad = true;
228 }
229
230
221231 NeverHasSideEffects = Inst.neverHasSideEffects;
222232
223233 #if 0