summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [asan] Support dead code stripping on Mach-O platformsRyan Govostes2016-03-283-13/+146
| | | | | | | | | | | | | | | | | | On OS X El Capitan and iOS 9, the linker supports a new section attribute, live_support, which allows dead stripping to remove dead globals along with the ASAN metadata about them. With this change __asan_global structures are emitted in a new __DATA,__asan_globals section on Darwin. Additionally, there is a __DATA,__asan_liveness section with the live_support attribute. Each entry in this section is simply a tuple that binds together the liveness of a global variable and its ASAN metadata structure. Thus the metadata structure will be alive if and only if the global it references is also alive. Review: http://reviews.llvm.org/D16737 llvm-svn: 264645
* [asan] Add runtime support for __asan_(un)register_image_globalsRyan Govostes2016-03-289-7/+99
| | | | | | | | | | | This change introduces routines that register and unregister all instrumented globals in a loaded executable image. These routines are only implemented on Darwin, where globals metadata is expected to be placed in the __DATA,__asan_globals section. Review: http://reviews.llvm.org/D16841 llvm-svn: 264644
* Revert "Reapply "[PGO] Fix name encoding for ObjC-like functions""Vedant Kumar2016-03-2812-25/+11
| | | | | | | This reverts commit r264641 to investigate why c-general.test is failing on the bots. llvm-svn: 264643
* Paper over the Windows-only enum initialization test failure until the bug ↵Reid Kleckner2016-03-281-1/+2
| | | | | | is fixed llvm-svn: 264642
* Reapply "[PGO] Fix name encoding for ObjC-like functions"Vedant Kumar2016-03-2812-11/+25
| | | | | | | | | | | | | | | | | | | | | Function names in ObjC can have spaces in them. This interacts poorly with name compression, which uses spaces to separate PGO names. Fix the issue by using a different separator and update a test. I chose "\01" as the separator because 1) it's non-printable, 2) we strip it from PGO names, and 3) it's the next natural choice once "\00" is discarded (that one's overloaded). This reverts the revert commit beaf3d18. What's changed? - I fixed up the covmap-V2 binary format tests using a linux VM. - I updated the expected counts in instrprof-comdat.h to account for the fact that there have been bugfixes to clang coverage. - I added an assert to make sure we don't get bitten by this again. Differential Revision: http://reviews.llvm.org/D18516 llvm-svn: 264641
* [tsan] Fix a crash when exiting the main thread (e.g. dispatch_main)Kuba Brecka2016-03-282-1/+43
| | | | | | | | This patch fixes the custom ThreadState destruction on OS X to avoid crashing when dispatch_main calls pthread_exit which quits the main thread. Differential Revision: http://reviews.llvm.org/D18496 llvm-svn: 264627
* [libprofile] Make this test not depend on previous runs.Sean Silva2016-03-281-0/+1
| | | | llvm-svn: 264626
* [libprofile] Make this test a bit more specificSean Silva2016-03-281-16/+16
| | | | llvm-svn: 264625
* Simplify how we represent relocation iterators.Rafael Espindola2016-03-281-25/+14
| | | | | | | | | | Instead of using a bit to detect if they are "dynamic", just look at sh_link. This is a simplification on its own, and will help with using llvm-objdump in dynamic objects. llvm-svn: 264624
* Use 'alignTo' instead of re-inventing it. NFCDouglas Katzman2016-03-281-2/+2
| | | | llvm-svn: 264623
* This file was accidentally committed with bad line endings. Fixed...Mike Spertus2016-03-281-7/+7
| | | | llvm-svn: 264621
* Submitted new file with wrong line endings. Correcting...Mike Spertus2016-03-281-7/+7
| | | | llvm-svn: 264620
* Profile summary cleanup.Easwaran Raman2016-03-282-29/+27
| | | | | | Differential Revision: http://reviews.llvm.org/D18468 llvm-svn: 264619
* Fix builds on Windows broken in r264598.Eugene Zelenko2016-03-281-2/+2
| | | | llvm-svn: 264618
* [STATS] Missing check for MIC in config-ix.cmakeJonathan Peyton2016-03-281-1/+1
| | | | llvm-svn: 264616
* [PGO] Update r264612 to use C-style commentAdam Nemet2016-03-281-2/+4
| | | | llvm-svn: 264615
* [PGO] Update r264611 to use C-style commentAdam Nemet2016-03-281-2/+4
| | | | llvm-svn: 264614
* [PGO] Comment how function pointers for indirect calls are mapped to ↵Adam Nemet2016-03-281-0/+2
| | | | | | | | | | | | | | | | function names Summary: Hopefully this will make it easier for the next person to figure all this out... Reviewers: bogner, davidxl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18490 llvm-svn: 264612
* [PGO] Comment how function pointers for indirect calls are mapped to ↵Adam Nemet2016-03-282-0/+5
| | | | | | | | | | | | | | | | function names Summary: Hopefully this will make it easier for the next person to figure all this out... Reviewers: bogner, davidxl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18490 llvm-svn: 264611
* Convert to Unix line endings due to previous commit error.Mike Spertus2016-03-281-823/+823
| | | | llvm-svn: 264610
* dos2unix CMakeLists.txtReid Kleckner2016-03-281-800/+800
| | | | | | The sign now reads "0 days since the last line ending confusion" llvm-svn: 264609
* MIRParser: Add %subreg.xxx syntax for subregister index operandsMatthias Braun2016-03-285-1/+85
| | | | | | Differential Revision: http://reviews.llvm.org/D18279 llvm-svn: 264608
* CodeGen: Correct specification of PHI nodesMatthias Braun2016-03-282-3/+3
| | | | | | | | | | They do have a def machine operand. Fixing the definition is necessary for an upcoming patch. Differential Revision: http://reviews.llvm.org/D18384 llvm-svn: 264607
* [AArch64] Do not lower scalar sdiv/udiv to a shifts + mul sequence when ↵Haicheng Wu2016-03-283-0/+64
| | | | | | | | optimizing for minsize Mimic what x86 does when optimizing sdiv/udiv for minsize. llvm-svn: 264606
* Revert "[SimlifyCFG] Prevent passes from destroying canonical loop ↵Reid Kleckner2016-03-288-84/+54
| | | | | | | | | | structure, especially for nested loops" This reverts commit r264596. It does not compile. llvm-svn: 264604
* Use VS2015 Project Support for Natvis to eliminate the need to manually ↵Mike Spertus2016-03-284-828/+842
| | | | | | | | | install clang native visualizer This is the clang equivalent to llvm commit 264601. When using Visual Studio 2015, cmake now puts the native visualizers in llvm.sln, so the developer automatically sees custom visualizations. Much thanks to ariccio who provided extensive help on this change. (manual installation still needed on VS2013). llvm-svn: 264603
* Forgot to commit this file in revision 264601Mike Spertus2016-03-281-789/+800
| | | | llvm-svn: 264602
* Use VS2015 Project Support for Natvis to eliminate the need to manually ↵Mike Spertus2016-03-282-3/+12
| | | | | | | | | install natvis files When using Visual Studio 2015, cmake now puts the native visualizers in llvm.sln, so the developer automatically sees custom visualizations. Much thanks to ariccio who provided extensive help on this change. (manual installation still needed on VS2013) llvm-svn: 264601
* [PowerPC] On the A2, popcnt[dw] are very slowHal Finkel2016-03-286-10/+34
| | | | | | | | | | | | | | | | The A2 cores support the popcntw/popcntd instructions, but they're microcoded, and slower than our default software emulation. Specifically, popcnt[dw] take approximately 74 cycles, whereas our software emulation takes only 24-28 cycles. I've added a new target feature to indicate a slow popcnt[dw], instead of just removing the existing target feature from the a2/a2q processor models, because: 1. This allows us to return more accurate information via the TTI interface (I recognize that this currently makes no practical difference) 2. Is hopefully easier to understand (it allows the core's features to match its manual while still having the desired effect). llvm-svn: 264600
* Remove else after returnDavid Blaikie2016-03-281-4/+3
| | | | llvm-svn: 264599
* Fix Clang-tidy modernize-deprecated-headers warnings in some files; other ↵Eugene Zelenko2016-03-2812-127/+149
| | | | | | | | minor fixes. Differential revision: http://reviews.llvm.org/D18469 llvm-svn: 264598
* Windows: Shrink sizeof(MacroInfo) from 256 to 248, MacroDirective 24 to 16Nico Weber2016-03-281-3/+3
| | | | | | | | | | In the Microsoft ABI, only bitfields with identical types get packed together, so use consistently use one of the two instead of a mix. Saves 457kB when parsing windows.h. No intended behavior change. llvm-svn: 264597
* [SimlifyCFG] Prevent passes from destroying canonical loop structure, ↵Hyojin Sung2016-03-288-54/+84
| | | | | | | | | | | | | | | | especially for nested loops When eliminating or merging almost empty basic blocks, the existence of non-trivial PHI nodes is currently used to recognize potential loops of which the block is the header and keep the block. However, the current algorithm fails if the loops' exit condition is evaluated only with volatile values hence no PHI nodes in the header. Especially when such a loop is an outer loop of a nested loop, the loop is collapsed into a single loop which prevent later optimizations from being applied (e.g., transforming nested loops into simplified forms and loop vectorization). The patch augments the existing PHI node-based check by adding a pre-test if the BB actually belongs to a set of loop headers and not eliminating it if yes. llvm-svn: 264596
* [llvm-readobj] NFC Replace case by macros for PT_* enumsHemant Kulkarni2016-03-281-24/+16
| | | | llvm-svn: 264595
* [PGO] Don't set the function hotness attribute when populating countersRong Xu2016-03-281-21/+52
| | | | | | | | | | | | | | Don't set the function hotness attribute on the fly. This changes the CFG branch probability of the caller function, which leads to inconsistent BB ordering. This patch moves the attribute setting to a separated loop after the counts in all functions are populated. Fixes PR27024 - PGO instrumentation profile data is not reflected in correct basic blocks. Differential Revision: http://reviews.llvm.org/D18491 llvm-svn: 264594
* Introduce MachineFunctionProperties and the AllVRegsAllocated propertyDerek Schuff2016-03-2824-3/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | MachineFunctionProperties represents a set of properties that a MachineFunction can have at particular points in time. Existing examples of this idea are MachineRegisterInfo::isSSA() and MachineRegisterInfo::tracksLiveness() which will eventually be switched to use this mechanism. This change introduces the AllVRegsAllocated property; i.e. the property that all virtual registers have been allocated and there are no VReg operands left. With this mechanism, passes can declare that they require a particular property to be set, or that they set or clear properties by implementing e.g. MachineFunctionPass::getRequiredProperties(). The MachineFunctionPass base class verifies that the requirements are met, and handles the setting and clearing based on the delcarations. Passes can also directly query and update the current properties of the MF if they want to have conditional behavior. This change annotates the target-independent post-regalloc passes; future changes will also annotate target-specific ones. Reviewers: qcolombet, hfinkel Differential Revision: http://reviews.llvm.org/D18421 llvm-svn: 264593
* docs: Fix section header committed in r264575Tobias Grosser2016-03-281-1/+1
| | | | | | | | | | | Ensure the length of the header underline matches the length of the header. This prevents SPHINX from erroring on this file and consequently not updating the documentation. Also, make this its own point not belonging to the 'increased applicability' section. llvm-svn: 264592
* [llvm-size] Implement --common optionHemant Kulkarni2016-03-282-0/+54
| | | | | | Differential Revision: http://reviews.llvm.org/D16820 llvm-svn: 264591
* Revert "[PGO] Fix name encoding for ObjC-like functions"Vedant Kumar2016-03-283-7/+4
| | | | | | | | | This reverts commit r264587. Reverting to investigate 6 unexpected failures on the ppc bot: http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/2822 llvm-svn: 264590
* AMDGPU/SI: Limit load clustering to 16 bytes instead of 4 instructionsTom Stellard2016-03-284-16/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This helps prevent load clustering from drastically increasing register pressure by trying to cluster 4 SMRDx8 loads together. The limit of 16 bytes was chosen, because it seems like that was the original intent of setting the limit to 4 instructions, but more analysis could show that a different limit is better. This fixes yields small decreases in register usage with shader-db, but also helps avoid a large increase in register usage when lane mask tracking is enabled in the machine scheduler, because lane mask tracking enables more opportunities for load clustering. shader-db stats: 2379 shaders in 477 tests Totals: SGPRS: 49744 -> 48600 (-2.30 %) VGPRS: 34120 -> 34076 (-0.13 %) Code Size: 1282888 -> 1283184 (0.02 %) bytes LDS: 28 -> 28 (0.00 %) blocks Scratch: 495616 -> 492544 (-0.62 %) bytes per wave Max Waves: 6843 -> 6853 (0.15 %) Wait states: 0 -> 0 (0.00 %) Reviewers: nhaehnle, arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D18451 llvm-svn: 264589
* [SimplifyLibCalls] Transform printf("%s", "a") -> putchar('a').Davide Italiano2016-03-282-0/+30
| | | | llvm-svn: 264588
* [PGO] Fix name encoding for ObjC-like functionsVedant Kumar2016-03-283-4/+7
| | | | | | | | | | | | | | Function names in ObjC can have spaces in them. This interacts poorly with name compression, which uses spaces to separate PGO names. Fix the issue by using a different separator and update a test. I chose "\01" as the separator because 1) it's non-printable, 2) we strip it from PGO names, and 3) it's the next natural choice once "\00" is discarded (that one's overloaded). Differential Revision: http://reviews.llvm.org/D18516 llvm-svn: 264587
* [Coverage] Strip <unknown> from PGO names if no filenames are availableVedant Kumar2016-03-284-7/+12
| | | | | | Patch suggested by David Li! llvm-svn: 264586
* [LTO] Internalize symbols.Davide Italiano2016-03-284-1/+49
| | | | | | | | | | | IPO doesn't work very well across symbols referenced by others TUs. The linker here tries to evaluate which symbols are safe to internalize and switches their linkage. Differential Revision: http://reviews.llvm.org/D18415 llvm-svn: 264585
* [Hexagon] Improve handling of unaligned vector loads and storesKrzysztof Parzyszek2016-03-286-56/+187
| | | | llvm-svn: 264584
* NFC: skip FenceInst up-front in AtomicExpandPass.James Y Knight2016-03-281-5/+5
| | | | llvm-svn: 264583
* Reduce size of DefinitionData from 120 to 96 bytes on Windows.Nico Weber2016-03-281-37/+37
| | | | | | | | | | In the Microsoft ABI, only bitfields with identical types get packed together, so use unsigned consistently instead of a bool / unsigned mix. No intended behavior change. llvm-svn: 264582
* [Hexagon] Only use restore functions for single register at -OzKrzysztof Parzyszek2016-03-282-0/+53
| | | | llvm-svn: 264581
* [Hexagon] Speed up frame lowering when no optimizations are enabledKrzysztof Parzyszek2016-03-282-24/+35
| | | | | | | | - Do not optimize stack slots in optnone functions. - Get aligned-base register from HexagonMachineFunctionInfo instead of looking for ALIGNA instruction in the function's body. llvm-svn: 264580
* Sparc: silently ignore .proc assembler directiveDouglas Katzman2016-03-282-0/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D18463 llvm-svn: 264579
OpenPOWER on IntegriCloud