-
-
Notifications
You must be signed in to change notification settings - Fork 260
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
Fix gc2stack pass #2750
Fix gc2stack pass #2750
Conversation
and expects it will crash with |
Breaking that test is fine imho – iirc it was only supposed to test that there is no infinite recursion caused by the EH code or something along those lines. |
Fix for |
@Hardcode84: How did you manage to run those tests with enabled optimizations? Do you set the DFLAGS env variable manually? |
@kinke just run ctest from git bash terminal. |
Well AFAICT that can't be without some special setup from your side, I mean this test hasn't been failing for CI and I've never seen it fail myself, plus I don't see any |
@kinke They passed because gc2stack pass was completely broken for (probably) very long time. |
Nope they passed because they are never run with |
If I revert submodule update from this PR, they will fail on CI because of gc2stack as well |
[I've been on vacation this week, so I'm not fully up-to-date.] |
Alright, so the druntime standalone tests are (only) run with I'm planning on releasing 1.10 final these days; how's your pipeline looking, any more patches to come in? :) |
I'm not tied to releases and this is somewhat dangerous fix for final version. There can be cases where it will incorrectly optimize which I didn't foresee. |
BTW, I don't see release branch, do we release from master now? |
gen/passes/GarbageCollect2Stack.cpp
Outdated
->getType(); | ||
|
||
// Value *ti = llvm::MetadataAsValue::get(node->getContext(), |
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.
No point in keeping this around, right?
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.
removed
@kinke You can merge this if you think it should go into 1.10 release, but I'm fine if it go to next release. |
I'd have included it if it was just me, as it seems to make GC2Stack work as intended (but yeah, that might cause issues indeed). The next beta is only a couple of weeks away I guess, so let's wait a little bit with this one. |
Fun fact: there is also |
gen/passes/GarbageCollect2Stack.cpp
Outdated
if (!ti || ti->stripPointerCasts() != ti_global) { | ||
auto md = llvm::dyn_cast<llvm::ValueAsMetadata>( | ||
node->getOperand(TD_TypeInfo).get()); | ||
if (md == nullptr || md->getValue() != ti_global) { |
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.
No more stripPointerCasts()
?
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 can add it but I'm not sure how to trigger it.
Some context: first metadata operand is GlobalVariable
for Typinfo object and we compare it with GlobalVariable
typeinfo passed as parameter to allocation function.
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.
[The TypeInfo globals used to be pointers to anonymous IR struct types IIRC; I changed them to the final TypeInfo
subtypes (TypeInfo_Struct, TypeInfo_Class etc.).] So if the param is a TypeInfo*
base class reference, the casts are better stripped for the comparison; they are already stripped for ti_global
.
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.
Added, thanks.
1.10 is out, so it can be merged, I think |
No description provided.