[llvm] r263733 - [Statepoints] Export a magic constant into a header; NFC

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 17 11:42:18 PDT 2016


Author: sanjoy
Date: Thu Mar 17 13:42:17 2016
New Revision: 263733

URL: http://llvm.org/viewvc/llvm-project?rev=263733&view=rev
Log:
[Statepoints] Export a magic constant into a header; NFC

Modified:
    llvm/trunk/include/llvm/IR/Statepoint.h
    llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

Modified: llvm/trunk/include/llvm/IR/Statepoint.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Statepoint.h?rev=263733&r1=263732&r2=263733&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Statepoint.h (original)
+++ llvm/trunk/include/llvm/IR/Statepoint.h Thu Mar 17 13:42:17 2016
@@ -409,6 +409,8 @@ StatepointBase<FunTy, InstructionTy, Val
 struct StatepointDirectives {
   Optional<uint32_t> NumPatchBytes;
   Optional<uint64_t> StatepointID;
+
+  static const uint64_t DefaultStatepointID = 0xABCDEF00;
 };
 
 /// Parse out statepoint directives from the function attributes present in \p

Modified: llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp?rev=263733&r1=263732&r2=263733&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp Thu Mar 17 13:42:17 2016
@@ -1318,7 +1318,7 @@ makeStatepointExplicitImpl(const CallSit
   IRBuilder<> Builder(InsertBefore);
 
   ArrayRef<Value *> GCArgs(LiveVariables);
-  uint64_t StatepointID = 0xABCDEF00;
+  uint64_t StatepointID = StatepointDirectives::DefaultStatepointID;
   uint32_t NumPatchBytes = 0;
   uint32_t Flags = uint32_t(StatepointFlags::None);
 




More information about the llvm-commits mailing list