diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-07-22 23:15:57 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-07-22 23:15:57 +0000 |
commit | 194f59ca5d2f48f1e0b7fa95971ae9f88e95ba95 (patch) | |
tree | 67fa8610cb1dccceeb055c823d16d438fed256d5 /llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | |
parent | 16fe4d178e9d81b07e8deb59a4b4292850364898 (diff) | |
download | bcm5719-llvm-194f59ca5d2f48f1e0b7fa95971ae9f88e95ba95.tar.gz bcm5719-llvm-194f59ca5d2f48f1e0b7fa95971ae9f88e95ba95.zip |
[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
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp index 286a5633024..42c20339d5a 100644 --- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp @@ -1867,15 +1867,15 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> { }; static IntrinsicKind getIntrinsicKind(Intrinsic::ID iid) { - const int DoesNotAccessMemory = IK_DoesNotAccessMemory; - const int OnlyReadsArgumentPointees = IK_OnlyReadsMemory; - const int OnlyReadsMemory = IK_OnlyReadsMemory; - const int OnlyAccessesArgumentPointees = IK_WritesMemory; - const int UnknownModRefBehavior = IK_WritesMemory; + const int FMRB_DoesNotAccessMemory = IK_DoesNotAccessMemory; + const int FMRB_OnlyReadsArgumentPointees = IK_OnlyReadsMemory; + const int FMRB_OnlyReadsMemory = IK_OnlyReadsMemory; + const int FMRB_OnlyAccessesArgumentPointees = IK_WritesMemory; + const int FMRB_UnknownModRefBehavior = IK_WritesMemory; #define GET_INTRINSIC_MODREF_BEHAVIOR -#define ModRefBehavior IntrinsicKind +#define FunctionModRefBehavior IntrinsicKind #include "llvm/IR/Intrinsics.gen" -#undef ModRefBehavior +#undef FunctionModRefBehavior #undef GET_INTRINSIC_MODREF_BEHAVIOR } |