summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [IR] Don't call assertModuleIsMaterialized in release buildsCraig Topper2017-01-132-2/+10
| | | | | | | | | | | | | | | | | Summary: To fix a release vs debug build linking error, r259695 made the body of assertModuleIsMaterialized empty if Value.cpp gets compiled in a release build. This way any code compiled as a debug build can still link against a release version of the function. This patch takes this a step farther and removes all calls to it from Value.h in any code that includes it in a relase build. This shrinks the opt binary on my macbook build by 17240 bytes. Reviewers: rafael Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28191 llvm-svn: 291883
* Track validity of pass resultsSerge Pavlov2017-01-1311-17/+67
| | | | | | | | | | | | | | | | | | | | | | | | Running tests with expensive checks enabled exhibits some problems with verification of pass results. First, the pass verification may require results of analysis that are not available. For instance, verification of loop info requires results of dominator tree analysis. A pass may be marked as conserving loop info but does not need to be dependent on DominatorTreePass. When a pass manager tries to verify that loop info is valid, it needs dominator tree, but corresponding analysis may be already destroyed as no user of it remained. Another case is a pass that is skipped. For instance, entities with linkage available_externally do not need code generation and such passes are skipped for them. In this case result verification must also be skipped. To solve these problems this change introduces a special flag to the Pass structure to mark passes that have valid results. If this flag is reset, verifications dependent on the pass result are skipped. Differential Revision: https://reviews.llvm.org/D27190 llvm-svn: 291882
* ProfileSummaryInfo improvements.Easwaran Raman2017-01-134-5/+230
| | | | | | | | | | | * Add is{Hot|Cold}CallSite methods * Fix a bug in isHotBB where it was looking for MD_prof on a return instruction * Use MD_prof data only if sample profiling was used to collect profiles. * Add an unit test to ProfileSummaryInfo Differential Revision: https://reviews.llvm.org/D28584 llvm-svn: 291878
* Revert r291503, "Lift the 10-type limit for AlignedCharArrayUnion", and ↵NAKAMURA Takumi2017-01-132-41/+31
| | | | | | | | | | | | | followings. r291503, "Lift the 10-type limit for AlignedCharArrayUnion" r291514, "Fix MSVC build of AlignedCharArrayUnion" r291515, "Revert the attempt to optimize the constexpr functions. MSVC does not handle this yet" r291519, "Try once again to fix the MSVC build of AlignedCharArrayUnion" They has been failing on i686-linux. llvm-svn: 291875
* [PowerPC] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-01-1310-255/+433
| | | | | | other minor fixes (NFC). llvm-svn: 291872
* Fix buildbots.Greg Clayton2017-01-131-2/+2
| | | | llvm-svn: 291864
* xray-account: Avoid std::errc::bad_message to appease mingw.NAKAMURA Takumi2017-01-131-1/+1
| | | | llvm-svn: 291863
* Move test of lazy BFI with ORE to a generic directoryAdam Nemet2017-01-131-0/+0
| | | | llvm-svn: 291862
* Add the ability to iterate across all attributes in a DIE.Greg Clayton2017-01-136-11/+215
| | | | | | Differential Revision: https://reviews.llvm.org/D28386 llvm-svn: 291861
* [asan] Don't overalign global metadata.Evgeniy Stepanov2017-01-122-12/+13
| | | | | | | | | Other than on COFF with incremental linking, global metadata should not need any extra alignment. Differential Revision: https://reviews.llvm.org/D28628 llvm-svn: 291859
* [asan] Refactor instrumentation of globals.Evgeniy Stepanov2017-01-122-148/+190
| | | | llvm-svn: 291858
* [llvm-pdbdump] Add a compact dump mode.Zachary Turner2017-01-126-35/+174
| | | | | | Differential Revision: https://reviews.llvm.org/D28545 llvm-svn: 291849
* [ThinLTO] Import static functions from the same module as callerTeresa Johnson2017-01-122-9/+38
| | | | | | | | | | | | | | | | | | | | | | | | Summary: We can sometimes end up with multiple copies of a local function that have the same GUID in the index. This happens when there are local functions with the same name that are in different source files with the same name (but in different directories), and they were compiled in their own directory so had the same path at compile time. In this case make sure we import the copy in the caller's module. While it isn't a correctness problem (the renamed reference which is based on the module IR hash will be unique since the module must have had an externally visible function that was imported), importing the wrong copy will result in lost performance opportunity since it won't be referenced and inlined. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28440 llvm-svn: 291841
* Clear the release notes for 5.0.0Hans Wennborg2017-01-121-28/+8
| | | | llvm-svn: 291836
* [ObjectYAML] Pull yaml2dwarf out of yaml2obj for reuseChris Bieneman2017-01-126-37/+63
| | | | | | This patch pulls the yaml2dwarf code out of yaml2obj into a new set of DWARF emitter functions in the DWARFYAML namespace. This will enable the YAML->DWARF code to be used inside DWARF tests by populating the DWARFYAML structs and calling the Emitter functions. llvm-svn: 291828
* Bump trunk version to 5.0.0svnHans Wennborg2017-01-123-6/+6
| | | | llvm-svn: 291815
* [DebugInfo] Remove redundant check in SimplifyCFG; NFC.Robert Lougher2017-01-121-4/+3
| | | | llvm-svn: 291813
* [DebugInfo] Handle same locations in DILocation::getMergedLocationRobert Lougher2017-01-122-13/+52
| | | | | | | | | | | Revision 289661 introduced the function DILocation::getMergedLocation for merging of debug locations. At the time is was simply a stub which always returned no location. This patch modifies getMergedLocation to handle the case where the two locations are the same or can't be discriminated. Differential Revision: https://reviews.llvm.org/D28521 llvm-svn: 291809
* [SCEV] Simplify SolveLinEquationWithOverflow a bit.Eli Friedman2017-01-121-7/+8
| | | | | | Cleanup in preparation for generalizing it. llvm-svn: 291808
* [X86] Replace AND+IMM64 with SRL/SHLNikolai Bozhenov2017-01-124-17/+110
| | | | | | | | | | | | | | | | | | | | | | | Emit SHRQ/SHLQ instead of ANDQ with a 64 bit constant mask if the result is unused and the mask has only higher/lower bits set. For example, with this patch LLVM emits shrq $41, %rdi je instead of movabsq $0xFFFFFE0000000000, %rcx testq %rcx, %rdi je This reduces number of instructions, code size and register pressure. The transformation is applied only for cases where the mask cannot be encoded as an immediate value within TESTQ instruction. Differential Revision: https://reviews.llvm.org/D28198 llvm-svn: 291806
* [X86] Modify BypassSlowDivision tests to match their new names (NFC)Nikolai Bozhenov2017-01-123-102/+47
| | | | | | | | | | | | | | | - bypass-slow-division-32.ll: tests verifying correctness of divl-to-divb bypassing - bypass-slow-division-64.ll: tests verifying correctness of divq-to-divl bypassing - bypass-slow-division-tune.ll: tests verifying that bypassing is enabled only when appropriate Differential Revision: https://reviews.llvm.org/D28551 llvm-svn: 291804
* [llvm-config] Fix obviously wrong code in parsing DyLib components.Marcello Maggioni2017-01-121-1/+1
| | | | | | | | | | | | | | The code parsing the string was using the offset returned from StringRef::find() wrong, assuming it was relative to the staring offset that is passed to the function, but the returned offset is always relative to the beginning of the line. This causes odd behaviour while parsing the component string. Spotted thanks to the newly added test: tools/llvm-config/booleans.test llvm-svn: 291803
* [X86] Rename tests for bypassing slow division (NFC)Nikolai Bozhenov2017-01-123-0/+0
| | | | | | | | | | | | | | | | | | | For tests on bypassing slow division there's no need to be Atom-specific. The patch renames all tests on division bypassing and makes their names more consistent: atom-bypass-slow-division.ll -> bypass-slow-division-32.ll (tests verifying correctness of divl-to-divb bypassing) atom-bypass-slow-division-64.ll -> bypass-slow-division-64.ll (tests verifying correctness of divq-to-divl bypassing) slow-div.ll -> bypass-slow-division-tune.ll (tests verifying that bypassing is enabled only when appropriate) Differential Revision: https://reviews.llvm.org/D28197 llvm-svn: 291802
* [X86] Tune bypassing of slow division for Intel CPUsNikolai Bozhenov2017-01-125-20/+89
| | | | | | | | | | | | | | | | | | 64-bit integer division in Intel CPUs is extremely slow, much slower than 32-bit division. On the other hand, 8-bit and 16-bit divisions aren't any faster. The only important exception is Atom where DIV8 is fastest. Because of that, the patch 1) Enables bypassing of 64-bit division for Atom, Silvermont and all big cores. 2) Modifies 64-bit bypassing to use 32-bit division instead of 16-bit one. This doesn't make the shorter division slower but increases chances of taking it. Moreover, it's much more likely to prove at compile-time that a value fits 32 bits and doesn't require a run-time check (e.g. zext i32 to i64). Differential Revision: https://reviews.llvm.org/D28196 llvm-svn: 291800
* [X86] Update LLC tests for slow division bypassing (NFC)Nikolai Bozhenov2017-01-122-74/+232
| | | | | | | | | | | | Run update_llc_test_checks.py on CodeGen/X86/atom-bypass-slow-division.ll CodeGen/X86/atom-bypass-slow-division-64.ll CodeGen/X86/slow-div.ll Differential Revision: https://reviews.llvm.org/D28469 llvm-svn: 291799
* AMDGPU: Skip fneg/select combine if it can fold into otherMatt Arsenault2017-01-123-29/+199
| | | | llvm-svn: 291792
* AMDGPU: Fold free fneg into sinMatt Arsenault2017-01-122-1/+47
| | | | llvm-svn: 291790
* ARM: slightly more table driven libcall setupSaleem Abdulrasool2017-01-121-26/+59
| | | | | | | | | Switch some additional library call setup to be table driven. This makes it more immediately obvious what the library call looks like. This is important for ARM since the calling conventions for the builtins change based on the target/libcall name. NFC llvm-svn: 291789
* [DebugInfo] DILocation variable declaration should be const; NFC.Robert Lougher2017-01-121-1/+1
| | | | llvm-svn: 291787
* Avoid std::errc::protocol_* to appease mingwHans Wennborg2017-01-123-3/+3
| | | | | | Like r291636 and r285261. llvm-svn: 291786
* [DebugInfo] Add const to DILocation variable declaration; NFC.Robert Lougher2017-01-121-1/+1
| | | | llvm-svn: 291785
* AMDGPU: Fold fneg into fmul_legacyMatt Arsenault2017-01-122-2/+183
| | | | llvm-svn: 291784
* Bump year to 2017 in LICENSE.txtHans Wennborg2017-01-121-1/+1
| | | | llvm-svn: 291782
* AMDGPU: Fold fneg into rcpMatt Arsenault2017-01-122-1/+107
| | | | llvm-svn: 291779
* AMDGPU: Fold fneg into fp_roundMatt Arsenault2017-01-122-2/+190
| | | | llvm-svn: 291778
* AMDGPU: Fold fneg into fp_extendMatt Arsenault2017-01-122-0/+140
| | | | llvm-svn: 291777
* Fix some -Wsign-compare warnings by making some integer literals explicitly ↵David Blaikie2017-01-121-3/+3
| | | | | | unsigned llvm-svn: 291776
* TTI: Add comment clarifying the meaning of MemIntrinsicInfo::PtrVal.Chad Rosier2017-01-121-0/+5
| | | | | | | Patch by Tom Stellard. Differential Revision: https://reviews.llvm.org/D27563 llvm-svn: 291772
* [globalisel] Move as much RegisterBank initialization to the constructor as ↵Daniel Sanders2017-01-127-42/+31
| | | | | | | | | | | | | | | | | | | | | possible Summary: The register bank is now entirely initialized in the constructor. However, we still have the hardcoded number of register classes which will be dealt with in the TableGen patch (D27338) since we do not have access to this information to resolve this at this stage. The number of register classes is known to the TRI and to TableGen but the RegisterBank constructor is too early for the former and too late for the latter. This will be fixed when the data is tablegen-erated. Reviewers: t.p.northover, ab, rovka, qcolombet Subscribers: aditya_nandakumar, kristof.beyls, vkalintiris, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D27809 llvm-svn: 291770
* [DebugInfo] Added DI macro creation API to DIBuilder.Amjad Aboud2017-01-123-0/+140
| | | | | | Differential Revision: https://reviews.llvm.org/D16077 llvm-svn: 291769
* [globalisel] Initialize RegisterBanks with static data.Daniel Sanders2017-01-126-142/+164
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Refactor the RegisterBank initialization to use static data. This requires GlobalISel implementations to rewrite calls to createRegisterBank() and addRegBankCoverage() into a call to setRegBankData(). Out of tree targets can use diff 4 of D27807 (https://reviews.llvm.org/D27807?id=84117) to have addRegBankCoverage() dump the register classes and other data that needs to be provided to setRegBankData(). This is the method that was used to generate the static data in this patch. Tablegen-eration of this static data will follow after some refactoring. Reviewers: t.p.northover, ab, rovka, qcolombet Subscribers: aditya_nandakumar, kristof.beyls, vkalintiris, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D27807 Differential Revision: https://reviews.llvm.org/D27808 llvm-svn: 291768
* [Devirtualization] MemDep returns non-local !invariant.group dependenciesPiotr Padlewski2017-01-126-21/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Memory Dependence Analysis was limited to return only local dependencies for invariant.group handling. Now it returns NonLocal when it finds it and then by asking getNonLocalPointerDependency we get found dep. Thanks to this we are able to devirtualize loops! void indirect(A &a, int n) { for (int i = 0 ; i < n; i++) a.foo(); } void test(int n) { A a; indirect(a); } After inlining a.foo() will be changed to direct call, even if foo and A::A() is external (but only if vtable definition is be available). Reviewers: nlewycky, dberlin, chandlerc, rsmith Subscribers: mehdi_amini, davide, llvm-commits Differential Revision: https://reviews.llvm.org/D28137 llvm-svn: 291762
* Wdocumentation fixSimon Pilgrim2017-01-121-1/+1
| | | | llvm-svn: 291761
* Fix windows buildbots building llvm-xraySimon Pilgrim2017-01-122-8/+13
| | | | | | | | | | 2 issues: 1 - replaced unix-style pid_t with cross-platform llvm::sys::ProcessInfo::ProcessId 2 - fixed shadow variable warning in lambda expression Reviewed by @filcab llvm-svn: 291760
* [XRay] Include <numeric> for std::accumulate.Dean Michael Berris2017-01-121-0/+1
| | | | | | Fix-up following D24377. llvm-svn: 291750
* [XRay] Implement the `llvm-xray account` subcommandDean Michael Berris2017-01-129-0/+860
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the third of a multi-part change to implement subcommands for the `llvm-xray` tool. Here we define the `account` subcommand which does simple function call accounting, generating basic statistics on function calls we find in an XRay log/trace. We support text output and csv output for this subcommand. This change also supports sorting, summing, and filtering the top N results. Part of this tool will later be turned into a library that could be used for basic function call accounting. Depends on D24376. Reviewers: dblaikie, echristo Subscribers: mehdi_amini, dberris, beanz, llvm-commits Differential Revision: https://reviews.llvm.org/D24377 llvm-svn: 291749
* AMDGPU: Fix sub_oneuse being marked commutativeMatt Arsenault2017-01-121-1/+2
| | | | llvm-svn: 291748
* [AVX-512] Improve lowering of zero_extend of v4i1 to v4i32 and v2i1 to v2i64 ↵Craig Topper2017-01-122-157/+46
| | | | | | with VLX, but no DQ or BW support. llvm-svn: 291747
* [AVX-512] Improve lowering of sign_extend of v4i1 to v4i32 and v2i1 to v2i64 ↵Craig Topper2017-01-122-154/+73
| | | | | | when avx512vl is available, but not avx512dq. llvm-svn: 291746
* [X86][AVX512] Fix PR31515 - Do not flip vselect condition if it's not a vXi1 ↵Elad Cohen2017-01-122-5/+27
| | | | | | | | | | | | | | | mask r289653 added a case where `vselect <cond> <vector1> <all-zeros>` is transformed to: `vselect xor(cond, DAG.getConstant(1, DL, CondVT) <all-zeros> <vector1>` This was not aimed to catch cases where Cond is not a vXi1 mask but it does. Moreover, when Cond type is VxiN (N > 1) then xor(cond, DAG.getConstant(1, DL, CondVT) != NOT(cond). This patch changes the above to xor with allones, and avoids entering the case for non-mask Conds. llvm-svn: 291745
OpenPOWER on IntegriCloud