- Apr 16, 2020
-
-
Jeremy Morse authored
In D68209, LiveDebugValues::transferDebugValue had a call to OpenRanges.erase shifted, and by accident this led to a code path where DBG_VALUEs of $noreg would not have their open range terminated, allowing variable locations to extend past blocks where they were terminated. This patch correctly terminates the open range, if present, when such a DBG_VAUE is encountered, and adds a test for this behaviour. Differential Revision: https://reviews.llvm.org/D78218
-
Stephan Dollberg authored
devtoolset-9 has been out for a while so also look for it. Differential Revision: https://reviews.llvm.org/D77420
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D78209
-
Lorenzo Chelini authored
Remove leftovers 'applyPatternsGreedily' from the codebase. Differential Revision: https://reviews.llvm.org/D78274
-
Ulysse Beaugnon authored
Summary: OpBase.td defined attributes kind for all integer types expect index. This commit fixes that by adding an IndexAttr attribute kind. Differential Revision: https://reviews.llvm.org/D78195
-
Pierre Oechsel authored
Differential Revision: https://reviews.llvm.org/D77729
-
Johannes Doerfert authored
Also added a TODO to remind us that indirect calls could be optimized as well.
-
Johannes Doerfert authored
The AAMap.lookup() call created a temporary value if the key was not present. Since the value was another map it was not free to create it. Instead of a lookup we now use find and compare the result against the end iterator explicitly. The result is the same but we never need to create a temporary map.
-
Dominik Montada authored
This reverts commit 1265899c.
-
Craig Topper authored
[CallSite removal][TargetLowering] Remove ArgListEntry::setAttributes signature that took an ImmutableCallSite. NFC There's another signature that takes a CallBase. The uses of the ImmutableCallSite version were removed in previous patches.
-
Matthias Gehre authored
Summary: This detected the bugs fixed in https://reviews.llvm.org/D66442 and https://reviews.llvm.org/D66440 The warning itself was implemented in https://reviews.llvm.org/D63954 https://reviews.llvm.org/D64256 https://reviews.llvm.org/D65120 https://reviews.llvm.org/D65127 https://reviews.llvm.org/D66152 Reviewers: zturner, mehdi_amini, gribozavr Subscribers: dexonsmith, Szelethus, xazax.hun, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66443
-
Johannes Doerfert authored
Since we use the fact that some uses are droppable in the Attributor we need to handle them explicitly when we replace uses. As an example, an assumed dead value can have live droppable users. In those we cannot replace the value simply by an undef. Instead, we either drop the uses (via `dropDroppableUses`) or keep them as they are. In this patch we do both, depending on the situation. For values that are dead but not necessarily removed we keep droppable uses around because they contain information we might be able to use later. For values that are removed we drop droppable uses explicitly to avoid replacement with undef.
-
Johannes Doerfert authored
The handling of the `returned` attribute in D75815 did miss the case where the argument is (bit)casted to a different type. This is explicitly allowed by the language reference and exposed by the Attributor. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D77977
-
Johannes Doerfert authored
-
Johannes Doerfert authored
The check if globals were accessed was not always working because two bits are set for NO_GLOBAL_MEM. The new check works also if only on kind of globals (internal/external) is accessed.
-
Johannes Doerfert authored
Running the verifier is expensive so we want to avoid it even in runs that enable assertions. As we move closer to enabling the Attributor this code will be executed by some buildbots but not cause overhead for most people.
-
Craig Topper authored
[CallSite removal][TargetLibraryInfo] Replace ImmutableCallSite with CallBase in one of the getLibFunc signatures. NFC Differential Revision: https://reviews.llvm.org/D78083
-
Mircea Trofin authored
Reviewers: craig.topper, dblaikie Subscribers: hiraditya, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78256
-
Shengchen Kan authored
Avoid duplicate code in X86MCCodeEmitter, NFCI.
-
Fangrui Song authored
For `.bss; nop`, MC inappropriately calls abort() (via report_fatal_error()) with a message `cannot have fixups in virtual section!` It is a bug to crash for invalid user input. Fix it by erroring out early in EmitInstToData(). Similarly, emitIntValue() in a virtual section (SHT_NOBITS in ELF) can crash with the mssage `non-zero initializer found in section '.bss'` (see D4199) It'd be nice to report the location but so many directives can call emitIntValue() and it is difficult to track every location. Note, COFF does not crash because MCAssembler::writeSectionData() is not called for an IMAGE_SCN_CNT_UNINITIALIZED_DATA section. Note, GNU as' arm64 backend reports ``Error: attempt to store non-zero value in section `.bss'`` for a non-zero .inst but fails to do so for other instructions. We simply reject all instructions, even if the encoding is all zeros. The Mach-O counterpart is D48517 (see `test/MC/MachO/zerofill-text.s`) Reviewed By: rnk, skan Differential Revision: https://reviews.llvm.org/D78138
-
Mehdi Amini authored
This would only fail when using a linker that is sensitive to the order in which the libraries are passed on the command line (like bfd).
-
Shengchen Kan authored
Make some function static, move the definitions of functions to a better place and use C++ style cast, etc.
-
Johannes Doerfert authored
Before, we eagerly analyzed all the functions to collect information about them, e.g. what instructions may read/write memory. This had multiple drawbacks: - In CGSCC-mode we can end up looking at a callee which is not in the SCC but for which we need an initialized cache. - We end up looking at functions that we deem dead and never need to analyze in the first place. - We have a implicit dependence which is easy to break. This patch moves the function analysis into the information cache and makes it lazy. There is no real functional change expected except due to the first reason above. -
Johannes Doerfert authored
The CallGraphUpdater allows to directly alter call site information and we should do so. This might appease the windows buildbot that crashes during the SCC traversal.
-
Shengchen Kan authored
As we mentioned in D78180, merge some if clauses and use CamelCase for variables, etc.
-
Vitaly Buka authored
Test fails in our setup if used with libunwind. It needs just few bytest to pass.
-
Richard Smith authored
-
Johannes Doerfert authored
This was supposed to be part of D76588 already.
-
Johannes Doerfert authored
I uploaded the old version accidentally instead of the one with these minor adjustments requested by the reviewers. Differential Revision: https://reviews.llvm.org/D77855
-
Shengchen Kan authored
Summary: The function in X86MCCodeEmitter has too many parameters to make it look messy, and some parameters are unnecessary. This is the first patch to reduce their parameters. The follwing operations are cheap ``` unsigned Opcode = MI.getOpcode(); const MCInstrDesc &Desc = MCII.get(Opcode); uint64_t TSFlags = Desc.TSFlags; ``` So if we pass a `MCInst`, we don't need to pass `MCInstrDesc`; if we pass a `MCInstrDesc`, we don't need to pass `TSFlags`. Reviewers: craig.topper, MaskRay, pengfei Reviewed By: craig.topper Subscribers: annita.zhang, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78180
-
Fangrui Song authored
I plan to use MCSection::getName() in D78138. Having the function in the base class is also convenient for debugging. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D78251
-
Johannes Doerfert authored
When the Attributor was created the test update scripts were not well suited to deal with the challenges of IR attribute checking. This partially improved. Since then we also added three additional configurations that need testing; in total we now have the following four: { TUNIT, CGSCC } x { old pass manager (OPM), new pass manager (NPM) } Finally, the number of developers and tests grew rapidly (partially due to the addition of ArgumentPromotion and IPConstantProp tests), which resulted in tests only being run in some configurations, different prefixes being used, and different "styles" of checks being used. Due to the above reasons I believed we needed to take another look at the test update scripts. While we started to use them, via UTC_ARGS: --enable/disable, the other problems remained. To improve the testing situation for *all* configurations, to simplify future updates to the test, and to help identify subtle effects of future changes, we now use the test update scripts for (almost) all Attributor tests. An exhaustive prefix list minimizes the number of check lines and makes it easy to identify and compare configurations. Tests have been adjusted in the process but we tried to keep their intend unchanged. Reviewed By: sstefan1 Differential Revision: https://reviews.llvm.org/D76588 -
Walter Erquinigo authored
[intel-pt] Improve the way the test determines whether to run - Now I'm creating a default value for the new test parameter - I fixed a small mistake in the skipping logic of the test ... I forgot to clear the cmake cache when testing my diff
-
River Riddle authored
This avoids asan failures as more calls may be added during inlining, invalidating the reference. Differential Revision: https://reviews.llvm.org/D78258
-
Richard Smith authored
This reverts commit 30853cd6. The problem that this change was working around was fixed in 1132c75b.
-
Richard Smith authored
Summary: Instead of storing a vptr in each FoldingSet instance, form an equivalent struct and pass it implicitly from FoldingSet into the various FoldingSetBase methods. This has three benefits: * FoldingSet becomes one pointer smaller. * Under LTO, the "virtual" functions are much easier to inline. * The element type no longer needs to be complete when instantiating FoldingSet<T>, only when instantiating an insert / lookup member. Reviewers: rnk Subscribers: hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78247
-
Alina Sbirlea authored
Now Reassociate Pass invalidates the analysis results of AAManager and BasicAA, but it saves GlobalsAA, although it seems that it should preserve them, since it affects only Unary and Binary operators. Author: kpolushin (Kirill) Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D77137
-
Fangrui Song authored
A pending change will merge MCSection*::getName() to MCSection::getName().
-
Johannes Doerfert authored
Summary: We can and should remove deleted nodes from their respective SCCs. We did not do this before and this was a potential problem even though I couldn't locally trigger an issue. Since the `DeleteNode` would assert if the node was not in the SCC, we know we only remove nodes from their SCC and only once (when run on all the Attributor tests). Reviewers: lebedev.ri, hfinkel, fhahn, probinson, wristow, loladiro, sstefan1, uenoku Subscribers: hiraditya, bollu, uenoku, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77855
-
Johannes Doerfert authored
Summary: While it is uncommon that the ExternalCallingNode needs to be updated, it can happen. It is uncommon because most functions listed as callees have external linkage, modifying them is usually not allowed. That said, there are also internal functions that have, or better had, their "address taken" at construction time. We conservatively assume various uses cause the address "to be taken". Furthermore, the user might have become dead at some point. As a consequence, transformations, e.g., the Attributor, might be able to replace a function that is listed as callee of the ExternalCallingNode. Since there is no function corresponding to the ExternalCallingNode, we did just remove the node from the callee list if we replaced it (so far). Now it would be preferable to replace it if needed and remove it otherwise. However, removing the node has implications on the CGSCC iteration. Locally, that caused some other nodes to be never visited but it is for sure possible other (bad) side effects can occur. As it seems conservatively safe to keep the new node in the callee list we will do that for now. Reviewers: lebedev.ri, hfinkel, fhahn, probinson, wristow, loladiro, sstefan1, uenoku Subscribers: hiraditya, bollu, uenoku, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77854
-