summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* [NewGVN] Prefer auto over explicit type. NFCI.Davide Italiano2017-01-071-1/+1
| | | | llvm-svn: 291328
* [WebAssembly] Don't abort on code with UB.Dan Gohman2017-01-073-7/+44
| | | | | | | | Gracefully leave code that performs function-pointer bitcasts implying non-trivial pointer conversions alone, rather than aborting, since it's just undefined behavior. llvm-svn: 291326
* [WebAssembly] Move a SmallVector to a more specific scope. NFC.Dan Gohman2017-01-071-2/+2
| | | | llvm-svn: 291324
* LowerTypeTests: Thread summary and action from the API and command line into ↵Peter Collingbourne2017-01-073-38/+87
| | | | | | | | | | | the pass. Also move command line handling out of the pass constructor and into a separate function. Differential Revision: https://reviews.llvm.org/D28422 llvm-svn: 291323
* Remove useless Forward Declaration from header (NFC)Mehdi Amini2017-01-071-1/+0
| | | | llvm-svn: 291321
* [AVR] Parenthesize a boolean expressionDylan McKay2017-01-071-2/+2
| | | | | | | Without the parentheses, clang would emit warnings while compiling the code. llvm-svn: 291320
* [MachineBasicBlock] Add a non-assert live-in accessor for debug mode.Quentin Colombet2017-01-071-0/+10
| | | | | | | | | With r291169, it is now not possible to access the live-in information when the liveness is not properly tracked. Although this is want we want in general, for debugging purpose we may want to still be able to traverse this information even if it may not be accurate. llvm-svn: 291317
* [WebAssembly] Add a pass to create wrappers for function bitcasts.Dan Gohman2017-01-075-0/+210
| | | | | | | | | | | | WebAssembly requires caller and callee signatures to match exactly. In LLVM, there are a variety of circumstances where signatures may be mismatched in practice, and one can bitcast a function address to another type to call it as that type. This patch adds a pass which replaces bitcasted function addresses with wrappers to replace the bitcasts. This doesn't catch everything, but it does match many common cases. llvm-svn: 291315
* Test commit. Comment formatting, it's -> its.Jacob Gravelle2017-01-071-2/+1
| | | | llvm-svn: 291312
* NewGVN: Fix PR 31501.Daniel Berlin2017-01-073-38/+223
| | | | | | | | | | | | Summary: LLVM's non-standard notion of phi nodes means we can't both try to substitute for undef in phi nodes *and* use phi nodes as leaders all the time. This changes NewGVN to use the same semantics as SimplifyPHINode to decide which phi nodes are equivalent. Reviewers: davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28312 llvm-svn: 291308
* ModuleSummaryIndexYAML: Make a few fields optional to make it easier to ↵Peter Collingbourne2017-01-071-6/+6
| | | | | | write tests. llvm-svn: 291307
* [ThinLTO] Handle conflicting local names gracefullyTeresa Johnson2017-01-064-6/+72
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: r285871 introduced an assert that was overly aggressive in the case of a same-named local in different same-named files (in different directories), where the source name and therefore the GUID ended up the same because the files were compiled in their own directory without any leading path. Change the handling in the promotion logic to get the summary for the version in that module. This also exposed an issue where we are not always importing the right copy, which is a performance not correctness issue (because the renaming is based on the module hash which must be different, see the bug report for details). I will fix that as a follow-on. Fixes PR31561. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28411 llvm-svn: 291304
* [ThinLTO] Optionally ignore empty index fileTeresa Johnson2017-01-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In order to simplify distributed build system integration, where actions may be scheduled before the Thin Link which determines the list of objects selected by the linker. The gold plugin currently will emit 0-sized index files for objects not selected by the link, to enable checking for expected output files by the build system. If the build system then schedules a backend action for these bitcode files, we want to be able to fall back to normal compilation instead of failing. This is the LLVM side support for optionally enabling fallback instead of issuing an error. Return a null CombinedIndex from llvm::getModuleSummaryIndexForFile under the option when the file is empty. Clang can then ignore the index when it is null. Clang patch is D28362. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28410 llvm-svn: 291302
* [PM] Edit comments on PM Proxy and utility classes.Justin Lebar2017-01-061-67/+60
| | | | | | | | | | Reviewers: chandlerc Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D27502 llvm-svn: 291301
* [gtest] Detect warning flags using the positive spelling.Chandler Carruth2017-01-063-7/+7
| | | | | | | | | | | | | | | | | | | | | Some GCC versions will accept any warning flag name after a '-Wno-', which would cause us to try to disable warnings with names GCC didn't understand. This will silently succeed unless there is some other output from GCC in which case we get weird cc1plus warnings about the warning name being bogus. There is still the issue that gtest sets warning flags for building gtest-all.cc using weird 'add_definitions' and the fact that there is a GCC version which warns on the variadic macro usage in gtest under -pedantic, but has no flag analogous to Clang's -Wgnu-zero-variadic-macro-argumnets to suppress this warning. I haven't been able to come up with any good solution here. The closest is to turn off -pedantic for those versions of GCC, but that seems really nasty. For now, those versinos of GCC aren't warning clean. If anyone is broken by this, I'll work on CMake logic to detect and disable -pedantic in these cases. llvm-svn: 291299
* [BPF] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-01-066-45/+42
| | | | | | minor fixes (NFC). llvm-svn: 291297
* [InstSimplify] Optimize away udivs in the presence of range metadataDavid Majnemer2017-01-062-0/+25
| | | | | | We know that udiv %V, C can be optimized away to 0 if %V is ult C. llvm-svn: 291296
* Follow-up for r291289: Fix failing global_metadata_darwin.ll testKuba Mracek2017-01-061-1/+1
| | | | llvm-svn: 291292
* Convert MSF Stream iterators to use llvm iterator facade.Zachary Turner2017-01-061-40/+71
| | | | llvm-svn: 291290
* [asan] Change the visibility of ___asan_globals_registered to hiddenKuba Mracek2017-01-061-0/+1
| | | | | | | | This flag is used to track global registration in Mach-O and it doesn't need to be exported and visible. Differential Revision: https://reviews.llvm.org/D28250 llvm-svn: 291289
* Fix use after freeXin Tong2017-01-061-1/+1
| | | | | | | | | | | | Summary: Fix use after free in LoopUnswitch Reviewers: chenli, atrick, hfinkel, mzolotukhin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28412 llvm-svn: 291288
* [llvm-config] Print --system-libs only when static linkingMichal Gorny2017-01-066-5/+17
| | | | | | | | | | | | | | | Modify the --system-libs option in llvm-config to print system libs only when using static linking. The system libraries are irrelevant when linking to a shared library since the library has appropriate library dependencies embedded. Modify the --system-libs test appropriately to force static linking, and disable it if static libs are not available (i.e. BUILD_SHARED_LIBS is enabled). Differential Revision: https://reviews.llvm.org/D27805 llvm-svn: 291285
* [cmake] Canonicalize CMake booleans to 0/1 for lit interopMichal Gorny2017-01-069-22/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Canonicalize all CMake booleans to 0/1 before passing them to lit, to ensure that the Python side handles all of them consistently and correctly. 0/1 is a safe choice of values that trigger the same boolean interpretation in CMake, Python and C++. Furthermore, using them without quotes improves the chance Python will explicitly fail when an incorrect value (such as ON/OFF, TRUE/FALSE, YES/NO) is accidentally passed, rather than silently misinterpreting the value. This replaces a lot of different logics spread around lit site files, attempting to partially reproduce the boolean logic used in CMake and usually silently failing when an uncommon value was used instead. In fact, some of them were never working correctly since different values were assigned in CMake and checked in Python. The alternative solution could be to create a common parser for CMake booleans in lit and use it consistently throughout the site files. However, it does not seem like the best idea to create redundant implementation of the same logic and have to follow upstream if it ever is extended to handle more values. Differential Revision: https://reviews.llvm.org/D28294 llvm-svn: 291284
* [test] Remove unused 'test_examples' config varMichal Gorny2017-01-062-5/+0
| | | | | | | | | Remove config.test_examples from lit.site.cfg and the relevant ENABLE_EXAMPLES definition from CMake. It is not used anywhere. Differential Revision: https://reviews.llvm.org/D28283 llvm-svn: 291283
* [InstSimplify] Optimize away urems in the presence of range metadataDavid Majnemer2017-01-063-24/+52
| | | | | | We know that urem %V, C can be optimized away to %V if %V is ult C. llvm-svn: 291282
* Fix LoopLoadElimination to keep original alignment on the inital hoisted storeMehdi Amini2017-01-062-4/+6
| | | | | | | | | | | This is fixing a bug where Loop Vectorization is widening a load but with a lower alignment. Hoisting the load without propagating the alignment will allow inst-combine to later deduce a higher alignment that what the pointer actually is. Differential Revision: https://reviews.llvm.org/D28408 llvm-svn: 291281
* AMDGPU/R600: Don't use REGISTER_{LOAD,STORE} ISD nodesJan Vesely2017-01-068-368/+1162
| | | | | | | | This will make transition to SCRATCH_MEMORY easier Differential Revision: https://reviews.llvm.org/D24746 llvm-svn: 291279
* [X86][SSE] Standardized triples in vector shift testsSimon Pilgrim2017-01-069-596/+596
| | | | | | Made no sense for them to be different and caused useless diffs in assembly remarks. llvm-svn: 291274
* [CostModel][X86] Add AVX512 and 512-bit vector shift cost tests.Simon Pilgrim2017-01-063-18/+758
| | | | llvm-svn: 291269
* AArch64CollectLOH: Rewrite as block-local analysis.Matthias Braun2017-01-065-851/+486
| | | | | | | | | | | | | | | | | | | | | Re-apply r288561: This time with a fix where the ADDs that are part of a 3 instruction LOH would not invalidate the "LastAdrp" state. This fixes http://llvm.org/PR31361 Previously this pass was using up to 5% compile time in some cases which is a bit much for what it is doing. The pass featured a full blown data-flow analysis which in the default configuration was restricted to a single block. This rewrites the pass under the assumption that we only ever work on a single block. This is done in a single pass maintaining a state machine per general purpose register to catch LOH patterns. Differential Revision: https://reviews.llvm.org/D27329 This reverts commit 9e6cedb0a4f14364d6511597a9160305e7d34493. llvm-svn: 291266
* [InstCombine] add a vector version of a test added in r291262; NFCSanjay Patel2017-01-061-0/+13
| | | | llvm-svn: 291265
* [InstCombine] move and add tests for icmp + shl nsw; NFCSanjay Patel2017-01-062-63/+205
| | | | | | | | As discussed here: http://lists.llvm.org/pipermail/llvm-dev/2017-January/108749.html ...we should be able to better optimize this pattern. llvm-svn: 291262
* [DWARF] Null out the debug locs of (loop invariant) instructions hoisted by ↵Wolfgang Pieb2017-01-062-0/+83
| | | | | | | | | | LICM in order to avoid jumpy line tables. Calls are left alone because they may be inlined. Differential Revision: https://reviews.llvm.org/D28390 llvm-svn: 291258
* Use %z for size_t and avoid deprecated string functionsReid Kleckner2017-01-061-4/+4
| | | | | | | | This usage of strcpy and snprintf was certainly safe, but using them sets off various deprecation and lint warnings. Easier to just write the belt and suspenders version. llvm-svn: 291256
* [AArch64] Reduce vector insert/extract cost for Falkor.Chad Rosier2017-01-062-0/+27
| | | | | | Differential Revision: https://reviews.llvm.org/D28403 llvm-svn: 291254
* [X86][SSE] Pass float domain flag to shuffle combine match functions. NFCI.Simon Pilgrim2017-01-061-13/+13
| | | | | | Early step towards ignoring domain above a certain shuffle depth. llvm-svn: 291248
* [AMDGPU] Remove extra semicolon. NFCKonstantin Zhuravlyov2017-01-061-1/+1
| | | | llvm-svn: 291246
* [AMDGPU] Do not emit .AMDGPU.config section for amdhsaKonstantin Zhuravlyov2017-01-063-8/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D27732 llvm-svn: 291245
* [X86][SSE] Simplify float domain requirement in unary shuffle matching.Simon Pilgrim2017-01-061-2/+1
| | | | | | The AVX1-only limit is never actually required in matchUnaryVectorShuffle llvm-svn: 291244
* [X86][AVX] Regenerate shuffle 128-bit tests.Simon Pilgrim2017-01-063-195/+89
| | | | | | The EVEX -> VEX fix means that AVX/AVX512 code is more likely the same now. llvm-svn: 291242
* [X86][AVX] Regenerate tzcnt tests.Simon Pilgrim2017-01-061-343/+82
| | | | | | The EVEX -> VEX fix means that AVX/AVX512 code is more likely the same now. llvm-svn: 291241
* Remove trailing whitespace. NFCI.Simon Pilgrim2017-01-061-3/+3
| | | | llvm-svn: 291240
* [X86] Add X86Subtarget argument. NFCI.Simon Pilgrim2017-01-061-8/+12
| | | | | | All callers of getTargetVShiftNode have access to X86Subtarget already so pass it along instead of re-extracting it. llvm-svn: 291239
* [ASan] Make ASan instrument variable-masked loads and storesFilipe Cabecinhas2017-01-062-43/+129
| | | | | | | | | | | | Summary: Previously we only supported constant-masked loads and stores. Reviewers: kcc, RKSimon, pgousseau, gbedwell, vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28370 llvm-svn: 291238
* [globalisel] Stop requiring -debug/-debug-only=registerbankinfo for assertions.Daniel Sanders2017-01-061-6/+7
| | | | | | | | | | | | | | | | | | | | | Summary: I've noticed that these assertions don't trigger when the condition is false. The problem is that the DEBUG(x) macro only executes x when the pass is emitting debug output via the -debug and -debug-only=registerbankinfo command line arguments. Debug builds should always execute the assertions so use '#ifndef NDEBUG' instead. Also removed an assertion that is only true the first time it's tested. <Target>RegisterBankInfo's constructor will re-use register banks causing them to be valid on subsequent tests. That assertion will fail on the first test too in the near future. Reviewers: t.p.northover, ab, rovka, qcolombet Subscribers: dberris, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D28358 llvm-svn: 291235
* [CostModel][X86] Fix 512-bit SDIV/UDIV 'big' costs.Simon Pilgrim2017-01-062-20/+20
| | | | | | Set the costs on the lowest target that supports the type. llvm-svn: 291229
* [CostModel][X86] Add SDIV/UDIV cost tests for a wider range of targetsSimon Pilgrim2017-01-061-18/+50
| | | | | | Added a test demonstrating bug in AVX512 division costs llvm-svn: 291228
* Move test input to directory called Inputs.Daniel Jasper2017-01-063-1/+1
| | | | | | It is a common convention that our internal test runner depends upon. llvm-svn: 291227
* [llvm-config] Add --cmakedir to obtain CMake module locationMichal Gorny2017-01-061-1/+9
| | | | | | | | | | | | Add a --cmakedir option to llvm-config that returns the correct path to built/installed CMake modules (i.e. lib/cmake/llvm). This is mostly intended as a convenience option for stand-alone builds of other LLVM projects that frequently reconstruct LLVM_CMAKE_PATH after querying llvm-config. Differential Revision: https://reviews.llvm.org/D26894 llvm-svn: 291218
* [Orc][RPC] Fix an obvious locking-order bug in RawByteChannel::startSendMessage.Lang Hames2017-01-061-1/+1
| | | | | | | | | | | The lock needs to be acquired before the data is sent, not afterwards. This think-o slipped in during the refactor in r286620, but went unnoticed as the resulting bug only manifests in multi-threaded clients (of which there are none in-tree). No unit test as the bug depends on thread scheduling. llvm-svn: 291216
OpenPOWER on IntegriCloud