Author: lattner Date: Wed Jan 9 22:44:48 2008 New Revision: 45819 URL: http://llvm.org/viewvc/llvm-project?rev=45819&view=rev Log: Infer mayload
Modified: llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp Modified: llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp?rev=45819&r1=45818&r2=45819&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp Wed Jan 9 22:44:48 2008 @@ -205,7 +205,7 @@ InstAnalyzer(CDP, mayStore, mayLoad,NeverHasSideEffects).Analyze(Inst.TheDef); - // InstAnalyzer only correctly analyzes mayStore so far. + // InstAnalyzer only correctly analyzes mayStore/mayLoad so far. if (Inst.mayStore) { // If the .td file explicitly sets mayStore, use it. // If we decided that this is a store from the pattern, then the .td file // entry is redundant. @@ -217,8 +217,18 @@ mayStore = true; } - // These two override everything. - mayLoad = Inst.mayLoad; + if (Inst.mayLoad) { // If the .td file explicitly sets mayLoad, use it. + // If we decided that this is a load from the pattern, then the .td file + // entry is redundant. + if (mayLoad) + fprintf(stderr, + "Warning: mayLoad flag explicitly set on instruction '%s'" + " but flag already inferred from pattern.\n", + Inst.TheDef->getName().c_str()); + mayLoad = true; + } + + NeverHasSideEffects = Inst.neverHasSideEffects; #if 0 _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits