- Dec 02, 2022
-
-
Michael Buch authored
Differential Revision: https://reviews.llvm.org/D139083
-
Michael Buch authored
Currently all callsites already assume the pointer is non-null. This patch just asserts this assumption. This is practically enforced by `ModuleList::Append` which won't add `nullptr`s to `m_modules`. Differential Revision: https://reviews.llvm.org/D139082
-
Konstantin Vladimirov authored
Restricts FMV usage for subtargets without 'f' extension. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D139105
-
Quentin Colombet authored
Subviews are supposed to be expanded before we hit the lowering code. The expansion is done with the pass called expand-strided-metadata. Add a test that demonstrate how these passes can be linked up to achieve the desired lowering. This patch is NFC in spirit but not in practice because `subview` gets lowered into `reinterpret_cast(extract_strided_metadata, <some math>)` which lowers in two memref descriptors (one for `reinterpert_cast` and one for `extract_strided_metadata`), which creates some noise of the form: `extractvalue(unrealized_cast(extractvalue[0]))[0]` that is currently not simplified within MLIR but that is really just noop in that case. Differential Revision: https://reviews.llvm.org/D136377
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D139104
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D139103
-
River Riddle authored
ConstantOp uses `%idx<value>` and BoolConstantOp uses true/false, which is similar to the printing for arith::ConstantOp. Differential Revision: https://reviews.llvm.org/D139175
-
Mel Chen authored
-
Valentin Clement authored
SELECT TYPE lower and conversion was not handling `character` type guard. This add support for it. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D139106
-
Vlad Serebrennikov authored
-
KAWASHIMA Takahiro authored
Explanations for options of floating point are updated to match the `RenderFloatingPointOptions` function in `clang/lib/Driver/ToolChains/Clang.cpp`. Missing explanations are also added. Differential Revision: https://reviews.llvm.org/D138117
-
River Riddle authored
This allows for properly supporting TypeSwitch on reference types which do not support copying/do not want copying.
-
River Riddle authored
This allows for more interesting manipulation of an inflight diagnostic.
-
Guillaume Chatelet authored
This helps override llvm libc functions for experiment purposes. Differential Revision: https://reviews.llvm.org/D138999
-
gonglingqin authored
-
Jean Perier authored
Update BinaryOp<T>::gen so that const T& is threaded and some operation knowledge that is not encoded by the type T or the arguments can be used. For Extremum, it is the order (Greater or Lesser) that is required, but this will also be required for evaluate::Relational. Differential Revision: https://reviews.llvm.org/D139124
-
Valery Pykhtin authored
The function makes liveness tests for the entire live register set for every instruction it passes by. This becomes very slow on high RP regions such as ASAN enabled code. Instead only uses of last tracked instruction should be tested and this greatly improves compilation time. This patch revealed few bugs in SIFormMemoryClauses and PreRARematStage::sinkTriviallyRematInsts which should be fixed first. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D136267
-
Fangrui Song authored
-
tentzen authored
This patch is the Part-2 (BE LLVM) implementation of HW Exception handling. Part-1 (FE Clang) was committed in 797ad701. This new feature adds the support of Hardware Exception for Microsoft Windows SEH (Structured Exception Handling). Compiler options: For clang-cl.exe, the option is -EHa, the same as MSVC. For clang.exe, the extra option is -fasync-exceptions, plus -triple x86_64-windows -fexceptions and -fcxx-exceptions as usual. NOTE:: Without the -EHa or -fasync-exceptions, this patch is a NO-DIFF change. The rules for C code: For C-code, one way (MSVC approach) to achieve SEH -EHa semantic is to follow three rules: First, no exception can move in or out of _try region., i.e., no "potential faulty instruction can be moved across _try boundary. Second, the order of exceptions for instructions 'directly' under a _try must be preserved (not applied to those in callees). Finally, global states (local/global/heap variables) that can be read outside of _try region must be updated in memory (not just in register) before the subsequent exception occurs. The impact to C++ code: Although SEH is a feature for C code, -EHa does have a profound effect on C++ side. When a C++ function (in the same compilation unit with option -EHa ) is called by a SEH C function, a hardware exception occurs in C++ code can also be handled properly by an upstream SEH _try-handler or a C++ catch(...). As such, when that happens in the middle of an object's life scope, the dtor must be invoked the same way as C++ Synchronous Exception during unwinding process. Design: A natural way to achieve the rules above in LLVM today is to allow an EH edge added on memory/computation instruction (previous iload/istore idea) so that exception path is modeled in Flow graph preciously. However, tracking every single memory instruction and potential faulty instruction can create many Invokes, complicate flow graph and possibly result in negative performance impact for downstream optimization and code generation. Making all optimizations be aware of the new semantic is also substantial. This design does not intend to model exception path at instruction level. Instead, the proposed design tracks and reports EH state at BLOCK-level to reduce the complexity of flow graph and minimize the performance-impact on CPP code under -EHa option. One key element of this design is the ability to compute State number at block-level. Our algorithm is based on the following rationales: A _try scope is always a SEME (Single Entry Multiple Exits) region as jumping into a _try is not allowed. The single entry must start with a seh_try_begin() invoke with a correct State number that is the initial state of the SEME. Through control-flow, state number is propagated into all blocks. Side exits marked by seh_try_end() will unwind to parent state based on existing SEHUnwindMap[]. Note side exits can ONLY jump into parent scopes (lower state number). Thus, when a block succeeds various states from its predecessors, the lowest State triumphs others. If some exits flow to unreachable, propagation on those paths terminate, not affecting remaining blocks. For CPP code, object lifetime region is usually a SEME as SEH _try. However there is one rare exception: jumping into a lifetime that has Dtor but has no Ctor is warned, but allowed: Warning: jump bypasses variable with a non-trivial destructor In that case, the region is actually a MEME (multiple entry multiple exits). Our solution is to inject a eha_scope_begin() invoke in the side entry block to ensure a correct State. Implementation: Part-1: Clang implementation (already in): Please see commit 797ad701). Part-2 : LLVM implementation described below. For both C++ & C-code, the state of each block is computed at the same place in BE (WinEHPreparing pass) where all other EH tables/maps are calculated. In addition to _scope_begin & _scope_end, the computation of block state also rely on the existing State tracking code (UnwindMap and InvokeStateMap). For both C++ & C-code, the state of each block with potential trap instruction is marked and reported in DAG Instruction Selection pass, the same place where the state for -EHsc (synchronous exceptions) is done. If the first instruction in a reported block scope can trap, a Nop is injected before this instruction. This nop is needed to accommodate LLVM Windows EH implementation, in which the address in IPToState table is offset by +1. (note the purpose of that is to ensure the return address of a call is in the same scope as the call address. The handler for catch(...) for -EHa must handle HW exception. So it is 'adjective' flag is reset (it cannot be IsStdDotDot (0x40) that only catches C++ exceptions). Suppress push/popTerminate() scope (from noexcept/noTHrow) so that HW exceptions can be passed through. Original llvm-dev [RFC] discussions can be found in these two threads below: https://lists.llvm.org/pipermail/llvm-dev/2020-March/140541.html https://lists.llvm.org/pipermail/llvm-dev/2020-April/141338.html Differential Revision: https://reviews.llvm.org/D102817/new/
-
Fangrui Song authored
-
Dhruva Chakrabarti authored
This reverts commit 2b234ce3.
-
wanglei authored
-
Jan Svoboda authored
This reverts commit f99e5a91.
-
Jan Svoboda authored
This reverts commit 83973cf1.
-
Chen Zheng authored
Tail duplication may modify the loop to a "non-canonical" form that CTR Loop pass can not recognize. We fixed one issue in D135846. And we found in some other case, the loop is changed to irreducible form. It is hard to fix this case in CTR loop pass, instead we reorder the CTR loop pass before tail duplication pass and just after finalize-isel pass to avoid any unexpected change to the loop form. Reviewed By: lkail Differential Revision: https://reviews.llvm.org/D138265
-
Chen Zheng authored
This reverts commit df9d60af. The CTRLoops pass is reordered to front of tail duplication pass in D138265.
-
Jan Svoboda authored
This is an attempt to fix a Windows bot failure. In the test introduced in 83973cf1, file dependencies were printed out-of-order (after replacing backslashes with slashes). This might've been caused by styles of some paths being different.
-
Jan Svoboda authored
With this patch, we mark module maps that include an affecting `extern` module map as also affecting. This is a generalization of D137197: now we don't require the importing module map to describe parent of the extern module. Depends on D137198. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D137206
-
Jan Svoboda authored
Currently, the algorithm for gathering affecting module maps includes only those defining modules that include some headers. This is not entirely correct, though. Some module maps might be "importing" module maps for `extern` submodules. Such parent module maps are affecting - they do change semantics of the compilation. This patch adds parent module maps into the set of affecting module maps. Depends on D137197. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D137198
-
Jan Svoboda authored
Currently, the algorithm for gathering affecting module maps includes those defining transitive dependencies. This seems like an over-approximation, since those don't change the semantics of current module build. (With this patch, `ModulesToProcess` only ever holds modules whose headers will be serialized into the current PCM.) Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D137197
-
Matt Arsenault authored
Needed manual fixes: 2008-01-06-VoidCast.ll alias.ll @0 type lost pr27703.ll totally confused pr44242.ll phi and update_test_checks pr44245.ll phi and update_test_checks Needed re-running update_test_checks: 2009-01-08-AlignAlloca.ll 2009-02-20-InstCombine-SROA.ll addrspacecast.ll alloca-cast-debuginfo.ll alloca-in-non-alloca-as.ll alloca.ll icmp-gep.ll icmp-custom-dl.ll lifetime-no-null-opt.ll non-integral-pointers.ll pr33689_same_bitwidth.ll pr39908.ll scalable-cast-of-alloc.ll select-cmp-br.ll unpack-fca.ll Converted to generated checks: 2012-6-7-vselect-bitcast.ll
-
Matt Arsenault authored
These interfered with opaquification
-
Matt Arsenault authored
Switch to FileCheck and generated checks.
-
Jan Svoboda authored
This patch resolves a FIXME that points out an inefficiency in first deserializing the input file info and the whole input file, which redundantly deserializes the input file info again. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D137192
-
Jan Svoboda authored
In D134923, the scanner introduced canonicalization of framework directories when reporting module map paths in order to increase module sharing. However, if we canonicalize framework directory that plays a role in a VFS remapping, and later try to use that module map to build the module, header lookup can fail. This happens when the module headers are remapped using the original framework path. This patch fixes that. The implementation relies on the fact that the chain of directories in VFS remapping are assigned `DirectoryEntry` objects distinct from their on-disk counterparts. If we detect that case, we avoid the canonicalization. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D135841
-
Louis Dionne authored
-
Chen Zheng authored
This is to address comments https://reviews.llvm.org/D138265#3950197 This should be helpful for detecting optimization passes added to O0 pipeline by mistake. Reviewed By: lkail Differential Revision: https://reviews.llvm.org/D138973
-
chenglin.bi authored
shift + and -> shift + shift to select more shfited registers.
-
Matt Arsenault authored
The opaquify script deleted a few declarations for some reason which were manually deleted.
-