-
Notifications
You must be signed in to change notification settings - Fork 14.7k
[CAS] Add LLVMCAS library with InMemoryCAS implementation #114096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CAS] Add LLVMCAS library with InMemoryCAS implementation #114096
Conversation
Created using spr 1.3.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a large patch, so I haven't read all the C++ closely enough to say anything about it. Mostly, I've left comments on the documentation, and pointed out a few things I saw while skimming the implementation.
I think overall a bit more explanation about how some of the key classes interoperate may be warranted. For instance I really don't understand why some of the reinterpret casts should be legal in InMemroyInlineObject
.
The other thing I see is a pattern of foo(){return fooImpl();}
, but fooImpl()
isn't private or (from what I can see) an extension point. I'm not sure I understand the design choice here, since I don't recall seeing it used this way much in LLVM. Normally the Impls are either private, virtual, or in some other module/namespace. It's a big project, so maybe I've just missed something though.
I'll try to take a more detailed look at the implementation code, but I'd encourage others to look too, since this is a very large, complicated patch set.
Created using spr 1.3.5
Created using spr 1.3.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything LGTM!
Created using spr 1.3.5
Created using spr 1.3.6
Ping! I am going to pushing to upstreaming CAS implementation again with the hope to land this before next dev meeting. @ilovepi @bogner @adrian-prantl Let me know if you want to take another look while I start working on rebasing and updating all the patches. |
Created using spr 1.3.6
Thanks @adrian-prantl . I will let it sit over the weekend in case anyone wants to make comments. |
Created using spr 1.3.6
Created using spr 1.3.6
@ilovepi Let me know how it looks now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think most of my comments have been addressed, so LGTM from my perspective.
Created using spr 1.3.6
Thanks for the review! Everything should be addressed now. Will land after tests pass and any post commit review is welcomed too. |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/11269 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/203/builds/19563 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/206/builds/4666 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/205/builds/18352 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/207/builds/5164 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/204/builds/18375 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/builds/12066 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/160/builds/22828 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/180/builds/22971 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/9019 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/42/builds/5770 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/118/builds/7759 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/97/builds/8104 Here is the relevant piece of the build log for the reference
|
@cachemeifyoucan I'm seeing this MSVC warning since this patch please can you investigate?
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/130/builds/14938 Here is the relevant piece of the build log for the reference
|
The unit test associated with this commit appears to be running infinitely inside of CASTest.BlobsParallel with our downstream toolchain running on X86 Linux. I'm not sure where to begin with respect to figuring out why other than just to turn it off.
|
@evodius96 Do you have a stack trace for the hang? Is it really hang or just take a long time? I can disable it but we have x86 linux bot (ubuntu) that runs this test without problem. |
@evodius96 I have a guess. Is it possible that you config llvm with LLVM_ENABLE_THREADS=Off? I should disable test in single thread mode. |
Yes, we do -- I believe that's the issue. Thanks! |
Add llvm::cas::ObjectStore abstraction and InMemoryCAS as a in-memory
CAS object store implementation.
The ObjectStore models its objects as:
And each CAS Object can be idenfied with an unqine ID/Hash.
ObjectStore supports following general action:
It also introduces following types to interact with a CAS ObjectStore:
print/compare CASIDs.
implementation defined so it can be optimized for
read/store/references depending on the implementation.
inside CAS Object. It bundles a ObjectHandle and an ObjectStore
instance.