Skip to content
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

Do not trigger write barrier when the child is a permanently rooted object #24304

Merged
merged 1 commit into from
Oct 31, 2017

Conversation

yuyichao
Copy link
Contributor

This addresses the simplest case in #22426 . A more generic version would require sorting the age of objects. At least now storing a nothing will never get a write barrier anymore.

This is based on #24283 and #24108 .

@yuyichao yuyichao added the compiler:codegen Generation of LLVM IR and native code label Oct 24, 2017
src/cgutils.cpp Outdated
#if JL_LLVM_VERSION >= 50000
F->addParamAttr(A->getArgNo(), Attribute::NonNull);
#else
F->setAttributes(F->getAttributes().addParamAttribute(getContext(), A->getArgNo(),
Copy link
Member

@ararslan ararslan Oct 24, 2017

Choose a reason for hiding this comment

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

Looks like this like is causing the failure on FreeBSD LLVM 3.9.

In file included from /usr/home/julia/worker/11rel-amd64/build/src/codegen.cpp:803:
./cgutils.cpp:352:59: error: use of undeclared identifier 'getContext'; did you mean 'getcontextx'?
    F->setAttributes(F->getAttributes().addParamAttribute(getContext(), A->getArgNo(),
                                                          ^~~~~~~~~~
                                                          getcontextx
/usr/include/ucontext.h:59:13: note: 'getcontextx' declared here
ucontext_t *getcontextx(void);
            ^
In file included from /usr/home/julia/worker/11rel-amd64/build/src/codegen.cpp:803:
./cgutils.cpp:352:41: error: no member named 'addParamAttribute' in 'llvm::AttributeSet'
    F->setAttributes(F->getAttributes().addParamAttribute(getContext(), A->getArgNo(),
                     ~~~~~~~~~~~~~~~~~~ ^
2 errors generated.
gmake[1]: *** [Makefile:138: codegen.dbg.obj] Error 1

@yuyichao yuyichao force-pushed the yyc/codegen/wb branch 6 times, most recently from dbba419 to c8dc445 Compare October 24, 2017 14:06
@yuyichao
Copy link
Contributor Author

yuyichao commented Oct 24, 2017

I'm also convienced that we should probably do this before LICM and loop vectorization and that'll probably mean at least partially spliting out the analysis code especially the ones for refinement. This should be good enough for now at least on 3.9 though.

@yuyichao yuyichao force-pushed the yyc/codegen/wb branch 5 times, most recently from 5b5cf3a to f55b571 Compare October 31, 2017 02:41
…bject

Or when the parent and the child are the same object
@yuyichao yuyichao merged commit 9b5d1e4 into master Oct 31, 2017
@yuyichao yuyichao deleted the yyc/codegen/wb branch October 31, 2017 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:codegen Generation of LLVM IR and native code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants