- Apr 18, 2021
-
-
Florian Hahn authored
Add test cases showing large ashr expansion during IndVarSimplify after ec54867d.
-
Nathan James authored
-
Roman Lebedev authored
Test SSE41, since that added float/i64/i32/i8 inserts/extracts. Don't forget to test vectors of pointers. Do test byte-aligned loads/stores. Fixup test coverage to be rather more exhaustive, testing all reasonable element sizes vs element counts permutations that fit up to witin ZMM.
-
Roman Lebedev authored
-
Juneyoung Lee authored
This is a patch to use m_Undef() matcher instead of isa<UndefValue>(). As suggested in D100122, this update is separately committed.
-
Juneyoung Lee authored
This fixes https://reviews.llvm.org/D93990#2666922 by teaching `m_Undef` to match vectors/aggrs with poison elements. As suggested, fixes in InstCombine files to use the `m_Undef` matcher instead of `isa<UndefValue>` will be followed. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D100122
-
Stephen Kelly authored
Extend the matchers gathering API for types to record template parameters. The TypeLoc type hierarchy has some types which are templates used in CRTP such as PointerLikeTypeLoc. Record the inherited template and template arguments of types inheriting those CRTP types in the ClassInheritance map. Because the name inherited from is now computed, the value type in that map changes from StringRef to std::string. This also causes the toJSON override signature used to serialize that map to change. Remove the logic for skipping over empty ClassData instances. Several classes such as TypeOfExprTypeLoc inherit a CRTP class which provides interesting locations though the derived class does not. Record it as a class to make the locations it inherits available. Record the typeSourceInfo accessors too as they provide access to TypeLocs in many classes. The existing unit tests use UnorderedElementsAre to compare the introspection result with the expected result. Our current implementation of google mock (in gmock-generated-matchers.h) is limited to support for comparing a container of 10 elements. As we are now returning more than 10 results for one of the introspection tests, change it to instead compare against an ordered vector of pairs. Because a macro is used to generate API strings and API calls, disable clang-format in blocks of expected results. Otherwise clang-format would insert whitespaces which would then be compared against the introspected strings and fail the test. Introduce a recursion guard in the generated code. The TypeLoc class has IgnoreParens() API which by default returns itself, so it would otherwise recurse infinitely. Differential Revision: https://reviews.llvm.org/D100516
-
Arthur O'Dwyer authored
-
Florian Hahn authored
At the moment, ReversePostOrderTraversal performs a post-order walk on the entry node of the passed in graph, rather than the graph type itself. If GT::NodeRef is the same as GraphT, everything works as expected and this is the case for the current uses in-tree. But it does not work as expected if GraphT != GT::NodeRef. In that case, we either fail to build (if there is no GraphTrait specialization for GT:NodeRef) or we pick the GraphTrait specialization for GT::NodeRef, instead of the specialization of GraphT. Both the depth-first and post-order iterators pick the expected specalization and this patch updates ReversePostOrderTraversal to delegate to po_begin & po_end to pick the right specialization, rather than forcing using GraphTraits<GT::NodeRef>, by first getting the entry node. This makes `ReversePostOrderTraversal<Graph<6>> RPOT(G);` build and work as expected in the test. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D100169
-
Nikita Popov authored
-
Nikita Popov authored
Replace branch on undef by branch on unknown condition.
-
Lang Hames authored
-
Sylvain Audi authored
clang-scan-deps contains some command line parsing and modifications. This patch adds support for clang-cl command options. Differential Revision: https://reviews.llvm.org/D92191
-
Sylvain Audi authored
This fixes argument injection in clang command lines, by adding them before "--". Previously, the arguments were injected at the end of the command line and could be added after "--", which would be wrongly interpreted as input file paths. This fix is needed for a subsequent patch, see D92191. Differential Revision: https://reviews.llvm.org/D95099
-
Alexandre Ganea authored
-
Stephen Kelly authored
-
Craig Topper authored
This keeps track of which modes are in VVT so we can find out if a mode is missing later. But we can just ask VVT whether it has a particular mode.
-
Jennifer Chukwu authored
Reviewed By: xgupta Differential Revision: https://reviews.llvm.org/D100705
-
Stephen Kelly authored
This class initially had args to be generic to future needs. In particular, I thought that source location introspection should show the getBeginLoc of CallExpr args and the getArgLoc of TemplateSpecializationLocInfo etc. However, that is probably best left out of source location introspection because it involves node traversal. If something like this is needed in the future, it can be added in the future. Differential Revision: https://reviews.llvm.org/D100688
-
Florian Hahn authored
This patch updates a couple of functions that unnecessarily took the input graph by value, when it was not needed. They can take the graph by const-reference instead, which does not require GraphT to provide a copy constructor. Split off from D100169.
-
Mark de Wever authored
-
- Apr 17, 2021
-
-
Yaxun (Sam) Liu authored
hipRTC compiles HIP device code at run time. Since the system may not have development tools installed, when a HIP program is compiled through hipRTC, there is no standard C or C++ header available. As such, the HIP headers should not depend on standard C or C++ headers when used with hipRTC. Basically when hipRTC is used, HIP headers only provides definitions of HIP device API functions. This is in line with what nvRTC does. This patch adds support of hipRTC to HIP headers in clang. Basically hipRTC defines a macro __HIPCC_RTC__ when compile HIP code at run time. When this macro is defined, HIP headers do not include standard C/C++ headers. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D100652
-
Dávid Bolvanský authored
GCC 8 introduced these new pragmas to control loop unrolling. We should support them for compatibility reasons and the implementation itself requires few lines of code, since everything needed is already implemented for #pragma unroll/nounroll.
-
Yaxun (Sam) Liu authored
Add device variables to llvm.compiler.used if they are ODR-used by either host or device functions. This is necessary to prevent them from being eliminated by whole-program optimization where the compiler has no way to know a device variable is used by some host code. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D98814
-
Yaxun (Sam) Liu authored
The internalization pass only internalizes global variables with no users. If the global variable has some dead user, the internalization pass will not internalize it. To be able to internalize global variables with dead users, a global dce pass is needed before the internalization pass. This patch adds that. Reviewed by: Artem Belevich, Matt Arsenault Differential Revision: https://reviews.llvm.org/D98783
-
Nikita Popov authored
We could optimize the first case, as the pointer is captured only after the loop.
-
Florian Hahn authored
Debug intrinsics are free to hoist and should be skipped when looking for terminator-only blocks. As a consequence, we have to delegate to the main hoisting loop to hoist any dbg intrinsics instead of jumping to the terminator case directly. This fixes PR49982. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D100640
-
Nikita Popov authored
It will not do anything useful for them, as we already know that they don't modref with any accessible memory. In particular, this prevents noalias metadata from being placed on noalias.scope.decl intrinsics. This reduces the amount of metadata needed, and makes it more likely that unnecessary decls can be eliminated.
-
Simon Pilgrim authored
-
David CARLIER authored
-
David Carlier authored
Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D89653
-
David Carlier authored
Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D89631
-
Fangrui Song authored
[ELF] --wrap: don't clear sym->isUsedInRegularObj if real->isUsedInRegularObj; set wrap's initial binding to sym's Fix PR49897: if `__real_foo` has the isUsedInRegularObj bit set, we need to retain `foo` in .symtab, even if `foo` is undefined. The new behavior will match GNU ld. Before the patch, we produced an R_X86_64_JUMP_SLOT relocation referencing the index 0 undefined symbol, which would be erroed by glibc (see f96ff3c0). While here, fix another bug: if `__wrap_foo` does not exist, its initial binding should be `foo`'s.
-
Serge Guelton authored
Such attributes can either be unset, or set to "true" or "false" (as string). throughout the codebase, this led to inelegant checks ranging from if (Fn->getFnAttribute("no-jump-tables").getValueAsString() == "true") to if (Fn->hasAttribute("no-jump-tables") && Fn->getFnAttribute("no-jump-tables").getValueAsString() == "true") Introduce a getValueAsBool that normalize the check, with the following behavior: no attributes or attribute set to "false" => return false attribute set to "true" => return true Differential Revision: https://reviews.llvm.org/D99299 -
Siva Chandra authored
-
Siva Chandra Reddy authored
-
Siva Chandra Reddy authored
-
Siva Chandra Reddy authored
This will help us catch errors like the ones fixed by the commit 31ed45d9
-
Siva Chandra Reddy authored
-
Fangrui Song authored
-