- Jan 17, 2021
-
-
Raphael Isemann authored
The build server should now have the missing dependencies. Original summary: Currently LLDB uses epydoc to generate the Python API reference for the website. epydoc however is unmaintained since more than a decade and no longer works with Python 3. Also whatever setup we had once for generating the documentation on the website server no longer seems to work, so the current website documentation has been stale since more than a year. This patch replaces epydoc with sphinx and its automodapi plugin that can generate Python API references. LLVM already uses sphinx for the rest of the documentation, so this way we are more consistent with the rest of LLVM. The only new dependency is the automodapi plugin for sphinx. This patch effectively does the following things: * Remove the epydoc code. * Make a new dummy Python API page in our website that just calls the Sphinx command for generated the API documentation. * Add a mock _lldb module that is only used when generating the Python API. This way we don't have to build all of LLDB to generate the API reference. Some notes: * The long list of skips is necessary due to boilerplate functions that SWIG is generating. Sadly automodapi is not really scriptable from what I can see, so we have to blacklist this stuff manually. * The .gitignore change because automodapi wants a subfolder of our documentation directory to place generated documentation files there. The path is also what is used on the website, so we can't really workaround this (without copying the whole `docs` dir somewhere else when we build). * We have to use environment variables to pass our build path to our sphinx configuration. Sphinx doesn't support passing variables onto that script. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D94489
-
mydeveloperday authored
Reverting {D92753} due to issues with #pragma indentation in #ifdef/endif structure
-
Nikita Popov authored
There are no changes relative to the original commit. However, an issue this exposed in BasicAA assumption tracking has been fixed in the previous commit. ----- An alias query currently works out roughly like this: * Look up location pair in cache. * Perform BasicAA logic (including cache lookup and insertion...) * Perform a recursive query using BestAAResults. * Look up location pair in cache (and thus do not recurse into BasicAA) * Query all the other AA providers. * Query all the other AA providers. This is a lot of unnecessary work, all ultimately caused by the BestAAResults query at the end of aliasCheck(). The reason we perform it, is that aliasCheck() is getting called recursively, and we of course want those recursive queries to also make use of other AA providers, not just BasicAA. We can solve this by making the recursive queries directly use BestAAResults (which will check both BasicAA and other providers), rather than recursing into aliasCheck(). There are some tradeoffs: * We can no longer pass through the precomputed underlying object to aliasCheck(). This is not a major concern, because nowadays getUnderlyingObject() is quite cheap. * Results from other AA providers are no longer cached inside BasicAA. The way this worked was already a bit iffy, in that a result could be cached, but if it was MayAlias, we'd still end up re-querying other providers anyway. If we want to cache non-BasicAA results, we should do that in a more principled manner. In any case, despite those tradeoffs, this works out to be a decent compile-time improvment. I think it also simplifies the mental model of how BasicAA works. It took me quite a while to fully understand how these things interact. Differential Revision: https://reviews.llvm.org/D90094
-
Nikita Popov authored
D91936 placed the tracking for the assumptions into BasicAA. However, when recursing over phis, we may use fresh AAQI instances. In this case AssumptionBasedResults from an inner AAQI can reesult in a removal of an element from the outer AAQI. To avoid this, move the tracking into AAQI. This generally makes more sense, as the NoAlias assumptions themselves are also stored in AAQI. The test case only produces an assertion failure with D90094 reapplied. I think the issue exists independently of that change as well, but I wasn't able to come up with a reproducer.
-
Fangrui Song authored
-
Kazushi (Jam) Marukawa authored
Modify libunwind to support SjLj exception handling routines for VE. In order to do that, we need to implement not only SjLj exception handling routines but also a Registers_ve class. This implementation of Registers_ve is incomplete. We will work on it later when we need backtrace in libunwind. Reviewed By: #libunwind, compnerd Differential Revision: https://reviews.llvm.org/D94591
-
Craig Topper authored
When we looked up the map to see if the entry already existed, this created the new entry for us. So save a reference to it so we can use it to update the entry instead of looking it up again. Also remove unnecessary StringRef constructors around string literals on calls to this function.
-
Craig Topper authored
-Use StringRef instead of std::string. -Const correct a parameter. -Don't call StringRef::data() before printing. Just pass the StringRef.
-
Craig Topper authored
Instead forming a std::string and returning it to pass into another raw_ostream, just pass the raw_ostream as a parameter. Take StringRef as arguments instead raw_string_ostream references making the caller responsible for converting to strings. Use StringRef operations instead of std::string::substr.a
-
Craig Topper authored
-
Craig Topper authored
Stop concatenating std::string before streaming into a raw_ostream. Just stream the pieces. Remove some new lines from asserts. Remove std::string concatenation from an assert. assert strings aren't really evaluated like this at runtime. An assertion failure will just print exactly what's between the parentheses in the source.
-
Fangrui Song authored
Fix PR48742: the D75203 assembler optimization locates MCRelaxableFragment's within two MCSymbol's and relaxes some MCRelaxableFragment's to reduce the size of a MCAlignFragment. A -g build has more MCSymbol's and therefore may have different assembler output (e.g. a MCRelaxableFragment (jmp) may have 5 bytes with -O1 while 2 bytes with -O1 -g). `.p2align 4, 0x90` is common due to loops. For a larger program, with a lot of temporary labels, the assembly output difference is somewhat destined. The cost seems to overweigh the benefits so we default to -x86-pad-for-align=false until the heuristic is improved. Reviewed By: skan Differential Revision: https://reviews.llvm.org/D94542
-
- Jan 16, 2021
-
-
Nikita Popov authored
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
-
Roman Lebedev authored
When removing catchpad's from catchswitch, if that removes a successor, we need to record that in DomTreeUpdater. This fixes PostDomTree preservation failure in an existing test. This appears to be the single issue that i see in my current test coverage.
-
David Green authored
If the previous block in a function does not fallthough, adding nop's to align it will never be executed. This means we can freely (except for codesize) align more branches. This happens in constantislandspass (as it cannot happen later) and only happens at aggressive optimization levels as it does increase codesize. Differential Revision: https://reviews.llvm.org/D94394
-
David Green authored
-
Dávid Bolvanský authored
-
Aart Bik authored
Added the ability to read (an extended version of) the FROSTT file format, so that we can now read in sparse tensors of arbitrary rank. Generalized the API to deal with more than two dimensions. Also added the ability to sort the indices of sparse tensors lexicographically. This is an important step towards supporting auto gen of initialization code, since sparse storage formats are easier to initialize if the indices are sorted. Since most external formats don't enforce such properties, it is convenient to have this ability in our runtime support library. Lastly, the re-entrant problem of the original implementation is fixed by passing an opaque object around (rather than having a single static variable, ugh!). Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D94852
-
Shilei Tian authored
The basic design is to create an outer-most parallel team. It is not a regular team because it is only created when the first hidden helper task is encountered, and is only responsible for the execution of hidden helper tasks. We first use `pthread_create` to create a new thread, let's call it the initial and also the main thread of the hidden helper team. This initial thread then initializes a new root, just like what RTL does in initialization. After that, it directly calls `__kmpc_fork_call`. It is like the initial thread encounters a parallel region. The wrapped function for this team is, for main thread, which is the initial thread that we create via `pthread_create` on Linux, waits on a condition variable. The condition variable can only be signaled when RTL is being destroyed. For other work threads, they just do nothing. The reason that main thread needs to wait there is, in current implementation, once the main thread finishes the wrapped function of this team, it starts to free the team which is not what we want. Two environment variables, `LIBOMP_NUM_HIDDEN_HELPER_THREADS` and `LIBOMP_USE_HIDDEN_HELPER_TASK`, are also set to configure the number of threads and enable/disable this feature. By default, the number of hidden helper threads is 8. Here are some open issues to be discussed: 1. The main thread goes to sleeping when the initialization is finished. As Andrey mentioned, we might need it to be awaken from time to time to do some stuffs. What kind of update/check should be put here? Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D77609
-
Sanjay Patel authored
This is NFC-intended and another step towards supporting intrinsics as reduction candidates. The remaining bits of the OperationData class do not make much sense as-is, so I will try to improve that, but I'm trying to take minimal steps because it's still not clear how this was intended to work.
-
Sanjay Patel authored
-
Sanjay Patel authored
This is another NFC-intended patch to allow matching intrinsics (example: maxnum) as candidates for reductions. It's possible that the loop/if logic can be reduced now, but it's still difficult to understand how this all works.
-
Dávid Bolvanský authored
Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D94870
-
David Green authored
This treats low overhead loop branches the same as jump tables and indirect branches in analyzeBranch - they cannot be analyzed but the direct branches on the end of the block may be removed. This helps remove the unnecessary branches earlier, which can help produce better codegen (and change block layout in a number of cases). Differential Revision: https://reviews.llvm.org/D94392
-
David Green authored
We now have a lot of llc tests for hardware loops in CodeGen, which test a larger variety of loops and are easier to maintain. This removes the llc from mixed llc/opt tests.
-
Dávid Bolvanský authored
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Florian Hahn authored
This patch removes some ancient options as a clean-up before moving code-gen to use LTOBackend in D94487. I think it would preferable to remove those ancient options, because 1. There are no corresponding options in LTOBackend based tools, 2. There are no unit tests for them, 3. They are not passed through by Clang, 4. At least for GNVLoadPRE, users could just use GVN's `enable-load-pre`. Alternatively we could add support for those options to lto::Config & co, but I think it would be better to remove them, unless they are actually used in practice. Reviewed By: steven_wu, tejohnson Differential Revision: https://reviews.llvm.org/D94783
-
Dávid Bolvanský authored
-
Hsiangkai Wang authored
According to "9. Vector Memory Alignment Constraints" in V specification, the alignment of vector memory access is aligned to the size of the element. In our current implementation, we support ELEN up to 64. We could assume the alignment of vector registers is 64 under the assumption. Differential Revision: https://reviews.llvm.org/D94751
-
Dávid Bolvanský authored
-
Dávid Bolvanský authored
-
James Player authored
Current code breaks this version of MSVC due to a mismatch between `std::is_trivially_copyable` and `llvm::is_trivially_copyable` for `std::pair` instantiations. Hence I was attempting to use `std::is_trivially_copyable` to set `llvm::is_trivially_copyable<T>::value`. I spent some time root causing an `llvm::Optional` build error on MSVC 16.8.3 related to the change described above: ``` 62>C:\src\ocg_llvm\llvm-project\llvm\include\llvm/ADT/BreadthFirstIterator.h(96,12): error C2280: 'llvm::Optional<std::pair<std::pair<unsigned int,llvm::Graph<4>::NodeSubset> *,llvm::Optional<llvm::Graph<4>::ChildIterator>>> &llvm::Optional<std::pair<std::pair<unsigned int,llvm::Graph<4>::NodeSubset> *,llvm::Optional<llvm::Graph<4>::ChildIterator>>>::operator =(const llvm::Optional<std::pair<std::pair<unsigned int,llvm::Graph<4>::NodeSubset> *,llvm::Optional<llvm::Graph<4>::ChildIterator>>> &)': attempting to reference a deleted function (compiling source file C:\src\ocg_llvm\llvm-project\llvm\unittests\ADT\BreadthFirstIteratorTest.cpp) ... ``` The "trivial" specialization of `optional_detail::OptionalStorage` assumes that the value type is trivially copy constructible and trivially copy assignable. The specialization is invoked based on a check of `is_trivially_copyable` alone, which does not imply both `is_trivially_copy_assignable` and `is_trivially_copy_constructible` are true. [[ https://en.cppreference.com/w/cpp/named_req/TriviallyCopyable | According to the spec ]], a deleted assignment operator does not make `is_trivially_copyable` false. So I think all these properties need to be checked explicitly in order to specialize `OptionalStorage` to the "trivial" version: ``` /// Storage for any type. template <typename T, bool = std::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value> class OptionalStorage { ``` Above fixed my build break in MSVC, but I think we need to explicitly check `is_trivially_copy_constructible` too since it might be possible the copy constructor is deleted. Also would be ideal to move over to `std::is_trivially_copyable` instead of the `llvm` namespace verson. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D93510
-
Stephen Kelly authored
Differential Revision: https://reviews.llvm.org/D94130
-
Stephen Kelly authored
This is a simple utility which allows matching on binaryOperator and cxxOperatorCallExpr. It can also be extended to support cxxRewrittenBinaryOperator. Add generic support for MapAnyOfMatchers to auto-marshalling functions. Differential Revision: https://reviews.llvm.org/D94129
-
Bjorn Pettersson authored
This is a follow-up fix to commit 03c8d6a0. Seems like we now end up with NeedInvert being set in the result from LegalizeSetCCCondCode more often than in the past, so we need to handle NeedInvert when expanding BR_CC. Not sure how to deal with the "Tmp4.getNode()" case properly, but current assumption is that that code path isn't impacted by the changes in 03c8d6a0 so we can simply move the old assert into the if-branch and only handle NeedInvert in the else-branch. I think that the test case added here, for PowerPC, might have failed also before commit 03c8d6a0. But we started to hit the assert more often downstream when having merged that commit. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D94762
-
Stephen Kelly authored
This makes them composable with mapAnyOf(). Differential Revision: https://reviews.llvm.org/D94128
-
Stephen Kelly authored
Make it possible to compose a matcher for different base nodes. This accepts one or more node matcher functors and zero or more matchers, composing the latter into the former. This allows composing of matchers where the same inner matcher name is used for the same concept, but with a different node functor. Currently, there is a limitation that the nodes must be in the same "clade", so while mapAnyOf(ifStmt, forStmt).with(hasBody(stmt())) can be used, functionDecl can not be added to the tuple. It is possible to use this in clang-query, but it will require changes to the QueryParser, so is deferred to a future review. Differential Revision: https://reviews.llvm.org/D94127
-