aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/IR/Statepoint.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:17:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:17:04 +0000
commitb915e9e0fc85ba6f398b3fab0db6a81a8913af94 (patch)
tree98b8f811c7aff2547cab8642daf372d6c59502fb /include/llvm/IR/Statepoint.h
parent6421cca32f69ac849537a3cff78c352195e99f1b (diff)
downloadsrc-b915e9e0fc85ba6f398b3fab0db6a81a8913af94.tar.gz
src-b915e9e0fc85ba6f398b3fab0db6a81a8913af94.zip
Vendor import of llvm trunk r290819:vendor/llvm/llvm-trunk-r290819
Notes
Notes: svn path=/vendor/llvm/dist/; revision=311116 svn path=/vendor/llvm/llvm-trunk-r290819/; revision=311117; tag=vendor/llvm/llvm-trunk-r290819
Diffstat (limited to 'include/llvm/IR/Statepoint.h')
-rw-r--r--include/llvm/IR/Statepoint.h32
1 files changed, 24 insertions, 8 deletions
diff --git a/include/llvm/IR/Statepoint.h b/include/llvm/IR/Statepoint.h
index 5cd7fe1b576c..916faa4b327e 100644
--- a/include/llvm/IR/Statepoint.h
+++ b/include/llvm/IR/Statepoint.h
@@ -1,4 +1,4 @@
-//===-- llvm/IR/Statepoint.h - gc.statepoint utilities ------ --*- C++ -*-===//
+//===-- llvm/IR/Statepoint.h - gc.statepoint utilities ----------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -19,6 +19,7 @@
#include "llvm/ADT/iterator_range.h"
#include "llvm/ADT/Optional.h"
+#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Constants.h"
@@ -26,21 +27,33 @@
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
+#include "llvm/Support/Casting.h"
+#include <cassert>
+#include <cstddef>
+#include <cstdint>
+#include <vector>
namespace llvm {
+
/// The statepoint intrinsic accepts a set of flags as its third argument.
/// Valid values come out of this set.
enum class StatepointFlags {
None = 0,
GCTransition = 1, ///< Indicates that this statepoint is a transition from
///< GC-aware code to code that is not GC-aware.
-
- MaskAll = GCTransition ///< A bitmask that includes all valid flags.
+ /// Mark the deopt arguments associated with the statepoint as only being
+ /// "live-in". By default, deopt arguments are "live-through". "live-through"
+ /// requires that they the value be live on entry, on exit, and at any point
+ /// during the call. "live-in" only requires the value be available at the
+ /// start of the call. In particular, "live-in" values can be placed in
+ /// unused argument registers or other non-callee saved registers.
+ DeoptLiveIn = 2,
+
+ MaskAll = 3 ///< A bitmask that includes all valid flags.
};
class GCRelocateInst;
class GCResultInst;
-class ImmutableStatepoint;
bool isStatepoint(ImmutableCallSite CS);
bool isStatepoint(const Value *V);
@@ -59,8 +72,6 @@ template <typename FunTy, typename InstructionTy, typename ValueTy,
typename CallSiteTy>
class StatepointBase {
CallSiteTy StatepointCS;
- void *operator new(size_t, unsigned) = delete;
- void *operator new(size_t s) = delete;
protected:
explicit StatepointBase(InstructionTy *I) {
@@ -69,6 +80,7 @@ protected:
assert(StatepointCS && "isStatepoint implies CallSite");
}
}
+
explicit StatepointBase(CallSiteTy CS) {
if (isStatepoint(CS))
StatepointCS = CS;
@@ -86,6 +98,9 @@ public:
CallArgsBeginPos = 5,
};
+ void *operator new(size_t, unsigned) = delete;
+ void *operator new(size_t s) = delete;
+
explicit operator bool() const {
// We do not assign non-statepoint CallSites to StatepointCS.
return (bool)StatepointCS;
@@ -444,6 +459,7 @@ StatepointDirectives parseStatepointDirectivesFromAttrs(AttributeSet AS);
/// Return \c true if the the \p Attr is an attribute that is a statepoint
/// directive.
bool isStatepointDirectiveAttr(Attribute Attr);
-}
-#endif
+} // end namespace llvm
+
+#endif // LLVM_IR_STATEPOINT_H