Clean up creating constant locations.
Change `Location::ConstantLocation()` to allow passing any
instruction and `DCHECK()` that it is indeed a constant.
Skip explicit calls to `HInstruction::AsConstant()` before
calling `Location::ConstantLocation()`.
Also cache results of `instuction->InputAt(.)` in some cases
when it's used more than once.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: run-gtests.sh
Test: testrunner.py --target --optimizing
Change-Id: I3c07642f6b3523b576ec229e4d234561ad74a20e
15 files changed