summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-02-18 09:54:39 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-02-18 09:54:40 +0000
commit35757740da77220dc51d5cff3bc3a779f2eea9ef (patch)
tree51ef8c6fda805fb3df6fee1d9ec040482660a253 /compiler/optimizing/code_generator.h
parentde7402182c1b020dec43aa38d62fa369a4ef52b8 (diff)
parentdc23d8318db08cb42e20f1d16dbc416798951a8b (diff)
Merge "Avoid generating jmp +0."
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r--compiler/optimizing/code_generator.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h
index efd0c84797..6c78f10500 100644
--- a/compiler/optimizing/code_generator.h
+++ b/compiler/optimizing/code_generator.h
@@ -91,6 +91,8 @@ class CodeGenerator {
HGraph* GetGraph() const { return graph_; }
+ HBasicBlock* GetNextBlockToEmit() const;
+ HBasicBlock* FirstNonEmptyBlock(HBasicBlock* block) const;
bool GoesToNextBlock(HBasicBlock* current, HBasicBlock* next) const;
size_t GetStackSlotOfParameter(HParameterValue* parameter) const {
@@ -314,6 +316,14 @@ class CodeGenerator {
return GetFrameSize() == (CallPushesPC() ? GetWordSize() : 0);
}
+ // Arm64 has its own type for a label, so we need to templatize this method
+ // to share the logic.
+ template <typename T>
+ T* CommonGetLabelOf(T* raw_pointer_to_labels_array, HBasicBlock* block) const {
+ block = FirstNonEmptyBlock(block);
+ return raw_pointer_to_labels_array + block->GetBlockId();
+ }
+
// Frame size required for this method.
uint32_t frame_size_;
uint32_t core_spill_mask_;