src/share/vm/shark/sharkBuilder.hpp

changeset 4314
2cd5e15048e6
parent 2314
f95d63e2154a
child 6876
710a3c8b516e
     1.1 --- a/src/share/vm/shark/sharkBuilder.hpp	Mon Nov 26 17:25:11 2012 -0800
     1.2 +++ b/src/share/vm/shark/sharkBuilder.hpp	Tue Nov 27 12:48:52 2012 -0800
     1.3 @@ -53,22 +53,37 @@
     1.4      return _code_buffer;
     1.5    }
     1.6  
     1.7 + public:
     1.8 +  llvm::LoadInst* CreateAtomicLoad(llvm::Value* ptr,
     1.9 +                                   unsigned align = HeapWordSize,
    1.10 +                                   llvm::AtomicOrdering ordering = llvm::SequentiallyConsistent,
    1.11 +                                   llvm::SynchronizationScope synchScope = llvm::CrossThread,
    1.12 +                                   bool isVolatile = true,
    1.13 +                                   const char *name = "");
    1.14 +  llvm::StoreInst* CreateAtomicStore(llvm::Value *val,
    1.15 +                                     llvm::Value *ptr,
    1.16 +                                     unsigned align = HeapWordSize,
    1.17 +                                     llvm::AtomicOrdering ordering = llvm::SequentiallyConsistent,
    1.18 +                                     llvm::SynchronizationScope SynchScope = llvm::CrossThread,
    1.19 +                                     bool isVolatile = true,
    1.20 +                                     const char *name = "");
    1.21 +
    1.22    // Helpers for accessing structures.
    1.23   public:
    1.24    llvm::Value* CreateAddressOfStructEntry(llvm::Value* base,
    1.25                                            ByteSize offset,
    1.26 -                                          const llvm::Type* type,
    1.27 +                                          llvm::Type* type,
    1.28                                            const char *name = "");
    1.29    llvm::LoadInst* CreateValueOfStructEntry(llvm::Value* base,
    1.30                                             ByteSize offset,
    1.31 -                                           const llvm::Type* type,
    1.32 +                                           llvm::Type* type,
    1.33                                             const char *name = "");
    1.34  
    1.35    // Helpers for accessing arrays.
    1.36   public:
    1.37    llvm::LoadInst* CreateArrayLength(llvm::Value* arrayoop);
    1.38    llvm::Value* CreateArrayAddress(llvm::Value*      arrayoop,
    1.39 -                                  const llvm::Type* element_type,
    1.40 +                                  llvm::Type* element_type,
    1.41                                    int               element_bytes,
    1.42                                    ByteSize          base_offset,
    1.43                                    llvm::Value*      index,
    1.44 @@ -85,8 +100,8 @@
    1.45  
    1.46    // Helpers for creating intrinsics and external functions.
    1.47   private:
    1.48 -  static const llvm::Type* make_type(char type, bool void_ok);
    1.49 -  static const llvm::FunctionType* make_ftype(const char* params,
    1.50 +  static llvm::Type* make_type(char type, bool void_ok);
    1.51 +  static llvm::FunctionType* make_ftype(const char* params,
    1.52                                                const char* ret);
    1.53    llvm::Value* make_function(const char* name,
    1.54                               const char* params,
    1.55 @@ -165,7 +180,6 @@
    1.56    llvm::Value* cmpxchg_int();
    1.57    llvm::Value* cmpxchg_ptr();
    1.58    llvm::Value* frame_address();
    1.59 -  llvm::Value* memory_barrier();
    1.60    llvm::Value* memset();
    1.61    llvm::Value* unimplemented();
    1.62    llvm::Value* should_not_reach_here();
    1.63 @@ -173,14 +187,7 @@
    1.64  
    1.65    // Public interface to low-level non-VM calls.
    1.66   public:
    1.67 -  llvm::CallInst* CreateCmpxchgInt(llvm::Value* exchange_value,
    1.68 -                                   llvm::Value* dst,
    1.69 -                                   llvm::Value* compare_value);
    1.70 -  llvm::CallInst* CreateCmpxchgPtr(llvm::Value* exchange_value,
    1.71 -                                   llvm::Value* dst,
    1.72 -                                   llvm::Value* compare_value);
    1.73    llvm::CallInst* CreateGetFrameAddress();
    1.74 -  llvm::CallInst* CreateMemoryBarrier(int flags);
    1.75    llvm::CallInst* CreateMemset(llvm::Value* dst,
    1.76                                 llvm::Value* value,
    1.77                                 llvm::Value* len,
    1.78 @@ -189,15 +196,6 @@
    1.79    llvm::CallInst* CreateShouldNotReachHere(const char* file, int line);
    1.80    NOT_PRODUCT(llvm::CallInst* CreateDump(llvm::Value* value));
    1.81  
    1.82 -  // Flags for CreateMemoryBarrier.
    1.83 - public:
    1.84 -  enum BarrierFlags {
    1.85 -    BARRIER_LOADLOAD   = 1,
    1.86 -    BARRIER_LOADSTORE  = 2,
    1.87 -    BARRIER_STORELOAD  = 4,
    1.88 -    BARRIER_STORESTORE = 8
    1.89 -  };
    1.90 -
    1.91    // HotSpot memory barriers
    1.92   public:
    1.93    void CreateUpdateBarrierSet(BarrierSet* bs, llvm::Value* field);
    1.94 @@ -209,9 +207,14 @@
    1.95    llvm::Value* CreateInlineOop(ciObject* object, const char* name = "") {
    1.96      return CreateInlineOop(object->constant_encoding(), name);
    1.97    }
    1.98 +
    1.99 +  llvm::Value* CreateInlineMetadata(Metadata* metadata, llvm::PointerType* type, const char* name = "");
   1.100 +  llvm::Value* CreateInlineMetadata(ciMetadata* metadata, llvm::PointerType* type, const char* name = "") {
   1.101 +    return CreateInlineMetadata(metadata->constant_encoding(), type, name);
   1.102 +  }
   1.103    llvm::Value* CreateInlineData(void*             data,
   1.104                                  size_t            size,
   1.105 -                                const llvm::Type* type,
   1.106 +                                llvm::Type* type,
   1.107                                  const char*       name = "");
   1.108  
   1.109    // Helpers for creating basic blocks.
   1.110 @@ -222,5 +225,4 @@
   1.111    llvm::BasicBlock* CreateBlock(llvm::BasicBlock* ip,
   1.112                                  const char*       name="") const;
   1.113  };
   1.114 -
   1.115 -#endif // SHARE_VM_SHARK_SHARKBUILDER_HPP
   1.116 +  #endif // SHARE_VM_SHARK_SHARKBUILDER_HPP

mercurial