diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2013-07-06 00:29:58 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2013-07-06 00:29:58 +0000 |
commit | c2ec0725cedceb851858c3991fbdd36ee9ac85dd (patch) | |
tree | 841ddf4ab15a0d446543803d7124a7716619cb04 /llvm/utils/TableGen/CodeGenTarget.cpp | |
parent | e8545dde7be8fe78e64bf4d9578c25368243c274 (diff) | |
download | bcm5719-llvm-c2ec0725cedceb851858c3991fbdd36ee9ac85dd.tar.gz bcm5719-llvm-c2ec0725cedceb851858c3991fbdd36ee9ac85dd.zip |
Extend 'readonly' and 'readnone' to work on function arguments as well as
functions. Make the function attributes pass add it to known library functions
and when it can deduce it.
llvm-svn: 185735
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp index 8b292b95728..a85ad0978ca 100644 --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -552,6 +552,12 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R) { else if (Property->isSubClassOf("NoCapture")) { unsigned ArgNo = Property->getValueAsInt("ArgNo"); ArgumentAttributes.push_back(std::make_pair(ArgNo, NoCapture)); + } else if (Property->isSubClassOf("ReadOnly")) { + unsigned ArgNo = Property->getValueAsInt("ArgNo"); + ArgumentAttributes.push_back(std::make_pair(ArgNo, ReadOnly)); + } else if (Property->isSubClassOf("ReadNone")) { + unsigned ArgNo = Property->getValueAsInt("ArgNo"); + ArgumentAttributes.push_back(std::make_pair(ArgNo, ReadNone)); } else llvm_unreachable("Unknown property!"); } |