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, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init |
|
#
61ba1481 |
| 24-Dec-2019 |
Erich Keane <erich.keane@intel.com> |
Implement _ExtInt as an extended int type specifier.
Introduction/Motivation: LLVM-IR supports integers of non-power-of-2 bitwidth, in the iN syntax. Integers of non-power-of-two aren't particularly
Implement _ExtInt as an extended int type specifier.
Introduction/Motivation: LLVM-IR supports integers of non-power-of-2 bitwidth, in the iN syntax. Integers of non-power-of-two aren't particularly interesting or useful on most hardware, so much so that no language in Clang has been motivated to expose it before.
However, in the case of FPGA hardware normal integer types where the full bitwidth isn't used, is extremely wasteful and has severe performance/space concerns. Because of this, Intel has introduced this functionality in the High Level Synthesis compiler[0] under the name "Arbitrary Precision Integer" (ap_int for short). This has been extremely useful and effective for our users, permitting them to optimize their storage and operation space on an architecture where both can be extremely expensive.
We are proposing upstreaming a more palatable version of this to the community, in the form of this proposal and accompanying patch. We are proposing the syntax _ExtInt(N). We intend to propose this to the WG14 committee[1], and the underscore-capital seems like the active direction for a WG14 paper's acceptance. An alternative that Richard Smith suggested on the initial review was __int(N), however we believe that is much less acceptable by WG14. We considered _Int, however _Int is used as an identifier in libstdc++ and there is no good way to fall back to an identifier (since _Int(5) is indistinguishable from an unnamed initializer of a template type named _Int).
[0]https://www.intel.com/content/www/us/en/software/programmable/quartus-prime/hls-compiler.html) [1]http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2472.pdf
Differential Revision: https://reviews.llvm.org/D73967
show more ...
|
#
c7ff5b38 |
| 26-Mar-2020 |
Serge Pavlov <sepavloff@gmail.com> |
[FPEnv] Use single enum to represent rounding mode
Now compiler defines 5 sets of constants to represent rounding mode. These are:
1. `llvm::APFloatBase::roundingMode`. It specifies all 5 rounding
[FPEnv] Use single enum to represent rounding mode
Now compiler defines 5 sets of constants to represent rounding mode. These are:
1. `llvm::APFloatBase::roundingMode`. It specifies all 5 rounding modes defined by IEEE-754 and is used in `APFloat` implementation.
2. `clang::LangOptions::FPRoundingModeKind`. It specifies 4 of 5 IEEE-754 rounding modes and a special value for dynamic rounding mode. It is used in clang frontend.
3. `llvm::fp::RoundingMode`. Defines the same values as `clang::LangOptions::FPRoundingModeKind` but in different order. It is used to specify rounding mode in in IR and functions that operate IR.
4. Rounding mode representation used by `FLT_ROUNDS` (C11, 5.2.4.2.2p7). Besides constants for rounding mode it also uses a special value to indicate error. It is convenient to use in intrinsic functions, as it represents platform-independent representation for rounding mode. In this role it is used in some pending patches.
5. Values like `FE_DOWNWARD` and other, which specify rounding mode in library calls `fesetround` and `fegetround`. Often they represent bits of some control register, so they are target-dependent. The same names (not values) and a special name `FE_DYNAMIC` are used in `#pragma STDC FENV_ROUND`.
The first 4 sets of constants are target independent and could have the same numerical representation. It would simplify conversion between the representations. Also now `clang::LangOptions::FPRoundingModeKind` and `llvm::fp::RoundingMode` do not contain the value for IEEE-754 rounding direction `roundTiesToAway`, although it is supported natively on some targets.
This change defines all the rounding mode type via one `llvm::RoundingMode`, which also contains rounding mode for IEEE rounding direction `roundTiesToAway`.
Differential Revision: https://reviews.llvm.org/D77379
show more ...
|
#
30588a73 |
| 08-Apr-2020 |
Erich Keane <erich.keane@intel.com> |
Make target features check work with ctor and dtor-
The problem was reported in PR45468, applying target features to an always_inline constructor/destructor runs afoul of GlobalDecl construction ass
Make target features check work with ctor and dtor-
The problem was reported in PR45468, applying target features to an always_inline constructor/destructor runs afoul of GlobalDecl construction assert when checking for target-feature compatibility.
The core problem is fixed by using the version of the check that takes a FunctionDecl rather than the GlobalDecl. However, while writing the test, I discovered that source locations weren't properly set for this check on ctors/dtors. This patch also fixes constructors and CALLED destructors.
Unfortunately, it doesn't seem too possible to get a meaningful source location for a 'cleanup' destructor, so those are still 'frontend' level errors unfortunately. A fixme was added to the test to cover that situation.
show more ...
|
#
bb3111cb |
| 01-Apr-2020 |
Ian Levesque <ianlevesque@fb.com> |
[clang][xray] Add xray attributes to functions without decls too
Summary: This allows instrumenting things like global initializers
Reviewers: dberris, MaskRay, smeenai
Subscribers: cfe-commits, j
[clang][xray] Add xray attributes to functions without decls too
Summary: This allows instrumenting things like global initializers
Reviewers: dberris, MaskRay, smeenai
Subscribers: cfe-commits, johnislarry
Tags: #clang
Differential Revision: https://reviews.llvm.org/D77191
show more ...
|
#
5087ace6 |
| 15-Mar-2020 |
Sander de Smalen <sander.desmalen@arm.com> |
[Clang][SVE] Parse builtin type string for scalable vectors
This patch adds 'q' to mean 'scalable vector' in the builtin type string, and for SVE will return the matching builtin type as defined in
[Clang][SVE] Parse builtin type string for scalable vectors
This patch adds 'q' to mean 'scalable vector' in the builtin type string, and for SVE will return the matching builtin type as defined in the C/C++ language extensions for SVE.
This patch also adds some scaffolding to generate the arm_sve.h header file, and some builtin definitions (+CodeGen) to be able to implement some simple masked load intrinsics that use the ACLE types, such as:
svint8_t test_svld1_s8(svbool_t pg, const int8_t *base) { return svld1_s8(pg, base); }
Reviewers: efriedma, rjmccall, rovka, rsandifo-arm, rengolin
Reviewed By: efriedma
Tags: #clang
Differential Revision: https://reviews.llvm.org/D75298
show more ...
|
#
fb44b9db |
| 29-Jan-2020 |
Yaxun (Sam) Liu <yaxun.liu@amd.com> |
[OpenCL][CUDA][HIP][SYCL] Add norecurse
norecurse function attr indicates the function is not called recursively directly or indirectly.
Add norecurse to OpenCL functions, SYCL functions in device
[OpenCL][CUDA][HIP][SYCL] Add norecurse
norecurse function attr indicates the function is not called recursively directly or indirectly.
Add norecurse to OpenCL functions, SYCL functions in device compilation and CUDA/HIP kernels.
Although there is LLVM pass adding norecurse to functions, it only works for whole-program compilation. Also FE adding norecurse can make that pass run faster since functions with norecurse do not need to be checked again.
Differential Revision: https://reviews.llvm.org/D73651
show more ...
|
#
1d49eb00 |
| 14-Feb-2020 |
Fangrui Song <maskray@google.com> |
[AsmPrinter] De-capitalize all AsmPrinter::Emit* but EmitInstruction
Similar to rL328848.
|
#
70cac41a |
| 13-Feb-2020 |
Johannes Doerfert <johannes@jdoerfert.de> |
Reapply "[OpenMP][IRBuilder] Perform finalization (incl. outlining) late"
Reapply 8a56d64d7620b3764f10f03f3a1e307fcdd72c2f with minor fixes.
The problem was that cancellation can cause new edges to
Reapply "[OpenMP][IRBuilder] Perform finalization (incl. outlining) late"
Reapply 8a56d64d7620b3764f10f03f3a1e307fcdd72c2f with minor fixes.
The problem was that cancellation can cause new edges to the parallel region exit block which is not outlined. The CodeExtractor will encode the information which "exit" was taken as a return value. The fix is to ensure we do not return any value from the outlined function, to prevent control to value conversion we ensure a single exit block for the outlined region.
This reverts commit 3aac953afa34885a72df96f2b703b65f85cbb149.
show more ...
|
#
3aac953a |
| 13-Feb-2020 |
Johannes Doerfert <johannes@jdoerfert.de> |
Revert "[OpenMP][IRBuilder] Perform finalization (incl. outlining) late"
This reverts commit 8a56d64d7620b3764f10f03f3a1e307fcdd72c2f.
Will be recommitted once the clang test problem is addressed.
|
#
8a56d64d |
| 10-Feb-2020 |
Johannes Doerfert <johannes@jdoerfert.de> |
[OpenMP][IRBuilder] Perform finalization (incl. outlining) late
In order to fix PR44560 and to prepare for loop transformations we now finalize a function late, which will also do the outlining late
[OpenMP][IRBuilder] Perform finalization (incl. outlining) late
In order to fix PR44560 and to prepare for loop transformations we now finalize a function late, which will also do the outlining late. The logic is as before but the actual outlining step happens now after the function was fully constructed. Once we have loop transformations we can apply them in the finalize step before the outlining.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D74372
show more ...
|
#
14f87036 |
| 11-Feb-2020 |
Ian Levesque <ianlevesque@fb.com> |
[xray][clang] Always add xray-skip-entry/exit and xray-ignore-loops attrs
The function attributes xray-skip-entry, xray-skip-exit, and xray-ignore-loops were only being applied if a function had an
[xray][clang] Always add xray-skip-entry/exit and xray-ignore-loops attrs
The function attributes xray-skip-entry, xray-skip-exit, and xray-ignore-loops were only being applied if a function had an xray-instrument attribute, but they should apply if xray is enabled globally too.
Differential Revision: https://reviews.llvm.org/D73842
show more ...
|
#
69bf40c4 |
| 20-Jan-2020 |
Fangrui Song <maskray@google.com> |
[Driver][CodeGen] Support -fpatchable-function-entry=N,M and __attribute__((patchable_function_entry(N,M))) where M>0
Reviewed By: nickdesaulniers
Differential Revision: https://reviews.llvm.org/D7
[Driver][CodeGen] Support -fpatchable-function-entry=N,M and __attribute__((patchable_function_entry(N,M))) where M>0
Reviewed By: nickdesaulniers
Differential Revision: https://reviews.llvm.org/D73072
show more ...
|
#
97ba4830 |
| 17-Jan-2020 |
Ian Levesque <ianlevesque@fb.com> |
[xray] Allow instrumenting only function entry and/or only function exit
Extend -fxray-instrumentation-bundle to split function-entry and function-exit into two separate options, so that it is possi
[xray] Allow instrumenting only function entry and/or only function exit
Extend -fxray-instrumentation-bundle to split function-entry and function-exit into two separate options, so that it is possible to instrument only function entry or only function exit. For use cases that only care about one or the other this will save significant overhead and code size.
Differential Revision: https://reviews.llvm.org/D72890
show more ...
|
#
1d62be24 |
| 17-Jan-2020 |
Ian Levesque <ianlevesque@fb.com> |
[clang][xray] Add -fxray-ignore-loops option
XRay allows tuning by minimum function size, but also always instruments functions with loops in them. If the minimum function size is set to a large val
[clang][xray] Add -fxray-ignore-loops option
XRay allows tuning by minimum function size, but also always instruments functions with loops in them. If the minimum function size is set to a large value the loop instrumention ends up causing most functions to be instrumented anyway. This adds a new flag, -fxray-ignore-loops, to disable the loop detection logic.
Differential Revision: https://reviews.llvm.org/D72873
show more ...
|
#
53539bb0 |
| 13-Jan-2020 |
Amy Huang <akhuang@google.com> |
[DebugInfo] Add another level to DebugInfoKind called Constructor
The option will limit debug info by only emitting complete class type information when its constructor is emitted. This patch change
[DebugInfo] Add another level to DebugInfoKind called Constructor
The option will limit debug info by only emitting complete class type information when its constructor is emitted. This patch changes comparisons with LimitedDebugInfo to use the new level instead.
Differential Revision: https://reviews.llvm.org/D72427
show more ...
|
#
f17ae668 |
| 05-Jan-2020 |
Fangrui Song <maskray@google.com> |
[Driver][CodeGen] Add -fpatchable-function-entry=N[,0]
In the backend, this feature is implemented with the function attribute "patchable-function-entry". Both the attribute and XRay use TargetOpcod
[Driver][CodeGen] Add -fpatchable-function-entry=N[,0]
In the backend, this feature is implemented with the function attribute "patchable-function-entry". Both the attribute and XRay use TargetOpcode::PATCHABLE_FUNCTION_ENTER, so the two features are incompatible.
Reviewed By: ostannard, MaskRay
Differential Revision: https://reviews.llvm.org/D72222
show more ...
|
#
a44c434b |
| 04-Jan-2020 |
Fangrui Song <maskray@google.com> |
Support function attribute patchable_function_entry
This feature is generic. Make it applicable for AArch64 and X86 because the backend has only implemented NOP insertion for AArch64 and X86.
Revie
Support function attribute patchable_function_entry
This feature is generic. Make it applicable for AArch64 and X86 because the backend has only implemented NOP insertion for AArch64 and X86.
Reviewed By: nickdesaulniers, aaron.ballman
Differential Revision: https://reviews.llvm.org/D72221
show more ...
|
#
ab1bcda8 |
| 07-Jan-2020 |
Jim Lin <tclin914@gmail.com> |
[NFC] Use isX86() instead of getArch()
Summary: This is a clean up for https://reviews.llvm.org/D72247.
Reviewers: MaskRay, craig.topper, jhenderson
Reviewed By: MaskRay
Subscribers: hiraditya, r
[NFC] Use isX86() instead of getArch()
Summary: This is a clean up for https://reviews.llvm.org/D72247.
Reviewers: MaskRay, craig.topper, jhenderson
Reviewed By: MaskRay
Subscribers: hiraditya, rupprecht, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D72320
show more ...
|
#
d35bcbbb |
| 23-Dec-2019 |
Craig Topper <craig.topper@intel.com> |
[Sema][X86] Consider target attribute into the checks in validateOutputSize and validateInputSize.
The validateOutputSize and validateInputSize need to check whether AVX or AVX512 are enabled. But t
[Sema][X86] Consider target attribute into the checks in validateOutputSize and validateInputSize.
The validateOutputSize and validateInputSize need to check whether AVX or AVX512 are enabled. But this can be affected by the target attribute so we need to factor that in.
This patch moves some of the code from CodeGen to create an appropriate feature map that we can pass to the function.
Differential Revision: https://reviews.llvm.org/D68627
show more ...
|
#
0792ef72 |
| 22-Dec-2019 |
Fangrui Song <maskray@google.com> |
[Driver] Verify -mrecord-mcount in Driver, instead of CodeGen after D71627
GCC's x86 and s390 ports support -mrecord-mcount. Other ports reject the option.
aarch64-linux-gnu-gcc: error: unrecogni
[Driver] Verify -mrecord-mcount in Driver, instead of CodeGen after D71627
GCC's x86 and s390 ports support -mrecord-mcount. Other ports reject the option.
aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-mrecord-mcount’
Allowing this option can cause failures when building Linux kernel for aarch64, powerpc64, etc, which will think the feature is available if the clang command returns 0.
show more ...
|
#
2520bef8 |
| 17-Dec-2019 |
Jonas Paulsson <paulsson@linux.vnet.ibm.com> |
[Clang FE, SystemZ] Recognize -mrecord-mcount CL option.
Recognize -mrecord-mcount from the command line and add a function attribute "mrecord-mcount" when passed.
Only valid on SystemZ (when used
[Clang FE, SystemZ] Recognize -mrecord-mcount CL option.
Recognize -mrecord-mcount from the command line and add a function attribute "mrecord-mcount" when passed.
Only valid on SystemZ (when used with -mfentry).
Review: Ulrich Weigand https://reviews.llvm.org/D71627
show more ...
|
#
ca520592 |
| 18-Dec-2019 |
Jonas Paulsson <paulsson@linux.vnet.ibm.com> |
[Clang FE, SystemZ] Don't add "true" value for the "mnop-mcount" attribute.
Let the "mnop-mcount" function attribute simply be present or non-present. Update SystemZ backend as well to use hasFnAtt
[Clang FE, SystemZ] Don't add "true" value for the "mnop-mcount" attribute.
Let the "mnop-mcount" function attribute simply be present or non-present. Update SystemZ backend as well to use hasFnAttribute() instead.
Review: Ulrich Weigand https://reviews.llvm.org/D71669
show more ...
|
#
599d1cc0 |
| 12-Dec-2019 |
Jonas Paulsson <paulsson@linux.vnet.ibm.com> |
[Clang FE, SystemZ] Recognize -mpacked-stack CL option
Recognize -mpacked-stack from the command line and add a function attribute "mpacked-stack" when passed. This is needed for building the Linux
[Clang FE, SystemZ] Recognize -mpacked-stack CL option
Recognize -mpacked-stack from the command line and add a function attribute "mpacked-stack" when passed. This is needed for building the Linux kernel.
If this option is passed for any other target than SystemZ, an error is generated.
Review: Ulrich Weigand https://reviews.llvm.org/D71441
show more ...
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3 |
|
#
9803178a |
| 10-Dec-2019 |
Reid Kleckner <rnk@google.com> |
Avoid Attr.h includes, CodeGen edition
This saves around 20 includes of Attr.h. Not much.
|
#
505aa241 |
| 09-Dec-2019 |
Craig Topper <craig.topper@intel.com> |
[Attr] Move ParsedTargetAttr out of the TargetAttr class
Need to forward declare it in ASTContext.h for D68627, so it can't be a nested struct.
Differential Revision: https://reviews.llvm.org/D71159
|