summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* [PM] Fix a bug where we didn't properly clear the list map when the listChandler Carruth2014-04-21
| | | | | | | | | | became empty. This would manifest later as an assert failure due to a non-empty list map but an empty result map. This doesn't easily manifest with just the module pass manager and the function pass manager, but the next commit will add the CGSCC pass manager that hits this assert immediately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206744 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm/test/CodeGen/X86/bmi.ll: Relax expressions for targeting win32.NAKAMURA Takumi2014-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206743 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] temporary disable generating __asan_loadN/__asan_storeNKostya Serebryany2014-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206741 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replace OwningPtr with std::unique_ptr in places where it doesn't ↵Benjamin Kramer2014-04-21
| | | | | | | | break the API. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206740 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Wire the analysis passes (such as they are) into the registry, andChandler Carruth2014-04-21
| | | | | | teach the opt driver to use it rather than a manual list. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206739 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] ISEL (and X, <constant mask>) to BZHI when BMI2 is available.Lang Hames2014-04-21
| | | | | | | | | | | | Generating BZHI in the variable mask case, i.e. (and X, (sub (shl 1, N), 1)), was already supported, but we were missing the constant-mask case. This patch fixes that. <rdar://problem/15480077> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206738 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Add a nice low-tech registry of passes as a boring macro expansionChandler Carruth2014-04-21
| | | | | | | | file. This will make it easy to scale up the number of passes supported. Currently, it just supports the function and module transformation passes that were already supported in the opt tool explicitly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206737 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r206732 which is causing llc to crash on most of the build bots.Chandler Carruth2014-04-21
| | | | | | | | Original commit message: Implement builtins for safe division: safe.sdiv.iN, safe.udiv.iN, safe.srem.iN, safe.urem.iN (iN = i8, i61, i32, or i64). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206735 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] insert __asan_loadN/__asan_storeN as out-lined asan checks, llvm partKostya Serebryany2014-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206734 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement builtins for safe division: safe.sdiv.iN, safe.udiv.iN, safe.srem.iN,Michael Zolotukhin2014-04-21
| | | | | | | | safe.urem.iN (iN = i8, i16, i32, or i64). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206732 91177308-0d34-0410-b5e6-96231b3b80d8
* [LCG] Add some basic debug output to the LCG pass.Chandler Carruth2014-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206730 91177308-0d34-0410-b5e6-96231b3b80d8
* Protect the ArgList dtorDavid Blaikie2014-04-20
| | | | | | | | | | | | | It could even be made non-virtual if it weren't for bad compiler warnings. This demonstrates that ArgList objects aren't destroyed polymorphically and possibly that they aren't even used polymorphically. If that's the case, it might be possible to refactor the two ArgList types more separately and simplify the Arg ownership model. *continues experimenting* git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206727 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing #include found by modules build.Richard Smith2014-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206726 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove comment that hasn't been true for 5 yearsDavid Blaikie2014-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206725 91177308-0d34-0410-b5e6-96231b3b80d8
* Use unique_ptr to handle ownership of synthesized args in DerivedArgListDavid Blaikie2014-04-20
| | | | | | | | This might be able to be simplified further by using Arg as a value type in a linked list (to maintain pointer validity), but here's something simple to start with. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206724 91177308-0d34-0410-b5e6-96231b3b80d8
* C++ has a bool type! (And C's had one too, for 15 years...)Richard Smith2014-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206723 91177308-0d34-0410-b5e6-96231b3b80d8
* More C++ification.Richard Smith2014-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206722 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some more C junk from these files.Richard Smith2014-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206721 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't provide two different definitions of ModRMDecision, OpcodeDecision, ↵Richard Smith2014-04-20
| | | | | | and ContextDecision in different source files (depending on #define magic). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206720 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't define llvm::X86Disassembler::InstructionSpecifier in different ways inRichard Smith2014-04-20
| | | | | | | different source files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206719 91177308-0d34-0410-b5e6-96231b3b80d8
* Maybe if I touch this file the buildbots will actually rerun configure like ↵Richard Smith2014-04-20
| | | | | | they need to... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206718 91177308-0d34-0410-b5e6-96231b3b80d8
* What year is it! This file has no reason to be written in C, and has doubly noRichard Smith2014-04-20
| | | | | | | | | | | reason to expose a global symbol 'decodeInstruction' nor to pollute the global scope with a bunch of external linkage entities (some of which conflict with others elsewhere in LLVM). This is just the initial transition to C++; more cleanups to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206717 91177308-0d34-0410-b5e6-96231b3b80d8
* [Mips] Add more special values for the st_other field in the symbolSimon Atanasyan2014-04-20
| | | | | | table entry for MIPS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206716 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Range-based loop simplification.Simon Atanasyan2014-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206715 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix redefinition of default argument, found by modules build. It's notRichard Smith2014-04-20
| | | | | | | | | | entirely clear whether this should be valid with modules enabled, but the fixed code is cleaner regardless. Also fix a TU-local type that accidentally had external linkage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206714 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some empty statementsAlp Toker2014-04-19
| | | | | | Cleanup only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206710 91177308-0d34-0410-b5e6-96231b3b80d8
* ProfileData: Remove an extra semicolonJustin Bogner2014-04-19
| | | | | | Spotted by Nick Lewycky in review, thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206708 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "blockfreq: Rewrite BlockFrequencyInfoImpl"Duncan P. N. Exon Smith2014-04-19
| | | | | | This reverts commit r206704, as expected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206707 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "blockfreq: Temporarily turn on -debug-only=block-freq"Duncan P. N. Exon Smith2014-04-19
| | | | | | This reverts commit r206705, as planned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206706 91177308-0d34-0410-b5e6-96231b3b80d8
* blockfreq: Temporarily turn on -debug-only=block-freqDuncan P. N. Exon Smith2014-04-19
| | | | | | | | | | | These tests fail after my BlockFrequencyInfo rewrite on two buildbots [1][2]. I can't reproduce it locally, so I'm temporarily turning on -debug-only=block-freq so I can find the problem. [1]: http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/1860 [2]: http://llvm-amd64.freebsd.your.org/b/builders/clang-i386-freebsd/builds/18477 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206705 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply "blockfreq: Rewrite BlockFrequencyInfoImpl"Duncan P. N. Exon Smith2014-04-19
| | | | | | | | | | | | | | | | | | | | | This reverts commit r206677, reapplying my BlockFrequencyInfo rewrite. I've done a careful audit, added some asserts, and fixed a couple of bugs (unfortunately, they were in unlikely code paths). There's a small chance that this will appease the failing bots [1][2]. (If so, great!) If not, I have a follow-up commit ready that will temporarily add -debug-only=block-freq to the two failing tests, allowing me to compare the code path between what the failing bots and what my machines (and the rest of the bots) are doing. Once I've triggered those builds, I'll revert both commits so the bots go green again. [1]: http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/1816 [2]: http://llvm-amd64.freebsd.your.org/b/builders/clang-i386-freebsd/builds/18445 <rdar://problem/14292693> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206704 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch by Vadim ChugunovYaron Keren2014-04-19
| | | | | | | | | | | | | Win64 stack unwinder gets confused when execution flow "falls through" after a call to 'noreturn' function. This fixes the "missing epilogue" problem by emitting a trap instruction for IR 'unreachable' on x86_x64-pc-windows. A secondary use for it would be for anyone wanting to make double-sure that 'noreturn' functions, indeed, do not return. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206684 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch by Ray Donnelly to print register names instead of numbers.Yaron Keren2014-04-19
| | | | | | | | http://reviews.llvm.org/D3422 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206683 91177308-0d34-0410-b5e6-96231b3b80d8
* Add parens to appease GCC warning.David Blaikie2014-04-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206678 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "blockfreq: Rewrite BlockFrequencyInfoImpl" (#2)Duncan P. N. Exon Smith2014-04-19
| | | | | | | | | | | This reverts commit r206666, as planned. Still stumped on why the bots are failing. Sanitizer bots haven't turned anything up. If anyone can help me debug either of the failures (referenced in r206666) I'll owe them a beer. (In the meantime, I'll be auditing my patch for undefined behaviour.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206677 91177308-0d34-0410-b5e6-96231b3b80d8
* OnDiskHashTable: Audit types and use offset_type consistentlyJustin Bogner2014-04-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206675 91177308-0d34-0410-b5e6-96231b3b80d8
* ProfileData: Avoid UB when readingJustin Bogner2014-04-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206674 91177308-0d34-0410-b5e6-96231b3b80d8
* OnDiskHashTable: Fix a think-o with offset_typeJustin Bogner2014-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206672 91177308-0d34-0410-b5e6-96231b3b80d8
* Check whether functions have any lines associated before emitting coverage ↵Nick Lewycky2014-04-18
| | | | | | info for them. This isn't just a size/time saving, gcov may crash on these. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206671 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-profdata: Avoid writing to /dev/null in testsJustin Bogner2014-04-18
| | | | | | | We fseek on our output file in llvm-profdata, which errors on some systems. Avoid getting into the situation by writing to /dev/null git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206670 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the ARM assembler to require a :lower16: or :upper16 on non-constantKevin Enderby2014-04-18
| | | | | | | | | | | | | | | | | | | | | | | expressions for mov instructions instead of silently truncating by default. For the ARM assembler, we want to avoid misleadingly allowing something like "mov r0, <symbol>" especially when we turn it into a movw and the expression <symbol> does not have a :lower16: or :upper16" as part of the expression. We don't want the behavior of silently truncating, which can be unexpected and lead to bugs that are difficult to find since this is an easy mistake to make. This does change the previous behavior of llvm but actually matches an older gnu assembler that would not allow this but print less useful errors of like “invalid constant (0x927c0) after fixup” and “unsupported relocation on symbol foo”. The error for llvm is "immediate expression for mov requires :lower16: or :upper16" with correct location information on the operand as shown in the added test cases. rdar://12342160 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206669 91177308-0d34-0410-b5e6-96231b3b80d8
* test: Add extra run lines to investigate an error on the botsJustin Bogner2014-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206668 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply "blockfreq: Rewrite BlockFrequencyInfoImpl" (#2)Duncan P. N. Exon Smith2014-04-18
| | | | | | | | | | | | | | | | | | | This reverts commit r206628, reapplying r206622 (and r206626). Two tests are failing only on buildbots [1][2]: i.e., I can't reproduce on Darwin, and Chandler can't reproduce on Linux. Asan and valgrind don't tell us anything, but we're hoping the msan bot will catch it. So, I'm applying this again to get more feedback from the bots. I'll leave it in long enough to trigger builds in at least the sanitizer buildbots (it was failing for reasons unrelated to my commit last time it was in), and hopefully a few others.... and then I expect to revert a third time. [1]: http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/1816 [2]: http://llvm-amd64.freebsd.your.org/b/builders/clang-i386-freebsd/builds/18445 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206666 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-symbolizer] Print file/line for a PC even if there is no DIE ↵Alexey Samsonov2014-04-18
| | | | | | | | | | | | describing it. This is important for symbolizing executables with debug info in unavailable .dwo files. Even if all DIE entries are missing, we can still symbolize an address: function name can be fetched from symbol table, and file/line info can be fetched from line table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206665 91177308-0d34-0410-b5e6-96231b3b80d8
* ProfileData: Don't forward declare ComputeHash and make it static inlineJustin Bogner2014-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206663 91177308-0d34-0410-b5e6-96231b3b80d8
* Compress debug sections only when beneficial.David Blaikie2014-04-18
| | | | | | | | | Both ZLIB and the debug info compressed section header ("ZLIB" + the size of the uncompressed data) take some constant overhead so in some cases the compressed data is actually larger than the uncompressed data. In these cases, just don't compress or rename the section at all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206659 91177308-0d34-0410-b5e6-96231b3b80d8
* ProfileData: Add support for the indexed instrprof formatJustin Bogner2014-04-18
| | | | | | | | This adds support for an indexed instrumentation based profiling format, which is just a small header and an on disk hash table. This format will be used by clang's -fprofile-instr-use= for PGO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206656 91177308-0d34-0410-b5e6-96231b3b80d8
* Added Sphinx documentation generation to CMake build system.Reid Kleckner2014-04-18
| | | | | | | | | | | | | | | | | | | | | The option LLVM_ENABLE_SPHINX option enables the "docs-llvm-html", "docs-llvm-man" targets but does not build them by default. The following CMake options have been added that control what targets are made available SPHINX_OUTPUT_HTML SPHINX_OUTPUT_MAN If LLVM_BUILD_DOCS is enabled then the enabled docs-llvm-* targets will be built by default and if ``make install`` is run then docs-llvm-html and docs-llvm-man will be installed (tested on Linux only). The add_sphinx_target function is in its own file so it can be included by other projects that use Sphinx for their documentation. Patch by Daniel Liew <daniel.liew@imperial.ac.uk>! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206655 91177308-0d34-0410-b5e6-96231b3b80d8
* [DWARF parser] Turn DILineInfo into a struct.Alexey Samsonov2014-04-18
| | | | | | | | | | | Immutable DILineInfo doesn't bring any benefits and complicates code. Also, use std::string instead of SmallString<16> for file and function names - their length can vary significantly. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206654 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the fragments of symbols in compressed sections.David Blaikie2014-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While unnamed relocations are already cached in side tables in ELFObjectWriter::RecordRelocation, symbols still need their fragments updated to refer to the newly compressed fragment (even if that fragment isn't big enough to fit the offset). Even though we only create temporary symbols in debug info sections this comes up in 32 bit builds where even temporary symbols in mergeable sections (such as debug_str) have to be emitted as named symbols. I tried a few other ways to do this but they all didn't work for various reasons: 1) Canonicalize the MCSymbolData in RecordRelocation, nulling out the Fragment (so it didn't have to be updated by CompressDebugSection). This doesn't work because some code relies on symbols having fragments to indicate that they're defined, I think. 2) Canonicalize the MCSymbolData in RecordRelocation to be "first fragment + absolute offset" so it would be cheaper to just test and update the fragment in CompressDebugSections. This doesn't work because the offset computed in RecordRelocation isn't that of the symbol's fragment, it's the passed in fragment (I haven't figured out what that fragment is - perhaps it's the location where the relocation is to be written). And if the fragment offset has to be computed only for this use we might as well just do it when we need to, in CompressDebugSection. I also added an assert to help catch this a bit more clearly, even though it is UB. The test case improvements would either assert fail and/or valgrind vail without the fix, even if they wouldn't necessarily fail the FileCheck output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206653 91177308-0d34-0410-b5e6-96231b3b80d8