mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Partially address a README by having functionattrs consider calls to
memcpy, memset and other intrinsics that only access their arguments to be readnone if the intrinsic's arguments all point to local memory. This improves the testcase in the README to readonly, but it could in theory be made readnone, however this would involve more sophisticated analysis that looks through the memcpy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92829 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -522,7 +522,7 @@ void IntrinsicEmitter::
|
||||
EmitModRefBehavior(const std::vector<CodeGenIntrinsic> &Ints, raw_ostream &OS){
|
||||
OS << "// Determine intrinsic alias analysis mod/ref behavior.\n";
|
||||
OS << "#ifdef GET_INTRINSIC_MODREF_BEHAVIOR\n";
|
||||
OS << "switch (id) {\n";
|
||||
OS << "switch (iid) {\n";
|
||||
OS << "default:\n return UnknownModRefBehavior;\n";
|
||||
for (unsigned i = 0, e = Ints.size(); i != e; ++i) {
|
||||
if (Ints[i].ModRef == CodeGenIntrinsic::WriteMem)
|
||||
|
Reference in New Issue
Block a user