summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [lsan] [aarch64] Fix calculating TLS areaStrahinja Petrovic2016-09-281-1/+4
| | | | | | | This patch fixes calculating begin of TLS area on AARCH64. Differential Revision: https://reviews.llvm.org/D24454 llvm-svn: 282571
* [SystemZ] Implementation of getUnrollingPreferences().Jonas Paulsson2016-09-284-6/+64
| | | | | | | | | | | | | | This commit enables more unrolling for SystemZ by implementing the SystemZTargetTransformInfo::getUnrollingPreferences() method. It has been found that it is better to only unroll moderately, so the DefaultUnrollRuntimeCount has been moved into UnrollingPreferences in order to set this to a lower value for SystemZ (4). Reviewers: Evgeny Stupachenko, Ulrich Weigand. https://reviews.llvm.org/D24451 llvm-svn: 282570
* [Headers] Replace stray indentation with tabs with spaces. NFC.Martin Storsjo2016-09-281-9/+9
| | | | | | This matches the rest of the surrounding file. llvm-svn: 282569
* [ELF] Ignore sections flagged with SHF_EXCLUDEEugene Leviant2016-09-282-0/+17
| | | | | | Differential revision: https://reviews.llvm.org/D24966 llvm-svn: 282568
* [DAG] Remove isVectorClearMaskLegal() check from vector_build dagcombineMichael Kuperstein2016-09-283-11/+4
| | | | | | | | | | | | This check currently doesn't seem to do anything useful on any in-tree target: On non-x86, it always evaluates to false, so we never hit the code path that creates the shuffle with zero. On x86, it just forwards to isShuffleMaskLegal(), which is a reasonable thing to query in general, but doesn't make sense if only restricted to zero blends. Differential Revision: https://reviews.llvm.org/D24625 llvm-svn: 282567
* Reverting r282565.Jason Molenda2016-09-2810-1691/+1197
| | | | | | | | | | A testbot found a regression introduced in the testsuite with the changes in r282565 on Ubuntu (TestStepNoDebug.ReturnValueTestCase). I'll get this set up on an ubuntu box and figure out what is happening there -- likely a problem with the eh_frame augmentation, which isn't used on macosx. llvm-svn: 282566
* Refactor the x86 UnwindAssembly class into a separate class calledJason Molenda2016-09-2810-1197/+1691
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | x86AssemblyInspectionEngine and the current UnwindAssembly_x86 to allow for the core engine to be exercised by unit tests. The UnwindAssembly_x86 class will have access to Targets, Processes, Threads, RegisterContexts -- it will be working in the full lldb environment. x86AssemblyInspectionEngine is layered away from all of that, it is given some register definitions and a bag of bytes to profile. I wrote an initial unittest for a do-nothing simple x86_64/i386 function to start with. I'll be adding more. The x86 assembly unwinder was added to lldb early in its bringup; I made some modernization changes as I was refactoring the code to make it more consistent with how we write lldb today. I also added RegisterContextMinidump_x86_64.cpp to the xcode project file so I can run the unittests from that. The testsuite passes with this change, but there was quite a bit of code change by the refactoring and it's possible there are some issues. I'll be testing this more in the coming days, but it looks like it is behaving correctly as far as I can tell with automated testing. <rdar://problem/28509178> llvm-svn: 282565
* Revert r282556. This change made several bots unhappy.Richard Smith2016-09-289-120/+54
| | | | llvm-svn: 282564
* [LTO] Mark member function as const to fix compiler errors.Davide Italiano2016-09-281-1/+1
| | | | llvm-svn: 282563
* [libFuzzer] speedup TracePC::FinalizeTraceKostya Serebryany2016-09-282-15/+22
| | | | llvm-svn: 282562
* [LAA] Rename emitAnalysis to recordAnalys. NFCAdam Nemet2016-09-282-24/+26
| | | | | | | | | Ever since LAA was split out into an analysis on its own, this function stopped emitting the report directly. Instead it stores it to be retrieved by the client which can then emit it as its own report (e.g. -Rpass-analysis=loop-vectorize). llvm-svn: 282561
* [ELF] Use MaxPageSize for aligning PT_LOADPetr Hosek2016-09-287-20/+19
| | | | | | | | | | | | This matches the behavior of Binutils linkers. We also change the default MaxPageSize on x86-64 to 0x1000 to preserver the current behavior, which is the same as the behavior implemented by gold. https://llvm.org/bugs/show_bug.cgi?id=30541 Differential Revision: https://reviews.llvm.org/D24987 llvm-svn: 282560
* [Inliner] Port all opt remarks to new streaming APIAdam Nemet2016-09-275-36/+170
| | | | llvm-svn: 282559
* Pass -S to opt in this test to avoid printing binary on mismatchAdam Nemet2016-09-271-1/+1
| | | | | | The purpose of the test is to verify diagnostics. llvm-svn: 282558
* Put new warning in a diagnostic group.Matthias Braun2016-09-272-3/+3
| | | | | | The warning I added in r282426 should be a diagnostic group. llvm-svn: 282557
* P0145R3 (C++17 evaluation order tweaks): evaluate the right-hand side ofRichard Smith2016-09-279-54/+120
| | | | | | | | | | | | | assignment and compound-assignment operators before the left-hand side. (Even if it's an overloaded operator.) This completes the implementation of P0145R3 + P0400R0 for all targets except Windows, where the evaluation order guarantees for <<, >>, and ->* are unimplementable as the ABI requires the function arguments are evaluated from right to left (because parameter destructors are run from left to right in the callee). llvm-svn: 282556
* Revert r282547 and add test to show correct behavior.Richard Trieu2016-09-272-27/+30
| | | | llvm-svn: 282555
* [Coverage] The coverage region for switch covers the code after the switch.Alex Lorenz2016-09-273-14/+18
| | | | | | | | | | | | | | This patch fixes a regression introduced in r262697 that changed the way the coverage regions for switches are constructed. The PGO instrumentation counter for a switch statement refers to the counter at the exit of the switch. Therefore, the coverage region for the switch statement should cover the code that comes after the switch, and not the switch statement itself. rdar://28480997 Differential Revision: https://reviews.llvm.org/D24981 llvm-svn: 282554
* Next set of additional error checks for invalid Mach-O files for theKevin Enderby2016-09-275-0/+47
| | | | | | | | | | other load commands that use the MachO::dylinker_command type but not used in llvm libObject code but used in llvm tool code. This includes LC_ID_DYLINKER, LC_LOAD_DYLINKER and LC_DYLD_ENVIRONMENT load commands. llvm-svn: 282553
* [CMake] Force CMP0057 to NEWChris Bieneman2016-09-271-0/+4
| | | | | | Hans reported an issue with r282510 on the list. This should resolve the issue. llvm-svn: 282552
* [LTO] Add an API to check if a symbol is a TLS one.Davide Italiano2016-09-271-0/+4
| | | | | | Will be used in lld. llvm-svn: 282551
* [AArch64][RegisterBankInfo] Switch to statically allocated ValueMapping.Quentin Colombet2016-09-272-10/+24
| | | | | | | | Another step toward TableGen'ed like structure for the RegisterBankInfo of AArch64. By doing this, we also save a bit of compile time for the exact same output. llvm-svn: 282550
* [AArch64][RegisterBankInfo] Fix copy/paste in comments.Quentin Colombet2016-09-271-3/+3
| | | | | | NFC. llvm-svn: 282549
* [sanitizer_common] Delete some copy/move methods in InternalScopedBufferVedant Kumar2016-09-271-8/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D24811 llvm-svn: 282548
* Fix defaulted member functions for templated classes.Richard Trieu2016-09-272-6/+30
| | | | | | | | | | In some cases, non-special member functions were being marked as being defaulted in templated classes. This can cause interactions with later code that expects the default function to be one of the specific member functions. Fix the check so that templated class members are checked the same way as non-templated class members are. llvm-svn: 282547
* [x86] add folds for FP logic with vector zerosSanjay Patel2016-09-272-23/+36
| | | | | | | | | | | | The 'or' case shows up in copysign. The copysign code also had redundant checking for a scalar zero operand with 'and', so I removed that. I'm not sure how to test vector 'and', 'andn', and 'xor' yet, but it seems better to just include all of the logic ops since we're fixing 'or' anyway. llvm-svn: 282546
* Shorten DiagnosticInfoOptimizationRemark* to OptimizationRemark*. NFCAdam Nemet2016-09-271-21/+15
| | | | | | | With the new streaming interface in LLVM, these class names need to be typed a lot and it's way too looong. llvm-svn: 282545
* Shorten DiagnosticInfoOptimizationRemark* to OptimizationRemark*. NFCAdam Nemet2016-09-277-70/+55
| | | | | | | With the new streaming interface, these class names need to be typed a lot and it's way too looong. llvm-svn: 282544
* [TargetRegisterInfo, AArch64] Add target hook for isConstantPhysReg().Geoff Berry2016-09-275-1/+62
| | | | | | | | | | | | | | | | | | | Summary: The current implementation of isConstantPhysReg() checks for defs of physical registers to determine if they are constant. Some architectures (e.g. AArch64 XZR/WZR) have registers that are constant and may be used as destinations to indicate the generated value is discarded, preventing isConstantPhysReg() from returning true. This change adds a TargetRegisterInfo hook that overrides the no defs check for cases such as this. Reviewers: MatzeB, qcolombet, t.p.northover, jmolloy Subscribers: junbuml, aemerson, mcrosier, rengolin Differential Revision: https://reviews.llvm.org/D24570 llvm-svn: 282543
* [Inliner] Fold the analysis remark into the missed remarkAdam Nemet2016-09-273-14/+12
| | | | | | | | | | | | | | | There is really no reason for these to be separate. The vectorizer started this pretty bad tradition that the text of the missed remarks is pretty meaningless, i.e. vectorization failed. There, you have to query analysis to get the full picture. I think we should just explain the reason for missing the optimization in the missed remark when possible. Analysis remarks should provide information that the pass gathers regardless whether the optimization is passing or not. llvm-svn: 282542
* [LoopSimplify] When simplifying phis in loop-simplify, do it only if it ↵Michael Zolotukhin2016-09-272-2/+41
| | | | | | preserves LCSSA form. llvm-svn: 282541
* Adapt to LLVM optimization remark interface change. NFCAdam Nemet2016-09-271-1/+1
| | | | llvm-svn: 282540
* Output optimization remarks in YAMLAdam Nemet2016-09-2710-10/+339
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Re-committed after moving the template specialization under the yaml namespace. GCC was complaining about this.) This allows various presentation of this data using an external tool. This was first recommended here[1]. As an example, consider this module: 1 int foo(); 2 int bar(); 3 4 int baz() { 5 return foo() + bar(); 6 } The inliner generates these missed-optimization remarks today (the hotness information is pulled from PGO): remark: /tmp/s.c:5:10: foo will not be inlined into baz (hotness: 30) remark: /tmp/s.c:5:18: bar will not be inlined into baz (hotness: 30) Now with -pass-remarks-output=<yaml-file>, we generate this YAML file: --- !Missed Pass: inline Name: NotInlined DebugLoc: { File: /tmp/s.c, Line: 5, Column: 10 } Function: baz Hotness: 30 Args: - Callee: foo - String: will not be inlined into - Caller: baz ... --- !Missed Pass: inline Name: NotInlined DebugLoc: { File: /tmp/s.c, Line: 5, Column: 18 } Function: baz Hotness: 30 Args: - Callee: bar - String: will not be inlined into - Caller: baz ... This is a summary of the high-level decisions: * There is a new streaming interface to emit optimization remarks. E.g. for the inliner remark above: ORE.emit(DiagnosticInfoOptimizationRemarkMissed( DEBUG_TYPE, "NotInlined", &I) << NV("Callee", Callee) << " will not be inlined into " << NV("Caller", CS.getCaller()) << setIsVerbose()); NV stands for named value and allows the YAML client to process a remark using its name (NotInlined) and the named arguments (Callee and Caller) without parsing the text of the message. Subsequent patches will update ORE users to use the new streaming API. * I am using YAML I/O for writing the YAML file. YAML I/O requires you to specify reading and writing at once but reading is highly non-trivial for some of the more complex LLVM types. Since it's not clear that we (ever) want to use LLVM to parse this YAML file, the code supports and asserts that we're writing only. On the other hand, I did experiment that the class hierarchy starting at DiagnosticInfoOptimizationBase can be mapped back from YAML generated here (see D24479). * The YAML stream is stored in the LLVM context. * In the example, we can probably further specify the IR value used, i.e. print "Function" rather than "Value". * As before hotness is computed in the analysis pass instead of DiganosticInfo. This avoids the layering problem since BFI is in Analysis while DiagnosticInfo is in IR. [1] https://reviews.llvm.org/D19678#419445 Differential Revision: https://reviews.llvm.org/D24587 llvm-svn: 282539
* Sort headersAdam Nemet2016-09-271-1/+1
| | | | llvm-svn: 282538
* Update FileSpec's interface to use StringRefs.Zachary Turner2016-09-272-148/+110
| | | | | | Differential Revision: https://reviews.llvm.org/D24936 llvm-svn: 282537
* [cmake] Support overriding remaining HTML doc install directoriesMichal Gorny2016-09-273-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | Support overriding the Doxygen & OCamldoc install directories, and provide a more FHS-compliant defaults for both of them. This extends r282240 that added this override for Sphinx-built documentation. LLVM_INSTALL_DOXYGEN_HTML_DIR and LLVM_INSTALL_OCAMLDOC_HTML_DIR are added, to control the location where Doxygen-generated and OCamldoc-generated HTML docs are installed appropriately. They both specify CMake-style install paths, and therefore can either by relative to the install prefix or absolute. The new defaults are subdirectories of share/doc/llvm, and replace the previous directories of 'docs/html' and 'docs/ocaml/html' that resulted in creating invalid '/usr/docs' that furthermore lacked proper namespacing for the LLVM package. The new defaults are consistent with the ones used for Sphinx HTML documentation, differing only in the last component. Since the 'html' subdirectory is already used for Sphinx docs, the 'doxygen-html' and 'ocaml-html' directories are used instead. Differential Revision: https://reviews.llvm.org/D24935 llvm-svn: 282536
* Fix a typo, depricated -> deprecatedMartin Storsjo2016-09-272-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D22849 llvm-svn: 282534
* Adapt to LLVM EnableStatistics() change.Matthias Braun2016-09-272-2/+2
| | | | llvm-svn: 282533
* Statistic: Bring back printing on exit by defaultMatthias Braun2016-09-272-3/+5
| | | | | | | | Turns out several external projects relied on llvm printing statistics on exit. Let's go back to this behaviour by default and have an optional parameter to disable it. llvm-svn: 282532
* [COFF] Add support for IMAGE_REL_ARM_SECRELMartin Storsjo2016-09-272-1/+6
| | | | | | | | | Handle this in the exact same way as IMAGE_REL_AMD64_SECREL and IMAGE_REL_I386_SECREL. Differential revision: https://reviews.llvm.org/D24608 llvm-svn: 282531
* builtins: use thumb-2 if possible on comparesf2Saleem Abdulrasool2016-09-271-0/+3
| | | | | | | This code can be built with thumb-2 like many of the other builtin routines. Enable that here as well. llvm-svn: 282530
* Adding a RegisterContextMinidump_x86_64 converterDimitar Vlahovski2016-09-277-6/+357
| | | | | | | | | | | | | | | | | | Summary: This is a register context converter from Minidump to Linux reg context. This knows the layout of the register context in the Minidump file (which is the same as in Windows FYI) and as a result emits a binary data buffer that matches the Linux register context binary layout. This way we can reuse the existing RegisterContextLinux_x86_64 and RegisterContextCorePOSIX_x86_64 classes. Reviewers: labath, zturner Subscribers: beanz, mgorny, lldb-commits, amccarth Differential Revision: https://reviews.llvm.org/D24919 llvm-svn: 282529
* [lit] Add instructions to run lit's test suiteDaniel Dunbar2016-09-271-0/+16
| | | | | | | | - Patch by Brian Gesiak. - https://reviews.llvm.org/D24968 llvm-svn: 282525
* Revert r282483 - [cmake] Add linker option "-Wl,-z,defs" in standalone buildMichal Gorny2016-09-271-12/+0
| | | | | | | | | Revert r282483 as it causes build failures due to missing symbols when not linking to -lgcc_s (i.e. doing pure LLVM stack build). The patch can be reintroduced when the build system is fixed to add all needed libraries (libunwind, compiler-rt). llvm-svn: 282524
* [llvm-cxxfilt] Use llvm::outs(). Simplify.Davide Italiano2016-09-272-5/+3
| | | | | | | This adds a dependency on Support/. As llvm-cxxfilt will grow support for options this will be needed anyway. llvm-svn: 282523
* [x86] use isNullFPConstant(); NFCISanjay Patel2016-09-271-40/+35
| | | | | | Also, put the related FP logic functions together to see the similarities. llvm-svn: 282522
* [DebugInfo] Add comments to phi dbg.value tracking code, NFCReid Kleckner2016-09-271-6/+8
| | | | | | | | | | | | LLVM developers might be surprised to learn that there are blocks without valid insertion points (catchswitch), so it seems worth calling that out explicitly. Also add a FIXME about what we should really be doing if we ever need to make optimized Windows EH code debuggable. While I'm here, make auto usage more consistent with LLVM standards and avoid an unecessary call to insertBefore. llvm-svn: 282521
* [RDF] Add "dead" flag to node attributesKrzysztof Parzyszek2016-09-273-14/+48
| | | | llvm-svn: 282520
* [RDF] Special treatment of exception handling registersKrzysztof Parzyszek2016-09-272-3/+65
| | | | | | | | | | | | A landing pad can have live-in registers that are defined by the runtime, not the program (exception pointer register and exception selector register). Make sure to recognize that case and not link these registers with any defs in the program. Each landing pad will have phi nodes added at the beginning to provide definitions of these registers, but the uses of those phi nodes will not have any reaching defs. llvm-svn: 282519
* Improve CMake output of host and target tripleChris Bieneman2016-09-272-1/+2
| | | | | | | | | | | | | | | | | Summary: The previous output was confusing as it would output "Taget triple: x86_64-unknown-linux-gnu" even when LLVM_HOST_TRIPLE or LLVM_DEFAULT_TARGET_TRIPLE were set on the CMake command line Patch by: Alex Richardson! Reviewers: beanz Subscribers: Eugene.Zelenko Differential Revision: https://reviews.llvm.org/D17067 llvm-svn: 282516
OpenPOWER on IntegriCloud