| #
f91d18ea |
| 20-Aug-2020 |
Sourabh Singh Tomar <[email protected]> |
[DebugInfo][flang]Added support for representing Fortran assumed length strings
This patch adds support for representing Fortran `character(n)`.
Primarily patch is based out of D54114 with appropri
[DebugInfo][flang]Added support for representing Fortran assumed length strings
This patch adds support for representing Fortran `character(n)`.
Primarily patch is based out of D54114 with appropriate modifications.
Test case IR is generated using our downstream classic-flang. We're in process of upstreaming flang PR's but classic-flang has dependencies on llvm, so this has to get in first.
Patch includes functional test case for both IR and corresponding dwarf, furthermore it has been manually tested as well using GDB.
Source snippet: ``` program assumedLength call sub('Hello') call sub('Goodbye') contains subroutine sub(string) implicit none character(len=*), intent(in) :: string print *, string end subroutine sub end program assumedLength ```
GDB: ``` (gdb) ptype string type = character (5) (gdb) p string $1 = 'Hello' ```
Reviewed By: aprantl, schweitz
Differential Revision: https://reviews.llvm.org/D86305
show more ...
|
| #
fc4fd898 |
| 14-Aug-2020 |
Vitaly Buka <[email protected]> |
[StackSafety] Use ValueInfo in ParamAccess::Call
This avoid GUID lookup in Index.findSummaryInModule. Follow up for D81242.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D
[StackSafety] Use ValueInfo in ParamAccess::Call
This avoid GUID lookup in Index.findSummaryInModule. Follow up for D81242.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D85269
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
| #
b3aece05 |
| 19-Jun-2020 |
Kai Nacke <[email protected]> |
[SystemZ/ZOS] Add binary format goff and operating system zos to the triple
Adds the binary format goff and the operating system zos to the triple class. goff is selected as default binary format if
[SystemZ/ZOS] Add binary format goff and operating system zos to the triple
Adds the binary format goff and the operating system zos to the triple class. goff is selected as default binary format if zos is choosen as operating system. No further functionality is added.
Reviewers: efriedma, tahonermann, hubert.reinterpertcast, MaskRay
Reviewed By: efriedma, tahonermann, hubert.reinterpertcast
Differential Revision: https://reviews.llvm.org/D82081
show more ...
|
| #
754deffd |
| 27-Jul-2020 |
Guillaume Chatelet <[email protected]> |
[NFC] Move BitcodeCommon.h from Bitstream to Bitcode
|
| #
d9bbe859 |
| 27-Jul-2020 |
Guillaume Chatelet <[email protected]> |
[Alignment][NFC] Update Bitcodewriter to use Align
Differential Revision: https://reviews.llvm.org/D83533
|
| #
2d10258a |
| 20-Jul-2020 |
Alok Kumar Sharma <[email protected]> |
[DebugInfo] Support for DW_AT_associated and DW_AT_allocated.
Summary: This support is needed for the Fortran array variables with pointer/allocatable attribute. This support enables debugger to ide
[DebugInfo] Support for DW_AT_associated and DW_AT_allocated.
Summary: This support is needed for the Fortran array variables with pointer/allocatable attribute. This support enables debugger to identify the status of variable whether that is currently allocated/associated.
for pointer array (before allocation/association) without DW_AT_associated
(gdb) pt ptr type = integer (140737345375288:140737354129776) (gdb) p ptr value requires 35017956 bytes, which is more than max-value-size
with DW_AT_associated
(gdb) pt ptr type = integer (:) (gdb) p ptr $1 = <not associated>
for allocatable array (before allocation)
without DW_AT_allocated
(gdb) pt arr type = integer (140737345375288:140737354129776) (gdb) p arr value requires 35017956 bytes, which is more than max-value-size
with DW_AT_allocated
(gdb) pt arr type = integer, allocatable (:) (gdb) p arr $1 = <not allocated>
Testing - unit test cases added - check-llvm - check-debuginfo
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D83544
show more ...
|
| #
5e999cbe |
| 05-Jun-2020 |
Matt Arsenault <[email protected]> |
IR: Define byref parameter attribute
This allows tracking the in-memory type of a pointer argument to a function for ABI purposes. This is essentially a stripped down version of byval to remove some
IR: Define byref parameter attribute
This allows tracking the in-memory type of a pointer argument to a function for ABI purposes. This is essentially a stripped down version of byval to remove some of the stack-copy implications in its definition.
This includes the base IR changes, and some tests for places where it should be treated similarly to byval. Codegen support will be in a future patch.
My original attempt at solving some of these problems was to repurpose byval with a different address space from the stack. However, it is technically permitted for the callee to introduce a write to the argument, although nothing does this in reality. There is also talk of removing and replacing the byval attribute, so a new attribute would need to take its place anyway.
This is intended avoid some optimization issues with the current handling of aggregate arguments, as well as fixes inflexibilty in how frontends can specify the kernel ABI. The most honest representation of the amdgpu_kernel convention is to expose all kernel arguments as loads from constant memory. Today, these are raw, SSA Argument values and codegen is responsible for turning these into loads.
Background:
There currently isn't a satisfactory way to represent how arguments for the amdgpu_kernel calling convention are passed. In reality, arguments are passed in a single, flat, constant memory buffer implicitly passed to the function. It is also illegal to call this function in the IR, and this is only ever invoked by a driver of some kind.
It does not make sense to have a stack passed parameter in this context as is implied by byval. It is never valid to write to the kernel arguments, as this would corrupt the inputs seen by other dispatches of the kernel. These argumets are also not in the same address space as the stack, so a copy is needed to an alloca. From a source C-like language, the kernel parameters are invisible. Semantically, a copy is always required from the constant argument memory to a mutable variable.
The current clang calling convention lowering emits raw values, including aggregates into the function argument list, since using byval would not make sense. This has some unfortunate consequences for the optimizer. In the aggregate case, we end up with an aggregate store to alloca, which both SROA and instcombine turn into a store of each aggregate field. The optimizer never pieces this back together to see that this is really just a copy from constant memory, so we end up stuck with expensive stack usage.
This also means the backend dictates the alignment of arguments, and arbitrarily picks the LLVM IR ABI type alignment. By allowing an explicit alignment, frontends can make better decisions. For example, there's real no advantage to an aligment higher than 4, so a frontend could choose to compact the argument layout. Similarly, there is a high penalty to using an alignment lower than 4, so a frontend could opt into more padding for small arguments.
Another design consideration is when it is appropriate to expose the fact that these arguments are all really passed in adjacent memory. Currently we have a late IR optimization pass in codegen to rewrite the kernel argument values into explicit loads to enable vectorization. In most programs, unrelated argument loads can be merged together. However, exposing this property directly from the frontend has some disadvantages. We still need a way to track the original argument sizes and alignments to report to the driver. I find using some side-channel, metadata mechanism to track this unappealing. If the kernel arguments were exposed as a single buffer to begin with, alias analysis would be unaware that the padding bits betewen arguments are meaningless. Another family of problems is there are still some gaps in replacing all of the available parameter attributes with metadata equivalents once lowered to loads.
The immediate plan is to start using this new attribute to handle all aggregate argumets for kernels. Long term, it makes sense to migrate all kernel arguments, including scalars, to be passed indirectly in the same manner.
Additional context is in D79744.
show more ...
|
| #
ff7900d5 |
| 08-Jul-2020 |
Gui Andrade <[email protected]> |
[LLVM] Accept `noundef` attribute in function definitions/calls
The `noundef` attribute indicates an argument or return value which may never have an undef value representation.
This patch allows L
[LLVM] Accept `noundef` attribute in function definitions/calls
The `noundef` attribute indicates an argument or return value which may never have an undef value representation.
This patch allows LLVM to parse the attribute.
Differential Revision: https://reviews.llvm.org/D83412
show more ...
|
|
Revision tags: llvmorg-10.0.1-rc1 |
|
| #
a2caa3b6 |
| 19-May-2020 |
Eli Friedman <[email protected]> |
Remove GlobalValue::getAlignment().
This function is deceptive at best: it doesn't return what you'd expect. If you have an arbitrary GlobalValue and you want to determine the alignment of that poin
Remove GlobalValue::getAlignment().
This function is deceptive at best: it doesn't return what you'd expect. If you have an arbitrary GlobalValue and you want to determine the alignment of that pointer, Value::getPointerAlignment() returns the correct value. If you want the actual declared alignment of a function or variable, GlobalObject::getAlignment() returns that.
This patch switches all the users of GlobalValue::getAlignment to an appropriate alternative.
Differential Revision: https://reviews.llvm.org/D80368
show more ...
|
| #
e6d86369 |
| 23-Jun-2020 |
Christopher Tetreault <[email protected]> |
[SVE] Remove calls to VectorType::getNumElements from Bitcode
Reviewers: efriedma, evgeny777, tejohnson, david-arm, kmclaughlin
Reviewed By: david-arm
Subscribers: tschuett, hiraditya, rkruppe, ps
[SVE] Remove calls to VectorType::getNumElements from Bitcode
Reviewers: efriedma, evgeny777, tejohnson, david-arm, kmclaughlin
Reviewed By: david-arm
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82209
show more ...
|
| #
4666953c |
| 01-Jun-2020 |
Vitaly Buka <[email protected]> |
[StackSafety] Add info into function summary
Summary: This patch adds optional field into function summary, implements asm and bitcode serialization. YAML serialization is omitted and can be added l
[StackSafety] Add info into function summary
Summary: This patch adds optional field into function summary, implements asm and bitcode serialization. YAML serialization is omitted and can be added later if needed.
This patch includes this information into summary only if module contains at least one sanitize_memtag function. In a near future MTE is the user of the analysis. Later if needed we can provede more direct control on when information is included into summary.
Reviewers: eugenis
Subscribers: hiraditya, steven_wu, dexonsmith, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80908
show more ...
|
| #
a7fa35a6 |
| 21-May-2020 |
Hiroshi Yamauchi <[email protected]> |
[ThinLTO] Compute the basic block count across modules.
Summary: Count the per-module number of basic blocks when the module summary is computed and sum them up during Thin LTO indexing.
This is us
[ThinLTO] Compute the basic block count across modules.
Summary: Count the per-module number of basic blocks when the module summary is computed and sum them up during Thin LTO indexing.
This is used to estimate the working set size under the partial sample PGO.
This is split off of D79831.
Reviewers: davidxl, espindola
Subscribers: emaste, inglorion, hiraditya, MaskRay, steven_wu, dexonsmith, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80403
show more ...
|
| #
a0d847c6 |
| 28-May-2020 |
Alok Kumar Sharma <[email protected]> |
Fixed bot failure after d20bf5a7258d4b6a7
There were some bot failures due unused funtion `rotateSign` left in code.
http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/3731
error: unused
Fixed bot failure after d20bf5a7258d4b6a7
There were some bot failures due unused funtion `rotateSign` left in code.
http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/3731
error: unused function 'rotateSign' [-Werror,-Wunused-function] static uint64_t rotateSign(int64_t I)
show more ...
|
| #
d20bf5a7 |
| 28-May-2020 |
Alok Kumar Sharma <[email protected]> |
[DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays
This patch upgrades DISubrange to support fortran requirements.
Summary: Below are the updates/addition of fields. lowerBound - Now
[DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays
This patch upgrades DISubrange to support fortran requirements.
Summary: Below are the updates/addition of fields. lowerBound - Now accepts signed integer or DIVariable or DIExpression, earlier it accepted only signed integer. upperBound - This field is now added and accepts signed interger or DIVariable or DIExpression. stride - This field is now added and accepts signed interger or DIVariable or DIExpression. This is required to describe bounds of array which are known at runtime.
Testing: unit test cases added (hand-written) check clang check llvm check debug-info
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D80197
show more ...
|
| #
f89f7da9 |
| 25-Apr-2020 |
Nikita Popov <[email protected]> |
[IR] Convert null-pointer-is-valid into an enum attribute
The "null-pointer-is-valid" attribute needs to be checked by many pointer-related combines. To make the check more efficient, convert it fro
[IR] Convert null-pointer-is-valid into an enum attribute
The "null-pointer-is-valid" attribute needs to be checked by many pointer-related combines. To make the check more efficient, convert it from a string into an enum attribute.
In the future, this attribute may be replaced with data layout properties.
Differential Revision: https://reviews.llvm.org/D78862
show more ...
|
| #
8c24f331 |
| 31-Mar-2020 |
Ties Stuij <[email protected]> |
[IR][BFloat] Add BFloat IR type
Summary: The BFloat IR type is introduced to provide support for, initially, the BFloat16 datatype introduced with the Armv8.6 architecture (optional from Armv8.2 onw
[IR][BFloat] Add BFloat IR type
Summary: The BFloat IR type is introduced to provide support for, initially, the BFloat16 datatype introduced with the Armv8.6 architecture (optional from Armv8.2 onwards). It has an 8-bit exponent and a 7-bit mantissa and behaves like an IEEE 754 floating point IR type.
This is part of a patch series upstreaming Armv8.6 features. Subsequent patches will upstream intrinsics support and C-lang support for BFloat.
Reviewers: SjoerdMeijer, rjmccall, rsmith, liutianle, RKSimon, craig.topper, jfb, LukeGeeson, sdesmalen, deadalnix, ctetreau
Subscribers: hiraditya, llvm-commits, danielkiss, arphaman, kristof.beyls, dexonsmith
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78190
show more ...
|
| #
4042ada1 |
| 15-May-2020 |
Alok Kumar Sharma <[email protected]> |
[DebugInfo] support for DW_AT_data_location in llvm
This patch adds support for DWARF attribute DW_AT_data_location.
Summary: Dynamic arrays in fortran are described by array descriptor and data al
[DebugInfo] support for DW_AT_data_location in llvm
This patch adds support for DWARF attribute DW_AT_data_location.
Summary: Dynamic arrays in fortran are described by array descriptor and data allocation address. Former is mapped to DW_AT_location and later is mapped to DW_AT_data_location.
Testing: unit test cases added (hand-written) check llvm check debug-info
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D79592
show more ...
|
| #
e59744fd |
| 08-May-2020 |
Sourabh Singh Tomar <[email protected]> |
[DebugInfo] Fortran module DebugInfo support in LLVM
This patch extends DIModule Debug metadata in LLVM to support Fortran modules. DIModule is extended to contain File and Line fields, these fields
[DebugInfo] Fortran module DebugInfo support in LLVM
This patch extends DIModule Debug metadata in LLVM to support Fortran modules. DIModule is extended to contain File and Line fields, these fields will be used by Flang FE to create debug information necessary for representing Fortran modules at IR level.
Furthermore DW_TAG_module is also extended to contain these fields. If these fields are missing, debuggers like GDB won't be able to show Fortran modules information correctly.
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D79484
show more ...
|
| #
cb22ab74 |
| 12-May-2020 |
Zequan Wu <[email protected]> |
Add nomerge function attribute to supress tail merge optimization in simplifyCFG
We want to add a way to avoid merging identical calls so as to keep the separate debug-information for those calls. T
Add nomerge function attribute to supress tail merge optimization in simplifyCFG
We want to add a way to avoid merging identical calls so as to keep the separate debug-information for those calls. There is also an asan usecase where having this attribute would be beneficial to avoid alternative work-arounds.
Here is the link to the feature request: https://bugs.llvm.org/show_bug.cgi?id=42783.
`nomerge` is different from `noline`. `noinline` prevents function from inlining at callsites, but `nomerge` prevents multiple identical calls from being merged into one.
This patch adds `nomerge` to disable the optimization in IR level. A followup patch will be needed to let backend understands `nomerge` and avoid tail merge at backend.
Reviewed By: asbirlea, rnk
Differential Revision: https://reviews.llvm.org/D78659
show more ...
|
| #
a58b62b4 |
| 28-Apr-2020 |
Craig Topper <[email protected]> |
[IR] Replace all uses of CallBase::getCalledValue() with getCalledOperand().
This method has been commented as deprecated for a while. Remove it and replace all uses with the equivalent getCalledOpe
[IR] Replace all uses of CallBase::getCalledValue() with getCalledOperand().
This method has been commented as deprecated for a while. Remove it and replace all uses with the equivalent getCalledOperand().
I also made a few cleanups in here. For example, to removes use of getElementType on a pointer when we could just use getFunctionType from the call.
Differential Revision: https://reviews.llvm.org/D78882
show more ...
|
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
| #
3b0450ac |
| 14-Feb-2020 |
Arthur Eubanks <[email protected]> |
Add IR constructs for preallocated (inalloca replacement)
Add llvm.call.preallocated.{setup,arg} instrinsics. Add "preallocated" operand bundle which takes a token produced by llvm.call.preallocated
Add IR constructs for preallocated (inalloca replacement)
Add llvm.call.preallocated.{setup,arg} instrinsics. Add "preallocated" operand bundle which takes a token produced by llvm.call.preallocated.setup. Add "preallocated" parameter attribute, which is like byval but without the copy.
Verifier changes for these IR constructs.
See https://github.com/rnk/llvm-project/blob/call-setup-docs/llvm/docs/CallSetup.md
Subscribers: hiraditya, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74651
show more ...
|
| #
2059a6e3 |
| 23-Apr-2020 |
Mircea Trofin <[email protected]> |
[llvm][NFC][CallSite] Remove ImmutableCallSite from a few locations
Reviewers: craig.topper, dblaikie
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.
[llvm][NFC][CallSite] Remove ImmutableCallSite from a few locations
Reviewers: craig.topper, dblaikie
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78783
show more ...
|
| #
0d9144a2 |
| 23-Apr-2020 |
Christopher Tetreault <[email protected]> |
[SVE] Remove isScalable from Bitcode
Reviewers: efriedma, dexonsmith, tejohnson, sdesmalen
Reviewed By: efriedma
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Diffe
[SVE] Remove isScalable from Bitcode
Reviewers: efriedma, dexonsmith, tejohnson, sdesmalen
Reviewed By: efriedma
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77695
show more ...
|
| #
2dea3f12 |
| 22-Apr-2020 |
Christopher Tetreault <[email protected]> |
[SVE] Add new VectorType subclasses
Summary: Introduce new types for fixed width and scalable vectors.
Does not remove getNumElements yet so as to not break code during transition period.
Reviewer
[SVE] Add new VectorType subclasses
Summary: Introduce new types for fixed width and scalable vectors.
Does not remove getNumElements yet so as to not break code during transition period.
Reviewers: deadalnix, efriedma, sdesmalen, craig.topper, huntergr
Reviewed By: sdesmalen
Subscribers: jholewinski, arsenm, jvesely, nhaehnle, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, csigg, arpith-jacob, mgester, lucyrfox, liufengdb, kerbowa, Joonsoo, grosul1, frgossen, lldb-commits, tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm, #lldb
Differential Revision: https://reviews.llvm.org/D77587
show more ...
|
| #
aad3d578 |
| 18-Apr-2020 |
LemonBoy <[email protected]> |
[DebugInfo] Change DIEnumerator payload type from int64_t to APInt
This allows the representation of arbitrarily large enumeration values. See https://lists.llvm.org/pipermail/llvm-dev/2017-December
[DebugInfo] Change DIEnumerator payload type from int64_t to APInt
This allows the representation of arbitrarily large enumeration values. See https://lists.llvm.org/pipermail/llvm-dev/2017-December/119475.html for context.
Reviewed By: andrewrk, aprantl, MaskRay
Differential Revision: https://reviews.llvm.org/D62475
show more ...
|