diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-10 04:44:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-10 04:44:48 +0000 |
commit | 7b52b0fa35004137341d12f07c5d2f1e3ba8df0b (patch) | |
tree | 7e2055e399d8093d2c7b181d9c75d35cb6f0a318 /utils/TableGen/InstrInfoEmitter.cpp | |
parent | dfde81399cc21b55bced6ec3e8b6ae6aff0a964a (diff) | |
download | external_llvm-7b52b0fa35004137341d12f07c5d2f1e3ba8df0b.zip external_llvm-7b52b0fa35004137341d12f07c5d2f1e3ba8df0b.tar.gz external_llvm-7b52b0fa35004137341d12f07c5d2f1e3ba8df0b.tar.bz2 |
Infer mayload
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45819 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/InstrInfoEmitter.cpp')
-rw-r--r-- | utils/TableGen/InstrInfoEmitter.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp index f4b9179..e652fc1 100644 --- a/utils/TableGen/InstrInfoEmitter.cpp +++ b/utils/TableGen/InstrInfoEmitter.cpp @@ -205,7 +205,7 @@ void InstrInfoEmitter::InferFromPattern(const CodeGenInstruction &Inst, 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 @@ void InstrInfoEmitter::InferFromPattern(const CodeGenInstruction &Inst, 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 |