summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the sphinx buildbot after D54429Kristof Umann2019-02-051-1/+1
| | | | llvm-svn: 353150
* [Expressions] Add support of expressions evaluation in some object's contextAleksandr Urakov2019-02-0526-44/+596
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support of expression evaluation in a context of some object. Consider the following example: ``` struct S { int a = 11; int b = 12; }; int main() { S s; int a = 1; int b = 2; // We have stopped here return 0; } ``` This patch allows to do something like that: ``` lldb.frame.FindVariable("s").EvaluateExpression("a + b") ``` and the result will be `33` (not `3`) because fields `a` and `b` of `s` will be used (not locals `a` and `b`). This is achieved by replacing of `this` type and object for the expression. This has some limitations: an expression can be evaluated only for values located in the debuggee process memory (they must have an address of `eAddressTypeLoad` type). Reviewers: teemperor, clayborg, jingham, zturner, labath, davide, spyffe, serge-sans-paille Reviewed By: jingham Subscribers: abidh, lldb-commits, leonid.mashinskiy Tags: #lldb Differential Revision: https://reviews.llvm.org/D55318 llvm-svn: 353149
* Previously if the user configured their build but then changedDan Liew2019-02-051-15/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LLVM_ENABLED_PROJECT and reconfigured it had no effect on what projects were actually built. This was very confusing behaviour. The reason for this is that the value of the `LLVM_TOOL_<PROJECT>_BUILD` variables are already set. The problem here is that we have two sources of truth: * The projects listed in LLVM_ENABLE_PROJECTS. * The projects enabled/disabled with LLVM_TOOL_<PROJECT>_BUILD. At configure time we have no real way of knowing which source of truth the user wants so we apply the following heuristic: If the user ever sets `LLVM_ENABLE_PROJECTS` in the CMakeCache then that is used as the single source of truth and we force the `LLVM_TOOL_<PROJECT>_BUILD` CMake cache variables to have the appropriate values that match the contents of the `LLVM_ENABLE_PROJECTS`. If the user never sets `LLVM_ENABLE_PROJECTS` then they can continue to use and set the `LLVM_TOOL_<PROJECT>_BUILD` variables as the "source of truth". The problem with this approach is that if the user ever tries to use both `LLVM_ENABLE_PROJECTS` and `LLVM_TOOL_<PROJECT>_BUILD` for the same build directory then any user set value for `LLVM_TOOL_<PROJECT>_BUILD` variables will get overwriten, likely without the user noticing. Hopefully the above shouldn't matter in practice because the LLVM_TOOL_<PROJECT>_BUILD variables are not documented, but LLVM_ENABLE_PROJECTS is. We should probably deprecate the `LLVM_TOOL_<PROJECT>_BUILD` variables at some point by turning them into to regular CMake variables that don't live in the CMake cache. Differential Revision: https://reviews.llvm.org/D57535 llvm-svn: 353148
* [NFC] fix trivial typos in commentsHiroshi Inoue2019-02-058-13/+13
| | | | llvm-svn: 353147
* [COFF] Avoid O(n^2) accesses into PartialSectionsMartin Storsjo2019-02-051-21/+21
| | | | | | | | | | | | | | | | | | | | | | | For MinGW, unique partial sections are much more common, e.g. comdat functions get sections named e.g. text$symbol. A moderate sized example of this contains over 200K Chunks which create 174K unique PartialSections. Prior to SVN r352928 (D57574), linking this took around 1,5 seconds for me, while it afterwards takes around 13 minutes. After this patch, the linking time is back to what it was before. The std::find_if in findPartialSection will do a linear scan of the whole container until a match is found. To use something like binary_search or the std::set container's own methods, we'd need to already have a PartialSection*. Reinstate a proper map instead of having a set with a custom sorting comparator. Differential Revision: https://reviews.llvm.org/D57666 llvm-svn: 353146
* [MinGW] Hook up the --no-insert-timestamp optionMartin Storsjo2019-02-053-0/+8
| | | | | | | | | | This fixes PR40582. Patch by Georg Koppen! Differential Revision: https://reviews.llvm.org/D57679 llvm-svn: 353145
* [DAG][NFC] Add unit tests.Clement Courbet2019-02-051-0/+211
| | | | | | In preparation for D57541. llvm-svn: 353144
* [DAG] BaseIndexOffset: FrameIndexSDNodes with the same FrameIndex compare equal.Clement Courbet2019-02-051-5/+9
| | | | | | | | | | | | Reviewers: niravd Subscribers: arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57692 llvm-svn: 353143
* [X86] Change MS inline asm clobber list filter to check for 'fpsr' instead ↵Craig Topper2019-02-051-1/+1
| | | | | | | | | | | | | | | | | | of 'fpsw' after D57641. Summary: The backend used to print the x87 FPSW register as 'fpsw', but gcc inline asm uses 'fpsr'. After D57641, the backend now uses 'fpsr' to match. Reviewers: rnk Reviewed By: rnk Subscribers: eraman, cfe-commits, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57642 llvm-svn: 353142
* [X86] Connect the default fpsr and dirflag clobbers in inline assembly to ↵Craig Topper2019-02-053-1/+17
| | | | | | | | | | | | | | | | | | | | | the registers we have defined for them. Summary: We don't currently map these constraints to physical register numbers so they don't make it to the MachineIR representation of inline assembly. This could have problems for proper dependency tracking in the machine schedulers though I don't have a test case that shows that. Reviewers: rnk Reviewed By: rnk Subscribers: eraman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57641 llvm-svn: 353141
* Fix double curliesJF Bastien2019-02-051-1/+1
| | | | | | Pointed out by Arthur in D57624. llvm-svn: 353140
* gn build: Upgrade to NDK r19.Peter Collingbourne2019-02-059-29/+20
| | | | | | | | | | NDK r19 includes a sysroot that can be used directly by the compiler without creating a standalone toolchain, so we just need a handful of flags to point Clang there. Differential Revision: https://reviews.llvm.org/D57733 llvm-svn: 353139
* [X86] Add test case from PR40529. NFCCraig Topper2019-02-051-0/+43
| | | | llvm-svn: 353138
* [CMake] Update lit test configurationPetr Hosek2019-02-056-32/+36
| | | | | | | | | There are several changes: - Don't stringify Pythonized bools (that's why we're Pythonizing them) - Support specifying target and sysroot via CMake variables - Use consistent spelling for --target, --sysroot, --gcc-toolchain llvm-svn: 353137
* [LSR] Check SCEV on isZero() after extend. PR40514Max Kazantsev2019-02-052-3/+78
| | | | | | | | | | | | | | | | | | | | | When LSR first adds SCEVs to BaseRegs, it only does it if `isZero()` has returned false. In the end, in invocation of `InsertFormula`, it asserts that all values there are still not zero constants. However between these two points, it makes some transformations, in particular extends them to wider type. SCEV does not give us guarantee that if `S` is not a constant zero, then `sext(S)` is also not a constant zero. It might have missed some optimizing transforms when it was calculating `S` and then made them when it took `sext`. For example, it may happen if previously optimizing transforms were limited by depth or somehow else. This patch adds a bailout when we may end up with a zero SCEV after extension. Differential Revision: https://reviews.llvm.org/D57565 Reviewed By: samparker llvm-svn: 353136
* [SamplePGO] More pipeline changes when flattened profile used in ThinLTO ↵Teresa Johnson2019-02-052-22/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | postlink Summary: Follow on to D54819/r351476. We also don't need to perform extra InstCombine pass when we aren't loading the sample profile in the ThinLTO backend because we have a flattened sample profile. Additionally, for consistency and clarity, when we aren't reloading the sample profile, perform ICP in the same location as non-sample PGO backends. To this end I have moved the ICP invocation for non-SamplePGO ThinLTO down into buildModuleSimplificationPipeline (partly addresses the FIXME where we were previously setting this up). Reviewers: wmi Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57705 llvm-svn: 353135
* Fix narrowing issue from r353129Richard Trieu2019-02-051-1/+2
| | | | llvm-svn: 353134
* [WebAssembly] Fix indentation after adding IsCanonical property (NFC)Heejin Ahn2019-02-052-11/+11
| | | | llvm-svn: 353132
* [WebAssembly] Make disassembler always emit most canonical name.Wouter van Oortmerssen2019-02-057-20/+59
| | | | | | | | | | | | | | | | | | | | | Summary: There are a few instructions that all map to the same opcode, so when disassembling, we have to pick one. That was just the first one before (the except_ref variant in the case of "call"), now it is the one marked as IsCanonical in tablegen, or failing that, the shortest name (which is typically the "canonical" one). Also introduced a canonical "end" instruction for this purpose. Reviewers: dschuff, tlively Subscribers: sbc100, jgravelle-google, aheejin, llvm-commits, sunfish Tags: #llvm Differential Revision: https://reviews.llvm.org/D57713 llvm-svn: 353131
* [Python2 to Python 3] Fix print -> print().Davide Italiano2019-02-051-6/+6
| | | | llvm-svn: 353130
* [SamplePGO][NFC] Minor improvement to replace a temporary vector with aWei Mi2019-02-051-3/+2
| | | | | | | | brace-enclosed init list. Differential Revision: https://reviews.llvm.org/D57726 llvm-svn: 353129
* GlobalISel: Fix verifier crashing on non-register operandsMatt Arsenault2019-02-052-2/+16
| | | | | | Also correct the wording of error on subregisters. llvm-svn: 353128
* [WebAssembly] memory.copyThomas Lively2019-02-057-2/+115
| | | | | | | | | | | | Summary: Depends on D57495. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, hiraditya, sunfish Differential Revision: https://reviews.llvm.org/D57498 llvm-svn: 353127
* [analyzer] Creating standard Sphinx documentationKristof Umann2019-02-0519-244/+2653
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lack of documentation has been a long standing issue in the Static Analyzer, and one of the leading reasons behind this was a lack of good documentation infrastucture. This lead serious drawbacks, such as * Not having proper release notes for years * Not being able to have a sensible auto-generated checker documentations (which lead to most of them not having any) * The HTML website that has to updated manually is a chore, and has been outdated for a long while * Many design discussions are now hidden in phabricator revisions This patch implements a new documentation infrastucture using Sphinx, like most of the other subprojects in LLVM. It transformed some pages as a proof-of- concept, with many others to follow in later patches. The eventual goal is to preserve the original website's (https://clang-analyzer.llvm.org/) frontpage, but move everything else to the new format. Some other ideas, like creating a unipage for each checker (similar to how clang-tidy works now), are also being discussed. Patch by Dániel Krupp! Differential Revision: https://reviews.llvm.org/D54429 llvm-svn: 353126
* GlobalISel: Consolidate load/store legalizationMatt Arsenault2019-02-056-158/+106
| | | | | | | | | | The fewerElementsVectors implementation for load/stores handles the scalar reduction case just as well, so drop the redundant code in narrowScalar. This also introduces support for narrowing irregular size breakdowns for scalars. llvm-svn: 353125
* [DAGCombiner] Discard pointer info when combining extract_vector_elt of a ↵Craig Topper2019-02-052-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | vector load when the index isn't constant Summary: If the index isn't constant, this transform inserts a multiply and an add on the index to calculating the base pointer for a scalar load. But we still create a memory operand with an offset of 0 and the size of the scalar access. But the access is really to an unknown offset within the original access size. This can cause the machine scheduler to incorrectly calculate dependencies between this load and other accesses. In the case we saw, there was a 32 byte vector store that was split into two 16 byte stores, one with offset 0 and one with offset 16. The size of the memory operand for both was 16. The scheduler correctly detected the alias with the offset 0 store, but not the offset 16 store. This patch discards the pointer info so we don't incorrectly detect aliasing. I wasn't sure if we could keep using the original offset and size without risking some other transform on the load changing the size. I tried to reduce a test case, but there's still a lot of memory operations needed to get the scheduler to do the bad reordering. So it looked pretty fragile to maintain. Reviewers: efriedma Reviewed By: efriedma Subscribers: arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57616 llvm-svn: 353124
* [SamplePGO] Minor efficiency improvement in samplePGO ICPTeresa Johnson2019-02-051-3/+3
| | | | | | | | | | | | | | | | | | | | Summary: When attaching prof metadata to promoted direct calls in SamplePGO mode, no need to construct and use a SmallVector to pass a single count to the ArrayRef parameter, we can simply use a brace-enclosed init list. This made a small but consistent improvement for a ThinLTO backend compile I was measuring. Reviewers: wmi Subscribers: mehdi_amini, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57706 llvm-svn: 353123
* GlobalISel: Implement narrowScalar for selectMatt Arsenault2019-02-053-2/+198
| | | | | | | | | | Don't handle vector conditions. I think this can be merged in the future with fewerElementsVectorSelect, although this becomes slightly tricky with a vector condition. llvm-svn: 353122
* GlobalISel: Combine g_extract with g_merge_valuesMatt Arsenault2019-02-045-25/+587
| | | | | | | | | | | | | | Try to use the underlying source registers. This enables legalization in more cases where some irregular operations are widened and others narrowed. This seems to make the test_combines_2 AArch64 test worse, since the MERGE_VALUES has multiple uses. Since this should be required for legalization, a hasOneUse check is probably inappropriate (or maybe should only be used if the merge is legal?). llvm-svn: 353121
* [Sanitizers] UBSan unreachable incompatible with Kernel ASanJulian Lettner2019-02-043-2/+13
| | | | | | | | | | | | | | | | Summary: This is a follow up for https://reviews.llvm.org/D57278. The previous revision should have also included Kernel ASan. rdar://problem/40723397 Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57711 llvm-svn: 353120
* [llvm-readobj] Fix readobj test expectation broken in rL353109. NFC.Sam Clegg2019-02-041-0/+9
| | | | llvm-svn: 353119
* Revert "[PATCH] [TargetLibraryInfo] Update run time support for Windows"Evandro Menezes2019-02-045-108/+126
| | | | | | This reverts accidental commit ff5527718d5d3b9966f6e8948866c0dc15ffcf3c. llvm-svn: 353118
* [ADT] Refactor the Windows query functions (NFC)Evandro Menezes2019-02-041-15/+14
| | | | | | Increase reuse in the query functions for Windows. llvm-svn: 353117
* [OBJC] Add attribute to mark Objective C class as non-lazyJoe Daniels2019-02-047-4/+68
| | | | | | | | | | | | | A non-lazy class will be initialized eagerly when the Objective-C runtime is loaded. This is required for certain system classes which have instances allocated in non-standard ways, such as the classes for blocks and constant strings. Adding this attribute is essentially equivalent to providing a trivial +load method but avoids the (fairly small) load-time overheads associated with defining and calling such a method. Differential Revision: https://reviews.llvm.org/D56555 llvm-svn: 353116
* [SemaObjC] Don't infer the availabilty of +new from -init if the receiver ↵Erik Pilkington2019-02-042-4/+16
| | | | | | | | | | has Class type rdar://47713266 Differential revision: https://reviews.llvm.org/D57712 llvm-svn: 353115
* [PATCH] [TargetLibraryInfo] Update run time support for WindowsEvandro Menezes2019-02-045-126/+108
| | | | | | | | | | | | | It seems that the run time for Windows has changed and supports more math functions than before. Since LLVM requires at least VS2015, I assume that this is the run time that would be redistributed with programs built with Clang. Thus, I based this update on the header file `math.h` that accompanies it. This patch addresses the PR40541. Unfortunately, I have no access to a Windows development environment to validate it. llvm-svn: 353114
* GlobalISel: Enforce operand types for constantsMatt Arsenault2019-02-0428-101/+169
| | | | | | | | A number of of tests were using imm operands, not cimm. Since CSE relies on the exact ConstantInt* pointer used, and implicit conversions are generally evil, also enforce the bitsize of the types. llvm-svn: 353113
* GlobalISel: Verify g_selectMatt Arsenault2019-02-047-40/+87
| | | | | | | Factor the common vector element consistency check many instructions need out, although this makes the error messages worse. llvm-svn: 353112
* MachineVerifier: Move verification of G_* instructions to functionMatt Arsenault2019-02-041-100/+117
| | | | llvm-svn: 353111
* [tsan] Disable fgetpwent_r to work around performance issuesVitaly Buka2019-02-041-0/+1
| | | | | | This was missed from D54041 when SANITIZER_INTERCEPT_FGETPWENT_R was branched from SANITIZER_INTERCEPT_GETPWENT_R llvm-svn: 353110
* [WebAssembly] MC: Mark more function aliases as functionsSam Clegg2019-02-042-1/+43
| | | | | | | | | | | | | Aliases of functions are now marked as function symbols even if they are bitcast to some other other non-function type. This is important for WebAssembly where object and function symbols can't alias each other. Fixes PR38866 Differential Revision: https://reviews.llvm.org/D57538 llvm-svn: 353109
* [libFuzzer][Windows] Clean up RawPrintJonathan Metzman2019-02-041-2/+1
| | | | | | | | | | | | | | | | Summary: Use `_write` instead of the deprecated alias `write` on Windows. Also, remove comment saying RawPrint is untested on Windows. Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: vitalybuka Differential Revision: https://reviews.llvm.org/D57589 llvm-svn: 353108
* MIR: Validate LLT types when parsingMatt Arsenault2019-02-048-6/+107
| | | | llvm-svn: 353107
* [CGP] fix bogus test names/comments; NFCSanjay Patel2019-02-041-10/+9
| | | | | | Inverted operand 0 and operand 1. llvm-svn: 353106
* [WebAssembly] Update test to match new readobj output. NFC.Sam Clegg2019-02-041-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D57715 llvm-svn: 353105
* [llvm-readobj] Report more WebAssembly symbol infoSam Clegg2019-02-042-0/+21
| | | | | | Differential Revision: https://reviews.llvm.org/D57695 llvm-svn: 353104
* [CGP] add tests for usubo; NFCSanjay Patel2019-02-041-1/+154
| | | | llvm-svn: 353103
* GlobalISel: Fix not calling observer when legalizing bitcount opsMatt Arsenault2019-02-047-31/+118
| | | | | | This was hiding bugs from never legalizing the source type. llvm-svn: 353102
* AMDGPU: Don't rematerialize mov with implicit operandsMatt Arsenault2019-02-042-1/+114
| | | | | | | This was pulling the mov used for register indexing on gfx9 out of the loop. llvm-svn: 353101
* [SanitizerCoverage] Clang crashes if user declares `__sancov_lowest_stack` ↵Julian Lettner2019-02-042-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | variable Summary: If the user declares or defines `__sancov_lowest_stack` with an unexpected type, then `getOrInsertGlobal` inserts a bitcast and the following cast fails: ``` Constant *SanCovLowestStackConstant = M.getOrInsertGlobal(SanCovLowestStackName, IntptrTy); SanCovLowestStack = cast<GlobalVariable>(SanCovLowestStackConstant); ``` This variable is a SanitizerCoverage implementation detail and the user should generally never have a need to access it, so we emit an error now. rdar://problem/44143130 Reviewers: morehouse Differential Revision: https://reviews.llvm.org/D57633 llvm-svn: 353100
OpenPOWER on IntegriCloud