- Dec 02, 2016
-
-
Dan Gohman authored
Move the cast<MCSymbolELF> inside emitELFSize, so that: - it's done in one place instead of at each call - it's more consistent with similar functions like EmitCOFFSafeSEH - ambiguity between cast<> and dyn_cast<> is avoided (which also eliminates an unnecessary dyn_cast call) This also makes it easier to experiment with using ".size" directives on non-ELF targets. llvm-svn: 288437
-
Joerg Sonnenberger authored
In bigger projects like an Operating System, the same source code is often compiled in slightly different ways. This could be the difference between PIC and non-PIC code for static vs dynamic libraries, it could also be the difference between size optimised versions of tools for ramdisk images. At the moment, the compilation database has no way to distinguish such cases. As first step, add a field in the JSON format for it and process it accordingly. Differential Revision: https://reviews.llvm.org/D27138 llvm-svn: 288436
-
Peter Collingbourne authored
llvm-svn: 288435
-
- Dec 01, 2016
-
-
Oleg Ranevskyy authored
Summary: This patch fixes comparison of 64-bit atomic with its expected value in CMP_SWAP_64 expansion. Currently, the low words are compared with CMP, while the high words are compared with SBC. SBC expects the carry flag to be set if CMP detects a difference. CMP might leave the carry unset for unequal arguments though if the first one is >= than the second. This might cause the comparison logic to detect false equality. Example of the broken C++ code: ``` std::atomic<long long> at(2); long long ll = 1; std::atomic_compare_exchange_strong(&at, &ll, 3); ``` Even though the atomic `at` and the expected value `ll` are not equal and `atomic_compare_exchange_strong` returns `false`, `at` is changed to 3. The patch replaces SBC with CMPEQ. Reviewers: t.p.northover Subscribers: aemerson, rengolin, llvm-commits, asl Differential Revision: https://reviews.llvm.org/D27315 llvm-svn: 288433
-
Artem Belevich authored
This reverts r288412 which causes severe compile-time regression. llvm-svn: 288431
-
Matthias Braun authored
The coalescer eliminates copies from reserved registers of the form: %vregX = COPY %rY in the case where %rY is a reserved register. However this turns out to be invalid if only some of the subregisters are reserved (see also https://reviews.llvm.org/D26648). Differential Revision: https://reviews.llvm.org/D26687 llvm-svn: 288428
-
Eugene Zelenko authored
llvm-svn: 288426
-
Eugene Zelenko authored
[ADT, Support, TableGen] Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC). llvm-svn: 288424
-
David Blaikie authored
llvm-svn: 288423
-
Saleem Abdulrasool authored
The previous change for enabling MinGW did not preserve the Win32 check and added the EABI specific routines to a Windows build which does not use the EABI routines. Correct the conditional check for that. llvm-svn: 288422
-
David Blaikie authored
llvm-svn: 288421
-
Chih-Hung Hsieh authored
This change fixes a regression in r279537 and makes getRawSubclassData behave like r279536. Without this change, the fp128-g.ll test case will have an infinite loop involving SoftenFloatRes_LOAD. Differential Revision: http://reviews.llvm.org/D26942 llvm-svn: 288420
-
Rui Ueyama authored
llvm-svn: 288419
-
Tim Northover authored
This time the issue is fortunately just a simple mistake rather than a horrible design spectre. I thought SUBS/SBCS provided sufficient NZCV flags for comparing two 64-bit values, but they don't. The fix is slightly clunkier in AArch64 because we can't use conditional execution to emit a pair of CMPs. Traditionally an "icmp ne i128" would map to an EOR/EOR/ORR/CBNZ, but that uses more registers so it's easier to go with a CSET/CINC/CBNZ combination. Slightly less efficient, but this is -O0 anyway. Thanks to Anton Korobeynikov for pointing out the issue. llvm-svn: 288418
-
Mehdi Amini authored
The comment only mentioned "old version of MSVC". Differential Revision: https://reviews.llvm.org/D27312 llvm-svn: 288417
-
Benjamin Kramer authored
llvm-svn: 288416
-
Philip Reames authored
The instcombine code which folds loads and stores into their use types can trip up if the use is a bitcast to a type which we can't directly load or store in the IR. In principle, such types shouldn't exist, but in practice they do today. This is a workaround to avoid a bug while we work towards the long term goal. Differential Revision: https://reviews.llvm.org/D24365 llvm-svn: 288415
-
George Burgess IV authored
llvm-svn: 288414
-
Philip Reames authored
This just extracts out the transfer rules for constant ranges into a single shared point. As it happens, neither bit of code actually overlaps in terms of the handled operators, but with this change that could easily be tweaked in the future. I also want to have this separated out to make experimenting with a eager value info implementation and possibly a ValueTracking-like fixed depth recursion peephole version. There's no reason all four of these can't share a common implementation which reduces the chances of bugs. Differential Revision: https://reviews.llvm.org/D27294 llvm-svn: 288413
-
Alexey Bataev authored
When trying to vectorize trees that start at insertelement instructions function tryToVectorizeList() uses vectorization factor calculated as MinVecRegSize/ScalarTypeSize. But sometimes it does not work as tree cost for this fixed vectorization factor is too high. Patch tries to improve the situation. It tries different vectorization factors from max(PowerOf2Floor(NumberOfVectorizedValues), MinVecRegSize/ScalarTypeSize) to MinVecRegSize/ScalarTypeSize and tries to choose the best one. Differential Revision: https://reviews.llvm.org/D27215 llvm-svn: 288412
-
Dan Gohman authored
llvm-svn: 288411
-
David L Kreitzer authored
Patch by Farhana Aleen Differential Revision: https://reviews.llvm.org/D25986 llvm-svn: 288410
-
Rui Ueyama authored
Use "color" instead of "group id" to describe the ICF algorithm. llvm-svn: 288409
-
Vedant Kumar authored
Tablegen's -gen-instr-info pass has a bug in its emitEnums() routine. The function intends for values in a vector to be deduplicated, but it accidentally skips over elements after performing a deletion. I think there are smarter ways of doing this deduplication, but we can do that in a follow-up commit if there's interest. See the thread: [PATCH] TableGen InstrMapping Bug fix. Patch by Tyler Kenney! llvm-svn: 288408
-
Vedant Kumar authored
llvm-svn: 288407
-
Artem Belevich authored
Fixes test failures if tests are run in a read-only source tree. llvm-svn: 288406
-
Matthias Braun authored
Recommitting r288293 with some extra fixes for GlobalISel code. Most of the exception handling members in MachineModuleInfo is actually per function data (talks about the "current function") so it is better to keep it at the function instead of the module. This is a necessary step to have machine module passes work properly. Also: - Rename TidyLandingPads() to tidyLandingPads() - Use doxygen member groups instead of "//===- EH ---"... so it is clear where a group ends. - I had to add an ugly const_cast at two places in the AsmPrinter because the available MachineFunction pointers are const, but the code wants to call tidyLandingPads() in between (markFunctionEnd()/endFunction()). Differential Revision: https://reviews.llvm.org/D27227 llvm-svn: 288405
-
Akira Hatanaka authored
have the same size. This fixes an asset that is triggered when an address of a boolean variable is passed to __builtin_arm_ldrex or __builtin_arm_strex. rdar://problem/29269006 llvm-svn: 288404
-
Sean Callanan authored
Should fix the bots. llvm-svn: 288403
-
Kevin Enderby authored
llvm-svn: 288402
-
Benjamin Kramer authored
llvm-svn: 288401
-
Mehdi Amini authored
A client of a header that relies on ABI breaking should get the macro exported there. Before this, the unittest for Support/Error including Support/Error.h didn't get the macro exported by the Support module, because the latter only re-export its submodules and included module, not textual headers. Hopefully, it'll also fix the build with local submodule visibility, since the LLVM_Utils contains two submodules: ADT and Support. They both include abi-breaking.h that defines a symbol. The textual inclusion lead to a double definition of the symbol which broke the parent module. Differential Revision: https://reviews.llvm.org/D27273 llvm-svn: 288400
-
Greg Clayton authored
This change removes the dependency on DwarfDebug that was used for DW_FORM_ref_addr by making a new DIEUnit class in DIE.cpp. The DIEUnit class represents a compile or type unit and it owns the unit DIE as an instance variable. This allows anyone with a DIE, to get the unit DIE, and then get back to its DIEUnit without adding any new ivars to the DIE class. Why was this needed? The DIE class has an Offset that is always the CU relative DIE offset, not the "offset in debug info section" as was commented in the header file (the comment has been corrected). This is great for performance because most DIE references are compile unit relative and this means most code that accessed the DIE's offset didn't need to make it into a compile unit relative offset because it already was. When we needed to emit a DW_FORM_ref_addr though, we needed to find the absolute offset of the DIE by finding the DIE's compile/type unit. This class did have the absolute debug info/type offset and could be added to the CU relative offset to compute the absolute offset. With this change we can easily get back to a DIE's DIEUnit which will have this needed offset. Prior to this is required having a DwarfDebug and required calling: DwarfCompileUnit *DwarfDebug::lookupUnit(const DIE *CU) const; Now we can use the DIEUnit class to do so without needing DwarfDebug. All clients now use DIEUnit objects (the DwarfDebug stack and the DwarfLinker). A follow on patch for the DWARF generator will also take advantage of this. Differential Revision: https://reviews.llvm.org/D27170 llvm-svn: 288399
-
Alexey Bataev authored
Currently when cost of scalar operations is evaluated the vector type is used for scalar operations. Patch fixes this issue and fixes evaluation of the vector operations cost. Several test showed that vector cost model is too optimistic. It allowed vectorization of 8 or less add/fadd operations, though scalar code is faster. Actually, only for 16 or more operations vector code provides better performance. Differential Revision: https://reviews.llvm.org/D26277 llvm-svn: 288398
-
Mandeep Singh Grang authored
Summary: Adds support for -Wa,-defsym,abc=1 option. Related llvm patch: https://reviews.llvm.org/D26214 Reviewers: rafael, t.p.northover, colinl, echristo, compnerd, rengolin Subscribers: mehdi_amini Tags: #clang-c Differential Revision: https://reviews.llvm.org/D26213 llvm-svn: 288397
-
Mandeep Singh Grang authored
Summary: Changes to llvm-mc to move common logic to separate function. Related clang patch: https://reviews.llvm.org/D26213 Reviewers: rafael, t.p.northover, colinl, echristo, rengolin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26214 llvm-svn: 288396
-
Simon Pilgrim authored
Will be necessary for a future patch. llvm-svn: 288395
-
Arnold Schwaighofer authored
llvm-svn: 288394
-
Hans Wennborg authored
Also added a gitignore to help track the right items to commit. Patch by Antonio Maiorano <amaiorano@gmail.com>! llvm-svn: 288393
-
Kostya Serebryany authored
llvm-svn: 288392
-