summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-12-03 02:30:17 +0000
committerDan Gohman <gohman@apple.com>2008-12-03 02:30:17 +0000
commitae3ba45eb244885dcab0629c6b7ce8dc03d0a3c3 (patch)
tree54253f5c9431045af3f388d08c2773dbda4aac0d /llvm/utils/TableGen/CodeGenDAGPatterns.cpp
parentac5392c59606aeccea6254a809fcc0c8fe93b3b8 (diff)
downloadbcm5719-llvm-ae3ba45eb244885dcab0629c6b7ce8dc03d0a3c3.tar.gz
bcm5719-llvm-ae3ba45eb244885dcab0629c6b7ce8dc03d0a3c3.zip
Add a sanity-check to tablegen to catch the case where isSimpleLoad
is set but mayLoad is not set. Fix all the problems this turned up. Change code to not use isSimpleLoad instead of mayLoad unless it really wants isSimpleLoad. llvm-svn: 60459
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenDAGPatterns.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
index 859a8ccac8d..b3ed27b8d89 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -1759,6 +1759,15 @@ static void InferFromPattern(const CodeGenInstruction &Inst,
MayLoad = true;
}
+ // Sanity-check the isSimpleLoad flag.
+ if (Inst.isSimpleLoad) {
+ if (!MayLoad)
+ fprintf(stderr,
+ "Warning: mayLoad flag not set or inferred for instruction '%s'"
+ " which has isSimpleLoad set.\n",
+ Inst.TheDef->getName().c_str());
+ }
+
if (Inst.neverHasSideEffects) {
if (HadPattern)
fprintf(stderr, "Warning: neverHasSideEffects set on instruction '%s' "
OpenPOWER on IntegriCloud