- Jan 19, 2021
-
-
Faris Rehman authored
Add support for option -I in the new Flang driver. This will allow for included headers and module files in other directories, as the default search path is currently the working folder. The behaviour of this is consistent with the current f18 driver, where the current folder (i.e. ".") has the highest priority followed by the order of '-I's taking priority from first to last. Summary of changes: - Add SearchDirectoriesFromDashI to PreprocessorOptions, to be forwarded into the parser's searchDirectories - Add header files and non-functional module files to be used in regression tests. The module files are just text files and are used to demonstrated that paths specified with `-I` are taken into account when searching for .mod files. Differential Revision: https://reviews.llvm.org/D93453
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D94911
-
Simon Pilgrim authored
If a srl doesn't introduce any sign bits into the truncated result, then replace with a sra to let us use a PACKSS truncation - fixes a regression noticed in D56387 on pre-SSE41 targets that don't have PACKUSDW.
-
Hans Wennborg authored
This caused a miscompile in Chromium, see comments on the codereview for discussion and pointer to a reproducer. > InstCombine already performs a fold where X == Y ? f(X) : Z is > transformed to X == Y ? f(Y) : Z if f(Y) simplifies. However, > if f(X) only has one use, then we can always directly replace the > use inside the instruction. To actually be profitable, limit it to > the case where Y is a non-expr constant. > > This could be further extended to replace uses further up a one-use > instruction chain, but for now this only looks one level up. > > Among other things, this also subsumes D94860. > > Differential Revision: https://reviews.llvm.org/D94862 This also reverts the follow-up a003f265: > [llvm] Prevent infinite loop in InstCombine of select statements > > This fixes an issue where the RHS and LHS the comparison operation > creating the predicate were swapped back and forth forever. > > Differential Revision: https://reviews.llvm.org/D94934
-
Jay Foad authored
Change-Id: Idd7f47647bc0faa3ad6f61f44728c0f20540ec00
-
Florian Hahn authored
D84108 exposed a bad interaction between inlining and loop-rotation during regular LTO, which is causing notable regressions in at least CINT2006/473.astar. The problem boils down to: we now rotate a loop just before the vectorizer which requires duplicating a function call in the preheader when compiling the individual files ('prepare for LTO'). But this then prevents further inlining of the function during LTO. This patch tries to resolve this issue by making LoopRotate more conservative with respect to rotating loops that have inline-able calls during the 'prepare for LTO' stage. I think this change intuitively improves the current situation in general. Loop-rotate tries hard to avoid creating headers that are 'too big'. At the moment, it assumes all inlining already happened and the cost of duplicating a call is equal to just doing the call. But with LTO, inlining also happens during full LTO and it is possible that a previously duplicated call is actually a huge function which gets inlined during LTO. From the perspective of LV, not much should change overall. Most loops calling user-provided functions won't get vectorized to start with (unless we can infer that the function does not touch memory, has no other side effects). If we do not inline the 'inline-able' call during the LTO stage, we merely delayed loop-rotation & vectorization. If we inline during LTO, chances should be very high that the inlined code is itself vectorizable or the user call was not vectorizable to start with. There could of course be scenarios where we inline a sufficiently large function with code not profitable to vectorize, which would have be vectorized earlier (by scalarzing the call). But even in that case, there probably is no big performance impact, because it should be mostly down to the cost-model to reject vectorization in that case. And then the version with scalarized calls should also not be beneficial. In a way, LV should have strictly more information after inlining and make more accurate decisions (barring cost-model issues). There is of course plenty of room for things to go wrong unexpectedly, so we need to keep a close look at actual performance and address any follow-up issues. I took a look at the impact on statistics for MultiSource/SPEC2000/SPEC2006. There are a few benchmarks with fewer loops rotated, but no change to the number of loops vectorized. Reviewed By: sanwou01 Differential Revision: https://reviews.llvm.org/D94232 -
Muhammad Omair Javaid authored
This patch adds a new test case which depends on AArch64 SVE support and dynamic resize capability enabled. It created two seperate threads which have different values of sve registers and SVE vector granule at various points during execution. We test that LLDB is doing the size and offset updates properly for all of the threads including the main thread and when we VG is updated using prctl call or by 'register write vg' command the appropriate changes are also update in register infos. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D82866
-
Muhammad Omair Javaid authored
This patch builds on previously submitted SVE patches regarding expedited register set and per thread register infos. (D82853 D82855 and D82857) We need to resize SVE register based on value received in expedited list. Also we need to resize SVE registers when we write vg register using register write vg command. The resize will result in a updated offset for all of fpr and sve register set. This offset will be configured in native register context by RegisterInfoInterface and will also be be updated on client side in GDBRemoteRegisterContext. A follow up patch will provide a API test to verify this change. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D82863
-
Pavel Labath authored
The test couldn't find lldb-server as it's path was being overridden by LLDB_DEBUGSERVER_PATH environment variable (pointing to debugserver). This test should always use lldb-server, as it tests its platform capabilities. There's no need for the environment override, as lldb-server tests should test the executable they just built, so I just remote the override capability.
-
Yvan Roux authored
This patch handles cases where we have to save/restore the link register into the stack and and load/store instruction which use the stack are part of the outlined region. It checks that there will be no overflow introduced by the new offset and fixup these instructions accordingly. Differential Revision: https://reviews.llvm.org/D92934
-
David Spickett authored
When a command option does not have a short version (e.g. -f for --file), we use an arbitrary value in the short_option field to mark it as invalid. (though this value is unqiue to be used later for other things) We check that this short option is valid to print using llvm::isPrint. This implicitly casts our int to char, meaning we check the last char of any short_option value. Since the arbitrary value we chose for these options is some shortened hex version of the name, this returned true even for invalid values. Since llvm::isPrint returns true we later call std::islower and/or std::isupper on the short_option value. (the int) Calling these functions with something that cannot be validly converted to unsigned char is undefined. Somehow we got/get away with this but for me compiling with g++-9 I got a crash for "help memory read". The other command that uses this is "target variable" but that didn't crash for unknown reasons. Checking that short_option can fit into an unsigned char before we call llvm::isPrint means we will not attempt to call islower/upper on these options since we have no reason to print them. This also fixes bogus short options being shown for "memory read" and target variable. For "target variable", before: -e <filename> ( --file <filename> ) -b <filename> ( --shlib <filename> ) After: --file <filename> --shlib <filename> (note that the bogus short options are just the bottom byte of our arbitrary short_option value) Reviewed By: labath Differential Revision: https://reviews.llvm.org/D94917 -
Fraser Cormack authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D94694
-
Tres Popp authored
This fixes an issue where the RHS and LHS the comparison operation creating the predicate were swapped back and forth forever. Differential Revision: https://reviews.llvm.org/D94934
-
serge-sans-paille authored
In addition to consistency, we'll hit a wall when 11.1.0 gets released, because we cannot represent it with lit versioning scheme. Differential Revision: https://reviews.llvm.org/D94157
-
Lang Hames authored
It depends on Orc types (SymbolLookupSet), so can't be part of OrcShared.
-
Tres Popp authored
Previously uniqueCallSite could have race conditions between different threads. Now it is accessed with an atomic RMW and will be unique between different threads. Differential Revision: https://reviews.llvm.org/D94784
-
David Sherwood authored
A previous patch has already changed getInstructionCost to return an InstructionCost type. This patch changes the other various getXXXCost functions to return an InstructionCost too. This is a non-functional change - I've added a few asserts that the costs are valid in places where we're selecting between vector call and intrinsic costs. However, since we don't yet return invalid costs from any of the TTI implementations these asserts should not fire. See this patch for the introduction of the type: https://reviews.llvm.org/D91174 See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html Differential Revision: https://reviews.llvm.org/D94065
-
Luo, Yuanke authored
The dpbsud should be dpbssd. Differential Revision: https://reviews.llvm.org/D94943
-
Jan Svoboda authored
This patch moves the parsing of `{Lang,CodeGen}Options` from `parseSimpleArgs` to the original `Parse{Lang,CodeGen}Args` functions. This ensures all marshalled `LangOptions` are being parsed **after** the call `setLangDefaults`, which in turn enables us to marshall `LangOptions` that somehow depend on the defaults. (In a future patch.) Now, `CodeGenOptions` need to be parsed **after** `LangOptions`, because `-cl-mad-enable` (a `CodeGenOpt`) depends on the value of `-cl-fast-relaxed-math` and `-cl-unsafe-math-optimizations` (`LangOpts`). Unfortunately, this removes the nice property that marshalled options get parsed in the exact order they appear in the `.td` file. Now we cannot be sure that a TableGen record referenced in `ImpliedByAnyOf` has already been parsed. This might cause an ordering issues (i.e. reading value of uninitialized variable). I plan to mitigate this by moving each `XxxOpt` group from `parseSimpleArgs` back to their original parsing function. With this setup, if an option from group `A` references option from group `B` in TableGen, the compiler will require us to make the `CompilerInvocation` member for `B` visible in the parsing function for `A`. That's where we notice that `B` didn't get parsed yet. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D94682 -
Andy Wingo authored
Element sections will also need flags, so we shouldn't squat the WASM_SEGMENT namespace. Depends on D90948. Differential Revision: https://reviews.llvm.org/D92315
-
Andy Wingo authored
This patch changes to make call_indirect explicitly refer to the corresponding function table, residualizing TABLE_NUMBER relocs against it. With this change, wasm-ld now sees all references to tables, and can link multiple tables. Differential Revision: https://reviews.llvm.org/D90948
-
Timm Bäder authored
getuid() is not being called in this file anymore.
-
Guillaume Chatelet authored
`ssize_t` is from POSIX and is not standard unfortunately. Rewritting the code so it doesn't depend on it. Differential Revision: https://reviews.llvm.org/D94760
-
Guillaume Chatelet authored
-
Marek Kurdej authored
[libc++] [P0935] [C++20] Eradicating unnecessarily explicit default constructors from the standard library. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0935r0.html Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D91292
-
ShihPo Hung authored
Add vamoswap, vamoadd, vamoxor, vamoand, vamoor, vamomin, vamomax, vamominu, vamomaxu intrinsics. Reviewed By: craig.topper, khchen Differential Revision: https://reviews.llvm.org/D94589 -
Yang Fan authored
GCC warning: ``` In file included from /usr/include/string.h:495, from /usr/include/c++/9/cstring:42, from /llvm-project/llvm/include/llvm/ADT/Hashing.h:53, from /llvm-project/llvm/include/llvm/ADT/ArrayRef.h:12, from /llvm-project/llvm/include/llvm/MC/MCAsmBackend.h:12, from /llvm-project/llvm/lib/MC/XCOFFObjectWriter.cpp:14: In function ‘char* strncpy(char*, const char*, size_t)’, inlined from ‘{anonymous}::Section::Section(const char*, llvm::XCOFF::SectionTypeFlags, bool, {anonymous}::CsectGroups)’ at /llvm-project/llvm/lib/MC/XCOFFObjectWriter.cpp:146:12: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 8 equals destination size [-Wstringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Reviewed By: hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D94872 -
Siva Chandra authored
-
Mehdi Amini authored
-
Siva Chandra Reddy authored
-
Lang Hames authored
OrcShared is the correct home for this header since Orc was split in 1d0676b5. (It should have been moved in that commit, but was overlooked).
-
Richard Smith authored
to dependent declarations. Treat an id-expression that names a local variable in a templated function as being instantiation-dependent. This addresses a language defect whereby a reference to a dependent declaration can be formed without any construct being value-dependent. Fixing that through value-dependence turns out to be problematic, so instead this patch takes the approach (proposed on the core reflector) of allowing the use of pointers or references to (but not values of) dependent declarations inside value-dependent expressions, and instead treating template arguments as dependent if they evaluate to a constant involving such dependent declarations. This ends up affecting a bunch of OpenMP tests, due to OpenMP imprecisely handling instantiation-dependent constructs, bailing out early instead of processing dependent constructs to the extent possible when handling the template. Previously committed as 8c1f2d15, and reverted because a dependency commit was reverted.
-
Richard Smith authored
the nested-name-specifier when determining whether a qualified type is instantiation-dependent. Previously reverted in 25a02c3d due to causing us to reject some code. It turns out that the rejected code was ill-formed (no diagnostic required).
-
Richard Smith authored
if E is merely instantiation-dependent. Previously reverted in 34e72a14; re-committed with a fix to an issue that caused name mangling to assert.
-
Luo, Yuanke authored
Add nounwind attribute to avoid generating cfi instructions. Also make global buffer 64 bytes align in lit test case. Differential Revision: https://reviews.llvm.org/D94910
-
Nemanja Ivanovic authored
As of 8dacca94, we sign extend the atomic loaded operand for signed subword comparisons. However, the assumption that the other operand is correctly sign extended doesn't always hold. This patch sign extends the other operand if it needs to be sign extended. This is a second fix for https://bugs.llvm.org/show_bug.cgi?id=30451 Differential revision: https://reviews.llvm.org/D94058
-
Richard Smith authored
The C++ standard wording doesn't appear to properly handle the case where a class inherits a default constructor from a base class. Various properties of classes are defined in terms of the corresponding property of the default constructor, and in this case, the class does not have a default constructor despite being default-constructible, which the wording doesn't handle properly. This change implements a tentative fix for these problems, which has also been proposed to the C++ committee: if a class would inherit a default constructor, and does not explicitly declare one, then one is implicitly declared.
-
Luo, Yuanke authored
This is a additional bug fix for c5be0e0c. The distance for the spill instructions is wrong in previous patch. Differential Revision: https://reviews.llvm.org/D94772
-
Chen Zheng authored
This reverts commit 3bdf4507. Post commit comments need to be addressed first.
-