summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [PowerPC] Fix calculating address of arguments on stack for variadic funcPetar Jovanovic2015-12-043-32/+43
| | | | | | | | | | | Fix calculating address of arguments larger than 32 bit on stack for variadic functions (rounding up address to alignment) on ppc32 architecture. Patch by Strahinja Petrovic. Differential Revision: http://reviews.llvm.org/D14871 llvm-svn: 254670
* [llvm-profdata] Add support for weighted merge of profile dataNathan Slingerland2015-12-0413-47/+266
| | | | | | | | | | | | | | | | | | This change adds support for an optional weight when merging profile data with the llvm-profdata tool. Weights are specified by adding an option ':<weight>' suffix to the input file names. Adding support for arbitrary weighting of input profile data allows for relative importance to be placed on the input data from multiple training runs. Both sampled and instrumented profiles are supported. Reviewers: dnovillo, bogner, davidxl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14547 llvm-svn: 254669
* [CodeGen] Minor correction to comment on PhysRegInfo.Kevin B. Smith2015-12-041-1/+1
| | | | | | Differential revision: http://reviews.llvm.org/D15216 llvm-svn: 254668
* Simplify since this function never fails.Rafael Espindola2015-12-032-11/+3
| | | | llvm-svn: 254667
* Add a newline at the end of this fileEnrico Granata2015-12-031-1/+1
| | | | llvm-svn: 254666
* CodeGen peephole: fold redundant phys reg copiesJF Bastien2015-12-032-12/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code generation often exposes redundant physical register copies through virtual registers such as: %vreg = COPY %PHYSREG ... %PHYSREG = COPY %vreg There are cases where no intervening clobber of %PHYSREG occurs, and the later copy could therefore be removed. In some cases this further allows us to remove the initial copy. This patch contains a motivating example which comes from the x86 build of Chrome, specifically cc::ResourceProvider::UnlockForRead uses libstdc++'s implementation of hash_map. That example has two tests live at the same time, and after machine sinking LLVM has confused itself enough and things spilling EFLAGS is a great idea even though it's never restored and the comparison results are both live. Before this patch we have: DEC32m %RIP, 1, %noreg, <ga:@L>, %noreg, %EFLAGS<imp-def> %vreg1<def> = COPY %EFLAGS; GR64:%vreg1 %EFLAGS<def> = COPY %vreg1; GR64:%vreg1 JNE_1 <BB#1>, %EFLAGS<imp-use> Both copies are useless. This patch tries to eliminate the later copy in a generic manner. dec is especially confusing to LLVM when compared with sub. I wrote this patch to treat all physical registers generically, but only remove redundant copies of non-allocatable physical registers because the allocatable ones caused issues (e.g. when calling conventions weren't properly modeled) and should be handled later by the register allocator anyways. The following tests used to failed when the patch also replaced allocatable registers: CodeGen/X86/StackColoring.ll CodeGen/X86/avx512-calling-conv.ll CodeGen/X86/copy-propagation.ll CodeGen/X86/inline-asm-fpstack.ll CodeGen/X86/musttail-varargs.ll CodeGen/X86/pop-stack-cleanup.ll CodeGen/X86/preserve_mostcc64.ll CodeGen/X86/tailcallstack64.ll CodeGen/X86/this-return-64.ll This happens because COPY has other special meaning for e.g. dependency breakage and x87 FP stack. Note that all other backends' tests pass. Reviewers: qcolombet Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15157 llvm-svn: 254665
* AsmPrinter: Simplify emitting FP elements in sequential data. NFCJustin Bogner2015-12-031-26/+15
| | | | | | | Use APFloat APIs here Rather than manually type-punning through unions. llvm-svn: 254664
* PR25731: namespace alias declarations can appear at block scope; ensure that weRichard Smith2015-12-033-11/+34
| | | | | | | | | do scope-based lookup when looking for redeclarations of them. Add some related missing checks for the scope-based redeclaration lookup: properly filter the list of found declarations to match the scope, and diagnose shadowing of a template parameter name. llvm-svn: 254663
* [WebAssembly] Fix dominance check for PHIs in the StoreResult passDan Gohman2015-12-033-16/+69
| | | | | | | | | | | | | | When a block has no terminator instructions, getFirstTerminator() returns end(), which can't be used in dominance checks. Check dominance for phi operands separately. Also, remove some bits from WebAssemblyRegStackify.cpp that were causing trouble on the same testcase; they were left behind from an earlier experiment. Differential Revision: http://reviews.llvm.org/D15210 llvm-svn: 254662
* Revert "raw_ostream: << operator for callables with raw_stream argument"Matthias Braun2015-12-036-89/+140
| | | | | | | | This commit provoked "error C2593: 'operator <<' is ambiguous" on MSVC. This reverts commit r254655. llvm-svn: 254661
* [CMake] CMake calls to set_property with APPEND string need to have a ↵Chris Bieneman2015-12-031-1/+1
| | | | | | leading space. llvm-svn: 254660
* [CMake] Fixing botsChris Bieneman2015-12-031-1/+1
| | | | | | CMake calls to set_property with APPEND string need to have a leading space. llvm-svn: 254659
* [CMake] set_target_properties doesn't append link flagsChris Bieneman2015-12-031-1/+1
| | | | | | This fixes a bug I introduced in r254643. llvm-svn: 254658
* [CMake] set_target_properties doesn't append link flagsChris Bieneman2015-12-031-3/+3
| | | | | | This fixes a bug introduced in r254627, and another occurance of the same bug in this file. llvm-svn: 254657
* [Analysis] Become aware of MSVC's new/delete functionsDavid Majnemer2015-12-033-2/+114
| | | | | | | | The compiler can take advantage of the allocation/deallocation function's properties. We knew how to do this for Itanium but had no support for MSVC-style functions. llvm-svn: 254656
* raw_ostream: << operator for callables with raw_stream argumentMatthias Braun2015-12-036-140/+89
| | | | | | | | | | | | | | | | | This allows easier construction of print helpers. Example: Printable PrintLaneMask(unsigned LaneMask) { return Printable([LaneMask](raw_ostream &OS) { OS << format("%08X", LaneMask); }); } // Usage: OS << PrintLaneMask(Mask); Differential Revision: http://reviews.llvm.org/D14348 llvm-svn: 254655
* [llvm-objdump] Use report_fatal_error() if we can't find a target.Davide Italiano2015-12-031-8/+2
| | | | llvm-svn: 254654
* [X86] Part 1 to fix x86-64 fp128 calling convention.Chih-Hung Hsieh2015-12-0315-77/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Almost all these changes are conditioned and only apply to the new x86-64 f128 type configuration, which will be enabled in a follow up patch. They are required together to make new f128 work. If there is any error, we should fix or revert them as a whole. These changes should have no impact to current configurations. * Relax type legalization checks to accept new f128 type configuration, whose TypeAction is TypeSoftenFloat, not TypeLegal, but also has TLI.isTypeLegal true. * Relax GetSoftenedFloat to return in some cases f128 type SDValue, which is TLI.isTypeLegal but not "softened" to i128 node. * Allow customized FABS, FNEG, FCOPYSIGN on new f128 type configuration, to generate optimized bitwise operators for libm functions. * Enhance related Lower* functions to handle f128 type. * Enhance DAGTypeLegalizer::run, SoftenFloatResult, and related functions to keep new f128 type in register, and convert f128 operators to library calls. * Fix Combiner, Emitter, Legalizer routines that did not handle f128 type. * Add ExpandConstant to handle i128 constants, ExpandNode to handle ISD::Constant node. * Add one more parameter to getCommonSubClass and firstCommonClass, to guarantee that returned common sub class will contain the specified simple value type. This extra parameter is used by EmitCopyFromReg in InstrEmitter.cpp. * Fix infinite loop in getTypeLegalizationCost when f128 is the value type. * Fix printOperand to handle null operand. * Enhance ISD::BITCAST node to handle f128 constant. * Expand new f128 type for BR_CC, SELECT_CC, SELECT, SETCC nodes. * Enhance X86AsmPrinter to emit f128 values in comments. Differential Revision: http://reviews.llvm.org/D15134 llvm-svn: 254653
* [Hexagon] Adding shuffling resources for HVX instructions and tests for ↵Colin LeMahieu2015-12-0311-7/+1320
| | | | | | instruction encodings. llvm-svn: 254652
* [RuntimeDyld] DenseMap -> std::unordered_mapKeno Fischer2015-12-032-3/+4
| | | | | | | | | | | DenseMap is most applicable when both keys and values are small. In this case, the value violates that assumption, causing quite significant memory overhead. A std::unordered_map is more appropriate in this case (or at least fixed the memory problems I was seeing). Differential Revision: http://reviews.llvm.org/D14910 llvm-svn: 254651
* Fix pass_object_size test on Windows.George Burgess IV2015-12-031-3/+3
| | | | | | | | | The tests were failing because the types of some member functions, when printed, unexpectedly had "__attribute__((thiscall))" at the end. The types in question were relatively unimportant to begin with, so they were removed/replaced with regexes. llvm-svn: 254650
* Fix style by sorting switch-cases.Rui Ueyama2015-12-031-8/+8
| | | | llvm-svn: 254649
* Remove redundant namespace specifiers.Rui Ueyama2015-12-031-5/+4
| | | | llvm-svn: 254648
* Interface to attach maximum function count from PGO to module as module flags.Easwaran Raman2015-12-032-0/+23
| | | | | | | | | | This provides interface to get and set maximum function counts to Module. This would allow things like determination of function hotness. The actual setting of this max function count will have to be done in the frontend. Differential Revision: http://reviews.llvm.org/D15003 llvm-svn: 254647
* Add tests for `&enable_if_function` diagnostics.George Burgess IV2015-12-033-1/+25
| | | | | | | | The introduction of pass_object_size fixed a few bugs related to taking the address of a function with enable_if attributes. This patch adds tests for the cases that were fixed. llvm-svn: 254646
* [X86] Put no-op ADJCALLSTACK markers around all dynamic loweringsReid Kleckner2015-12-034-48/+78
| | | | | | | | | | | | | | | | | Summary: These ADJCALLSTACK markers don't generate code, but they keep dynamic alloca code that calls chkstk out of the prologue. This slightly pessimizes inalloca calls by preventing some register copy coalescing, but I can live with that. Reviewers: qcolombet Subscribers: hans, llvm-commits Differential Revision: http://reviews.llvm.org/D15200 llvm-svn: 254645
* [CMake] Support externalizing debug info on DarwinChris Bieneman2015-12-032-0/+27
| | | | | | | | * Adds COMPILER_RT_EXTERNALIZE_DEBUGINFO option * On Darwin this results in calling dsymutil and strip after linking * This generates an error on non-darwin platforms, matching the LLVM behavior llvm-svn: 254643
* [CMake] Removing an unnecessary layer of variable indirectionChris Bieneman2015-12-031-1/+1
| | | | | | This prevents passthrough variables from having values. llvm-svn: 254642
* [CMake] Removing an unnecessary layer of variable indirectionChris Bieneman2015-12-031-1/+1
| | | | | | This prevents passthrough variables from having values. llvm-svn: 254641
* Move branch folding test to a better location.Andrew Kaylor2015-12-031-1/+0
| | | | llvm-svn: 254640
* [analyzer] Suppress stack address escape on CK_CopyAndAutoreleaseBlockObject.Devin Coughlin2015-12-032-4/+13
| | | | | | | | | | Don't warn about addresses of stack-allocated blocks escaping if the block region was cast with CK_CopyAndAutoreleaseBlockObject. These casts, which are introduced in the implicit conversion operator for lambda-to-block conversions, cause the block to be copied to the heap -- so the warning is spurious. llvm-svn: 254639
* Fix in-memory section loading for JIT-ed code.Oleksiy Vyalov2015-12-031-0/+1
| | | | | | http://reviews.llvm.org/D15172 llvm-svn: 254638
* Replace DYNA_* names with KMP_* namesJonathan Peyton2015-12-035-213/+213
| | | | llvm-svn: 254637
* Fix buildbot failuresAndrew Kaylor2015-12-031-0/+1
| | | | llvm-svn: 254636
* Fixed header determination logic. Was missing extensionless headers in ↵John Thompson2015-12-031-1/+1
| | | | | | coverage check. llvm-svn: 254635
* Update .gitignore to include __pycache__ directories.Zachary Turner2015-12-031-0/+1
| | | | llvm-svn: 254634
* Un XFAIL some tests that are now passing on Windows.Zachary Turner2015-12-032-2/+0
| | | | llvm-svn: 254633
* Add tests for pass_object_size.George Burgess IV2015-12-034-0/+554
| | | | | | | | These additions were meant to go in as a part of r254554; while it's certainly nice to have new functionality, it's nicer if we have tests to go with it. :) llvm-svn: 254632
* Simplify test. NFC.Rafael Espindola2015-12-031-8/+4
| | | | llvm-svn: 254631
* Test commit.Easwaran Raman2015-12-031-2/+2
| | | | | | Remove blank spaces at the end of comments llvm-svn: 254630
* [WinEH] Avoid infinite loop in BranchFolding for multiple single block funcletsAndrew Kaylor2015-12-032-0/+118
| | | | | | Differential Revision: http://reviews.llvm.org/D14996 llvm-svn: 254629
* [CMake] If you're not installing the libcxx library, exclude it from the ↵Chris Bieneman2015-12-031-3/+10
| | | | | | | | "all" target so it doesn't get built when you run "ninja install" This is just a build dependency optimization. Running check-libcxx will still build libcxx and function as expected, it just removes libcxx from the all build and install targets. llvm-svn: 254628
* [CMake] Add option LLVM_EXTERNALIZE_DEBUGINFOChris Bieneman2015-12-032-0/+30
| | | | | | | | | | | | Summary: This adds support for generating dSYM files and stripping debug info from executables and dylibs. It also supports passing -object_path_lto to the linker to generate dSYMs for LTO builds. Reviewers: bogner, friss Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15133 llvm-svn: 254627
* dwarfdump: Correctly indentify the indicies for DWP recordsDavid Blaikie2015-12-032-5/+5
| | | | | | The indicies are one-based, not zero-based, per the spec. llvm-svn: 254626
* [PGO] Introduce error report macro in profile-rtXinliang David Li2015-12-033-3/+21
| | | | | | Also added a test case for runtime error reporting. llvm-svn: 254625
* [ThinLTO] Appending linkage fixesTeresa Johnson2015-12-033-5/+35
| | | | | | | | | | | | | | | | | | | | Summary: Fix import from module with appending var, which cannot be imported. The first fix is to remove an overly-aggressive error check. The second fix is to deal with restructuring introduced to the module linker yesterday in r254418 (actually, this fix was included already in r254559, just added some additional cleanup). Test by Mehdi Amini. Reviewers: joker.eph, rafael Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D15156 llvm-svn: 254624
* [Hexagon] Remove variable unused in NDEBUG buildKrzysztof Parzyszek2015-12-031-3/+2
| | | | llvm-svn: 254623
* Fix Objective-C metadata for properties from class extensions after r251874Nico Weber2015-12-032-7/+57
| | | | | | | | | | | | After, properties from class extensions no longer show up in ObjCInterfaceDecl::properties(). Make ObjCCommonMac::EmitPropertyList() explicitly look for properties in class extensions before looking at direct properties. Also add a test that passes both with clang before r251874 and after this patch (but fails with r251874 and without this patch). llvm-svn: 254622
* AArch64FastISel: Use cbz/cbnz to branch on i1Matthias Braun2015-12-034-80/+32
| | | | | | | | | In the case of a conditional branch without a preceding cmp we used to emit a "and; cmp; b.eq/b.ne" sequence, use tbz/tbnz instead. Differential Revision: http://reviews.llvm.org/D15122 llvm-svn: 254621
* Friendly takeover of the Hexagon backendKrzysztof Parzyszek2015-12-031-4/+4
| | | | llvm-svn: 254620
OpenPOWER on IntegriCloud