summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix for broken build on clang-hexagon-elf for ambiguous call toLeonard Chan2018-08-061-1/+2
| | | | | | std::abs. llvm-svn: 339044
* [X86] Recognize a splat of negate in isFNEGEaswaran Raman2018-08-062-35/+83
| | | | | | | | | | | | | | | | | | | Summary: Expand isFNEG so that we generate the appropriate F(N)M(ADD|SUB) instructions in more cases. For example, the following sequence a = _mm256_broadcast_ss(f) d = _mm256_fnmadd_ps(a, b, c) generates an fsub and fma without this patch and an fnma with this change. Reviewers: craig.topper Subscribers: llvm-commits, davidxl, wmi Differential Revision: https://reviews.llvm.org/D48467 llvm-svn: 339043
* [ELF] Don't copy STT_TLS in copy relocationFangrui Song2018-08-063-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During copy relocation of a variable defined in a DSO, if a TLS variable in that DSO happens to have the same st_value, it would also be copied. This was unnecessary because the addresses of TLS variables are relative to TLS segment. They don't interfere with non-TLS variables. This copying behavior can be harmful in the following scenario: For function-scope thread-local variables with non-trivial constructors, they have guard variables. In the case of x86_64 general-dynamic model: template <int N> void foo() { thread_local std::string a; } GOT[n] R_X86_64_DTPMOD64 guard variable for a GOT[n+1] R_X86_64_DTPOFF64 guard variable for a GOT[n+2] R_X86_64_DTPMOD64 a GOT[n+3] R_X86_64_DTPOFF64 a a and its guard variable are both represented as TLS variables, which should be within the same module. If one is copy relocated to the main module while the other is not, their module ID will mismatch and can cause access without prior construction. Reviewers: ruiu, espindola Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D50289 llvm-svn: 339042
* [X86] When using "and $0" and "orl $-1" to store 0 and -1 for minsize, make ↵Craig Topper2018-08-063-21/+30
| | | | | | | | | | sure the store isn't volatile If the store is volatile this might be a memory mapped IO access. In that case we shouldn't generate a load that didn't exist in the source Differential Revision: https://reviews.llvm.org/D50270 llvm-svn: 339041
* [X86] Add test cases to show bad use of "and $0" and "orl $-1" for minsize ↵Craig Topper2018-08-061-0/+100
| | | | | | | | when the store is volatile If the store is volatile we shouldn't be adding a little that didn't exist in the source. llvm-svn: 339040
* [NFC] Remove TODO comment that no longer applies (ParsedAttr)Erich Keane2018-08-061-1/+1
| | | | llvm-svn: 339039
* Removed the OverflowConversionsToFract tests for now. Will add them backLeonard Chan2018-08-061-45/+0
| | | | | | in once I figure out why this doesn't work on windows. llvm-svn: 339038
* Fix for failing test from sanitizer-x86_64-linux-fast where there was aLeonard Chan2018-08-061-0/+7
| | | | | | left shift on a negative value. llvm-svn: 339037
* Force test/Driver/fuchsia.c(pp) to use lldDavid Greene2018-08-062-9/+22
| | | | | | | | | | The Fuchsia driver relies on lld so invoke clang with -fuse-ld=lld. This gets the test passing when the clang default linker is something other than lld. Differential Revision: https://reviews.llvm.org/D49899 llvm-svn: 339036
* [RegisterCoalescer] Delay live interval update work until the rematerializationWei Mi2018-08-062-6/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for all the uses from the same def is done. We run into a compile time problem with flex generated code combined with `-fno-jump-tables`. The cause is that machineLICM hoists a lot of invariants outside of a big loop, and drastically increases the compile time in global register splitting and copy coalescing. https://reviews.llvm.org/D49353 relieves the problem in global splitting. This patch is to handle the problem in copy coalescing. About the situation where the problem in copy coalescing happens. After machineLICM, we have several defs outside of a big loop with hundreds or thousands of uses inside the loop. Rematerialization in copy coalescing happens for each use and everytime rematerialization is done, shrinkToUses will be called to update the huge live interval. Because we have 'n' uses for a def, and each live interval update will have at least 'n' complexity, the total update work is n^2. To fix the problem, we try to do the live interval update work in a collective way. If a def has many copylike uses larger than a threshold, each time rematerialization is done for one of those uses, we won't do the live interval update in time but delay that work until rematerialization for all those uses are completed, so we only have to do the live interval update work once. Delaying the live interval update could potentially change the copy coalescing result, so we hope to limit that change to those defs with many (like above a hundred) copylike uses, and the cutoff can be adjusted by the option -mllvm -late-remat-update-threshold=xxx. Differential Revision: https://reviews.llvm.org/D49519 llvm-svn: 339035
* Fix more offsetof issues.Greg Clayton2018-08-061-5/+5
| | | | llvm-svn: 339034
* Fix offsetof usage that got lost when passing patches between linux and mac.Greg Clayton2018-08-062-14/+16
| | | | llvm-svn: 339033
* Add support for ARM and ARM64 breakpad generated minidump files (version 2).Greg Clayton2018-08-0616-33/+1805
| | | | | | | | | | | | | | | | In this patch I add support for ARM and ARM64 break pad files. There are two flavors of ARM: Apple where FP is R7, and non Apple where FP is R11. Added minimal tests that load up ARM64 and the two flavors or ARM core files with a single thread and known register values in each register. Each register is checked for the exact value. This is a fixed version of: https://reviews.llvm.org/D49750 The changes from D49750 are: Don't init the m_arch in the Initialize call as a system info isn't required. This keeps the thread list, module list and other tests from failing Added -Wextended-offsetof to Xcode project so we catch use extended usages of offsetof before submission Fixed any extended offset of warnings Differential Revision: https://reviews.llvm.org/D50336 llvm-svn: 339032
* [Fixed Point Arithmetic] Remove unused include.Benjamin Kramer2018-08-061-1/+0
| | | | | | lib/Basic cannot depend on lib/AST. llvm-svn: 339031
* [AST] Remove unnecessary indirections in DeclarationNameTableBruno Ricci2018-08-062-117/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DeclarationNameTable currently hold 3 "void *" to FoldingSet<CXXSpecialName>, FoldingSet<CXXLiteralOperatorIdName> and FoldingSet<CXXDeductionGuideNameExtra>. CXXSpecialName, CXXLiteralOperatorIdName and CXXDeductionGuideNameExtra are private classes holding extra information about a "special" declaration name and are in AST/DeclarationName.cpp. The original intent seems to have been to keep these classes private and only expose DeclarationNameExtra and DeclarationName (the code dates from 2008 and has not been significantly changed since). However this make the code less straightforward than necessary because of the need to have "void *" in DeclarationNameTable (with 1 of 3 comments wrong) and to manually allocate/deallocate the FoldingSets. Moreover removing the extra indirections reduce the run-time of an fsyntax-only on all of Boost by 2.3% which is not totally unexpected given how frequently this data structure is used (especially for C++). A concern raised by erichkeane during the review was that including Type.h would increase the compile time unreasonably. However test builds (both clean and incremental) showed that this patch did not result in any compile time increase. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D50261 llvm-svn: 339030
* Fix typo in the MSVC Visualizer for SmallVector classDaniil Fukalov2018-08-061-1/+1
| | | | llvm-svn: 339029
* [Fixed Point Arithmetic] Fixed Point ConstantLeonard Chan2018-08-0610-6/+991
| | | | | | | | | | This patch proposes an abstract type that represents fixed point numbers, similar to APInt or APSInt that was discussed in https://reviews.llvm.org/D48456#inline-425585. This type holds a value, scale, and saturation and is meant to perform intermediate calculations on constant fixed point values. Currently this class is used as a way for handling the conversions between fixed point numbers with different sizes and radixes. For example, if I'm casting from a signed _Accum to a saturated unsigned short _Accum, I will need to check the value of the signed _Accum to see if it fits into the short _Accum which involves getting and comparing against the max/min values of the short _Accum. The FixedPointNumber class currently handles the radix shifting and extension when converting to a signed _Accum. Differential Revision: https://reviews.llvm.org/D48661 llvm-svn: 339028
* Fix raw_fd_ostream::write_impl hang due to an infinite loop with large outputOwen Reynolds2018-08-061-4/+4
| | | | | | | | | | On windows when raw_fd_ostream::write_impl calls write, a 32 bit input is required for character count. As a variable with size_t is used for this argument, on x64 integral demotion occurs. In the case of large files an infinite loop follows. See: https://bugs.llvm.org/show_bug.cgi?id=37926 This fix allows the output of files larger than the previous int32 limit. Differential Revision: https://reviews.llvm.org/D48948 llvm-svn: 339027
* [Fixed Point Arithmetic] Fix for FixedPointValueToStringLeonard Chan2018-08-067-17/+153
| | | | | | | | | | | | - Print negative numbers correctly - Handle APInts of different sizes - Add formal unit tests for FixedPointValueToString - Add tests for checking correct printing when padding is set - Restrict to printing in radix 10 since that's all we need for now Differential Revision: https://reviews.llvm.org/D49945 llvm-svn: 339026
* AMDGPU: Fold v_lshl_or_b32 with 0 src0Matt Arsenault2018-08-062-1/+86
| | | | | | Appears from expansion of some packed cases. llvm-svn: 339025
* [AST] Add individual size info for Types in -print-statsBruno Ricci2018-08-061-1/+3
| | | | | | | | This mirrors what is done for Decls and Stmts in the -print-stats output, ie instead of printing "57426 LValueReference types" we print "57426 LValueReference types, 40 each (2297040 bytes)". llvm-svn: 339024
* ValueTracking: Handle canonicalize in CannotBeNegativeZeroMatt Arsenault2018-08-062-0/+51
| | | | | | | Also fix apparently missing test coverage for any of the handling here. llvm-svn: 339023
* AMDGPU: Rename check prefixes in testMatt Arsenault2018-08-061-34/+34
| | | | | | Will avoid noisy diff in future change. llvm-svn: 339022
* [NFC] Fixed unused function warningsDavid Bolvansky2018-08-061-0/+2
| | | | llvm-svn: 339021
* Revert unused function fixDavid Bolvansky2018-08-061-1/+1
| | | | llvm-svn: 339020
* [NFC] Fixed unused function warningDavid Bolvansky2018-08-061-1/+1
| | | | llvm-svn: 339019
* [ASTmporter] SourceRange-free function parameter checking for declarationsGabor Marton2018-08-062-15/+50
| | | | | | | | | | | | | | | | Summary: The previous code which avoided infinite recursion (because of reparsing declarations in function parameter lists) contained SourceRange dependent code which had some problems when parameter types were coming from macros. The new solution is not using macros and therefore much safer. A couple of importer problems are fixed in redis and tmux by this fix. Various unittests are included. Reviewers: a.sidorin, r.stahl, a_sidorin Reviewed By: a_sidorin Subscribers: cfe-commits, dkrupp, balazske, martong Differential Revision: https://reviews.llvm.org/D49792 Patch by Zoltan Gera! llvm-svn: 339018
* [AST] Move the enum in ObjCMethodDeclBitfieldsBruno Ricci2018-08-061-2/+3
| | | | | | | | | | Move the enum { ObjCMethodFamilyBitWidth = 4 } to the top of the class. For some dark reason having the enum between the bitfields breaks the packing with gcc version 7.3-win32 20180312. Reported by: Abramo Bagnara (by email) llvm-svn: 339017
* [clang] Fix broken include_next in float.hLouis Dionne2018-08-061-3/+3
| | | | | | | | | | | | | | | Summary: The code defines __FLOAT_H and then includes the next <float.h>, which is guarded on __FLOAT_H so it gets skipped entirely. This commit uses the header guard __CLANG_FLOAT_H, like other headers (such as limits.h) do. Reviewers: jfb Subscribers: dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50276 llvm-svn: 339016
* Fix Mangled::Compare()Stefan Granitz2018-08-061-1/+1
| | | | llvm-svn: 339015
* Add ConstString::IsNull() to tell between null vs. empty strings and fix ↵Stefan Granitz2018-08-063-2/+28
| | | | | | | | | | | | | | usage in Mangled::GetDemangledName() Summary: `IsEmpty()` and `operator bool() == false` have equal semantics. Usage in Mangled::GetDemangledName() was incorrect. What it actually wants is a check for null-string. Split this off of D50071 and added a test to clarify usage. Reviewers: labath, jingham Subscribers: erik.pilkington, lldb-commits Differential Revision: https://reviews.llvm.org/D50327 llvm-svn: 339014
* [AArch64] Fix assertion failure on widened f16 BUILD_VECTORBryan Chan2018-08-062-0/+23
| | | | | | | | | | | | | | | | Summary: Ensure that NormalizedBuildVector returns a BUILD_VECTOR with operands of the same type. This fixes an assertion failure in VerifySDNode. Reviewers: SjoerdMeijer, t.p.northover, javed.absar Reviewed By: SjoerdMeijer Subscribers: kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D50202 llvm-svn: 339013
* [libc++] Add the _LIBCPP_HIDE_FROM_ABI_AFTER_V1 macroLouis Dionne2018-08-063-105/+25
| | | | | | | | | | | | | | | | | | | | | Summary: This macro allows hiding symbols from the ABI when the library is built with an ABI version after ABI v1, which is currently the only stable ABI. This commit defines `_LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY` to be `_LIBCPP_HIDE_FROM_ABI_AFTER_V1`, meaning that symbols that were only exported by the library for historical reasons are not exported anymore in the unstable ABI. Because of that, this commit is an ABI break for ABI v2. This ABI version is not stable, however, so this should not be a problem. Reviewers: EricWF, mclow.lists Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D49914 llvm-svn: 339012
* [clangd] Index Interfaces for XrefsHaojian Wu2018-08-067-3/+81
| | | | | | | | | | | | | | Summary: This is the first step of implementing Xrefs in clangd: - add index interfaces, and related data structures. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D49658 llvm-svn: 339011
* Fix modules build with different technique to suppress Knuth debuggingTim Northover2018-08-061-37/+33
| | | | | | | | | | Currently we use #pragma push_macro(LLVM_DEBUG) to fiddle with the LLVM_DEBUG macro so that we can silence debugging the Knuth division algorithm unless it's actually desired. Unfortunately this is incompatible with enabling modules while building LLVM (via LLVM_ENABLE_MODULES=ON), probably due to a bug being fixed by D33004. llvm-svn: 339009
* clang-cl: Parse the new /JMC flagHans Wennborg2018-08-062-0/+2
| | | | llvm-svn: 339008
* ARM-MachO: don't add Thumb bit for addend to non-external relocation.Tim Northover2018-08-063-0/+23
| | | | | | | | | ld64 supplies its own Thumb bit for Thumb functions, and intentionally zeroes out that part of any addend in an object file. But it only does that for symbols marked N_EXT -- i.e. external symbols. So LLVM should avoid setting that extra bit in other cases. llvm-svn: 339007
* Re-enable "[ValueTracking] Teach isKnownNonNullFromDominatingCondition about ↵Max Kazantsev2018-08-062-10/+199
| | | | | | | | | | | AND" The patch was reverted because of bug detected by sanitizer. The bug is fixed, respective tests added. Differential Revision: https://reviews.llvm.org/D50172 llvm-svn: 339005
* [ELF] - Remove dead code from LinkerScript::assignOffsets(). NFC-ihope.George Rimar2018-08-061-14/+2
| | | | | | | | | | | | | | | | | | Some parts of the code changed are a bit old. I found traces in 2016. Initiall commits has test cases and perhaps reasonable comments. For example, we had segfaults earlier and had the code to fix them. Now, in 2018, I think it is excessive to have these parts, because we do not have segfaults and our code was changed a lot (softly saying). I reviewed the current sources and I think that at this point of the execution flow, we should never face with the conditions checked and so I removing them in this patch. This helps to cleanup the code. llvm-svn: 339003
* [docs] Continue working around broken Sphinx parsing of LLVM code blocksChandler Carruth2018-08-061-1/+1
| | | | | | by switching to `text` in another place. llvm-svn: 339001
* [ELF] Test undefined weak symbol for Thumb narrow branchPeter Smith2018-08-061-0/+50
| | | | | | | | | | Add a test for the R_ARM_THM_JUMP11 relocation to an undefined symbol. We have to use yaml2obj as llvm-mc relaxes the narrow branch to a b.w which uses the R_ARM_THM_JUMP24 relocation instead. Differential Revision: https://reviews.llvm.org/D50234 llvm-svn: 338999
* [docs] Remove the `dso_local` tag from these functions.Chandler Carruth2018-08-061-2/+2
| | | | | | | | | The sphinx build bot is erroring on these examples for some unknown reason, and really the dso_local doesn't seem to be relevant to the example in any way so its cleaner to omit it. And now they will look a bit more like other (successful) IR examples. llvm-svn: 338998
* [docs] Stop trying to parse the ThinLTO summary IR fragments with theChandler Carruth2018-08-061-22/+22
| | | | | | | `llvm` syntax in Sphinx. This appears to just fail and create errors on the docs buildbot. llvm-svn: 338997
* [clang-rename] make clang-rename.py vim integration python3 compatibleJonas Toth2018-08-061-4/+9
| | | | | | | | | | | | | | | | | Summary: This patch makes the clang-rename.py script useable for vim with only python3 support. It uses the print-function and adjust the doc slightly to mention the correct python3 command for the letter mapping in vim. Reviewers: arphaman, klimek, aaron.ballman, hokein Reviewed By: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50307 llvm-svn: 338996
* Change ConstString::SetCStringWithMangledCounterpart to use StringRefPavel Labath2018-08-064-32/+44
| | | | | | | This should simplify the upcoming demangling patch (D50071). While I was in there, I also added a quick test for the function. llvm-svn: 338995
* Revert rL338990 to see if it causes sanitizer failuresMax Kazantsev2018-08-062-110/+10
| | | | | | | | | Multiple failues reported by sanitizer-x86_64-linux, seem to be caused by this patch. Reverting to see if they sustain without it. Differential Revision: https://reviews.llvm.org/D50172 llvm-svn: 338994
* Revert "[DebugInfo] Generate debug information for labels. (Fix PR37395)"Hsiangkai Wang2018-08-065-83/+0
| | | | | | | | | | | Build failed in http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/27258 In lib/CodeGen/LiveDebugVariables.cpp:589, it uses std::prev(MBBI) to get DebugValue's SlotIndex. however, the previous instruction may be also a debug instruction. llvm-svn: 338992
* Try to fix buildbotMax Kazantsev2018-08-061-1/+1
| | | | llvm-svn: 338991
* [ValueTracking] Teach isKnownNonNullFromDominatingCondition about ANDMax Kazantsev2018-08-062-10/+110
| | | | | | | | | | | `isKnownNonNullFromDominatingCondition` is able to prove non-null basing on `br` or `guard` by `%p != null` condition, but is unable to do so basing on `(%p != null) && %other_cond`. This patch allows it to do so. Differential Revision: https://reviews.llvm.org/D50172 Reviewed By: reames llvm-svn: 338990
* [DebugInfo] Generate debug information for labels. (Fix PR37395)Hsiangkai Wang2018-08-065-0/+83
| | | | | | | | | | | Generate DILabel metadata and call llvm.dbg.label after label statement to associate the metadata with the label. After fixing PR37395. Differential Revision: https://reviews.llvm.org/D45045 llvm-svn: 338989
OpenPOWER on IntegriCloud