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 | 89c656657753beb33be734219429b80d02c7fff0 (patch) | |
tree | 33ca87147cb000098e20ca9d10d621f824065b3b /llvm/utils/TableGen/InstrInfoEmitter.cpp | |
parent | 0e519bb555b64dcd6ca9a43727854a6124112869 (diff) | |
download | bcm5719-llvm-89c656657753beb33be734219429b80d02c7fff0.tar.gz bcm5719-llvm-89c656657753beb33be734219429b80d02c7fff0.zip |
set the 'isstore' flag for instructions whose pattern is an
intrinsic that writes to memory.
llvm-svn: 45650
Diffstat (limited to 'llvm/utils/TableGen/InstrInfoEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/InstrInfoEmitter.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/InstrInfoEmitter.cpp b/llvm/utils/TableGen/InstrInfoEmitter.cpp index d648721c379..4ab285f58f1 100644 --- a/llvm/utils/TableGen/InstrInfoEmitter.cpp +++ b/llvm/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) |