summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Default SetVector to use a DenseSet.Rafael Espindola2015-11-184-12/+11
| | | | | | | | | | | | | | | We use to have an odd difference among MapVector and SetVector. The map used a DenseMop, but the set used a SmallSet, which in turn uses a std::set. I have changed SetVector to use a DenseSet. If you were depending on the old behaviour you can pass an explicit set type or use SmallSetVector. The common cases for needing to do it are: * Optimizing for small sets. * Sets for types not supported by DenseSet. llvm-svn: 253439
* Teach the inliner to track deoptimization stateSanjoy Das2015-11-188-6/+286
| | | | | | | | | | | | | | | | Summary: This change teaches LLVM's inliner to track and suitably adjust deoptimization state (tracked via deoptimization operand bundles) as it inlines through call sites. The operation is described in more detail in the LangRef changes. Reviewers: reames, majnemer, chandlerc, dexonsmith Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14552 llvm-svn: 253438
* Stop producing .data.rel sections.Rafael Espindola2015-11-1824-134/+93
| | | | | | | | | | | | | | | | | If a section is rw, it is irrelevant if the dynamic linker will write to it or not. It looks like llvm implemented this because gcc was doing it. It looks like gcc implemented this in the hope that it would put all the relocated items close together and speed up the dynamic linker. There are two problem with this: * It doesn't work. Both bfd and gold will map .data.rel to .data and concatenate the input sections in the order they are seen. * If we want a feature like that, it can be implemented directly in the linker since it knowns where the dynamic relocations are. llvm-svn: 253436
* Fix LLD testsuite fallout from r253429David Majnemer2015-11-181-4/+4
| | | | llvm-svn: 253432
* Add a test for r253323David Majnemer2015-11-181-0/+47
| | | | | | Forgot to do this simultaneously with committing the fix. llvm-svn: 253430
* [llvm-objdump] Use the COFF export table for additional symbolsDavid Majnemer2015-11-184-59/+128
| | | | | | | | | Most linked executables do not have a symbol table in COFF. However, it is pretty typical to have some export entries. Use those entries to inform the disassembler about potential function definitions and call targets. llvm-svn: 253429
* [doc] simplify the doc on compiling CUDAJingyue Wu2015-11-181-26/+3
| | | | | | CUDA support doesn't reply on temporary patches any more. Thanks Artem! llvm-svn: 253427
* Remove a redundant assertion in MachineBasicBlock.cpp. NFC.Cong Hou2015-11-181-1/+0
| | | | llvm-svn: 253426
* Remove redundant code in MachineBasicBlock.cpp. NFC.Cong Hou2015-11-181-28/+8
| | | | llvm-svn: 253425
* Attempt to fix uninitialized SDAG persistent ids detected by MSanReid Kleckner2015-11-181-1/+1
| | | | llvm-svn: 253422
* Let += and -= operators in BranchProbability have saturation behaviors.Cong Hou2015-11-181-6/+4
| | | | | | | | This commit is for a later patch that is depend on it. The sum of two branch probabilities can be greater than 1 due to rounding. It is safer to saturate the results of sum and subtraction. llvm-svn: 253421
* [libFuzzer] remove default initializer as a workaround for ↵Kostya Serebryany2015-11-181-1/+1
| | | | | | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68399. Don't need it anyway. llvm-svn: 253419
* Modify the interface BranchProbability::normalizeProbabilities to let it ↵Cong Hou2015-11-182-9/+14
| | | | | | accept a pair of iterators. NFC. llvm-svn: 253417
* Revert "[llvm-profdata] Add SaturatingAdd/SaturatingMultiply Helper Functions"Nathan Slingerland2015-11-184-77/+9
| | | | | | Not ready for merge. llvm-svn: 253415
* Improving edge probabilities computation when choosing the best successor in ↵Cong Hou2015-11-182-13/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | machine block placement. When looking for the best successor from the outer loop for a block belonging to an inner loop, the edge probability computation can be improved so that edges in the inner loop are ignored. For example, suppose we are building chains for the non-loop part of the following code, and looking for B1's best successor. Assume the true body is very hot, then B3 should be the best candidate. However, because of the existence of the back edge from B1 to B0, the probability from B1 to B3 can be very small, preventing B3 to be its successor. In this patch, when computing the probability of the edge from B1 to B3, the weight on the back edge B1->B0 is ignored, so that B1->B3 will have 100% probability. if (...) do { B0; ... // some branches B1; } while(...); else B2; B3; Differential revision: http://reviews.llvm.org/D10825 llvm-svn: 253414
* [llvm-profdata] Fix unhandled enumeration values warningNathan Slingerland2015-11-181-0/+2
| | | | | | | | | | Fix this: llvm/tools/llvm-profdata/llvm-profdata.cpp:78:15: warning: 12 enumeration values not handled in switch: 'success', 'eof', 'unrecognized_format'... [-Wswitch] switch (instrError) { ^ llvm-svn: 253413
* [llvm-profdata] Add SaturatingAdd/SaturatingMultiply Helper FunctionsNathan Slingerland2015-11-184-9/+77
| | | | | | | | | | | | | | | Summary: This change adds MathExtras helper functions for handling unsigned, saturating addition and multiplication. It also updates the instrumentation and sample profile merge implementations to use them. No functional changes. Reviewers: dnovillo, bogner, davidxl Subscribers: davidxl, llvm-commits Differential Revision: http://reviews.llvm.org/D14720 llvm-svn: 253412
* [ARM] Enable shrink-wrapping by default.Quentin Colombet2015-11-1812-18/+32
| | | | | | | | Differential Revision: http://reviews.llvm.org/D14357 rdar://problem/21942589 llvm-svn: 253411
* Generalize ownership/passing semantics to allow dsymutil to own ↵David Blaikie2015-11-183-23/+21
| | | | | | | | | | | | | abbreviations via unique_ptr While still allowing CodeGen/AsmPrinter in llvm to own them using a bump ptr allocator. (might be nice to replace the pointers there with something that at least automatically calls their dtors, if that's necessary/useful, rather than having it done explicitly (I think a typed BumpPtrAllocator already does this, or maybe a unique_ptr with a custom deleter, etc)) llvm-svn: 253409
* Remove excess white spaceRafael Espindola2015-11-181-6/+0
| | | | llvm-svn: 253408
* [InstCombine] refactor optimizeIntToFloatBitCast() ; NFCISanjay Patel2015-11-181-38/+29
| | | | | | | | | | | | | | | The logic for handling the pattern without a shift is identical to the logic for handling the pattern with a shift if you set the shift amount to zero for the former. This should make it easier to see that we probably don't even need optimizeIntToFloatBitCast(). If we call something like foldVecTruncToExtElt() from visitTrunc(), we'll solve PR25543: https://llvm.org/bugs/show_bug.cgi?id=25543 llvm-svn: 253403
* [llvm-profdata] Show hint for other mismatch errors when merging instr profdataNathan Slingerland2015-11-171-1/+5
| | | | | | | | | | | Missed bit of feedback from D14720. Show the same "Make sure that all profile data to be merged is generated from the same binary." hint for hash mismatch and value site count mismatch as we now do for counter mismatch when merging incompatible instrumentation profile data. llvm-svn: 253400
* [X86][AVX512] Added AVX512 SHUFP*/VPERMILP* shuffle decode comments.Simon Pilgrim2015-11-175-186/+119
| | | | llvm-svn: 253396
* Fix read-of-uninitialized introduced in r253277 exposed on some buildbotsDavid Blaikie2015-11-171-1/+1
| | | | | | | | | | | | Verified that this was at least /an/ issue, if not the only one, by initializing NumBuckets to 1 (previously it was uninitialized, so if this change made a difference, which it did (causing a bunch of tests to crash) it demonstrates use-of-uninitialized memory). Initializing then removes the crashes. Thanks Reid for the debugging assistance llvm-svn: 253395
* [PGO] Move value profile data definitions out of IndexedInstrProfXinliang David Li2015-11-174-52/+49
| | | | | | | Move the data structure defintions out of the namespace. The defs will be shared by raw format. [NFC] llvm-svn: 253394
* Fix null dereference committed in r253277David Blaikie2015-11-171-2/+3
| | | | llvm-svn: 253393
* dwarfdump: support indexed string dumping in dwp based on the STR_OFFSETS ↵David Blaikie2015-11-172-3/+6
| | | | | | component of the index llvm-svn: 253392
* [X86][AVX512] Added support for AVX512 UNPCK shuffle decode comments.Simon Pilgrim2015-11-177-315/+180
| | | | llvm-svn: 253391
* [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
* [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
* Fix -Wunused-function in a non-Win32 buildDavid Blaikie2015-11-171-1/+1
| | | | llvm-svn: 253373
* [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
* 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
* use local variables; NFCISanjay Patel2015-11-171-7/+7
| | | | llvm-svn: 253356
* enabling sancov tests on linux x86_64 onlyMike Aizatsky2015-11-173-0/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D14728 llvm-svn: 253354
* [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
* [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
* [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
OpenPOWER on IntegriCloud