diff options
Diffstat (limited to 'compiler/optimizing/nodes.h')
| -rw-r--r-- | compiler/optimizing/nodes.h | 47 | 
1 files changed, 11 insertions, 36 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index befd0ff97b..ffa16dd787 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -1410,12 +1410,7 @@ class HLoopInformationOutwardIterator : public ValueObject {    M(IntermediateAddressIndex, Instruction)  #endif -#ifndef ART_ENABLE_CODEGEN_arm  #define FOR_EACH_CONCRETE_INSTRUCTION_ARM(M) -#else -#define FOR_EACH_CONCRETE_INSTRUCTION_ARM(M)                            \ -  M(ArmDexCacheArraysBase, Instruction) -#endif  #define FOR_EACH_CONCRETE_INSTRUCTION_ARM64(M) @@ -1424,7 +1419,6 @@ class HLoopInformationOutwardIterator : public ValueObject {  #else  #define FOR_EACH_CONCRETE_INSTRUCTION_MIPS(M)                           \    M(MipsComputeBaseMethodAddress, Instruction)                          \ -  M(MipsDexCacheArraysBase, Instruction)                                \    M(MipsPackedSwitch, Instruction)  #endif @@ -1485,7 +1479,8 @@ FOR_EACH_INSTRUCTION(FORWARD_DECLARATION)    H##type* As##type() { return this; }  template <typename T> -class HUseListNode : public ArenaObject<kArenaAllocUseListNode> { +class HUseListNode : public ArenaObject<kArenaAllocUseListNode>, +                     public IntrusiveForwardListNode<HUseListNode<T>> {   public:    // Get the instruction which has this use as one of the inputs.    T GetUser() const { return user_; } @@ -1494,10 +1489,6 @@ class HUseListNode : public ArenaObject<kArenaAllocUseListNode> {    // Set the position of the input record that this use corresponds to.    void SetIndex(size_t index) { index_ = index; } -  // Hook for the IntrusiveForwardList<>. -  // TODO: Hide this better. -  IntrusiveForwardListHook hook; -   private:    HUseListNode(T user, size_t index)        : user_(user), index_(index) {} @@ -4166,17 +4157,13 @@ class HInvokeStaticOrDirect FINAL : public HInvoke {      // Used for app->boot calls with non-relocatable image and for JIT-compiled calls.      kDirectAddress, -    // Load from resolved methods array in the dex cache using a PC-relative load. -    // Used when we need to use the dex cache, for example for invoke-static that -    // may cause class initialization (the entry may point to a resolution method), -    // and we know that we can access the dex cache arrays using a PC-relative load. -    kDexCachePcRelative, - -    // Use ArtMethod* from the resolved methods of the compiled method's own ArtMethod*. -    // Used for JIT when we need to use the dex cache. This is also the last-resort-kind -    // used when other kinds are unavailable (say, dex cache arrays are not PC-relative) -    // or unimplemented or impractical (i.e. slow) on a particular architecture. -    kDexCacheViaMethod, +    // Load from an entry in the .bss section using a PC-relative load. +    // Used for classes outside boot image when .bss is accessible with a PC-relative load. +    kBssEntry, + +    // Make a runtime call to resolve and call the method. This is the last-resort-kind +    // used when other kinds are unimplemented on a particular architecture. +    kRuntimeCall,    };    // Determines the location of the code pointer. @@ -4197,7 +4184,6 @@ class HInvokeStaticOrDirect FINAL : public HInvoke {      //   - thread entrypoint offset for kStringInit method if this is a string init invoke.      //     Note that there are multiple string init methods, each having its own offset.      //   - the method address for kDirectAddress -    //   - the dex cache arrays offset for kDexCachePcRel.      uint64_t method_load_data;    }; @@ -4298,12 +4284,9 @@ class HInvokeStaticOrDirect FINAL : public HInvoke {    bool NeedsDexCacheOfDeclaringClass() const OVERRIDE;    bool IsStringInit() const { return GetMethodLoadKind() == MethodLoadKind::kStringInit; }    bool HasMethodAddress() const { return GetMethodLoadKind() == MethodLoadKind::kDirectAddress; } -  bool HasPcRelativeDexCache() const { -    return GetMethodLoadKind() == MethodLoadKind::kDexCachePcRelative; -  }    bool HasPcRelativeMethodLoadKind() const {      return GetMethodLoadKind() == MethodLoadKind::kBootImageLinkTimePcRelative || -           GetMethodLoadKind() == MethodLoadKind::kDexCachePcRelative; +           GetMethodLoadKind() == MethodLoadKind::kBssEntry;    }    bool HasCurrentMethodInput() const {      // This function can be called only after the invoke has been fully initialized by the builder. @@ -4327,11 +4310,6 @@ class HInvokeStaticOrDirect FINAL : public HInvoke {      return dispatch_info_.method_load_data;    } -  uint32_t GetDexCacheArrayOffset() const { -    DCHECK(HasPcRelativeDexCache()); -    return dispatch_info_.method_load_data; -  } -    const DexFile& GetDexFileForPcRelativeDexCache() const;    ClinitCheckRequirement GetClinitCheckRequirement() const { @@ -4376,7 +4354,7 @@ class HInvokeStaticOrDirect FINAL : public HInvoke {    // Does this method load kind need the current method as an input?    static bool NeedsCurrentMethodInput(MethodLoadKind kind) { -    return kind == MethodLoadKind::kRecursive || kind == MethodLoadKind::kDexCacheViaMethod; +    return kind == MethodLoadKind::kRecursive || kind == MethodLoadKind::kRuntimeCall;    }    DECLARE_INSTRUCTION(InvokeStaticOrDirect); @@ -6881,9 +6859,6 @@ class HParallelMove FINAL : public HTemplateInstruction<0> {  #if defined(ART_ENABLE_CODEGEN_arm) || defined(ART_ENABLE_CODEGEN_arm64)  #include "nodes_shared.h"  #endif -#ifdef ART_ENABLE_CODEGEN_arm -#include "nodes_arm.h" -#endif  #ifdef ART_ENABLE_CODEGEN_mips  #include "nodes_mips.h"  #endif  |