summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove excessive padding from PTHStatData (NFC)Mehdi Amini2016-08-241-2/+2
| | | | | | | | | | | | | This diff reorders the fields and removes excessive padding. This fixes the following warning: PTHLexer.cpp:629:7: warning: Excessive padding in 'class (anonymous namespace)::PTHStatData' (14 padding bytes, where 6 is optimal). Optimal fields order: Size, ModTime, UniqueID, HasData, IsDirectory, consider reordering the fields or adding explicit padding members. Patch by: Alexander Shaposhnikov <shal1t712@gmail.com> Differential Revision: https://reviews.llvm.org/D23826 llvm-svn: 279607
* libc++: add an option to build against compiler-rtSaleem Abdulrasool2016-08-242-1/+8
| | | | | | This mirrors the option in libc++abi to build without libgcc. llvm-svn: 279606
* Preserve a pointer to the newly allocated signal stack as well. That tooChandler Carruth2016-08-241-4/+6
| | | | | | is flagged by LSan at least among leak detectors. llvm-svn: 279605
* TargetSchedule: Do not consider subregister definitions as reads.Matthias Braun2016-08-241-1/+1
| | | | | | | | | | | | | | We should not consider subregister definitions as reads for schedule model purposes (they are just modeled as reads of the overal vreg for liveness calculation purposes, the CPU instructions are not actually reading). Unfortunately I cannot submit a test for this as it requires a target which uses ReadAdvance annotation in the scheduling model and has subregister liveness enabled at the same time, which is only the case on an out of tree target. llvm-svn: 279604
* Adding an additional test to ensure the frame pointer is emittedDouglas Yung2016-08-241-0/+2
| | | | | | when compiling with optimization when PS4 is the target. llvm-svn: 279603
* CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePassesMatthias Braun2016-08-2424-162/+109
| | | | | | | | | | | | | | | | | | | | | | Re-apply this patch, hopefully I will get away without any warnings in the constructor now. This patch removes the MachineFunctionAnalysis. Instead we keep a map from IR Function to MachineFunction in the MachineModuleInfo. This allows the insertion of ModulePasses into the codegen pipeline without breaking it because the MachineFunctionAnalysis gets dropped before a module pass. Peak memory should stay unchanged without a ModulePass in the codegen pipeline: Previously the MachineFunction was freed at the end of a codegen function pipeline because the MachineFunctionAnalysis was dropped; With this patch the MachineFunction is freed after the AsmPrinter has finished. Differential Revision: http://reviews.llvm.org/D23736 llvm-svn: 279602
* [libFuzzer] use __attribute__((target("popcnt"))) only on x86_64Kostya Serebryany2016-08-244-7/+13
| | | | llvm-svn: 279601
* MIRParser/MIRPrinter: Compute isSSA instead of printing/parsing it.Matthias Braun2016-08-2470-160/+21
| | | | | | | | | Specifying isSSA is an extra line at best and results in invalid MI at worst. Compute the value instead. Differential Revision: http://reviews.llvm.org/D22722 llvm-svn: 279600
* Increase the size of the sigaltstack used by LLVM signal handlers. 8KB is notRichard Smith2016-08-241-1/+1
| | | | | | | | sufficient in some cases; increase to 64KB, which should be enough for anyone :) Patch by github.com/bryant! llvm-svn: 279599
* MachineModuleInfo: Avoid dummy constructor, use INITIALIZE_TM_PASSMatthias Braun2016-08-246-32/+13
| | | | | | | | | | | Change this pass constructor to just accept a const TargetMachine * and use INITIALIZE_TM_PASS, that way we can get rid of the dummy constructor. The pass will still fail when calling the default constructor leading to TM == nullptr, this is no different than before but is more in line what other codegen passes are doing and avoids the dummy constructor. llvm-svn: 279598
* Revert "libc++: Perform configuration checks with -nodefaultlibs"Saleem Abdulrasool2016-08-241-21/+2
| | | | | | | This reverts SVN r279584 which broke the buildbots. Will re-apply once the issue has been root-caused and fixed. llvm-svn: 279596
* [sanitizer] trying to fix the PPC botsKostya Serebryany2016-08-241-1/+1
| | | | llvm-svn: 279595
* [ADCE] Add control dependence computationDavid Callahan2016-08-241-21/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is part of a serious of patches to evolve ADCE.cpp to support removing of unnecessary control flow. This patch adds the ability to compute control dependences using the iterated dominance frontier. We extend the liveness propagation to alternate between data and control dependences until convergences. Modify the pass manager intergation to compute the post-dominator tree needed for iterator dominance frontier. We still force all terminators live for now until we add code to handlinge removing control flow in a later patch. No changes to effective behavior with this patch Previous patches: D23225 [ADCE] Modify data structures to support removing control flow D23065 [ADCE] Refactor anticipating new functionality (NFC) D23102 [ADCE] Refactoring for new functionality (NFC) Reviewers: nadav, majnemer, mehdi_amini Subscribers: twoh, freik, llvm-commits Differential Revision: https://reviews.llvm.org/D23559 llvm-svn: 279594
* [stackmaps] Remove an unneeded member variable [NFC]Philip Reames2016-08-232-5/+3
| | | | llvm-svn: 279590
* [libFuzzer] fix link in docsKostya Serebryany2016-08-231-1/+1
| | | | llvm-svn: 279589
* [libFuzzer] collect 64 states for value profile, not 65Kostya Serebryany2016-08-231-1/+5
| | | | llvm-svn: 279588
* [libFuzzer] docs on value profileKostya Serebryany2016-08-231-0/+28
| | | | llvm-svn: 279587
* [stackmaps] More extraction of common code [NFCI]Philip Reames2016-08-236-24/+55
| | | | | | General cleanup before starting to work on the part I want to actually change. llvm-svn: 279586
* [LoopUnroll] By default disable unrolling when optimizing for size.Michael Zolotukhin2016-08-232-1/+9
| | | | | | | | | | | | | | | | | | | | | Summary: In clang commit r268509 we started to invoke loop-unroll pass from the driver even under -Os. However, we happen to not initialize optsize thresholds properly, which si fixed with this change. r268509 led to some big compile time regressions, because we started to unroll some loops that we didn't unroll before. With this change I hope to recover most of the regressions. We still are slightly slower than before, because we do some checks here and there in loop-unrolling before we bail out, but at least the slowdown is not that huge now. Reviewers: hfinkel, chandlerc Subscribers: mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D23388 llvm-svn: 279585
* libc++: Perform configuration checks with -nodefaultlibsSaleem Abdulrasool2016-08-231-2/+21
| | | | | | | | | | | | | | | | | We're compiling libc++ with -nodefaultlibs, so we should also pass this option during the configuration checks to ensure those checks are consistent with the actual build. The primary motivation here is to ease cross-compilation against a non-standard set of C++ libraries. Previously, the configuration checks would attempt to link against the standard C++ libraries, which would cause link failures when cross-compiling, even though the actual library link would go through correctly (because of the use of -nodefaultlibs and explicitly specifying any needed libraries). This is more correct even ignoring the motivation, however. Patch by Shoaib Meenai! llvm-svn: 279584
* Don't use "return {...}" to initialize a std::tuple. This has only been validRichard Smith2016-08-231-2/+2
| | | | | | | | | since 2015 (n4387), though it's allowed by a library DR so new implementations accept it in their C++11 modes... This should unbreak the build with libstdc++ 4.9. llvm-svn: 279583
* #ifdef out validation code when asserts are disabled to remove unused variableRichard Smith2016-08-231-0/+2
| | | | | | warnings. llvm-svn: 279582
* Remove unused data member to unbreak -Werror builds.Richard Smith2016-08-232-5/+1
| | | | llvm-svn: 279581
* Revert r279564. It introduces undefined behavior (binding a reference to aRichard Smith2016-08-2325-115/+171
| | | | | | | dereferenced null pointer) in MachineModuleInfo::MachineModuleInfo that causes -Werror builds (including several buildbots) to fail. llvm-svn: 279580
* GlobalISel: add some G_TRUNCs to make icmp test valid MIR.Tim Northover2016-08-231-11/+17
| | | | llvm-svn: 279579
* [InstCombine] use local variables for repeated values; NFCISanjay Patel2016-08-231-12/+9
| | | | llvm-svn: 279578
* [MC] Support .dc directives in assembler parserPetr Hosek2016-08-232-0/+67
| | | | | | | | | | While these directives are mostly aliases for the existing integer and float value directives, some of them like .dc.a have no direct equivalents and are sometimes being used for convenience. Differential Revision: https://reviews.llvm.org/D23810 llvm-svn: 279577
* [ThinLTO] Add caching to the new LTO APIMehdi Amini2016-08-238-35/+393
| | | | | | | | | | | | Add the ability to plug a cache on the LTO API. I tried to write such that a linker implementation can control the cache backend. This is intrusive and I'm not totally happy with it, but I can't figure out a better design right now. Differential Revision: https://reviews.llvm.org/D23599 llvm-svn: 279576
* [InstCombine] move foldICmpShrConstConst() contents to foldICmpShrConst(); NFCISanjay Patel2016-08-232-77/+65
| | | | | | | There will only be 3 lines of code in foldICmpShrConst() when the cleanup is done, so it doesn't make much sense to have a separate function for a single fold. llvm-svn: 279575
* [stackmaps] Extract out magic constants [NFCI]Philip Reames2016-08-233-6/+40
| | | | | | This is a first step towards clarifying the exact MI semantics of stackmap's "live values". llvm-svn: 279574
* MachineFunction: Introduce NoPHIs propertyMatthias Braun2016-08-2310-4/+52
| | | | | | | | | | | | | I want to compute the SSA property of .mir files automatically in upcoming patches. The problem with this is that some inputs will be reported as static single assignment with some passes claiming not to support SSA form. In reality though those passes do not support PHI instructions => Track the presence of PHI instructions separate from the SSA property. Differential Revision: https://reviews.llvm.org/D22719 llvm-svn: 279573
* [sanitizer] change the 64-bit allocator to use a single array for free-d ↵Kostya Serebryany2016-08-233-182/+144
| | | | | | chunks instead of a lock-free linked list of tranfer batches. This change simplifies the code, makes the allocator more 'hardened', and will allow simpler code to release RAM to OS. This may also slowdown malloc stress tests due to lock contension, but I did not observe noticeable slowdown on various real multi-threaded benchmarks. llvm-svn: 279572
* Fix member call on null pointer, found by sanitizer buildbot.Richard Smith2016-08-231-2/+4
| | | | llvm-svn: 279571
* [sanitizer] adding a threaded performance stress test for malloc (useful for ↵Kostya Serebryany2016-08-231-0/+37
| | | | | | manual analysis of malloc performance) llvm-svn: 279570
* GlobalISel: add forgotten test-case for G_ICMPTim Northover2016-08-231-0/+45
| | | | llvm-svn: 279569
* [InstCombine] remove icmp shr folds that are already handled by InstSimplifySanjay Patel2016-08-231-17/+3
| | | | | | | | AFAICT, these already worked in all cases for scalar types, and I enhanced the code to work for vector types in: https://reviews.llvm.org/rL279543 llvm-svn: 279568
* GlobalISel: make truncate/extend casts uniformTim Northover2016-08-2315-73/+100
| | | | | | | They really should have both types represented, but early variants were created before MachineInstrs could have multiple types so they're rather ambiguous. llvm-svn: 279567
* GlobalISel: legalize integer comparisons on AArch64.Tim Northover2016-08-235-3/+80
| | | | | | | Next step is doing both legalizations at the same time! Marvel at GlobalISel's cunning. llvm-svn: 279566
* GlobalISel: legalize conditional branches on AArch64.Tim Northover2016-08-235-1/+30
| | | | llvm-svn: 279565
* CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePassesMatthias Braun2016-08-2325-171/+115
| | | | | | | | | | | | | | | | | | | | | | | Re-apply this commit with the deletion of a MachineFunction delegated to a separate pass to avoid use after free when doing this directly in AsmPrinter. This patch removes the MachineFunctionAnalysis. Instead we keep a map from IR Function to MachineFunction in the MachineModuleInfo. This allows the insertion of ModulePasses into the codegen pipeline without breaking it because the MachineFunctionAnalysis gets dropped before a module pass. Peak memory should stay unchanged without a ModulePass in the codegen pipeline: Previously the MachineFunction was freed at the end of a codegen function pipeline because the MachineFunctionAnalysis was dropped; With this patch the MachineFunction is freed after the AsmPrinter has finished. Differential Revision: http://reviews.llvm.org/D23736 llvm-svn: 279564
* [ValueTracking] Use a function_ref to avoid multiple instantiationsDavid Majnemer2016-08-231-5/+5
| | | | | | | No functional change intended, this should just be a code size improvement. llvm-svn: 279563
* [SLP] Avoid signed integer overflowMatthew Simpson2016-08-232-9/+39
| | | | | | | | | | | | | | | | | | | The test case included with r279125 exposed an existing signed integer overflow. Since getTreeCost can return INT_MAX, we can't sum this cost together with other costs, such as getReductionCost. This patch removes the possibility of assigning a cost of INT_MAX. Since we were previously using INT_MAX as an indicator for "should not vectorize", we now explicitly check this condition with "isTreeTinyAndNotFullyVectorizable" before computing a cost. This patch adds a run-line to the test case used for r279125 that ensures we don't vectorize. Previously, this line would vectorize the test case by chance due to undefined behavior in the cost calculation. Differential Revision: https://reviews.llvm.org/D23723 llvm-svn: 279562
* Remove unused translation unit.Zachary Turner2016-08-232-14/+0
| | | | llvm-svn: 279561
* Update coding standards for include style.Zachary Turner2016-08-231-1/+11
| | | | | | | Reviewed By: lattner Differential Revision: https://reviews.llvm.org/D23591 llvm-svn: 279560
* driver: Support checking for rlimits via cmake (when bootstrapping)Chris Bieneman2016-08-233-5/+9
| | | | | | | | | | | | | | | | | Summary: Add a cmake check for sys/resource.h and replace the __has_include() check with its result, in order to make it possible to use rlimits when building with compilers not supporting __has_include() -- i.e. when bootstrapping. // Please also re-apply dfcd52eb1d8e5d322404b40414cb7331c7380a8c (llvm-config.h fix) Patch by: Michał Górny Reviewers: rsmith, beanz Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23744 llvm-svn: 279559
* Remove two dos line endings.Nico Weber2016-08-231-2/+2
| | | | llvm-svn: 279558
* Fix regression introduced by r279164: only pass definitions as the PatternDefRichard Smith2016-08-237-64/+67
| | | | | | | | | | | | | | | | | | | | | | | | | to DiagnoseUninstantiableTemplate, teach hasVisibleDefinition to correctly determine whether a function definition is visible, and mark both the function and the template as visible when merging function template definitions to provide hasVisibleDefinition with the relevant information. The change to always pass the right declaration as the PatternDef to DiagnoseUninstantiableTemplate also caused those checks to happen before other diagnostics in InstantiateFunctionDefinition, giving worse diagnostics for the same situations, so I sunk the relevant diagnostics into DiagnoseUninstantiableTemplate. Those parts of this patch are based on changes in reviews.llvm.org/D23492 by Vassil Vassilev. This reinstates r279486, reverted in r279500, with a fix to DiagnoseUninstantiableTemplate to only mark uninstantiable explicit instantiation declarations as invalid if we actually diagnosed them. (When we trigger an explicit instantiation of a class member from an explicit instantiation declaration for the class, it's OK if there is no corresponding definition and we certainly don't want to mark the member invalid in that case.) This previously caused a build failure during bootstrap. llvm-svn: 279557
* [LTO] Fix test following r279550Mehdi Amini2016-08-231-1/+1
| | | | | | | The output name changed, but it was passing locally using the old output still present in the build dir. llvm-svn: 279556
* clang-cl: Make /Brepro actually work.Nico Weber2016-08-232-4/+4
| | | | | | | | | /Brepro means we want reproducible builds, i.e. we _don't_ want the timestamp that's needed to be compatible with the incremental linker. https://reviews.llvm.org/D23805 llvm-svn: 279555
* GlobalISel: extend legalizer interface to handle multiple types.Tim Northover2016-08-236-84/+171
| | | | | | | | Instructions like G_ICMP have multiple types that may need to be legalized (the boolean output and nearly arbitrary inputs in this case). So the legalizer must be capable of deciding what to do for each of them separately. llvm-svn: 279554
OpenPOWER on IntegriCloud