- Oct 28, 2020
-
-
Siva Chandra Reddy authored
Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D90262
-
Fangrui Song authored
[BranchProbabilityInfo] Make MaxSuccIdx[Src] efficient and add a comment about the subtle eraseBlock. NFC Follow-up to D90272.
-
River Riddle authored
Resolves missed comments in D89103
-
River Riddle authored
At this point, these methods are just carbon copies of OpBuilder::create and aren't necessary given that PatternRewriter inherits from OpBuilder. Differential Revision: https://reviews.llvm.org/D90087
-
River Riddle authored
An InterfaceMap is generated for every single operation type, and is responsible for a large amount of the code size from MLIR given that its internals highly utilize templates. This revision refactors the internal implementation to use bare malloc/free for interface instances as opposed to static variables and moves as much code out of templates as possible. This led to a decrease of over >1mb (~12% of total MLIR related code size) for a downstream MLIR library with a large amount of operations. Differential Revision: https://reviews.llvm.org/D90086
-
River Riddle authored
When compiling for code size, the use of a vtable causes a destructor(and constructor in certain cases) to be generated for the class. Interface models don't need a complex constructor or a destructor, so this can lead to many megabytes of code size increase(even in opt). This revision switches to a simpler struct of function pointers approach that accomplishes the same API requirements as before. This change requires no updates to user code, or any other code aside from the generator, as the user facing API is still exactly the same. Differential Revision: https://reviews.llvm.org/D90085
-
River Riddle authored
[mlir][SIdeEffectInterface][NFC] Move several InterfaceMethods to the extraClassDeclarations instead All InterfaceMethods will have a corresponding entry in the interface model, and by extension have an implementation generated for every operation type. This can result in large binary size increases when a large amount of operations use an interface, such as the side effect interface. Differential Revision: https://reviews.llvm.org/D90084
-
MaheshRavishankar authored
This patch adds support for fusing linalg.indexed_generic op with linalg.tensor_reshape op by expansion, i.e. - linalg.indexed_generic op -> linalg.tensor_reshape op when the latter is expanding. - linalg.tensor_reshape op -> linalg.indexed_generic op when the former is folding. Differential Revision: https://reviews.llvm.org/D90082
-
Kazu Hirata authored
This patch ensures that BranchProbabilityInfo::eraseBlock(BB) deletes all entries in Probs associated with with BB. Without this patch, stale entries for BB may remain in Probs after eraseBlock(BB), leading to a situation where a newly created basic block has an edge probability associated with it even before the pass responsible for creating the basic block adds any edge probability to it. Consider the current implementation of eraseBlock(BB): for (const_succ_iterator I = succ_begin(BB), E = succ_end(BB); I != E; ++I) { auto MapI = Probs.find(std::make_pair(BB, I.getSuccessorIndex())); if (MapI != Probs.end()) Probs.erase(MapI); } Notice that it uses succ_begin(BB) and succ_end(BB), which are based on BB->getTerminator(). This means that if the terminator changes between calls to setEdgeProbability and eraseBlock, then we may not examine all pairs associated with BB. This is exactly what happens in MaybeMergeBasicBlockIntoOnlyPred, which merges basic blocks A into B if A is the sole predecessor of B, and B is the sole successor of A. It replaces the terminator of A with UnreachableInst before (indirectly) calling eraseBlock(A). The patch fixes the problem by keeping track of all edge probablities entered with setEdgeProbability in a map from BasicBlock* to a successor index. Differential Revision: https://reviews.llvm.org/D90272 -
Kazu Hirata authored
This patch teaches the jump threading pass to set edge probabilities whenever the pass creates new basic blocks. Without this patch, the compiler sometimes produces non-deterministic results. The non-determinism comes from the jump threading pass using stale edge probabilities in BranchProbabilityInfo. Specifically, when the jump threading pass creates a new basic block, we don't initialize its outgoing edge probability. Edge probabilities are maintained in: DenseMap<Edge, BranchProbability> Probs; in class BranchProbabilityInfo, where Edge is an ordered pair of BasicBlock * and a successor index declared as: using Edge = std::pair<const BasicBlock *, unsigned>; Probs maps edges to their corresponding probabilities. Now, we rarely remove entries from this map, so if we happen to allocate a new basic block at the same address as a previously deleted basic block with an edge probability assigned, the newly created basic block appears to have an edge probability, albeit a stale one. This patch fixes the problem by explicitly setting edge probabilities whenever the jump threading pass creates new basic blocks. Differential Revision: https://reviews.llvm.org/D90106
-
Sam Clegg authored
This field to represents the amount of static data needed by an dynamic library or executable it should not include things like heap or stack areas, which in the case of `-pie` are not determined until runtime (e.g. __stack_pointer is imported). Differential Revision: https://reviews.llvm.org/D90261
-
Eugene Zhulenev authored
Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D90264
-
Sanjay Patel authored
This was originally part of: f2c25c70 but that was reverted because there was an underlying bug in processing the vector type of these intrinsics. That was fixed with: 74ffc823 This is similar in spirit to 01ea93d8 (memcpy) except that here the underlying caller assumptions were created for vectorizer use (throughput) rather than other passes. That meant targets could have an enormous throughput cost with no corresponding size, latency, or blended cost increase. Paraphrasing from the previous commits: This may not make sense for some callers, but at least now the costs will be consistently wrong instead of mysteriously wrong. Targets should provide better overrides if the current modeling is not accurate.
-
Sanjay Patel authored
-
Martin Storsjö authored
On windows, wchar_t is 16 bit, while we might be widening chars to char32_t. This cast had been present since the initial commit, and removing it doesn't seem to make any tests fail. Differential Revision: https://reviews.llvm.org/D90228
-
Nemanja Ivanovic authored
When converting a BUILD_VECTOR or VECTOR_SHUFFLE to a splatting load as of 1461fb6e, we inaccurately check for a single user of the load and neglect to update the users of the output chain of the original load. As a result, we can emit a new load when the original load is kept and the new load can be reordered after a dependent store. This patch fixes those two issues. Fixes https://bugs.llvm.org/show_bug.cgi?id=47891
-
Joseph Huber authored
Summary: This patch adds basic support for priting the source location and names for the mapped variables. This patch does not support names for custom mappers. This is based on D89802. The names information currently will be printed out only in debug mode or using env LIBOMPTARGET_INFO during execution. But the information is added when availible to the Device and Private data structures. To get the information out the code must be built with debug symbols on using -g or -Rpass=openmp-opt Reviewers: jdoerfert Differential Revision: https://reviews.llvm.org/D90172
-
Louis Dionne authored
On windows, the previous path replacement using forward slashes wouldn't work, and so we'd end up including the same file again. We would do that until we'd hit the recursion limit of the Python interpreter. Instead, use `os.path` to properly replace without assuming a specific path separator.
-
Tony authored
Differential Revision: https://reviews.llvm.org/D90259
-
Joseph Huber authored
Summary: This patch adds support for passing in the original delcaration name in the source file to the libomptarget runtime. This will allow the runtime to provide more intelligent debugging messages. This patch takes the original expression parsed from the OpenMP map / update clause and provides a textual representation if it was explicitly mapped, otherwise it takes the name of the variable declaration as a fallback. The information in passed to the runtime in a global array of strings that matches the existing ident_t source location strings using ";name;filename;column;row;;". See clang/test/OpenMP/target_map_names.cpp for an example of the generated output for a given map clause. Reviewers: jdoervert Differential Revision: https://reviews.llvm.org/D89802
-
Louis Dionne authored
Otherwise, it's possible for some __config_site macros not to be picked up.
-
Fangrui Song authored
-
LLVM GN Syncbot authored
-
LLVM GN Syncbot authored
-
Fangrui Song authored
LegacyInlinerBase::doFinalization runs removeDeadFunctions() to remove bar but the new PM inliner doesn't. Improve the test to use llvm-nm -U.
-
Aaron En Ye Shi authored
Update the clang complex builtins for OpenMP to use the correct max function from either __nv_* or __ocml_*.
-
Nicolai Hähnle authored
These logically belong together since it's a base commit plus followup fixes to less common build configurations. The patches are: Revert "CfgInterface: rename interface() to getInterface()" This reverts commit a74fc481. Revert "Wrap CfgTraitsFor in namespace llvm to please GCC 5" This reverts commit f2a06875. Revert "Try to make GCC5 happy about the CfgTraits thing" This reverts commit 03a5f7ce. Revert "Introduce CfgTraits abstraction" This reverts commit c0cdd22c.
-
Nicolai Hähnle authored
This reverts commit 848a68a0.
-
Florian Hahn authored
-
Stella Laurenzo authored
* Still rough edges that need more sugar but the bones are there. Notes left in the test case for things that can be improved. * Does not actually yield custom OpViews yet for traversing. Will rework that in a followup. Differential Revision: https://reviews.llvm.org/D89932
-
Stanislav Mekhanoshin authored
I do not exactly like the use of a negative predicate to enable instructions' support. Change HasNoMadMacF32Insts with HasFmaLegacy32. Differential Revision: https://reviews.llvm.org/D90250
-
Victor Huang authored
Turn on TLS support for PCRel by default and update the test cases. Differential Revision: https://reviews.llvm.org/D88738 Reviewed by: stefanp, kamaub
-
Louis Dionne authored
When porting libc++ to embedded systems, it can be useful to drop support for localization, which these systems don't implement or care about. Differential Revision: https://reviews.llvm.org/D90072
-
Duncan P. N. Exon Smith authored
Shrink `FileEntryRef` to the size of a pointer, by having it directly reference the `StringMapEntry` the same way that `DirectoryEntryRef` does. This makes `FileEntryRef::FileEntryRef` private as a side effect (`FileManager` is a friend!). There are two helper types added within `FileEntryRef`: - `FileEntryRef::MapValue` is the type stored in `FileManager::SeenFileEntries`. It's a replacement for `SeenFileEntryOrRedirect`, where the second pointer type has been changed from `StringRef*` to `MapEntry*` (see next bullet). - `FileEntryRef::MapEntry` is the instantiation of `StringMapEntry<>` where `MapValue` is stored. This is what `FileEntryRef` has a pointer to, in order to grab the name in addition to the value. Differential Revision: https://reviews.llvm.org/D89488
-
Sean Silva authored
Differential Revision: https://reviews.llvm.org/D90204
-
Jay Foad authored
Also, following D81841, don't try to encode f16 literals in i16/u16 instructions. Differential Revision: https://reviews.llvm.org/D90242
-
Christian Sigg authored
Reviewed By: ezhulenev Differential Revision: https://reviews.llvm.org/D90211
-
Martin Storsjö authored
Differential Revision: https://reviews.llvm.org/D90220
-
Simon Pilgrim authored
This should have been removed when rG445c3fdd simplified the conditions. Reported as "Snippet 5" in https://www.viva64.com/en/b/0771/
-