summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [CUDA] Added a wrapper header for inclusion of stock CUDA headers.Artem Belevich2015-11-172-0/+180
| | | | | | | | | | | | | | | | | | | | Header files that come with CUDA are assuming split host/device compilation and are not usable by clang out of the box. With a bit of preprocessor magic it's possible to twist them into something clang can use. This wrapper always includes CUDA headers exactly the same way during host and device compilation passes and produces identical preprocessed content during host and device side compilation for sm_35 GPUs. Device compilation passes for older GPUs will see a smaller subset of device functions supported by particular GPU. The wrapper assumes specific contents of CUDA header files and works only with CUDA 7.0 and 7.5. Differential Revision: http://reviews.llvm.org/D13171 llvm-svn: 253388
* [CUDA] Detect and link with CUDA's libdevice bitcode library.Artem Belevich2015-11-176-4/+75
| | | | | | | | | | | - added detection of libdevice bitcode file and API to find one appropriate for the GPU we're compiling for. - pass additional cc1 options for linking with detected libdevice bitcode - added -nocudalib to prevent automatic linking with libdevice - added test cases to verify new functionality Differential Revision: http://reviews.llvm.org/D14556 llvm-svn: 253387
* [CUDA] added include paths for both sides of CUDA compilation.Artem Belevich2015-11-178-6/+66
| | | | | | | | | | | | | | | | | | | | | In order to compile a CUDA file clang must be able to find include files for both both host and device. This patch passes AuxToolchain to AddPreprocessingOptions and uses it to add include paths for the opposite side of compilation. We also must be able to find CUDA include files. If the driver found CUDA installation, it adds appropriate include path to CUDA headers. This can be disabled with '-nocudainc'. - Added include paths for the opposite side of compilation. - Added include paths to detected CUDA installation. - Added -nocudainc to prevent adding CUDA include path. - Added test cases to verify new functionality. Differential Revision: http://reviews.llvm.org/D13170 llvm-svn: 253386
* [CUDA] use -aux-triple to pass target triple of opposite side of compilationArtem Belevich2015-11-179-75/+109
| | | | | | | | | | | | | | | | Clang needs to know target triple for both sides of compilation so that preprocessor macros and target builtins from both sides are available. This change augments Compilation class to carry information about toolchains used during different CUDA compilation passes and refactors BuildActions to use it when it constructs CUDA jobs. Removed DeviceTriple from CudaHostAction/CudaDeviceAction as it's no longer needed. Differential Revision: http://reviews.llvm.org/D13144 llvm-svn: 253385
* [llvm-profdata] Improve error messaging when merging mismatched profile dataNathan Slingerland2015-11-173-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change tries to make the root cause of instrumented profile data merge failures clearer. Previous: $ llvm-profdata merge test_0.profraw test_1.profraw -o test_merged.profdata test_1.profraw: foo: Function count mismatch test_1.profraw: bar: Function count mismatch test_1.profraw: baz: Function count mismatch ... Changed: $ llvm-profdata merge test_0.profraw test_1.profraw -o test_merged.profdata test_1.profraw: foo: Function basic block count change detected (counter mismatch) Make sure that all profile data to be merged is generated from the same binary. test_1.profraw: bar: Function basic block count change detected (counter mismatch) test_1.profraw: baz: Function basic block count change detected (counter mismatch) ... Reviewers: dnovillo, davidxl, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14739 llvm-svn: 253384
* Cleanup indentationEnrico Granata2015-11-171-2/+4
| | | | llvm-svn: 253383
* Fix bad variable name. project_root -> project_obj_rootEric Fiselier2015-11-171-1/+1
| | | | llvm-svn: 253382
* Cleanup the type X clear commands, so that one base class can implement all ↵Enrico Granata2015-11-171-366/+83
| | | | | | of them llvm-svn: 253381
* [X86][SSE] Share AVX1/AVX2 shuffle tests with AVX512 where possibleSimon Pilgrim2015-11-172-323/+504
| | | | llvm-svn: 253379
* [WinEH] Move WinEHFuncInfo from MachineModuleInfo to MachineFunctionReid Kleckner2015-11-1715-193/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Now that there is a one-to-one mapping from MachineFunction to WinEHFuncInfo, we don't need to use a DenseMap to select the right WinEHFuncInfo for the current funclet. The main challenge here is that X86WinEHStatePass is an IR pass that doesn't have access to the MachineFunction. I gave it its own WinEHFuncInfo object that it uses to calculate state numbers, which it then throws away. As long as nobody creates or removes EH pads between this pass and SDAG construction, we will get the same state numbers. The other thing X86WinEHStatePass does is to mark the EH registration node. Instead of communicating which alloca was the registration through WinEHFuncInfo, I added the llvm.x86.seh.ehregnode intrinsic. This intrinsic generates no code and simply marks the alloca in use. Reviewers: JCTremoulet Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14668 llvm-svn: 253378
* dwarfdump: Reference the appropriate line table segment when dumping dwp filesDavid Blaikie2015-11-176-19/+45
| | | | | | Also improves .dwo type unit dumping which didn't handle this either. llvm-svn: 253377
* Add tests for the extended integer types - as required by LWG#2119Marshall Clow2015-11-171-0/+40
| | | | llvm-svn: 253376
* Fixing build failures caused by r253367. Sorry for breaking the build.Yunzhong Gao2015-11-171-5/+4
| | | | llvm-svn: 253374
* Fix -Wunused-function in a non-Win32 buildDavid Blaikie2015-11-171-1/+1
| | | | llvm-svn: 253373
* Use !hasArg with two options instead of !hasArg && !hasArg.Douglas Katzman2015-11-172-92/+59
| | | | | | Thereby fixing a warning about failure to claim all args. llvm-svn: 253372
* [Lit Test] Updated 34 Lit tests to be C++11 compatible.Charles Li2015-11-1734-26/+260
| | | | | | | Added expected diagnostics new to C++11. Expanded RUN line to: default, C++98/03 and C++11. llvm-svn: 253371
* [EH] Keep filter clauses for types that have been caught.Andrew Kaylor2015-11-172-8/+25
| | | | | | | | The instruction combiner previously removed types from filter clauses in Landing Pad instructions if the type had previously been seen in a catch clause. This is incorrect and prevents unexpected exception handlers from rethrowing the caught type. Differential Revision: http://reviews.llvm.org/D14669 llvm-svn: 253370
* [RuntimeDyld] Fix resolving R_PPC64_REL24 relocationsUlrich Weigand2015-11-171-3/+3
| | | | | | | | | | | | | | | When resolving R_PPC64_REL24, code used to check for an address delta that fits in 24 bits, while the instructions that take this relocation actually can process address deltas that fit into *26* bits (as those instructions have a 24 bit field, but implicitly append two zero bits at the end since all instruction addresses are a multiple of 4). This means that code would signal overflow once a single object's text section exceeds 8 MB, while we can actually support up to 32 MB. Partially fixes PR25540. llvm-svn: 253369
* adding sancov to Makefile directory list.Mike Aizatsky2015-11-171-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D14753 llvm-svn: 253368
* Switch lto codegen to using diagnostic handlers.Yunzhong Gao2015-11-174-53/+68
| | | | | | | | | | | This patch removes the std::string& argument from a number of C++ LTO API calls and instead makes them use the installed diagnostic handler. This would also improve consistency of diagnostic handling infrastructure: if an LTO client used lto_codegen_set_diagnostic_handler() to install a custom error handler, we do not want some error messages to go through the custom error handler, and some other error messages to go into sLastErrorString. llvm-svn: 253367
* Specify explicit storage type for AllocType. NFC.George Burgess IV2015-11-171-1/+1
| | | | llvm-svn: 253366
* Move this back to a pid_t; this file is OSX only anyway, and the signedness ↵Enrico Granata2015-11-171-2/+2
| | | | | | of pid_t is actually a thing we want here llvm-svn: 253364
* Vector of pointers in function attributes calculationElena Demikhovsky2015-11-172-1/+39
| | | | | | | | | While setting function attributes we check all instructions that may access memory. For a call instruction we check all arguments. The special check is required for pointers. I added vector-of-pointers to the call arguments types that should be checked. Differential Revision: http://reviews.llvm.org/D14693 llvm-svn: 253363
* SamplePGO - Move debug/dump function bodies out of header files. NFC.Diego Novillo2015-11-172-30/+54
| | | | | | No point polluting the header declarations with debugging code. llvm-svn: 253361
* StringRef-ify some Option APIsDavid Blaikie2015-11-174-49/+45
| | | | | | | | Patch by Eugene Kosov! Differential Revision: http://reviews.llvm.org/D14711 llvm-svn: 253360
* fix typos; NFCSanjay Patel2015-11-171-2/+2
| | | | llvm-svn: 253359
* bmiintrin.h: Allow using the tzcnt intrinsics for non-BMI targetsHans Wennborg2015-11-171-3/+9
| | | | | | | | | | | | The tzcnt intrinsics are used non non-BMI targets by code (e.g. ffmpeg) that uses it as a potentially faster BSF. The TZCNT instruction is special in that it's encoded in a backward-compatible way and behaves as BSF on non-BMI targets. Differential Revision: http://reviews.llvm.org/D14748 llvm-svn: 253358
* use local variables; NFCISanjay Patel2015-11-171-7/+7
| | | | llvm-svn: 253356
* ARM: fix mismatch between Clang and backend on exception type.Tim Northover2015-11-172-7/+11
| | | | | | | | | | | | "-arch armv7k" is only normally used with a watchos target, but Clang doesn't stop you from giving a "-miphoneos-version-min" option too, converting the triple to "thumbv7k-apple-ios". In this case the backend will decide to use SjLj exceptions, so Clang needs to agree so it can create the correct predefines. Fortunately, there's a handy function to make the decision for us now. llvm-svn: 253355
* enabling sancov tests on linux x86_64 onlyMike Aizatsky2015-11-173-0/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D14728 llvm-svn: 253354
* Remove --swig-executable `which swig` from Xcode prepare_bindings.py call.Todd Fiala2015-11-171-1/+1
| | | | | | | | This is no longer needed with --find-swig, and although innocuous on systems with swig in the path, it blows up when there is no swig in the path. This should have been removed in the prior check-in. llvm-svn: 253353
* [ELF2/AArch64] Add lazy relocation support for AArch64.Igor Kudrin2015-11-174-8/+272
| | | | | | Differential Revision: http://reviews.llvm.org/D14749 llvm-svn: 253352
* [ELF2] getPLTRefReloc() -> getPltRefReloc().Igor Kudrin2015-11-173-5/+5
| | | | llvm-svn: 253351
* Add trivial utility to append -L arguments to linker step. NFCDouglas Katzman2015-11-173-35/+19
| | | | llvm-svn: 253350
* [ARM] Don't pessimize i32 vselect.Charlie Turner2015-11-173-11/+9
| | | | | | | | | | | | | | | | | | The underlying issues surrounding codegen for 32-bit vselects have been resolved. The pessimistic costs for 64-bit vselects remain due to the bad scalarization that is still happening there. I tested this on A57 in T32, A32 and A64 modes. I saw no regressions, and some improvements. From my benchmarks, I saw these improvements in A57 (T32) spec.cpu2000.ref.177_mesa 5.95% lnt.SingleSource/Benchmarks/Shootout/strcat 12.93% lnt.MultiSource/Benchmarks/MiBench/telecomm-CRC32/telecomm-CRC32 11.89% I also measured A57 A32, A53 T32 and A9 T32 and found no performance regressions. I see much bigger wins in third-party benchmarks with this change Differential Revision: http://reviews.llvm.org/D14743 llvm-svn: 253349
* function names start with a lower case letter; NFCSanjay Patel2015-11-171-20/+20
| | | | llvm-svn: 253348
* Reinstate Xcode project usage of prepare_bindings.py, with new --find-swig ↵Todd Fiala2015-11-171-5/+5
| | | | | | option set. llvm-svn: 253347
* Added --find-swig option to allow searching for swig in path or other likely ↵Todd Fiala2015-11-171-0/+76
| | | | | | locations. llvm-svn: 253346
* [Support] Tweak path::system_temp_directory() on Windows.Pawel Bylica2015-11-172-16/+85
| | | | | | | | | | | | | | | | | Summary: This patch changes the behavior of path::system_temp_directory() on Windows to be closer to GetTempPath Windows API call. Enforces path separator to be the native one, makes path absolute, etc. GetTempPath is not used directly because of limitations/implementation bugs on Windows 7. Windows specific unit tests are added. Most of them runs in separated process with modified environment variables. This change fixes FileSystemTest.CreateDir unittest that had been failing when run from Unix-like shell on Windows (Unix-like path separator (/) used in env variables). Reviewers: chapuni, rafael, aaron.ballman Subscribers: rafael, llvm-commits Differential Revision: http://reviews.llvm.org/D14231 llvm-svn: 253345
* [AArch64] Promote f16 SELECT_CC CC operands when op is legal.Ahmed Bougacha2015-11-172-1/+34
| | | | | | | | | | | | | | | | SELECT_CC has the nasty property of having operands with unrelated types. So if you do something like: f32 = select_cc f16, f16, f32, f32, cc You'd only look for the action for <select_cc, f32>, but never f16. If the types are all legal, but the op isn't (as for f16 on AArch64, or for f128 on x86_64/AArch64?), then you get into trouble. For f128, we have softenSetCCOperands to handle this case. Similarly, for f16, we can directly promote the CC operands. llvm-svn: 253344
* [llvm-rtdyld] Don't waste cycles invalidating instruction cache.Davide Italiano2015-11-171-20/+4
| | | | | | | | | | | | | Now that setExecutable() changed to do all the ground work to make memory executable on the host, we can remove all (redundant) calls to invalidate instruction cache here. As an added bonus, this makes invalidateInstructionCache() dead code, so it can be removed. Differential Revision: http://reviews.llvm.org/D13631 llvm-svn: 253343
* [asan] Enable halt_on_error tests on OS X.Yury Gribov2015-11-172-0/+0
| | | | llvm-svn: 253342
* [JIT/Memory] Fix up semantic of setExecutable().Davide Italiano2015-11-171-4/+1
| | | | | | | | | | setExecutable() should do everything that's needed to make the memory executable on host, i.e. unconditionally set permissions + invalidate instruction cache. llvm-rtdyld will be updated in my next commit. Discusseed with: Lang Hames (as part of D13631). llvm-svn: 253341
* Update DebugInfo tests for the change in DEBUG_VALUE output in r253338.Dan Gohman2015-11-177-9/+9
| | | | llvm-svn: 253340
* Lower statepoints with multi-def targets.Pat Gavlin2015-11-172-8/+30
| | | | | | | | | | Statepoint lowering currently expects that the target method of a statepoint only defines a single value. This precludes using statepoints with ABIs that return values in multiple registers (e.g. the SysV AMD64 ABI). This change adds support for lowering statepoints with mutli-def targets. llvm-svn: 253339
* Use TargetRegisterInfo for printing MachineOperand register commentsDan Gohman2015-11-179-17/+25
| | | | | | | | | | | | | | | | Several places in AsmPrinter.cpp print comments describing MachineOperand registers using MCRegisterInfo, which uses MCOperand-oriented names. This doesn't work for targets that use virtual registers exclusively, as WebAssembly does, since virtual registers are represented and printed differently. This patch preserves what seems to be the spirit of r229978, avoiding the use of TM.getSubtargetImpl(), while still using MachineOperand-oriented printing for MachineOperands. Differential Revision: http://reviews.llvm.org/D14709 llvm-svn: 253338
* Revert "Make FP_CONTRACT ON the default."Manuel Klimek2015-11-176-192/+15
| | | | | | | | | This reverts commit r253269. This leads to assert / segfault triggering on the following reduced example: float foo(float U, float base, float cell) { return (U = 2 * base) - cell; } llvm-svn: 253337
* Typo.Chad Rosier2015-11-171-1/+1
| | | | llvm-svn: 253336
* [ARM] Default to ARMv4t in favour of adding Other to ARMArchBradley Smith2015-11-172-2/+2
| | | | llvm-svn: 253335
* [ARM] Match VABDL from log2 shuffles.Charlie Turner2015-11-172-0/+61
| | | | | | Differential Revision: http://reviews.llvm.org/D14664 llvm-svn: 253334
OpenPOWER on IntegriCloud