summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-objcopy]Allow llvm-objcopy to be used on an ELF file with no section ↵James Henderson2019-04-023-13/+47
| | | | | | | | | | | | | | | | | | | | headers This patch fixes https://bugs.llvm.org/show_bug.cgi?id=41293 and https://bugs.llvm.org/show_bug.cgi?id=41045. llvm-objcopy assumed that it could always read a section header string table. This isn't the case when the sections were previously all stripped, and the e_shstrndx field was set to 0. This patch fixes this. It also fixes a double space in an error message relating to this issue, and prevents llvm-objcopy from adding extra space for non-existent section headers, meaning that --strip-sections on the output of a previous --strip-sections run produces identical output, simplifying the test. Reviewed by: rupprecht, grimar Differential Revision: https://reviews.llvm.org/D59989 llvm-svn: 357475
* Fix typo that I introduced in r357413. Thanks to ensadc@mailnesia.com for ↵Marshall Clow2019-04-021-1/+2
| | | | | | the catch. llvm-svn: 357474
* [mips] Remove the override of the `isMachineVerifierClean()`Simon Atanasyan2019-04-021-4/+0
| | | | | | All issues found by machine verifier in MIPS target have been fixed. llvm-svn: 357473
* [mips] Use AltOrders to prevent using odd FP-registersSimon Atanasyan2019-04-024-22/+28
| | | | | | | | | | | | | | | | | | | | | | | | | To disable using of odd floating-point registers (O32 ABI and -mno-odd-spreg command line option) such registers and their super-registers added to the set of reserved registers. In general, it works. But there is at least one problem - in case of enabled machine verifier pass some floating-point tests failed because live ranges of register units that are reserved is not empty and verification pass failed with "Live segment doesn't end at a valid instruction" error message. There is D35985 patch which tries to solve the problem by explicit removing of register units. This solution did not get approval. I would like to use another approach for prevent using odd floating point registers - define `AltOrders` and `AltOrderSelect` for MIPS floating point register classes. Such `AltOrders` contains reduced set of registers. At first glance, such solution does not break any test cases and allows enabling machine instruction verification for all MIPS test cases. Differential Revision: http://reviews.llvm.org/D59799 llvm-svn: 357472
* [ObjectYAML] Fix build issueMichael Liao2019-04-021-1/+1
| | | | | | | - ObjectYAML depends on Object as minidump support adds additional dependency. llvm-svn: 357471
* [RISCV] Support assembling @plt symbol operandsAlex Bradbury2019-04-0211-6/+49
| | | | | | | | | | This patch allows symbols appended with @plt to parse and assemble with the R_RISCV_CALL_PLT relocation. Differential Revision: https://reviews.llvm.org/D55335 Patch by Lewis Revill. llvm-svn: 357470
* Add minidump support to obj2yamlPavel Labath2019-04-027-0/+110
| | | | | | | | | | | | | | | | | Summary: This patch adds the code needed to parse a minidump file into the MinidumpYAML model, and the necessary glue code so that obj2yaml can recognise the minidump files and process them. Reviewers: jhenderson, zturner, clayborg Subscribers: mgorny, lldb-commits, amccarth, markmentovai, aprantl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59634 llvm-svn: 357469
* [clang-tidy] make getLangOpts return a const refAlexander Kornienko2019-04-021-1/+1
| | | | llvm-svn: 357468
* Fix Wimplicit-fallthrough warning introduced in rL357466. NFCI.Simon Pilgrim2019-04-021-0/+1
| | | | llvm-svn: 357467
* [PowerPC] Fix issue with inline asm - soft float modeStrahinja Petrovic2019-04-023-1/+28
| | | | | | | | | This patch prevents floating point register constraints in soft float mode. Differential Revision: https://reviews.llvm.org/D59310 llvm-svn: 357466
* [X86][AVX] Add test case showing failure to fold broadcast load if its also ↵Simon Pilgrim2019-04-021-0/+48
| | | | | | used as a scalar llvm-svn: 357465
* Make operator==s consistent between c++ and python APIsPavel Labath2019-04-0213-45/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: modify-python-lldb.py had code to insert python equality operators to some classes. Some of those classes already had c++ equality operators, and some didn't. This makes the situation more consistent, by removing all equality handilng from modify-python-lldb. Instead, I add c++ operators to classes where they were missing, and expose them in the swig interface files so that they are available to python too. The only tricky case was the SBAddress class, which had an operator== defined as a free function, which is not handled by swig. This function cannot be removed without breaking ABI, and we cannot add an extra operator== member, as that would make equality comparisons ambiguous. For this class, I define a python __eq__ function by hand and have it delegate to the operator!=, which I have defined as a member function. This isn't fully NFC, as the semantics of some equality functions in python changes slightly, but I believe it changes for the better (e.g., previously SBBreakpoint.__eq__ would consider two breakpoints with the same ID as equal, even if they belonged to different targets; now they are only equal if they belong to the same target). Reviewers: jingham, clayborg, zturner Subscribers: jdoerfert, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D59819 llvm-svn: 357463
* Fix tests after r357452Hans Wennborg2019-04-022-4/+4
| | | | llvm-svn: 357462
* Fix compiler warning, remove extra ";" [NFC]Mikael Holmen2019-04-021-1/+1
| | | | | | | | | At least gcc 7.4 complained with ../tools/clang/lib/StaticAnalyzer/Checkers/Taint.cpp:26:53: warning: extra ';' [-Wpedantic] TaintTagType); ^ llvm-svn: 357461
* Enforce StackID definition in PEISander de Smalen2019-04-028-10/+128
| | | | | | | | | | | | | | | There are various places in LLVM where the definition of StackID is not properly honoured, for example in PEI where objects with a StackID > 0 are allocated on the default stack (StackID0). This patch enforces that PEI only considers allocating objects to StackID 0. Reviewers: arsenm, thegameg, MatzeB Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D60062 llvm-svn: 357460
* Fix flakyness in TestCommandScriptImmediateOutputPavel Labath2019-04-022-5/+7
| | | | | | | | | | | | | | | I'm not sure why this surfaced at this particular point, but TestCommandScriptImmediateOutput (a pexpect test) had a synchronization issue, where the (lldb) promts it was expecting were getting out of sync. This happened for two reasons: - it did not expect the initial (lldb) prompt we print at startup - launchArgs() returned None, which resulted in an extra "target create None" command being issued to lldb (and an extra unhandled prompt being printed). Resolving these two issues seems to fix (or at least, improve) the test. llvm-svn: 357459
* [Internalize] Replace uses of std::set with DenseSetFangrui Song2019-04-022-7/+6
| | | | | | This makes it faster and saves 104 bytes for my build. llvm-svn: 357458
* [Internalize] Replace fstream with line_iterator for ↵Fangrui Song2019-04-021-9/+7
| | | | | | | | -internalize-public-api-file This makes my libLLVMipo.so.9svn smaller by 360 bytes. llvm-svn: 357457
* Fix llvm_unreachable in TestWriteMemoryPavel Labath2019-04-021-1/+1
| | | | | | | | | | The test was hitting llvm_unreachable in Platform::GetSoftwareBreakpointTrapOpcode because it could not figure out the architecture of the process. Since that is not the purpose of the test, I change the test to use an explicit CreateTargetWithFileAndTargetTriple command to specify it. llvm-svn: 357456
* PDBFPO: Refactor register reference resolutionPavel Labath2019-04-021-60/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This refactors moves the register name->number resolution out of the FPOProgramNodeRegisterRef class. Instead I create a special FPOProgramNodeSymbol class, which holds unresolved symbols, and move the resolution into the ResolveRegisterRefs visitor. The background here is that I'd like to use this code for Breakpad unwind info, which uses similar syntax to describe unwind info. For example, a simple breakpad unwind program might look like: .cfa: $esp 8 + $ebp: .cfa 8 - ^ To be able to do this, I need to be able to customize register resolving, as that is presently hardcoded to use codeview register names, but breakpad supports a lot more architectures with different register names. Moving the resolution into a separate class will allow each user to use a different resolution logic. Reviewers: aleksandr.urakov, zturner, amccarth Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D60068 llvm-svn: 357455
* [clangd] Use capacity() instead of size() in RefSlab::bytes()Ilya Biryukov2019-04-021-1/+1
| | | | | | | | | | | | | | | | Patch by Nathan Ridge. Reviewers: gribozavr Reviewed By: gribozavr Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60040 llvm-svn: 357454
* Fix a number of bugs in __val_expr's subset operator[].Eric Fiselier2019-04-029-222/+359
| | | | | | | | The current definitions were entirely broken. They didn't call any existing constructor and the forgot to friend the expression types they were trying to construct. llvm-svn: 357453
* SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without ↵Hans Wennborg2019-04-029-84/+128
| | | | | | | | | | | | | | | | used results (PR41259) The code was previously checking that candidates for sinking had exactly one use or were a store instruction (which can't have uses). This meant we could sink call instructions only if they had a use. That limitation seemed a bit arbitrary, so this patch changes it to "instruction has zero or one use" which seems more natural and removes the need to special-case stores. Differential revision: https://reviews.llvm.org/D59936 llvm-svn: 357452
* Simplify TestGdbRemoteRegisterStatePavel Labath2019-04-021-9/+0
| | | | | | | | While reviewing D56233 it became clear to me that this test can be simplified. There's no need for a start-stop cycle in the inferior -- we can start fiddling with its registers as soon as it is launched. llvm-svn: 357451
* ar_to_bc.sh: replace readlink -f with custom relative path resolutionFangrui Song2019-04-021-2/+2
| | | | | | | | | | llvm-ar is a crunchgen-style executable dispatching to dlltool,ranlib,lib,ar based on argv[0]. In our content-addressable storage, readlink -f resolves paths to some digest and thus lost the original "llvm-ar" filename. Replace it with a custom path resolution to fix the problem. llvm-svn: 357450
* [compiler-rt][test] Make instrprof-set-dir-mode test tolerant of group IDMatt Davis2019-04-021-1/+5
| | | | | | | | | | | | | | | | | | | Patch from 'troyj': Hi, I ran into a problem with this test when the source was located in certain directories. The mkdir(2) man page states that the set-group-ID bit is inherited from the parent directory, but this test was written in such a way that it assumes the bit is unset. Whether that assumption is true depends on where the checkout lives, which leads to some people being able to reproduce the problem whereas others cannot. I think the correct fix is to exclude the bit from the check. Making probinson a reviewer since they reviewed the original test. Patch landed for troyj, thanks! Differential Revision: D53832 llvm-svn: 357449
* [LoopPredication] Simplify widenable condition handling [NFC]Philip Reames2019-04-021-9/+18
| | | | | | The code doesn't actually need any of the information about the widenable condition at this level. The only thing we need is to ensure the WC call is the last thing anded in, and even that is a quirk we should really look to remove. llvm-svn: 357448
* Add an optional list of blocks to avoid when looking for a path in ↵Nick Lewycky2019-04-026-48/+158
| | | | | | | | | | isPotentiallyReachable. The leads to some ambiguous overloads, so update three callers. Differential Revision: https://reviews.llvm.org/D60085 llvm-svn: 357447
* [X86] Add test cases to fixup-lea.ll for optsize and no size optimization. ↵Craig Topper2019-04-021-1/+160
| | | | | | | | Add +/-slow-incdec command lines We only form inc/dec in FixupLEAs under minsize today, but all other locations in the compiler for inc/dec with optsize. llvm-svn: 357446
* [X86] Autogenerate complete checks. NFCCraig Topper2019-04-021-4/+25
| | | | llvm-svn: 357445
* [X86] Use unsigned type for opcodes throughout X86FixupLEAs.Craig Topper2019-04-021-12/+13
| | | | | | All of the interfaces related to opcode in MachineInstr and MCInstrInfo refer to opcodes as unsigned. llvm-svn: 357444
* InstSimplify: Add missing case from r357386Matt Arsenault2019-04-021-0/+23
| | | | llvm-svn: 357443
* [AMDGPU] Add more test cases of D59608.Michael Liao2019-04-023-0/+110
| | | | | | | | | | | | | | Summary: - Add more test cases. Reviewers: arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60071 llvm-svn: 357442
* AMDGPU: Fix test filenameMatt Arsenault2019-04-021-0/+0
| | | | llvm-svn: 357441
* [ARM] Optimize expressions like "return x != 0;" for Thumb1.Eli Friedman2019-04-024-169/+153
| | | | | | | | | | | | | There's an existing optimization for x != C, but somehow it was missing a special case for 0. While I'm here, also cleaned up the code/comments a bit: the second value produced by the MERGE_VALUES was actually dead, since a CMOV only produces one result. Differential Revision: https://reviews.llvm.org/D59616 llvm-svn: 357437
* [ARM] Don't try to create "push {r12, lr}" in Thumb1 at -Oz.Eli Friedman2019-04-012-22/+28
| | | | | | | | | | | | It's a little tricky to make this issue show up because prologue/epilogue emission normally likes to push at least two registers... but it doesn't when lr is force-spilled due to function length. Not sure if that really makes sense, but I decided not to touch it for now. Differential Revision: https://reviews.llvm.org/D59385 llvm-svn: 357436
* [LoopPred] Rename a variable to simply a future patch [NFC]Philip Reames2019-04-011-8/+8
| | | | llvm-svn: 357433
* [AArch64][GlobalISe] Select STRQui for stores into v264s instead of scalarizingJessica Paquette2019-04-013-5/+26
| | | | | | | | | This improves selection for vector stores into v2s64s. Before we just scalarized them, but we can just use a STRQui instead. Differential Revision: https://reviews.llvm.org/D60083 llvm-svn: 357432
* [CMake] Only the Python scirpt interpreter should link against Python.Jonas Devlieghere2019-04-012-8/+1
| | | | | | This patch removes spurious links against Python. llvm-svn: 357431
* Fix clangd unittest _WIN32 ifdefReid Kleckner2019-04-011-2/+2
| | | | | | WIN32 is not defined, _WIN32 is, use that instead. llvm-svn: 357429
* [Process] Use early returns in Process::WriteMemory (NFC)Jonas Devlieghere2019-04-011-55/+51
| | | | | | | | | | I found the code of Process::WriteMemory particularly hard to follow when reviewing Ismail's change in D60022. This simplifies the code and hopefully prevents similar oversights in the future. Differential revision: https://reviews.llvm.org/D60092 llvm-svn: 357428
* [NFC] Remove dead parameter "FreeInLoop", fix some typos and trailing ↵Nick Lewycky2019-04-011-15/+12
| | | | | | | | whitespace. Differential Revision: https://reviews.llvm.org/D60084 llvm-svn: 357427
* [lldb-vscode] Add logic to handle EOF when reading from lldb-vscode stdout.Jorge Gorbe Moya2019-04-011-31/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change prevents the lldb-vscode test harness from hanging up waiting for new messages when the lldb-vscode subprocess crashes. Now, when an EOF from the subprocess pipe is detected we enqueue a `None` packet in the received packets list. Then, during the message processing loop, we can use this `None` packet to tell apart the case where lldb-vscode has terminated unexpectedly from the normal situation where no pending messages means blocking and waiting for more data. I believe this should be enough to fix the issues with these tests hanging on multiple platforms. Once this lands, I'll prepare and test a separate change removing the @skipIfLinux annotations. Reviewers: clayborg, zturner Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D59849 llvm-svn: 357426
* Not all blocks are reachable from entry. Don't assume they are.Nick Lewycky2019-04-012-4/+51
| | | | | | Fixes a bug in isPotentiallyReachable, noticed by inspection. llvm-svn: 357425
* [API] Add SBReproducer to LLDB.hJonas Devlieghere2019-04-011-0/+1
| | | | llvm-svn: 357424
* [libcxx] Make sure reference_wrapper works with incomplete typesLouis Dionne2019-04-015-1/+163
| | | | | | | | | | | | Summary: Completes P0357R3, which was merged into the C++20 Working Draft in San Diego. Reviewers: EricWF, mclow.lists Subscribers: christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D54722 llvm-svn: 357423
* [pstl] Mangle the parallel_strict_scan backend functionLouis Dionne2019-04-013-8/+9
| | | | llvm-svn: 357422
* [NFC][LLD] Specify namespaces explicity to fix build failure on GCC 5 after ↵Matthew Voss2019-04-011-3/+7
| | | | | | r357383 llvm-svn: 357421
* [Process] Fix WriteMemory return valueMed Ismail Bennani2019-04-012-2/+32
| | | | | | | | | | | | | | | | | | | | | Summary: In case of a breakpoint site overlapping with the destination address, the WriteMemory method reported an incorrect memory size. Instead of returning the right amount of bytes written, it falls through the scope and returned 0. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Reviewers: jasonmolenda, friss, jingham Subscribers: JDevlieghere, davide, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D60022 llvm-svn: 357420
* [X86] Classify the AVX512 rounding control operand as ↵Craig Topper2019-04-013-2/+9
| | | | | | | | | | X86::OPERAND_ROUNDING_CONTROL instead of MCOI::OPERAND_IMMEDIATE. Add an assert on legal values of rounding control in the encoder and remove an explicit mask. This should allow llvm-exegesis to intelligently constrain the rounding mode. The mask in the encoder shouldn't be necessary any more. We used to allow codegen to use 8-11 for rounding mode and the assembler would use 0-3 to mean the same thing so we masked here and in the printer. Codegen now matches the assembler and the printer was updated, but I forgot to update the encoder. llvm-svn: 357419
OpenPOWER on IntegriCloud