forked from flang-compiler/flang
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Pull recent NVIDIA changes #124
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with the LLVM from github:flang-compiler/llvm. This permits the use of the Fortran debug extensions included in that version.
A bind(c) function was having its return type, despite a prototype, being trampled over because of alternate return handling.
… it is not passed in uplevel or display struct.
to pass the rank of the object to f90_init_from_desc so that it can distinguish between the initialization of an array and the initialization of an array element for which the entire array's descriptor has been supplied.
…lined function - no need because we can directly generate the address. Normally local DINIT or SAVE variable gets put in static memory(.STATICS/.BSS). There are certain local variables that don't get put in static memory - normally it is done by back end If that is so, then PARREF flag needs to be set by front end so that we can generate the correct address ILI when inside outlined function. Therefore for all local variables, always PARREF flag. mk_address() should always be called to get address of variable.
Pull 2018-01-23T17-18 Recent NVIDIA Changes
Use the same binding name as we would without the bind(C), so include the module name in it. This is done by delaying processing of an explicit empty bind name until routine process_bind to allow that case to be treated differently from the implicit empty name case. Also rearrange the code in routine semant1 to reduce the arbitrary differences in the cases that process the two main bind attribute reductions. The processing for the unnamed variant is a subset of the processing for the named variant, which is now more apparent in the code.
Upstream code in routine ref_pd_subr in file semfunc.c changes a call to the IDATE intrinsic into a user routine call if the number or type of call arguments are invalid for the intrinsic. The assert in routine rewrite_func_ast that is triggered due to a missing definition of nargs is therefore unnecessary, since the code is only reached when the call arguments have already been validated. Deleting the code with the asserts leaves code for IDATE that is similar to nearby cases for other intrinsics.
In the Infinity/NaN case, preserve the bottom 32 bits rather than zeroing them out.
- For a symbol with POINTERG set, get the data type using DDTG(DTYPEG(sptr)). This gets the base type of the pointer (double, say), instead of trying to build an empty array type, which comes out like '[0 x [0 x double]]' - When printing out the data value for a pointer, print out 'null' if it's a zero value - Handle data initialization of a pointer in add_init_const_op
Pull 2018-01-24T16-58 Recent NVIDIA Changes
We were passing a constant value to a function argument where we were expecting a descriptor, which leads to a seg fault. The constant is created in the front end "transform_call", where we are missing a case here, when there is no member descriptor, use SDSC instead.
This bug occurs when we have a contiguous pointer to an array section that is passed to an assumed-shape formal like in this example: integer, pointer, contiguous :: p(:,:) integer, pointer :: matrix(:,:,:) allocate(matrix(...)) p => matrix(:,:,n) call sub(p) The section descriptor that we create and pass in to the procedure has an lbase value that represents the distance from the start of the array to the start of the section that the pointer represents. When we pass in the address of the first element that p points to, that distance is included in the pointer. So combined with the lbase offset in the descriptor we end up indexing too far into the array (or past the end). To fix this we need to either adjust the descriptor or pass in the address of the array instead of the first element of the section. This fix does the latter.
Pull 2018-01-25T12-01 Recent NVIDIA Changes
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.