src/share/vm/shark/sharkBuilder.hpp
Print this page
rev 3850 : [mq]: shark.patch
*** 51,76 ****
protected:
SharkCodeBuffer* code_buffer() const {
return _code_buffer;
}
// Helpers for accessing structures.
public:
llvm::Value* CreateAddressOfStructEntry(llvm::Value* base,
ByteSize offset,
! const llvm::Type* type,
const char *name = "");
llvm::LoadInst* CreateValueOfStructEntry(llvm::Value* base,
ByteSize offset,
! const llvm::Type* type,
const char *name = "");
// Helpers for accessing arrays.
public:
llvm::LoadInst* CreateArrayLength(llvm::Value* arrayoop);
llvm::Value* CreateArrayAddress(llvm::Value* arrayoop,
! const llvm::Type* element_type,
int element_bytes,
ByteSize base_offset,
llvm::Value* index,
const char* name = "");
llvm::Value* CreateArrayAddress(llvm::Value* arrayoop,
--- 51,91 ----
protected:
SharkCodeBuffer* code_buffer() const {
return _code_buffer;
}
+ public:
+ llvm::LoadInst* CreateAtomicLoad(llvm::Value* ptr,
+ unsigned align = HeapWordSize,
+ llvm::AtomicOrdering ordering = llvm::SequentiallyConsistent,
+ llvm::SynchronizationScope synchScope = llvm::CrossThread,
+ bool isVolatile = false,
+ const char *name = "");
+ llvm::StoreInst* CreateAtomicStore(llvm::Value *val,
+ llvm::Value *ptr,
+ unsigned align = HeapWordSize,
+ llvm::AtomicOrdering ordering = llvm::SequentiallyConsistent,
+ llvm::SynchronizationScope SynchScope = llvm::CrossThread,
+ bool isVolatile = false,
+ const char *name = "");
+
// Helpers for accessing structures.
public:
llvm::Value* CreateAddressOfStructEntry(llvm::Value* base,
ByteSize offset,
! llvm::Type* type,
const char *name = "");
llvm::LoadInst* CreateValueOfStructEntry(llvm::Value* base,
ByteSize offset,
! llvm::Type* type,
const char *name = "");
// Helpers for accessing arrays.
public:
llvm::LoadInst* CreateArrayLength(llvm::Value* arrayoop);
llvm::Value* CreateArrayAddress(llvm::Value* arrayoop,
! llvm::Type* element_type,
int element_bytes,
ByteSize base_offset,
llvm::Value* index,
const char* name = "");
llvm::Value* CreateArrayAddress(llvm::Value* arrayoop,
*** 83,94 ****
llvm::Value* index,
const char* name = "");
// Helpers for creating intrinsics and external functions.
private:
! static const llvm::Type* make_type(char type, bool void_ok);
! static const llvm::FunctionType* make_ftype(const char* params,
const char* ret);
llvm::Value* make_function(const char* name,
const char* params,
const char* ret);
llvm::Value* make_function(address func,
--- 98,109 ----
llvm::Value* index,
const char* name = "");
// Helpers for creating intrinsics and external functions.
private:
! static llvm::Type* make_type(char type, bool void_ok);
! static llvm::FunctionType* make_ftype(const char* params,
const char* ret);
llvm::Value* make_function(const char* name,
const char* params,
const char* ret);
llvm::Value* make_function(address func,
*** 171,188 ****
llvm::Value* should_not_reach_here();
llvm::Value* dump();
// Public interface to low-level non-VM calls.
public:
- llvm::CallInst* CreateCmpxchgInt(llvm::Value* exchange_value,
- llvm::Value* dst,
- llvm::Value* compare_value);
- llvm::CallInst* CreateCmpxchgPtr(llvm::Value* exchange_value,
- llvm::Value* dst,
- llvm::Value* compare_value);
llvm::CallInst* CreateGetFrameAddress();
- llvm::CallInst* CreateMemoryBarrier(int flags);
llvm::CallInst* CreateMemset(llvm::Value* dst,
llvm::Value* value,
llvm::Value* len,
llvm::Value* align);
llvm::CallInst* CreateUnimplemented(const char* file, int line);
--- 186,196 ----
*** 207,226 ****
llvm::Value* code_buffer_address(int offset);
llvm::Value* CreateInlineOop(jobject object, const char* name = "");
llvm::Value* CreateInlineOop(ciObject* object, const char* name = "") {
return CreateInlineOop(object->constant_encoding(), name);
}
llvm::Value* CreateInlineData(void* data,
size_t size,
! const llvm::Type* type,
const char* name = "");
// Helpers for creating basic blocks.
// NB don't use unless SharkFunction::CreateBlock is unavailable.
// XXX these are hacky and should be removed.
public:
llvm::BasicBlock* GetBlockInsertionPoint() const;
llvm::BasicBlock* CreateBlock(llvm::BasicBlock* ip,
const char* name="") const;
};
!
! #endif // SHARE_VM_SHARK_SHARKBUILDER_HPP
--- 215,238 ----
llvm::Value* code_buffer_address(int offset);
llvm::Value* CreateInlineOop(jobject object, const char* name = "");
llvm::Value* CreateInlineOop(ciObject* object, const char* name = "") {
return CreateInlineOop(object->constant_encoding(), name);
}
+
+ llvm::Value* CreateInlineMetadata(Metadata* metadata, llvm::PointerType* type, const char* name = "");
+ llvm::Value* CreateInlineMetadata(ciMetadata* metadata, llvm::PointerType* type, const char* name = "") {
+ return CreateInlineMetadata(metadata->constant_encoding(), type, name);
+ }
llvm::Value* CreateInlineData(void* data,
size_t size,
! llvm::Type* type,
const char* name = "");
// Helpers for creating basic blocks.
// NB don't use unless SharkFunction::CreateBlock is unavailable.
// XXX these are hacky and should be removed.
public:
llvm::BasicBlock* GetBlockInsertionPoint() const;
llvm::BasicBlock* CreateBlock(llvm::BasicBlock* ip,
const char* name="") const;
};
! #endif // SHARE_VM_SHARK_SHARKBUILDER_HPP