[ptr-compr][csa] Define optimal parameter mode as Smi
This generates slightly better code and gives some performance. Bug: v8:8948 Change-Id: I958fed109c85d2b1a413c82b37e56a39766dd172 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1762295 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Auto-Submit: Igor Sheludko <ishell@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#63309}
This commit is contained in:
parent
c4e0dd7422
commit
861f09d6b7
@ -220,7 +220,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
// fewer live ranges. Thus only convert indices to untagged value on 64-bit
|
||||
// platforms.
|
||||
ParameterMode OptimalParameterMode() const {
|
||||
return Is64() ? INTPTR_PARAMETERS : SMI_PARAMETERS;
|
||||
return !COMPRESS_POINTERS_BOOL && Is64() ? INTPTR_PARAMETERS
|
||||
: SMI_PARAMETERS;
|
||||
}
|
||||
|
||||
MachineRepresentation ParameterRepresentation(ParameterMode mode) const {
|
||||
@ -275,7 +276,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(V8_HOST_ARCH_32_BIT)
|
||||
#if defined(V8_HOST_ARCH_32_BIT) || defined(V8_COMPRESS_POINTERS)
|
||||
TNode<Smi> BIntToSmi(TNode<BInt> source) { return source; }
|
||||
TNode<IntPtrT> BIntToIntPtr(TNode<BInt> source) {
|
||||
return SmiToIntPtr(source);
|
||||
|
@ -1834,7 +1834,7 @@ class V8_EXPORT_PRIVATE CodeAssemblerScopedExceptionHandler {
|
||||
|
||||
} // namespace compiler
|
||||
|
||||
#if defined(V8_HOST_ARCH_32_BIT)
|
||||
#if defined(V8_HOST_ARCH_32_BIT) || defined(V8_COMPRESS_POINTERS)
|
||||
using BInt = Smi;
|
||||
#elif defined(V8_HOST_ARCH_64_BIT)
|
||||
using BInt = IntPtrT;
|
||||
|
Loading…
Reference in New Issue
Block a user