From e8a822d2209a644f30fc1b6db3c70ec5faf2b79a Mon Sep 17 00:00:00 2001 From: Santiago Aboy Solanes Date: Mon, 13 Sep 2021 14:40:53 +0100 Subject: Remove entry SuspendCheck for methods which only call on the slow path We can skip SuspendCheck if the method is e.g. a leaf method with a read barrier call in the slow path. Bug: 135477345 Test: ART tests Change-Id: I6e04f10544ec61b46bb5763a88c28248e88193bf --- compiler/optimizing/code_generator.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'compiler/optimizing/code_generator.h') diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index 99de61ddce..cf59be86bf 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -403,6 +403,14 @@ class CodeGenerator : public DeletableArenaObject { requires_current_method_ = true; } + bool NeedsSuspendCheckEntry() const { + return needs_suspend_check_entry_; + } + + void MarkNeedsSuspendCheckEntry() { + needs_suspend_check_entry_ = true; + } + void SetRequiresCurrentMethod() { requires_current_method_ = true; } @@ -855,6 +863,9 @@ class CodeGenerator : public DeletableArenaObject { // Whether the method is a leaf method. bool is_leaf_; + // Whether the method has to emit a SuspendCheck at entry. + bool needs_suspend_check_entry_; + // Whether an instruction in the graph accesses the current method. // TODO: Rename: this actually indicates that some instruction in the method // needs the environment including a valid stack frame. -- cgit v1.2.3-59-g8ed1b