You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On lowering, the {section = ".abc"} attribute is ignored. That is because in LoweringToLLVM.cpp, the function CIRToLLVMGlobalOpLowering::matchAndRewrite can exit prematurely before the variable attributes is used at the end of the function.
I'm not sure how to fix it -- I tried removing those early returns, but it won't work and results in a crash.
The text was updated successfully, but these errors were encountered:
The amount of if arms here is a bit annoying, ideally it should be broken / refactored into multiple functions to be a bit more clean.
In this example, sounds like you want to also set up the attributes right after createRegionInitializedLLVMGlobalOp but before the return.
In a PR that does that, please add the call to setup the attributes right before all returns of success (so we don't run into this again with other types of constants).
I'm not sure how to fix it -- I tried removing those early returns, but it won't work and results in a crash.
That's expected, the early returns have already setup the LLVM global in some form, doing it twice is probably leading to the crash.
Consider the following global variable:
On lowering, the
{section = ".abc"}
attribute is ignored. That is because inLoweringToLLVM.cpp
, the functionCIRToLLVMGlobalOpLowering::matchAndRewrite
can exit prematurely before the variableattributes
is used at the end of the function.I'm not sure how to fix it -- I tried removing those early
return
s, but it won't work and results in a crash.The text was updated successfully, but these errors were encountered: