Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

llvm 10 support for EOS VM OC #8465

Merged
merged 3 commits into from
Jan 23, 2020
Merged

llvm 10 support for EOS VM OC #8465

merged 3 commits into from
Jan 23, 2020

Conversation

spoonincode
Copy link
Contributor

Change Description

Minor changes to update EOS VM OC to work with LLVM 10. Tested against rc1, passed all tests.

ORCv1, the LLVM API EOS VM OC is using, was expected to be removed in 10 but it has survived. Sounds like almost certain it will be removed for 11 though, so updating to the ORCv2 API will be a requirement soon.

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

Comment on lines 899 to 921
#else
#define EMIT_LOAD_OP(valueTypeId,name,llvmMemoryType,naturalAlignmentLog2,conversionOp) \
void valueTypeId##_##name(LoadOrStoreImm<naturalAlignmentLog2> imm) \
{ \
auto byteIndex = pop(); \
auto pointer = coerceByteIndexToPointer(byteIndex,imm.offset,llvmMemoryType); \
auto load = irBuilder.CreateLoad(pointer); \
load->setAlignment(llvm::MaybeAlign(1)); \
load->setVolatile(true); \
push(conversionOp(load,asLLVMType(ValueType::valueTypeId))); \
}
#define EMIT_STORE_OP(valueTypeId,name,llvmMemoryType,naturalAlignmentLog2,conversionOp) \
void valueTypeId##_##name(LoadOrStoreImm<naturalAlignmentLog2> imm) \
{ \
auto value = pop(); \
auto byteIndex = pop(); \
auto pointer = coerceByteIndexToPointer(byteIndex,imm.offset,llvmMemoryType); \
auto memoryValue = conversionOp(value,llvmMemoryType); \
auto store = irBuilder.CreateStore(memoryValue,pointer); \
store->setVolatile(true); \
store->setAlignment(llvm::MaybeAlign(1)); \
}
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need to duplicate the whole function just to add llvm::MaybeAlign?

@spoonincode spoonincode merged commit 9dfa74d into develop Jan 23, 2020
@spoonincode spoonincode deleted the llvm10_support branch January 23, 2020 17:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants