-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Ml intrinsics #299
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
Closed
Closed
Ml intrinsics #299
Conversation
This file contains hidden or 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
Also rename instantiateLocalAlias to instantiateAlias and use it in global (the global code was also wrong not to use mapSymbolAndAttributes).
extend syntax for fir.iterate_while as well. extend builder methods.
Addition of the AArch64 target will enable lowering on this platform. All tests can also be run with this change.
This is a legacy function, it was kept to protect from array character in context that are not array ready. It fired in createUnboxChar where it is OK to get arrays. Remove it and enforce the arrays bans on caller sides where it make sens.
Add the ability to test if a subprogram is recursive or not.
… longer needed. Update test to reflect the simpler fir that is now generated.
fix bug with mpsubprogram fix tests
Handle assumed shape array both on callee/caller sides: - Modify the call interface lowering utility to handle explicit interface, add TODOs for anything but intrinsic type assumed shape arrays. - On caller side, simply add a call to createBox in case the interface needs a box. - On callee side, the lowering of bounds is done using `fir.box_dims`, the address is obtained with `fir.box_addr` and for character the length is done using `fir.box_elesize`. Note that fir generation works as expected, but lowering to LLVM on the callee side fails due to a bad GEP generated for fir.box_dims. Assumed shape array do not require any change in the symbol map used in lowering because their shape and base address cannot change in the program unit (as opposed to allocatable/pointers that are deferred shape arrays).
- Always reflect rank when lowering fir.box type to its llvm type (make the dimension array explicit). This is needed to use the LLVM GEP when lowering fir.box_dims on callee side. - Fix my own incompetence of getting bad indexes for lower_bound and extent (1 and 2 instead of 0 and 1). - The front-end is not making implicit assumed shape lower bounds explicit (to 1) but is labeling as deferred. Due to this, the code was taking the lower bound of the descriptor instead of of 1. Workaround this for now, when we lower allocatable and pointer, we will want either to update the front-end to make assumed shape lower bound explicit or to handle this better in lowering. - Align lit tests With this patch, assumed shape associated with contiguous intrinsic variable are compiling OK end to end.
* Add END statements to the PFT - Fix #503 and #524 Program unit end statements may have labels that may be branch targets. Modify the PFT to include these statements. Update the PFT dump to insert a blank in PFT annotations, so 'EndSubroutineStmt', which is an actual PFT node, is somewhat differentiated from 'End Subroutine', which is not. There is an additional front end bug that when addressed will fix additional instances of #524.
…ss result - This was a left over TODO from character refactoring, scalar character base address type fir.ref<fir.char> should not be propagated anymore since character related utilities are expecting a sequence type with the length as first dimension. This prevented unformatted IO with scalar characters to lower. - Lower character length directly in translateSymbolToFIRType - Remove genTypeWithCharFixup now translateSymbolToFIRType handles this
Also make AbstractIrBox inherit from AbstractArrayBox to get the array aspects from there.
[NFC] Remove old BoxValue class and rename IrBoxValue to BoxValue
[flang] Fixing shared library builds
This handles the lowering of the basic cases. There are several TODOs in the code for other variants. This lowers expressions like the following where a and b are arrays. a = f(b) a = abs(b) These are transformed into loop (nests) where the right-hand side is fully evaluated by applying the function to each element in the array and then the resulting array is copied-out to the left-hand side.
[flang] Removing extraneous semi-colon, gcc 9.3.0 is complaining about
The linker on macos doesn't accept `-rpath=...`, it wants the library as a separate argument. That seems to work okay on linux too. Also replace `%temp` with `%t` where that was intended.
Fix -rpath for macos
Add the capability to lower select case constructs of any type to either FIR SelectCaseOp's or a sequence of comparisons and branches. Actually generate SelectCaseOp's for integer type constructs, but use comparisons and branches for logical types (the code is better) and for character types (it isn't possible yet to handle character SelectCaseOp's downstream).
Lower initial data target
Lowering of basic elemental functions (intrinsic and user-defined).
[flang] Adding ability to customize the printer of the LLVMIRLoweringPass
This repository does not accept pull requests. Please follow http://llvm.org/docs/Contributing.html#how-to-submit-a-patch for contribution to LLVM. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
@jeanPerier @schweitzpgi
Please review these changes for the SCAN intrinsic. I was not sure about the TBD portions for handling optional arguments. The routine genScan() in IntrinsicCall.cpp has a couple TBD comments for optional arguments.