6985015: C1 needs to support compressed oops

This change implements compressed oops for C1 for x64 and sparc. The changes are mostly on the codegen level, with a few exceptions when we do access things outside of the heap that are uncompressed from the IR. Compressed oops are now also enabled with tiered.

Reviewed-by: twisti, kvn, never, phh
This commit is contained in:
Igor Veresov 2010-11-30 23:23:40 -08:00
parent 8006fe8f75
commit d59d7ffc4a
30 changed files with 493 additions and 429 deletions

View file

@ -1007,24 +1007,9 @@ static void no_shared_spaces() {
void Arguments::check_compressed_oops_compat() {
#ifdef _LP64
assert(UseCompressedOops, "Precondition");
# if defined(COMPILER1) && !defined(TIERED)
// Until c1 supports compressed oops turn them off.
FLAG_SET_DEFAULT(UseCompressedOops, false);
# else
// Is it on by default or set on ergonomically
bool is_on_by_default = FLAG_IS_DEFAULT(UseCompressedOops) || FLAG_IS_ERGO(UseCompressedOops);
// Tiered currently doesn't work with compressed oops
if (TieredCompilation) {
if (is_on_by_default) {
FLAG_SET_DEFAULT(UseCompressedOops, false);
return;
} else {
vm_exit_during_initialization(
"Tiered compilation is not supported with compressed oops yet", NULL);
}
}
// If dumping an archive or forcing its use, disable compressed oops if possible
if (DumpSharedSpaces || RequireSharedSpaces) {
if (is_on_by_default) {
@ -1038,9 +1023,7 @@ void Arguments::check_compressed_oops_compat() {
// UseSharedSpaces is on by default. With compressed oops, we turn it off.
FLAG_SET_DEFAULT(UseSharedSpaces, false);
}
# endif // defined(COMPILER1) && !defined(TIERED)
#endif // _LP64
#endif
}
void Arguments::set_tiered_flags() {
@ -3075,11 +3058,9 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
// Set flags based on ergonomics.
set_ergonomics_flags();
#ifdef _LP64
if (UseCompressedOops) {
check_compressed_oops_compat();
}
#endif
// Check the GC selections again.
if (!check_gc_consistency()) {