summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.h
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2017-10-15 19:01:32 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2017-10-15 19:01:32 +0000
commitadbf58dc0b3cc85f02c379ee372c9fc06517e227 (patch)
tree0a9347b18269102aa01cc5c3f6e1d6258c4a2ee6 /llvm/utils/TableGen/CodeGenDAGPatterns.h
parent6d989436d063502266f8bc27007e6bb294ef4ec7 (diff)
downloadbcm5719-llvm-adbf58dc0b3cc85f02c379ee372c9fc06517e227.tar.gz
bcm5719-llvm-adbf58dc0b3cc85f02c379ee372c9fc06517e227.zip
[tablegen] Use hasPredCode()/hasImmCode() instead of getPredCode().empty()/getImmCode().empty(). NFC
These are cheaper ways of testing for the presence of code than generating the C++ code and testing it's empty. llvm-svn: 315872
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.h')
-rw-r--r--llvm/utils/TableGen/CodeGenDAGPatterns.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.h b/llvm/utils/TableGen/CodeGenDAGPatterns.h
index 5b047bc182d..1f7e9fb98d3 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.h
+++ b/llvm/utils/TableGen/CodeGenDAGPatterns.h
@@ -447,7 +447,7 @@ public:
/// isAlwaysTrue - Return true if this is a noop predicate.
bool isAlwaysTrue() const;
- bool isImmediatePattern() const { return !getImmCode().empty(); }
+ bool isImmediatePattern() const { return hasImmCode(); }
/// getImmediatePredicateCode - Return the code that evaluates this pattern if
/// this is an immediate predicate. It is an error to call this on a
@@ -511,6 +511,8 @@ public:
Record *getScalarMemoryVT() const;
private:
+ bool hasPredCode() const;
+ bool hasImmCode() const;
std::string getPredCode() const;
std::string getImmCode() const;
bool immCodeUsesAPInt() const;
OpenPOWER on IntegriCloud