summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/register_allocator.cc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-12-29 17:43:08 -0800
committerAndreas Gampe <agampe@google.com>2015-01-15 10:21:11 -0800
commit71fb52fee246b7d511f520febbd73dc7a9bbca79 (patch)
tree444d91e910433aaf887bbdada28dfaa3160bebc2 /compiler/optimizing/register_allocator.cc
parent420457e6040184a6e1639a4c84fcc8e237bd8a3d (diff)
downloadart-71fb52fee246b7d511f520febbd73dc7a9bbca79.tar.gz
art-71fb52fee246b7d511f520febbd73dc7a9bbca79.tar.bz2
art-71fb52fee246b7d511f520febbd73dc7a9bbca79.zip
ART: Optimizing compiler intrinsics
Add intrinsics infrastructure to the optimizing compiler. Add almost all intrinsics supported by Quick to the x86-64 backend. Further intrinsics require more assembler support. Change-Id: I48de9b44c82886bb298d16e74e12a9506b8e8807
Diffstat (limited to 'compiler/optimizing/register_allocator.cc')
-rw-r--r--compiler/optimizing/register_allocator.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/compiler/optimizing/register_allocator.cc b/compiler/optimizing/register_allocator.cc
index d2f4f9b7dc..1d155f9b5d 100644
--- a/compiler/optimizing/register_allocator.cc
+++ b/compiler/optimizing/register_allocator.cc
@@ -1217,10 +1217,17 @@ void RegisterAllocator::ConnectSiblings(LiveInterval* interval) {
locations->SetEnvironmentAt(use->GetInputIndex(), source);
} else {
Location expected_location = locations->InAt(use->GetInputIndex());
- if (expected_location.IsUnallocated()) {
- locations->SetInAt(use->GetInputIndex(), source);
- } else if (!expected_location.IsConstant()) {
- AddInputMoveFor(use->GetUser(), source, expected_location);
+ // The expected (actual) location may be invalid in case the input is unused. Currently
+ // this only happens for intrinsics.
+ if (expected_location.IsValid()) {
+ if (expected_location.IsUnallocated()) {
+ locations->SetInAt(use->GetInputIndex(), source);
+ } else if (!expected_location.IsConstant()) {
+ AddInputMoveFor(use->GetUser(), source, expected_location);
+ }
+ } else {
+ DCHECK(use->GetUser()->IsInvoke());
+ DCHECK(use->GetUser()->AsInvoke()->GetIntrinsic() != Intrinsics::kNone);
}
}
use = use->GetNext();