Revision: 19157
Author: [email protected]
Date: Thu Feb 6 13:25:58 2014 UTC
Log: A64: Disable inlining of functions that have a different context
On A64, the register allocator doesn't have control of cp, so we can't
arbitrarily switch the context
BUG=none
[email protected], [email protected], [email protected]
LOG=n
Review URL: https://codereview.chromium.org/153623010
http://code.google.com/p/v8/source/detail?r=19157
Modified:
/branches/experimental/a64/src/hydrogen.cc
=======================================
--- /branches/experimental/a64/src/hydrogen.cc Thu Feb 6 11:53:35 2014 UTC
+++ /branches/experimental/a64/src/hydrogen.cc Thu Feb 6 13:25:58 2014 UTC
@@ -7022,6 +7022,19 @@
TraceInline(target, caller, "target AST is too large [early]");
return false;
}
+
+#if V8_TARGET_ARCH_A64
+ // Target must be able to use caller's context.
+ // TODO(jochen): Remove this block once A64's register allocator can
allocate
+ // cp.
+ CompilationInfo* outer_info = current_info();
+ if (target->context() != outer_info->closure()->context() ||
+ outer_info->scope()->contains_with() ||
+ outer_info->scope()->num_heap_slots() > 0) {
+ TraceInline(target, caller, "target requires context change");
+ return false;
+ }
+#endif
// Don't inline deeper than the maximum number of inlining levels.
HEnvironment* env = environment();
@@ -7161,8 +7174,12 @@
function_state()->inlining_kind(),
undefined_receiver);
+// TODO(jochen): Remove this #ifdef once A64's register allocator can
allocate
+// cp.
+#if !V8_TARGET_ARCH_A64
HConstant* context = Add<HConstant>(Handle<Context>(target->context()));
inner_env->BindContext(context);
+#endif
Add<HSimulate>(return_id);
current_block()->UpdateEnvironment(inner_env);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.