diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-06 05:36:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-06 05:36:50 +0000 |
commit | e67bde5bb1959dbd7085981cb0bcf6f7c749f724 (patch) | |
tree | 511e04e3480c2ba0f50f9170f02118d82dfaeb99 /utils/TableGen/InstrInfoEmitter.cpp | |
parent | e81cd881b165fd4197a25e21a88e25f781754e55 (diff) | |
download | llvm-e67bde5bb1959dbd7085981cb0bcf6f7c749f724.tar.gz llvm-e67bde5bb1959dbd7085981cb0bcf6f7c749f724.tar.bz2 llvm-e67bde5bb1959dbd7085981cb0bcf6f7c749f724.tar.xz |
set the 'isstore' flag for instructions whose pattern is an
intrinsic that writes to memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/InstrInfoEmitter.cpp')
-rw-r--r-- | utils/TableGen/InstrInfoEmitter.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp index d648721c37..4ab285f58f 100644 --- a/utils/TableGen/InstrInfoEmitter.cpp +++ b/utils/TableGen/InstrInfoEmitter.cpp @@ -176,8 +176,15 @@ private: // Get information about the SDNode for the operator. const SDNodeInfo &OpInfo = CDP.getSDNodeInfo(N->getOperator()); - if (OpInfo.getEnumName() == "ISD::STORE") + // If this is a store node, it obviously stores to memory. + if (OpInfo.getEnumName() == "ISD::STORE") { isStore = true; + + } else if (const CodeGenIntrinsic *IntInfo = N->getIntrinsicInfo(CDP)) { + // If this is an intrinsic, analyze it. + if (IntInfo->ModRef >= CodeGenIntrinsic::WriteArgMem) + isStore = true; // Intrinsics that can write to memory are 'isStore'. + } } for (unsigned i = 0, e = N->getNumChildren(); i != e; ++i) |