summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [LLVM-C] Improve Bindings to The Internalize PassRobert Widmann2019-07-232-0/+24
| | | | | | | | | | | | | | | | Summary: Adds a binding to the internalize pass that allows the caller to pass a function pointer that acts as the visibility-preservation predicate. Previously, one could only pass an unsigned value (not LLVMBool?) that directed the pass to consider "main" or not. Reviewers: whitequark, deadalnix, harlanhaskins Reviewed By: whitequark, harlanhaskins Subscribers: kren1, hiraditya, llvm-commits, harlanhaskins Tags: #llvm Differential Revision: https://reviews.llvm.org/D62456 llvm-svn: 366777
* Implement most of P1612R1: Relocate endian. Moves the std::endian ↵Marshall Clow2019-07-233-16/+23
| | | | | | functionality from 'type-traits' to 'bit'. No other change. The reason that this is 'partial' is that P1621 also recommends a feature-test macro, but I don't have the value for that one yet. In a month or so, I'll add that llvm-svn: 366776
* [PowerPC] Replace float load/store pair with integer load/store pair when ↵Zi Xuan Wu2019-07-235-23/+35
| | | | | | | | | | | | | | it's only used in load/store Replace float load/store pair with integer load/store pair when it's only used in load/store, because float load/store instructions cost more cycles then integer load/store. A typical scenario is when there is a call with more than 13 float arguments passing, we need pass them by stack. So we need a load/store pair to do such memory operation if the variable is global variable. Differential Revision: https://reviews.llvm.org/D64195 llvm-svn: 366775
* Inline function call into assert to fix unused variable warning.Richard Trieu2019-07-231-3/+2
| | | | llvm-svn: 366774
* Move variable out from debug only section.Richard Trieu2019-07-231-2/+0
| | | | | | | MFI is no longer just needed for an assert. Move it out of the debug only section to allow non-assert builds to be able to find it. llvm-svn: 366773
* [llvm-lipo] Implement -infoShoaib Meenai2019-07-234-14/+101
| | | | | | | | | | Prints architecture type of all input files. Patch by Anusha Basana <anusha.basana@gmail.com> Differential Revision: https://reviews.llvm.org/D64668 llvm-svn: 366772
* [lldb][test_suite] Fix skipIfTargetAndroid decoratorAlex Langford2019-07-231-7/+3
| | | | | | | | | | | | Summary: Delete the duplicate func `skipIfTargetAndroid` Fix the old one. It didn't work for missing an argument `bugnumber`, this somehow made the decorator failed Differential Revision: https://reviews.llvm.org/D64583 Patch by Wanyi Ye <kusmour@gmail.com> llvm-svn: 366771
* [lldb][test_suite] skip tests of `libstdcpp` on Android and clean upAlex Langford2019-07-232-19/+15
| | | | | | | | | | | | | | | | Summary: Delete the android target from `libstdcpp` test category, since android no longer support libstdcxx Reviewers: xiaobai, labath Reviewed By: labath Subscribers: srhines, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64771 llvm-svn: 366770
* Fixing build error from commit 95cbc3dStefan Stipanovic2019-07-225-1/+468
| | | | | | | | | | | | | | | [Attributor] Liveness analysis. Liveness analysis abstract attribute used to indicate which BasicBlocks are dead and can therefore be ignored. Right now we are only looking at noreturn calls. Reviewers: jdoerfert, uenoku Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D64162 llvm-svn: 366769
* [Logging] Replace LogIfAnyCategoriesSet with LLDB_LOG.Jonas Devlieghere2019-07-226-67/+35
| | | | | | | | This patch removes any remaining instances of LogIfAnyCategoriesSet and replaces them with the LLDB_LOG macro. This in turn made it possible to make Log::VAPrintf and Log::VAError private. llvm-svn: 366768
* Restore tests for lldb-server and lldb-vscode removed at rL366590Antonio Afonso2019-07-2263-0/+10564
| | | | | | | | | | | | | | | | Summary: This was removed here rL366590 by accident. Reviewers: xiaobai, jfb Reviewed By: xiaobai Subscribers: dexonsmith, srhines, krytarowski, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65123 llvm-svn: 366766
* [Statepoints] Fix a bug in statepoint lowering for functions w/no-realign-stackPhilip Reames2019-07-222-3/+9
| | | | | | | | | | We were silently using the ABI alignment for all of the stores generated for deopt and gc values. We'd gotten the alignment of the stack slot itself properly reduced (via MachineFrameInfo's clamping), but having the MMO on the store incorrect was enough for us to generate an aligned store to a unaligned location. The simplest fix would have been to just pass the alignment to the helper function, but once we do that, the helper function doesn't really help. So, inline it and directly call the MMO version of DAG.getStore with a properly constructed MMO. Note that there's a separate performance possibility here. Even if we *can* realign stacks, we probably don't *want to* if all of the stores are in slowpaths. But that's a later patch, if at all. :) llvm-svn: 366765
* Fix pointer width in test from r366754.Peter Collingbourne2019-07-221-2/+2
| | | | llvm-svn: 366764
* gn build: Wrap two comments to 80 columnsNico Weber2019-07-221-2/+3
| | | | llvm-svn: 366763
* [DWARF] Add more error handling to debug line parser.Jonas Devlieghere2019-07-224-38/+256
| | | | | | | | | | This patch exnteds the error handling in the debug line parser to get rid of the existing MD5 assertion. I want to reuse the debug line parser from LLVM in LLDB where we cannot crash on invalid input. Differential revision: https://reviews.llvm.org/D64544 llvm-svn: 366762
* [NFC][clang] Refactor getCompilationPhases()+Types.def step 1.Puyan Lotfi2019-07-224-67/+85
| | | | | | | | | | | Moves list of phases into Types.def table: Currently Types.def contains a table of strings that are used to assemble a list of compilation phases to be setup in the clang driver's jobs pipeline. This change makes it so that the table itself contains the list of phases. A subsequent patch will remove the strings. Differential Revision: https://reviews.llvm.org/D64098 llvm-svn: 366761
* [Statepoints] Add a test which shows a miscompile with no-realign-stacksPhilip Reames2019-07-221-0/+55
| | | | llvm-svn: 366760
* Revert "Fixing build error from commit 9285295."Stefan Stipanovic2019-07-225-466/+1
| | | | | | This reverts commit 95cbc3da8871f43c1ce2b2926afaedcd826202b1. llvm-svn: 366759
* llvm-objcopy/test: add REQUIRES: shell for use of umaskDavid Blaikie2019-07-222-0/+2
| | | | | | (follow-up to r365162) llvm-svn: 366755
* Analysis: Don't look through aliases when simplifying GEPs.Peter Collingbourne2019-07-222-1/+18
| | | | | | | | | | | | | | | | | | | | It is not safe in general to replace an alias in a GEP with its aliasee if the alias can be replaced with another definition (i.e. via strong/weak resolution (linkonce_odr) or via symbol interposition (default visibility in ELF)) while the aliasee cannot. An example of how this can go wrong is in the included test case. I was concerned that this might be a load-bearing misoptimization (it's possible for us to use aliases to share vtables between base and derived classes, and on Windows, vtable symbols will always be aliases in RTTI mode, so this change could theoretically inhibit trivial devirtualization in some cases), so I built Chromium for Linux and Windows with and without this change. The file sizes of the resulting binaries were identical, so it doesn't look like this is going to be a problem. Differential Revision: https://reviews.llvm.org/D65118 llvm-svn: 366754
* Fixing build error from commit 9285295.Stefan Stipanovic2019-07-225-1/+466
| | | | | | | | | | | | | | | [Attributor] Liveness analysis. Liveness analysis abstract attribute used to indicate which BasicBlocks are dead and can therefore be ignored. Right now we are only looking at noreturn calls. Reviewers: jdoerfert, uenoku Subscribers: hiraditya, llvm-commits Differential revision: https://reviews.llvm.org/D64162 llvm-svn: 366753
* [NFC][PatternMatch] Refactor code into a proper "matcher for any integral ↵Roman Lebedev2019-07-222-18/+10
| | | | | | | | | constant" Having it as a proper matcher is better for reusability elsewhere (in a follow-up patch.) llvm-svn: 366752
* [InstSimplify][NFC] Tests for skipping 'div-by-0' checks before ↵Roman Lebedev2019-07-222-0/+188
| | | | | | | | | @llvm.umul.with.overflow These may remain after @llvm.umul.with.overflow was canonicalized from the code that was originally doing the check via division. llvm-svn: 366751
* [SimplifyCFG][NFC] Test that we fail to flatten CFG in JPEG "sign" value ↵Roman Lebedev2019-07-221-0/+39
| | | | | | | | | | extend pattern This comes up in JPEG decoding, see e.g. Figure F.12 – Extending the sign bit of a decoded value in V of ITU T.81 (JPEG specification). llvm-svn: 366750
* [SimplifyCFG][NFC] Test that we fail to flatten CFG after forming ↵Roman Lebedev2019-07-221-0/+38
| | | | | | | | | | @llvm.umul.with.overflow Even if we formed @llvm.umul.with.overflow, we are still stuck with that guard against div-by-zero, which is no longer needed, because we didn't flatten the CFG. llvm-svn: 366749
* [InstCombine][NFC] Tests for canonicalization of unsigned multiply overflow ↵Roman Lebedev2019-07-224-0/+556
| | | | | | check llvm-svn: 366748
* [NFC][PhaseOrdering] Add tests showcasing the problems of unsigned multiply ↵Roman Lebedev2019-07-221-0/+85
| | | | | | | | | | overflow check While we can form the @llvm.mul.with.overflow easily, we are still left with that check that was guarding against div-by-0. And in the second case we won't even flatten the CFG. llvm-svn: 366747
* [IndVarSimplify][NFC] Autogenerate check lines in loop_evaluate_1.llRoman Lebedev2019-07-221-18/+27
| | | | | | Being affected by upcoming patch. llvm-svn: 366746
* Remove Xcode project remnantsJonas Devlieghere2019-07-222-64/+0
| | | | llvm-svn: 366745
* [Driver] Set the default win32-macho debug format to DWARFVedant Kumar2019-07-222-3/+8
| | | | | | | | rdar://53267670 Differential Revision: https://reviews.llvm.org/D65116 llvm-svn: 366744
* AMDGPU: Don't use SDNodeXForm for DS offset outputMatt Arsenault2019-07-221-12/+12
| | | | | | | | | | | The xform has no real valuewhen it's using out of a complex pattern output. The complex pattern was already creating TargetConstants with i16, so this was just unnecessary machinery. This allows global isel to import the simple cases once the complex pattern is implemented. llvm-svn: 366743
* Remove INSTALL.txt fileJonas Devlieghere2019-07-221-18/+0
| | | | | | | Its contents are stale and much better documentation can be found either online or in the docs directory. llvm-svn: 366742
* [Docs] Remove stale documentationJonas Devlieghere2019-07-221-21/+2
| | | | | | | This removes a stale piece of documentation about building LLDB with the Xcode project. llvm-svn: 366741
* [LLDB] Remove the Xcode projectJonas Devlieghere2019-07-2213-12765/+0
| | | | | | | | | | | | | Finally, after a lot of hard work from a bunch of people, we're in a state where we can unify LLDB's build system. This patch removes the hand-maintained Xcode project in favor of using CMake in combination with the Xcode generator. Going forward, we want to focus our efforts on improving the generated Xcode project. Differential revision: https://reviews.llvm.org/D65109 llvm-svn: 366739
* [TSan] Enable fiber tests on iOS simulatorJulian Lettner2019-07-225-5/+5
| | | | | | | | | These tests *do not* work on device, but they *do* work in the simulator. rdar://53403778 llvm-svn: 366738
* Temporarily Revert "[Attributor] Liveness analysis." as it's breaking the build.Eric Christopher2019-07-225-468/+1
| | | | | | This reverts commit 9285295f75a231dc446fa7cbc10a0a391b3434a5. llvm-svn: 366737
* [Attributor] Liveness analysis.Stefan Stipanovic2019-07-225-1/+468
| | | | | | | | | | | | | Liveness analysis abstract attribute used to indicate which BasicBlocks are dead and can therefore be ignored. Right now we are only looking at noreturn calls. Reviewers: jdoerfert, uenoku Subscribers: hiraditya, llvm-commits Differential revision: https://reviews.llvm.org/D64162 llvm-svn: 366736
* [NFC][libc++] Add missing EXPLICIT to pair and tuple synopsisLouis Dionne2019-07-222-16/+16
| | | | | | | The constructors for std::pair and std::tuple have been made conditionally explicit, however the synopsis in the headers do not reflect that. llvm-svn: 366735
* [runtimes] Don't depend on libpthread on AndroidYi Kong2019-07-2216-16/+16
| | | | | | | | | | r362048 added support for ELF dependent libraries, but broke Android build since Android does not have libpthread. Remove the dependency on the Android build. Differential Revision: https://reviews.llvm.org/D65098 llvm-svn: 366734
* [Symbol] Improve Variable::GetLanguageAlex Langford2019-07-222-14/+14
| | | | | | | | | | | | | | | | Summary: When trying to ascertain what language a variable belongs to, just checking the compilation unit is often not enough. In r364845 I added a way to check for a variable's language type, but didn't put it in Variable itself. Let's go ahead and put it in Variable. Reviewers: jingham, clayborg Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D64042 llvm-svn: 366733
* [X86] When using AND+PACKUS in lowerV16I8Shuffle, generate the build vector ↵Craig Topper2019-07-2216-52/+51
| | | | | | | | | | | | | | | | directly in v16i8 with the correct 0x00 or 0xFF elements rather than using another VT and bitcasting it. The build_vector will become a constant pool load. By using the desired type initially, it ensures we don't generate a bitcast of the constant pool load which will need to be folded with the load. While experimenting with another patch, I noticed that when the load type and the constant pool type don't match, then SimplifyDemandedBits can't handle it. While we should probably fix that, this was a simple way to fix the issue I saw. llvm-svn: 366732
* [NFC][PowerPC]Change ADDIStocHA to ADDIStocHA8 to follow 64-bit naming ↵Jason Liu2019-07-2212-33/+33
| | | | | | | | | | | | | | | convention Summary: Since we are planning to add ADDIStocHA for 32bit in later patch, we decided to change 64bit one first to follow naming convention with 8 behind opcode. Patch by: Xiangling_L Differential Revision: https://reviews.llvm.org/D64814 llvm-svn: 366731
* [libc++] Set __file_ to 0 in basic_filebuf::close() even if fclose failsPetr Hosek2019-07-222-3/+58
| | | | | | | | | | | | | | | | | | | | This issue was detected by ASan in one of our tests. This test manually invokes basic_filebuf::cloe(). fclose(__h.release() returned a non-zero exit status, so __file_ wasn't set to 0. Later when basic_filebuf destructor ran, we would enter the if (__file_) block again leading to heap-use-after-free error. The POSIX specification for fclose says that independently of the return value, fclose closes the underlying file descriptor and any further access (including another call to fclose()) to the stream results in undefined behavior. This is exactly what happened in our test case. To avoid this issue, we have to always set __file_ to 0 independently of the fclose return value. Differential Revision: https://reviews.llvm.org/D64979 llvm-svn: 366730
* [Attributor] NoAlias on return values.Stefan Stipanovic2019-07-224-9/+276
| | | | | | | | | | | | | Porting function return value attribute noalias to attributor. This will be followed with a patch for callsite and function argumets. Reviewers: jdoerfert Subscribers: lebedev.ri, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D63067 llvm-svn: 366728
* Stubs out TLOF for AIX and add support for common vars in assembly output.Sean Fertile2019-07-2212-10/+184
| | | | | | | | | Stubs out a TargetLoweringObjectFileXCOFF class, implementing only SelectSectionForGlobal for common symbols. Also adds an override of EmitGlobalVariable in PPCAIXAsmPrinter which adds a number of defensive errors and adds support for emitting common globals. llvm-svn: 366727
* [SafeStack] Insert the deref after the offsetPetr Hosek2019-07-222-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While debugging code that uses SafeStack, we've noticed that LLVM produces an invalid DWARF. Concretely, in the following example: int main(int argc, char* argv[]) { std::string value = ""; printf("%s\n", value.c_str()); return 0; } DWARF would describe the value variable as being located at: DW_OP_breg14 R14+0, DW_OP_deref, DW_OP_constu 0x20, DW_OP_minus The assembly to get this variable is: leaq -32(%r14), %rbx The order of operations in the DWARF symbols is incorrect in this case. Specifically, the deref is incorrect; this appears to be incorrectly re-inserted in repalceOneDbgValueForAlloca. With this change which inserts the deref after the offset instead of before it, LLVM produces correct DWARF: DW_OP_breg14 R14-32 Differential Revision: https://reviews.llvm.org/D64971 llvm-svn: 366726
* WholeProgramDevirt: Teach the pass to respect the global's alignment.Peter Collingbourne2019-07-223-18/+23
| | | | | | | | | | | | | | | | | | | The bytes inserted before an overaligned global need to be padded according to the alignment set on the original global in order for the initializer to meet the global's alignment requirements. The previous implementation that padded to the pointer width happened to be correct for vtables on most platforms but may do the wrong thing if the vtable has a larger alignment. This issue is visible with a prototype implementation of HWASAN for globals, which will overalign all globals including vtables to 16 bytes. There is also no padding requirement for the bytes inserted after the global because they are never read from nor are they significant for alignment purposes, so stop inserting padding there. Differential Revision: https://reviews.llvm.org/D65031 llvm-svn: 366725
* [PowerPC] Fix comment on MO_PLT Target Operand Flag. [NFC]Sean Fertile2019-07-221-2/+2
| | | | | | Patch by Xiangling Liao. llvm-svn: 366724
* [Object][XCOFF] Remove extra includes from XCOFF related files. [NFC]Sean Fertile2019-07-222-20/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D60885 llvm-svn: 366723
* LowerTypeTests: Teach the pass to respect global alignments.Peter Collingbourne2019-07-222-19/+42
| | | | | | | | | | | | | | | We were previously ignoring alignment entirely when combining globals together in this pass. There are two main things that we need to do here: add additional padding before each global to meet the alignment requirements, and set the combined global's alignment to the maximum of all of the original globals' alignments. Since we now need to calculate layout as we go anyway, use the calculated layout to produce GlobalLayout instead of using StructLayout. Differential Revision: https://reviews.llvm.org/D65033 llvm-svn: 366722
OpenPOWER on IntegriCloud