summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Intrinsics calls should avoid the PLT when "RtLibUseGOT" metadata is present.Sriraman Tallam2018-02-235-2/+46
| | | | | | Differential Revision: https://reviews.llvm.org/D42216 llvm-svn: 325962
* Set Module Metadata "RtLibUseGOT" when fno-plt is used.Sriraman Tallam2018-02-232-1/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D42217 llvm-svn: 325961
* [InstCombine] allow fmul-sqrt folds with less than full -ffast-mathSanjay Patel2018-02-234-39/+59
| | | | | | Also, add a Builder method for intrinsics to reduce code duplication for clients. llvm-svn: 325960
* Simplify a DEBUG statement to remove a set but not used variable in release ↵Eric Christopher2018-02-231-7/+4
| | | | | | builds. llvm-svn: 325959
* Fix breakpoint thread name conditionals after breakpoint options refactor.Jim Ingham2018-02-233-39/+42
| | | | | | PR36435 llvm-svn: 325958
* [X86] Add assembler/disassembler support for blendm with zero masking and ↵Craig Topper2018-02-233-0/+192
| | | | | | | | broacast. Fixes PR31617 llvm-svn: 325957
* [Power9] Add missing instructions to the Power 9 schedulerStefan Pintilie2018-02-231-47/+97
| | | | | | | | | | This is the first in a series of patches that will define more instructions using InstRW so that we can move away from ItinRW and ultimately have a complete Power 9 scheduler. Differential Revision: https://reviews.llvm.org/D43635 llvm-svn: 325956
* Remove dead code.Rui Ueyama2018-02-231-2/+0
| | | | llvm-svn: 325955
* [Hexagon] Recognize non-immediate constants in HexagonConstPropagationKrzysztof Parzyszek2018-02-233-6/+36
| | | | llvm-svn: 325954
* Inline printHelp.Rui Ueyama2018-02-231-5/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D43526 llvm-svn: 325953
* Handle --version before handling --mllvm.Rui Ueyama2018-02-231-5/+6
| | | | | | | | Because it's a waste of time to handle --mllvm before --version. Differential Revision: https://reviews.llvm.org/D43527 llvm-svn: 325952
* Fixed unused variable warning. NFCI.Simon Pilgrim2018-02-231-1/+1
| | | | llvm-svn: 325950
* [X86] Add DAG combine to remove (and X, 1) from in front of a v1i1 scalar to ↵Craig Topper2018-02-233-8/+26
| | | | | | | | | | | | vector. These can be created by type legalization promoting the inputs to select to match scalar boolean contents. We were trying to pattern match them away during isel, but its better to just remove them from the DAG. I've cleaned up some patterns to not check for this 'and' anymore. But I suspect this has also opened up opportunities for pattern removal. llvm-svn: 325949
* Inline a trivial ctor.Rui Ueyama2018-02-231-15/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D43525 llvm-svn: 325948
* [WebAssembly] Fix macro metaprogram to not duplicate code as much.Benjamin Kramer2018-02-231-7/+11
| | | | | | No functionality change intended. llvm-svn: 325947
* Because of CVE-2018-6574, some compiler options and linker options are ↵Eric Christopher2018-02-231-0/+8
| | | | | | | | | | | | | | | | | | | | restricted to prevent arbitrary code execution. https://github.com/golang/go/issues/23672 By this change, building a Go code with LLVM Go bindings causes a compilation error as follows. go build llvm.org/llvm/bindings/go/llvm: invalid flag in #cgo LDFLAGS: -Wl,-headerpad_max_install_names llvm-go tool generates cgo LDFLAGS directive from `llvm-config --ldflags` and it contains -Wl,option options. But -Wl,option is banned by default. To avoid this problem, we need to set $CGO_LDFLAGS_ALLOW environment variable to notify a compiler that the flags should be allowed. $ export CGO_LDFLAGS_ALLOW='-Wl,(-search_paths_first|-headerpad_max_install_names)' By default for go 1.10 and go 1.9.5 these options should appear in the accepted set of options, however, if you're running into the error it's useful to have this documented. Patch by Ryuichi Hayashida llvm-svn: 325946
* [Driver] Make -fno-common default for FuchsiaPetr Hosek2018-02-232-0/+3
| | | | | | | | We never want to generate common symbols on Fuchsia. Differential Revision: https://reviews.llvm.org/D43545 llvm-svn: 325945
* [X86][SSE] Generalize x > C-1 ? x+-C : 0 --> subus x, C combine for ↵Simon Pilgrim2018-02-232-115/+43
| | | | | | non-uniform constants llvm-svn: 325944
* Really fix test on windows.Rafael Espindola2018-02-231-3/+3
| | | | | | Sorry for the noise. llvm-svn: 325943
* Fix one last test on a windows host.Rafael Espindola2018-02-231-1/+1
| | | | llvm-svn: 325942
* Shrink various scheduling tables by using narrower types.Benjamin Kramer2018-02-234-30/+35
| | | | | | 16 bits ought to be enough for everyone. This shrinks clang by ~1MB. llvm-svn: 325941
* Bring r325915 back.Rafael Espindola2018-02-23198-1970/+2020
| | | | | | | | | | | | | | | The tests that failed on a windows host have been fixed. Original message: Start setting dso_local for COFF. With this there are still some GVs where we don't set dso_local because setGVProperties is never called. I intend to fix that in followup commits. This is just the bare minimum to teach shouldAssumeDSOLocal what it should do for COFF. llvm-svn: 325940
* [PATCH] [AArch64] Add new target feature to fuse conditional selectEvandro Menezes2018-02-234-22/+103
| | | | | | | | | This feature enables the fusion of the comparison and the conditional select instructions together. Differential revision: https://reviews.llvm.org/D42392 llvm-svn: 325939
* Fix compiler warning introduced in r325931. NFC.Geoff Berry2018-02-231-3/+2
| | | | llvm-svn: 325938
* [Test] Fix the test to output to /dev/null instead of redirecting.Matt Davis2018-02-231-1/+1
| | | | | | The redirection was confusing the windows build machine. llvm-svn: 325937
* [X86][SSE] Add x > C-1 ? x+-C : 0 --> subus x, C test caaes for non-uniform ↵Simon Pilgrim2018-02-231-0/+136
| | | | | | constants llvm-svn: 325936
* [MemorySSA] Use fewer magic numbers. NFCGeorge Burgess IV2018-02-231-1/+1
| | | | | | | | | INVALID_MEMORYACCESS_ID == 0. This patch also makes this initialization consistent with the rest of the "invalid" ones in this file. llvm-svn: 325935
* [MemorySSA] Reduce padding in MemoryDefs. NFCGeorge Burgess IV2018-02-231-1/+1
| | | | llvm-svn: 325934
* [X86] Custom split v32i16/v64i8 bitcasts when AVX512F is available, but BWI ↵Craig Topper2018-02-232-2123/+126
| | | | | | | | | | is not. The test changes you can see are related to the changes in ReplaceNodeResults. Though shuffle-vs-trunc-512.ll does have a test that exercises the code in LowerBITCAST. Looks like the test output didn't change because DAG combining is able to clean up the resulting type legalization. Adding the custom hook just makes type legalization work less hard. Differential Revision: https://reviews.llvm.org/D43447 llvm-svn: 325933
* [MachineOperand][Target] MachineOperand::isRenamable semantics changesGeoff Berry2018-02-2331-71/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add a target option AllowRegisterRenaming that is used to opt in to post-register-allocation renaming of registers. This is set to 0 by default, which causes the hasExtraSrcRegAllocReq/hasExtraDstRegAllocReq fields of all opcodes to be set to 1, causing MachineOperand::isRenamable to always return false. Set the AllowRegisterRenaming flag to 1 for all in-tree targets that have lit tests that were effected by enabling COPY forwarding in MachineCopyPropagation (AArch64, AMDGPU, ARM, Hexagon, Mips, PowerPC, RISCV, Sparc, SystemZ and X86). Add some more comments describing the semantics of the MachineOperand::isRenamable function and how it is set and maintained. Change isRenamable to check the operand's opcode hasExtraSrcRegAllocReq/hasExtraDstRegAllocReq bit directly instead of relying on it being consistently reflected in the IsRenamable bit setting. Clear the IsRenamable bit when changing an operand's register value. Remove target code that was clearing the IsRenamable bit when changing registers/opcodes now that this is done conservatively by default. Change setting of hasExtraSrcRegAllocReq in AMDGPU target to be done in one place covering all opcodes that have constant pipe read limit restrictions. Reviewers: qcolombet, MatzeB Subscribers: aemerson, arsenm, jyknight, mcrosier, sdardis, nhaehnle, javed.absar, tpr, arichardson, kristof.beyls, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, jordy.potman.lists, apazos, sabuasal, niosHD, escha, nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D43042 llvm-svn: 325931
* Convert test to FileCheck. NFC.Rafael Espindola2018-02-231-7/+7
| | | | llvm-svn: 325930
* Revert "Start setting dso_local for COFF."Rafael Espindola2018-02-23147-1838/+1788
| | | | | | | | This reverts commit r325915. It will take some time to fix the failures on a windows host. llvm-svn: 325929
* [Darwin] Add a test to make sure clang emits __apple accelerator tables.Davide Italiano2018-02-231-0/+17
| | | | llvm-svn: 325928
* Replace HashStringUsingDJB with llvm::djbHashPavel Labath2018-02-238-222/+81
| | | | | | | | | | | | | | | | | | | | | | Summary: The llvm function is equivalent to this one. Where possible I tried to replace const char* with llvm::StringRef to avoid extra strlen computations. In most places, I was able to track the c string back to the ConstString it was created from. I also create a test that verifies we are able to lookup names with unicode characters, as a bug in the llvm compiler (it accidentally used a different hash function) meant this was not working until recently. This also removes the unused ExportTable class. Reviewers: aprantl, davide Subscribers: JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D43596 llvm-svn: 325927
* [Debug] Add dbg.value intrinsics for PHIs created during LCSSA.Matt Davis2018-02-234-8/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is an enhancement to propagate dbg.value information when Phis are created on behalf of LCSSA. I noticed a case where a value carried across a loop was reported as <optimized out>. Specifically this case: ``` int bar(int x, int y) { return x + y; } int foo(int size) { int val = 0; for (int i = 0; i < size; ++i) { val = bar(val, i); // Both val and i are correct } return val; // <optimized out> } ``` In the above case, after all of the interesting computation completes our value is reported as "optimized out." This change will add a dbg.value to correct this. This patch also moves the dbg.value insertion routine from LoopRotation.cpp into Local.cpp, so that we can share it in both places (LoopRotation and LCSSA). Reviewers: mzolotukhin, aprantl, vsk, davide Reviewed By: aprantl, vsk Subscribers: dberlin, llvm-commits Differential Revision: https://reviews.llvm.org/D42551 llvm-svn: 325926
* [BPI] Detect branches in loops that make themselves not takenJohn Brawn2018-02-232-14/+223
| | | | | | | | | | | | | | | | | | | | | | If we have a loop like this: int n = 0; while (...) { if (++n >= MAX) { n = 0; } } then the body of the 'if' statement will only be executed once every MAX iterations. Detect this by looking for branches in loops where taking the branch makes the branch condition evaluate to 'not taken' in the next iteration of the loop, and reduce the probability of such branches. This slightly improves EEMBC benchmarks on cortex-m4/cortex-m33 due to making better choices in if-conversion, but has no effect on any other cpu/benchmark that I could detect. Differential Revision: https://reviews.llvm.org/D35804 llvm-svn: 325925
* [InstCombine] refactor fmul with negated op folds; NFCISanjay Patel2018-02-231-24/+18
| | | | | | | | | | | | | | The existing code was inefficiently looking for 'nsz' variants. That's unnecessary because we canonicalize those to the expected form with -0.0. We may also want to adjust or remove the fold that sinks negation. We don't do that for fdiv (or integer ops?). That should be uniform? It may also lead to missed optimization as in PR21914: https://bugs.llvm.org/show_bug.cgi?id=21914 ...or we just have to fix other passes to avoid that problem. llvm-svn: 325924
* [InstCombine] use FMF-copying functions to reduce code; NFCISanjay Patel2018-02-231-28/+12
| | | | llvm-svn: 325923
* [OMPT] Fix parallel_data in implicit barrier-endJonas Hahnfeld2018-02-234-98/+135
| | | | | | | | | This is required to be NULL for implicit barriers at the end of a parallel region. Noticed in review of D43191. Differential Revision: https://reviews.llvm.org/D43308 llvm-svn: 325922
* [OMPT] Fix test tasks/serialized.c with optimizationJonas Hahnfeld2018-02-232-54/+114
| | | | | | | | | | | | | | The compiler inlines the user code in the task. Check for that case at runtime by comparing the frame addresses and print the expected exit address. Also showcase how I think the OMPT tests could be reformatted to match LLVM's code style. In my opinion it would be great to that kind of change to all tests that need to be touched for whatever reason... Differential Revision: https://reviews.llvm.org/D43191 llvm-svn: 325921
* Revert "[Darwin] Add a test to check clang produces accelerator tables."Paul Robinson2018-02-231-16/+0
| | | | | | | This reverts commit 7e24e5f8bff77b7e78da3bfcc68abf42457a66c9. aka r325850. Clang should not have end-to-end tests. llvm-svn: 325920
* [X86] Regenerate i128 multiply testsSimon Pilgrim2018-02-231-14/+348
| | | | llvm-svn: 325919
* [PowerPC] Code cleanup. Remove instructions that were withdrawn from Power 9.Stefan Pintilie2018-02-233-54/+1
| | | | | | | | | | | | | | The following set of instructions was originally planned to be added for Power 9 and so code was added to support them. However, a decision was made later on to withdraw support for these instructions in the hardware. xscmpnedp xvcmpnesp xvcmpnedp This patch removes support for the instructions that were not added. Differential Revision: https://reviews.llvm.org/D43641 llvm-svn: 325918
* [mips] finish removal of unused fields in MipsInstructionSelectorPetar Jovanovic2018-02-231-2/+2
| | | | | | r325916 missed to remove calls in constructor. llvm-svn: 325917
* [mips] remove unused fields in MipsInstructionSelectorPetar Jovanovic2018-02-231-3/+0
| | | | | | Unused fields cause buildbreak if -Werror,-Wunused-private-field is passed. llvm-svn: 325916
* Start setting dso_local for COFF.Rafael Espindola2018-02-23147-1788/+1838
| | | | | | | | | With this there are still some GVs where we don't set dso_local because setGVProperties is never called. I intend to fix that in followup commits. This is just the bare minimum to teach shouldAssumeDSOLocal what it should do for COFF. llvm-svn: 325915
* Allow passing additional compiler/linker flags for the testsAlexander Richardson2018-02-233-0/+14
| | | | | | | | | | | | | | | | | | | Summary: These flags can be specified using the CMake variables LIBCXX_TEST_LINKER_FLAGS and LIBCXX_TEST_COMPILER_FLAGS. When building the tests for CHERI I need to pass additional flags (such as -mabi=n64 or -mabi=purecap) to the compiler for our test configurations Reviewers: EricWF Reviewed By: EricWF Subscribers: christof, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D42139 llvm-svn: 325914
* Support for the mno-stack-arg-probe flagHans Wennborg2018-02-238-10/+39
| | | | | | | | | | | | Adds support for this flag. There is also another piece for llvm (separate review). More info: https://bugs.llvm.org/show_bug.cgi?id=36221 By Ruslan Nikolaev! Differential Revision: https://reviews.llvm.org/D43108 llvm-svn: 325901
* Support for the mno-stack-arg-probe flagHans Wennborg2018-02-236-10/+65
| | | | | | | | | | | | Adds support for this flag. There is also another piece for clang (separate review). More info: https://bugs.llvm.org/show_bug.cgi?id=36221 By Ruslan Nikolaev! Differential Revision: https://reviews.llvm.org/D43107 llvm-svn: 325900
* [mips] Revert r325872Stefan Maksimovic2018-02-232-46/+0
| | | | | | | There are still outstanding issues with byVal arguments that prevent this from being committed. Revert for now. llvm-svn: 325899
OpenPOWER on IntegriCloud