diff options
author | 2016-03-09 11:10:16 +0000 | |
---|---|---|
committer | 2016-07-25 14:10:37 +0100 | |
commit | 806f0122e923581f559043e82cf958bab5defc87 (patch) | |
tree | c297dd93b213ce174558f7b63ead3f174ff1a90c /compiler/optimizing/locations.h | |
parent | c4aa8961819c78a0fb2ed342ed374d4aaeb4255c (diff) |
Add support for CallKind::kCallOnMainAndSlowPath
Some of the intrinsics call on both the main and slowpath. This patch
adds support for such a CallKind and marks the intrinsics accordingly.
This will be exercised by a later patch that refactors all the runtime
calls to use InvokeRuntime().
Please note that without this patch, the calls to ValidateInvokeRuntime()
exercised by the following patches would fail.
Change-Id: I450571b8b47280a004b714996189ba6db13fb57d
Diffstat (limited to 'compiler/optimizing/locations.h')
-rw-r--r-- | compiler/optimizing/locations.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/compiler/optimizing/locations.h b/compiler/optimizing/locations.h index 7a78bfdc8d..8031a9c9e1 100644 --- a/compiler/optimizing/locations.h +++ b/compiler/optimizing/locations.h @@ -480,6 +480,7 @@ class LocationSummary : public ArenaObject<kArenaAllocLocationSummary> { public: enum CallKind { kNoCall, + kCallOnMainAndSlowPath, kCallOnSlowPath, kCallOnMainOnly }; @@ -540,10 +541,29 @@ class LocationSummary : public ArenaObject<kArenaAllocLocationSummary> { Location Out() const { return output_; } - bool CanCall() const { return call_kind_ != kNoCall; } - bool WillCall() const { return call_kind_ == kCallOnMainOnly; } - bool OnlyCallsOnSlowPath() const { return call_kind_ == kCallOnSlowPath; } - bool NeedsSafepoint() const { return CanCall(); } + bool CanCall() const { + return call_kind_ != kNoCall; + } + + bool WillCall() const { + return call_kind_ == kCallOnMainOnly || call_kind_ == kCallOnMainAndSlowPath; + } + + bool CallsOnSlowPath() const { + return call_kind_ == kCallOnSlowPath || call_kind_ == kCallOnMainAndSlowPath; + } + + bool OnlyCallsOnSlowPath() const { + return call_kind_ == kCallOnSlowPath; + } + + bool CallsOnMainAndSlowPath() const { + return call_kind_ == kCallOnMainAndSlowPath; + } + + bool NeedsSafepoint() const { + return CanCall(); + } void SetStackBit(uint32_t index) { stack_mask_->SetBit(index); |