From 194f59ca5d2f48f1e0b7fa95971ae9f88e95ba95 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Wed, 22 Jul 2015 23:15:57 +0000 Subject: [PM/AA] Extract the ModRef enums from the AliasAnalysis class in preparation for de-coupling the AA implementations. In order to do this, they had to become fake-scoped using the traditional LLVM pattern of a leading initialism. These can't be actual scoped enumerations because they're bitfields and thus inherently we use them as integers. I've also renamed the behavior enums that are specific to reasoning about the mod/ref behavior of functions when called. This makes it more clear that they have a very narrow domain of applicability. I think there is a significantly cleaner API for all of this, but I don't want to try to do really substantive changes for now, I just want to refactor the things away from analysis groups so I'm preserving the exact original design and just cleaning up the names, style, and lifting out of the class. Differential Revision: http://reviews.llvm.org/D10564 llvm-svn: 242963 --- llvm/utils/TableGen/IntrinsicEmitter.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'llvm/utils/TableGen') diff --git a/llvm/utils/TableGen/IntrinsicEmitter.cpp b/llvm/utils/TableGen/IntrinsicEmitter.cpp index 2b59ee69d16..18a8db6b534 100644 --- a/llvm/utils/TableGen/IntrinsicEmitter.cpp +++ b/llvm/utils/TableGen/IntrinsicEmitter.cpp @@ -722,29 +722,30 @@ EmitModRefBehavior(const std::vector &Ints, raw_ostream &OS){ << "\"Unknown intrinsic.\");\n\n"; OS << "static const uint8_t IntrinsicModRefBehavior[] = {\n" - << " /* invalid */ UnknownModRefBehavior,\n"; + << " /* invalid */ FMRB_UnknownModRefBehavior,\n"; for (unsigned i = 0, e = Ints.size(); i != e; ++i) { OS << " /* " << TargetPrefix << Ints[i].EnumName << " */ "; switch (Ints[i].ModRef) { case CodeGenIntrinsic::NoMem: - OS << "DoesNotAccessMemory,\n"; + OS << "FMRB_DoesNotAccessMemory,\n"; break; case CodeGenIntrinsic::ReadArgMem: - OS << "OnlyReadsArgumentPointees,\n"; + OS << "FMRB_OnlyReadsArgumentPointees,\n"; break; case CodeGenIntrinsic::ReadMem: - OS << "OnlyReadsMemory,\n"; + OS << "FMRB_OnlyReadsMemory,\n"; break; case CodeGenIntrinsic::ReadWriteArgMem: - OS << "OnlyAccessesArgumentPointees,\n"; + OS << "FMRB_OnlyAccessesArgumentPointees,\n"; break; case CodeGenIntrinsic::ReadWriteMem: - OS << "UnknownModRefBehavior,\n"; + OS << "FMRB_UnknownModRefBehavior,\n"; break; } } OS << "};\n\n" - << "return static_cast(IntrinsicModRefBehavior[iid]);\n" + << "return " + "static_cast(IntrinsicModRefBehavior[iid]);\n" << "#endif // GET_INTRINSIC_MODREF_BEHAVIOR\n\n"; } -- cgit v1.2.3