- Oct 15, 2021
-
-
Dan Liew authored
rdar://83637067
-
Jim Lin authored
Reviewed By: craig.topper, jrtc27 Differential Revision: https://reviews.llvm.org/D110308
-
Andrew Young authored
This adds a new parser and printer for text which may be a keyword or a string. When printing, it will attempt to print the text as a keyword, but if it has any special or non-printable characters, it will be printed as an escaped string. When parsing, it will parse either a valid keyword or a potentially escaped string. The printer allows for an empty string, in which case it prints `""`. This new function is used for printing the name in NamedAttributes, and for printing the symbol name after the `@`. In CIRCT we are using this to print module port names, which are conceptually similar to named function arguments. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D111683
-
Jason Molenda authored
When DynamicLoaderMacOS::SetNotificationBreakpoint sets the breakpoint for new binaries being loaded/unloaded, it limits the scope of that breakpoint to just dyld, so we don't re-evaluate the breakpoint for every new binary loaded. I wrote this to get the module's ObjectFile FileSpec in an earlier change, but this is not correct. If lldb is debugging a remote system, and it had to read dyld out of memory from the remote system, it will have no FileSpec on the lldb debugger host. We need to grab the Module's FileSpec, which in this case is actually falling back to the PlatformFileSpec, the binary path on the target system. rdar://84199646
-
Shao-Ce SUN authored
-
Ben Shi authored
Use SH1ADD/SH2ADD/SH3ADD along with LUI+ADDI to compose int32*3, int32*5 and int32*9. Reviewed By: craig.topper, luismarques Differential Revision: https://reviews.llvm.org/D111484
-
Kazu Hirata authored
-
Max Kazantsev authored
This patch teaches SCEV two implication rules: x <u y && y >=s 0 --> x <s y, x <s y && y <s 0 --> x <u y. And all equivalents with signs/parts swapped. Differential Revision: https://reviews.llvm.org/D110517 Reviewed By: nikic
-
Qiu Chaofan authored
Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D94282
-
Artem Dergachev authored
'(self.prop)' produces a surprising AST where ParenExpr resides inside `PseudoObjectExpr. This breaks ObjCMethodCall::getMessageKind() which in turn causes us to perform unnecessary dynamic dispatch bifurcation when evaluating body-farmed property accessors, which in turn causes us to explore infeasible paths.
-
Richard Smith authored
This is unnecessary in general, and wrong when the expression invokes a consteval function.
-
Max Kazantsev authored
Current implementations of DFS in SCEV check unique-visited of traversed values on pop, and not on push. As result, the same value may be pushed multiple times just to be thrown away when popped. These operations are meaningless and only waste time and increase memory footprint of the worklist. This patch reworks the DFS strategy to check uniqueness before push. Should be NFC. Differential Revision: https://reviews.llvm.org/D111774 Reviewed By: nikic, reames
-
Mogball authored
`DefaultValuedAttr<StrAttr, "">` and `ConstantAttr<StrAttr, "">` result in bugs in which TableGen will not recognize that the attribute has a default value, because `""` is an empty TableGen string. Strings no longer have special treatment. Instead, string values must be wrapped in quotes: "\"foo\"". Two helpers, `DefaultValuedStrAttr` and `ConstantStrAttr` have been added to keep code clean. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D111855
-
Matthias Springer authored
From the perspective of analysis, scf::ForOp is treated as a black box. Basic block arguments do not alias with their respective OpOperands on the ForOp, so they do not participate in conflict analysis with ops defined outside of the loop. However, bufferizesToMemoryRead and bufferizesToMemoryWrite on the scf::ForOp itself are used to determine how the scf::ForOp interacts with its surrounding ops. Differential Revision: https://reviews.llvm.org/D111775
-
Matthias Springer authored
For each memory read, follow SSA use-def chains to find the op that produces the data being read (i.e., the most recent write). A memory write to an alias is a conflict if it takes places after the "most recent write" but before the read. This CL introduces two main changes: * There is a concise definition of a conflict. Given a piece of IR with InPlaceSpec annotations and a computes alias set, it is easy to compute whether this program has a conflict. No need to consider multiple cases such as "read of operand after in-place write" etc. * No need to check for clobbering. Differential Revision: https://reviews.llvm.org/D111287
-
Artur Pilipenko authored
Fix a bug when getInlineCost incorrectly returns a cost/threshold pair instead of an explicit never inline. Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D111687
-
Hongtao Yu authored
PseudoProbeUpdatePass is used to distribute sample counts among dulplicated probes. It doesn't make sense for it to run without a sample profile. The pass takes 1% of the build time. Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D111847
-
Vitaly Buka authored
It was the slowest test: -------------------------------------------------------------------------- 41.77s: AddressSanitizer-x86_64-linux :: TestCases/Linux/uar_signals.cpp 26.64s: AddressSanitizer-i386-linux :: TestCases/Linux/uar_signals.cpp 14.82s: AddressSanitizer-x86_64-linux :: TestCases/Posix/current_allocated_bytes.cpp 14.79s: AddressSanitizer-i386-linux :: TestCases/Posix/current_allocated_bytes.cpp 11.55s: AddressSanitizer-x86_64-linux :: TestCases/scariness_score_test.cpp 10.15s: AddressSanitizer-x86_64-linux :: TestCases/Posix/stack-use-after-return.cpp
-
Vitaly Buka authored
-std=c++14 is a default for a while. Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D111848
-
Vitaly Buka authored
-
Michael Jones authored
Add an implementation for memccpy and mempcpy. These functions are posix extensions for the moment. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D111762
-
peter klausler authored
Semantics is rejecting valid programs with NULL() actual arguments to generic interfaces, including user-defined operators. Subclause 16.9.144(para 6) makes clear that NULL() can be a valid actual argument to a generic interface so long as it does not produce ambiguity. This patch handles those cases, revises existing tests, and adjust an error message about NULL() operands to appear less like a blanket prohibition. Differential Revision: https://reviews.llvm.org/D111850
-
Jacques Pienaar authored
Allow emitting get & set prefix for accessors generated for ops. If enabled, then the argument/return/region name gets converted from snake_case to UpperCamel and prefix added. The attribute also allows generating both the current "raw" method along with the prefix'd one to make it easier to stage changes. The option is added on the dialect and currently defaults to existing raw behavior. The expectation is that the staging where both are generated would be short lived and so optimized to keeping the changes local/less invasive (it just generates two functions for each accessor with the same body - most of these internally again call a helper function). But generation can be optimized if needed. I'm unsure about OpAdaptor classes as there it is all get methods (it is a named view into raw data structures), so prefix doesn't add much. This starts with emitting raw-only form (as current behavior) as default, then one can opt-in to raw & prefixed, then just prefixed. The default in OpBase will switch to prefixed-only to be consistent with MLIR style guide. And the option potentially removed later (considered enabling specifying prefix but current discussion more pro keeping it limited and stuck with that). Also add more explicit checking for pruned functions to avoid emitting where no function was added (and so avoiding dereferencing nullptr) during op def/decl generation. See https://bugs.llvm.org/show_bug.cgi?id=51916 for further discussion. Differential Revision: https://reviews.llvm.org/D111033
-
peter klausler authored
Fold the legacy intrinsic functions LGE, LGT, LLE, & LLT by rewriting them into character relational expressions and then folding those. Also fix folding of comparisons of character values of distinct lengths: the shorter value must be padded with blanks. (This fix exposed some bad test cases, which are also fixed.) Differential Revision: https://reviews.llvm.org/D111843
-
Arthur Eubanks authored
-
Evgenii Stepanov authored
When built with hwasan, assume that the target architecture does not support TBI. HWASan uses that byte for its own purpose, and changing it breaks things. Reviewed By: hctim Differential Revision: https://reviews.llvm.org/D111842
-
Evgenii Stepanov authored
On newer glibc, this test detects an extra match somewhere under pthread_getattr_np. This results in Thread: lines getting spread out in the report and failing to match the CHECKs. Fix the CHECKs to allow this possibility. Reviewed By: fmayer Differential Revision: https://reviews.llvm.org/D111841
-
Evgenii Stepanov authored
Add a default "/" prefix to the symbol search path in the symbolization script. Without this, the binary itself is not considered a valid source of symbol info. Differential Revision: https://reviews.llvm.org/D111840
-
Peyton, Jonathan L authored
Detect, through CPUID.1A, and show user different core types through KMP_AFFINITY=verbose mechanism. Offer future runtime optimizations __kmp_is_hybrid_cpu() to know whether running on a hybrid system or not. Differential Revision: https://reviews.llvm.org/D110435
-
Peyton, Jonathan L authored
-
David Blaikie authored
Looks like lldb has some issues with this - somehow it causes lldb to treat a "char[N]" type as an array of chars (prints them out individually) but a "char [N]" is printed as a string. (even though the DWARF doesn't have this string in it - it's something to do with the string lldb generates for itself using clang) This reverts commit 277623f4.
-
peter klausler authored
Semantics refuses valid ELEMENTAL subprograms without dummy arguments, but there's no such constraint in the standard; indeed, subclause 15.8.2 discusses the meaning of calls to ELEMENTAL functions with arguments. Remove the check and its test. Differential Revision: https://reviews.llvm.org/D111832
-
Stella Laurenzo authored
* Leaves it as a commented out area with a note on how to debug.
-
Peyton, Jonathan L authored
This patch implements teams affinity on the host. The default is spread. A user can specify either spread, close, or primary using KMP_TEAMS_PROC_BIND environment variable. Unlike OMP_PROC_BIND, KMP_TEAMS_PROC_BIND is only a single value and is not a list of values. The values follow the same semantics under the OpenMP specification for parallel regions except T is the number of teams in a league instead of the number of threads in a parallel region. Differential Revision: https://reviews.llvm.org/D109921
-
Alexey Bataev authored
Need to check that either Idx is UndefMaskElem and value is UndefValue or Idx is valid and value is the same as the scalar value in the node. Differential Revision: https://reviews.llvm.org/D111802
-
David Blaikie authored
Based on post-commit review discussion on 2bd84938 with Richard Smith. Other uses of forcing HasEmptyPlaceHolder to false seem OK to me - they're all around pointer/reference types where the pointer/reference token will appear at the rightmost side of the left side of the type name, so they make nested types (eg: the "int" in "int *") behave as though there is a non-empty placeholder (because the "*" is essentially the placeholder as far as the "int" is concerned).
-
Reid Kleckner authored
After the TargetRegistry.h move, nothing in Support includes headers from MC. However, files in tablegen use MC headers, so we must add an entry for them in tblgen srcs. Differential Revision: https://reviews.llvm.org/D111835
-
Collin Baker authored
When LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on Asan-i386-calls-Dynamic-Test and Asan-i386-inline-Dynamic-Test fail to run on a x86_64 host. This is because asan's unit test lit files are configured once, rather than per target arch as with the non-unit tests. LD_LIBRARY_PATH ends up incorrect, and the tests try linking against the x86_64 runtime which fails. This changes the unit test CMake machinery to configure the default and dynamic unit tests once per target arch, similar to the other asan tests. Then the fix from https://reviews.llvm.org/D108859 is adapted to the unit test Lit files with some modifications. Fixes PR52158. Differential Revision: https://reviews.llvm.org/D111756
-
Arthur Eubanks authored
Previously without -disable-free, -clear-ast-before-backend would crash in ~ASTContext() due to various reasons. This works around that by doing a lot of the cleanup ahead of the destructor so that the destructor doesn't actually do any manual cleanup if we've already cleaned up beforehand. This actually does save a measurable amount of memory with -clear-ast-before-backend, although at an almost unnoticeable runtime cost: https://llvm-compile-time-tracker.com/compare.php?from=5d755b32f2775b9219f6d6e2feda5e1417dc993b&to=58ef1c7ad7e2ad45f9c97597905a8cf05a26258c&stat=max-rss Previously we weren't doing any cleanup with -disable-free, so I tried measuring the impact of always doing the cleanup and didn't measure anything noticeable on llvm-compile-time-tracker. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D111767
-
Rong Xu authored
We are seeing extremely long time in building AMDGPUInstPrinter.cpp when profile instrumentation is enabled: It takes more than 5 minutes (compared to ~8 seconds in non-instrument build). This caused by the huge statements in printInstruction functions. In profile instrumentation build, we need have extra control flow to differentiate each case statement. This in turn adds significant compile time in block placement and branch folding. Function printInstruction is not likely to benefit from PGO build as it's rarely executed in a typical compilation. So here I disable the profile instrumentation for this function. Differential Revision: https://reviews.llvm.org/D111682
-