- Nov 18, 2022
-
-
Fangrui Song authored
This reverts commit eb2a57eb. llvm/include/llvm/Transforms/Instrumentation/KCFI.h including llvm/CodeGen is a layering violation. We should use an approach where Instrumementation/ doesn't need to include CodeGen/. Sorry for not spotting this in the review.
-
Craig Topper authored
This avoids depending on int->float or double->float conversion. Improving codegen with #pragma STDC FENV_ACCESS ON. Really we should improve constant folding somewhere, but this was a cheap and easy improvement. Fixes PR59052.
-
Murali Vijayaraghavan authored
dimension where the extra parallel dimension is inserted Currently, the innerParallel and non innerParallel strategies use two different ways to fix for where the extra loop is inserted and where the extra dimension for the intermediate result is inserted - innerParallel adds the extra (parallel) loop right after the pre-existing reduction loop, whereas non innerParallel adds the reduction loop in the successor to the index supplied by control, and the parallel loop in the index supplied by the control. The semantics of the index supplied by the control is supposed to only control where the extra tensor dimension is inserted in the intermediate tensor. Conflating this index with where the reduction (and parallel) loops are inserted leads to more complex (and confusing) logic overall. This differential removes conflating the two uses of the index, and keeps the reduction and parallel loops in the same vicinity and uses the supplied index to only determine the position of the extra tensor dimension. It also simplifies the code by merging the two strategies in a lot more places. Differential Revision: https://reviews.llvm.org/D137478
-
Krzysztof Parzyszek authored
This includes instruction formats, definitions, encodings, scheduling classes, and builtins/intrinsics.
-
Krzysztof Parzyszek authored
-
Sami Tolvanen authored
The KCFI sanitizer emits "kcfi" operand bundles to indirect call instructions, which the LLVM back-end lowers into an architecture-specific type check with a known machine instruction sequence. Currently, KCFI operand bundle lowering is supported only on 64-bit X86 and AArch64 architectures. As a lightweight forward-edge CFI implementation that doesn't require LTO is also useful for non-Linux low-level targets on other machine architectures, add a generic KCFI operand bundle lowering pass that's only used when back-end lowering support is not available and allows -fsanitize=kcfi to be enabled in Clang on all architectures. Reviewed By: nickdesaulniers, MaskRay Differential Revision: https://reviews.llvm.org/D135411
-
Ben Langmuir authored
When a pcm has already been loaded from disk, reuse it from the InMemoryModuleCache in readASTFileControlBlock. This avoids potentially reading it again. As noted in the FIXME, ideally we would also add the module to the cache if it will be used again later, but that could modify its build state and we do not have enough context currenlty to know if it's correct. Differential Revision: https://reviews.llvm.org/D138160
-
usama hameed authored
Differential Revision: https://reviews.llvm.org/D137518
-
Roman Lebedev authored
-
bixia1 authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D138233
-
bixia1 authored
The getSparseTensorReaderNextX functions should return void. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D138226
-
Krzysztof Parzyszek authored
Fixes https://github.com/llvm/llvm-project/issues/59042.
-
Matt Arsenault authored
-
Krzysztof Parzyszek authored
Don't treat them as i1, all predicate bits need to be loaded or stored.
-
Krzysztof Parzyszek authored
-
Martin Storsjö authored
The hidden helper task is only enabled on Linux (kmp_runtime.cpp initializes __kmp_enable_hidden_helper to TRUE for linux but to FALSE for any other OS), and the __kmp_stg_parse_use_hidden_helper function always makes it disabled on non-Linux OSes too. Add a lit test feature for hidden helper tasks (only made available on Linux) and mark two tests as requiring this feature. Disable hidden helper tasks in the test that doesn't really involve them, for consistent behaviour across platforms. Differential Revision: https://reviews.llvm.org/D137749
-
Guillaume Chatelet authored
The introducion of `constraint_setting` generated issues with downstream integration. This reverts commit 3c13d83a.
-
Vaibhav Yenamandra authored
Refactor StaticAnalyzer to use clang::SarifDocumentWriter for serializing sarif diagnostics. Uses clang::SarifDocumentWriter to generate SARIF output in the StaticAnalyzer. Various bugfixes are also made to clang::SarifDocumentWriter. Summary of changes: clang/lib/Basic/Sarif.cpp: * Fix bug in adjustColumnPos introduced from prev move, it now uses FullSourceLoc::getDecomposedExpansionLoc which provides the correct location (in the presence of macros) instead of FullSourceLoc::getDecomposedLoc. * Fix createTextRegion so that it handles caret ranges correctly, this should bring it to parity with the previous implementation. clang/test/Analysis/diagnostics/Inputs/expected-sarif: * Update the schema URL to the offical website * Add the emitted defaultConfiguration sections to all rules * Annotate results with the "level" property clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp: * Update SarifDiagnostics class to hold a clang::SarifDocumentWriter that it uses to convert diagnostics to SARIF. -
Artem Belevich authored
-
Peiming Liu authored
Reviewed By: aartbik, bixia Differential Revision: https://reviews.llvm.org/D138223
-
Evgenii Stepanov authored
Differential Revision: https://reviews.llvm.org/D137354
-
Jakub Kuderski authored
-
Jakub Kuderski authored
Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D138225
-
Sami Tolvanen authored
When the Linux kernel is compiled without -mretpoline, KCFI fails ungracefully because it doesn't handle indirect calls with a memory target operand. Since the KCFI check will need to load the target address into a register for validating the type hash anyway, simply unfold memory operands in indirect calls that need a KCFI check. Fixes #59017
-
Sanjay Patel authored
I missed this file when updating similarly with f44e8464.
-
Adrian Prantl authored
-
bixia1 authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D138214
-
Jakub Kuderski authored
Fail to match conversion patterns when source op has unsupported types. Fixes: https://github.com/llvm/llvm-project/issues/58749 Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D138178
-
Tomas Matheson authored
The invalid case is now represented by an empty StringRef rather than a nullptr. Previously ARCH_FEATURE was build from SUB_ARCH by prepending "+". This is now reverse, so that the "+arch-feature" is now visible in the .def, which is a bit clearer. This meant converting one StringSwitch into a loop. Removed getters which are now mostly unnecessary. Removed some old FIXMEs. Differential Revision: https://reviews.llvm.org/D138026
-
Mengxuan Cai authored
The current code of validDepInterchange() enumerates cases that are legal for interchange. This could be simplified by checking lexicographically order of the swapped direction matrix. Reviewed By: congzhe, Meinersbur, bmahjour Differential Revision: https://reviews.llvm.org/D137461
-
Jakub Kuderski authored
This includes LIT IR tests and runtime tests. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D138184
-
Roman Lebedev authored
Now that we are done with loop unrolling, be it either by LoopVectorizer, or LoopUnroll passes, some variable-offset GEP's into alloca's could have become constant-offset, thus enabling SROA and alloca promotion, yet we don't capitalize on that, which is surprizing. While it would be good to not introduce one more SROA invocation, but instead move the one from `PassBuilder::buildFunctionSimplificationPipeline()`, the existing test coverage says that is a bad idea, though it would be fine compile-time wise: https://llvm-compile-time-tracker.com/compare.php?from=b150d34c47efbd8fa09604bce805c0920360f8d7&to=5a9a5c855158b482552be8c7af3e73d67fa44805&stat=instructions So instead, i add yet another SROA run. I have checked, and it needs to be at least after said final loop unrolling. This is still fine compile-time wise: https://llvm-compile-time-tracker.com/compare.php?from=70324cd88328c0924e605fa81b696572560aa5c9&to=fb489bbef687ad821c3173a931709f9cad9aee8a&stat=instructions I've encountered this in a real code, `SROA-after-final-loop-unrolling.ll` has been reduced from https://godbolt.org/z/fsdMhETh3 Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D136806
-
Slava Zakharin authored
In general, the meaning of fastmath flags on a call during inlining is that the call's operation flags must be ignored. For user functions that means that the fastmath flags used for the function definition override any call site's fastmath flags. For intrinsic functions we can use the call site's fastmath flags, but we have to make sure that the call sites with different flags produce/use different simplified versions of the same intrinsic function. Differential Revision: https://reviews.llvm.org/D138048
-
Sanjay Patel authored
-
bixia1 authored
Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D138213
-
Roman Lebedev authored
In practice this means that we can speculate more loads in SROA. This e.g. comes up in https://godbolt.org/z/G8716s6sj, although we are missing second half of the puzzle to optimize that.
-
Roman Lebedev authored
-
Stanislav Mekhanoshin authored
A target can return if a misaligned access is 'fast' as defined by the target or not. In reality there can be different levels of 'fast' and 'slow'. This patch changes the boolean 'Fast' argument of the allowsMisalignedMemoryAccesses family of functions to an unsigned representing its speed. A target can still define it as it wants and the direct translation of the current code uses 0 and 1 for current false and true. This makes the change an NFC. Subsequent patch will start using an actual value of speed in the load/store vectorizer to compare if a vectorized access going to be not just fast, but not slower than before. Differential Revision: https://reviews.llvm.org/D124217
-
Simon Pilgrim authored
-
Matt Arsenault authored
-