summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Use value semantics to manage DbgVariables rather than dynamic ↵David Blaikie2014-04-212-54/+57
| | | | | | | | | | allocation/pointers. Requires switching some vectors to lists to maintain pointer validity. These could be changed to forward_lists (singly linked) with a bit more work - I've left comments to that effect. llvm-svn: 206780
* Rename X86insrtps to the proper instruction name.Filipe Cabecinhas2014-04-213-15/+15
| | | | | | | | | | | | | | | Summary: The INSERTPS pattern fragment was called insrtps (mising 'e'), which would make it harder to grep for the patterns related to this instruction. Renaming it to use the proper instruction name. Reviewers: nadav CC: llvm-commits Differential Revision: http://reviews.llvm.org/D3443 llvm-svn: 206779
* [Modules] Consolidate the DEBUG_TYPE defines in NVPTX to the top of theChandler Carruth2014-04-212-5/+1
| | | | | | cpp file rather than in the header and then again in the cpp file. llvm-svn: 206778
* [Modules] Sink all the DEBUG_TYPE defines for InstCombine out of theChandler Carruth2014-04-2113-2/+12
| | | | | | | | | | | header files and into the cpp files. These files will require more touches as the header files actually use DEBUG(). Eventually, I'll have to introduce a matched #define and #undef of DEBUG_TYPE for the header files, but that comes as step N of many to clean all of this up. llvm-svn: 206777
* [Modules] Sink the DEBUG_TYPE macro out of LegalizeTypes.h and into theChandler Carruth2014-04-216-1/+5
| | | | | | | various .cpp files. This macro is inherently non-modular, and it wasn't even needed in this header file. llvm-svn: 206775
* ARM64: Combine shifts and uses from different basic block to bit-extract ↵Yi Jiang2014-04-213-3/+231
| | | | | | instruction llvm-svn: 206774
* Revert "[rtdyld,c++11] Range'ify symbol table walking."Jim Grosbach2014-04-211-25/+33
| | | | | | | | | Tentative revert for http://lab.llvm.org:8011/builders/llvm-mips-linux/builds/8305. This reverts commit c2a58efff07294fca724f89500538f2ddbcd12ff. llvm-svn: 206773
* Fix unnecessary line breakMatt Arsenault2014-04-211-4/+2
| | | | llvm-svn: 206772
* blockfreq: Some cleanup of UnsignedFloatDuncan P. N. Exon Smith2014-04-211-22/+19
| | | | | | | Change `PositiveFloat` to `UnsignedFloat`, and fix some of the comments to indicate that it's disappearing eventually. llvm-svn: 206771
* [rtdyld,c++11] Range'ify symbol table walking.Jim Grosbach2014-04-211-33/+25
| | | | llvm-svn: 206769
* Reapply "blockfreq: Rewrite BlockFrequencyInfoImpl"Duncan P. N. Exon Smith2014-04-214-5/+948
| | | | | | | | | This reverts commit r206707, reapplying r206704. The preceding commit to CalcSpillWeights should have sorted out the failing buildbots. <rdar://problem/14292693> llvm-svn: 206766
* CalcSpillWeights: Hack to prevent x87 nonsenseDuncan P. N. Exon Smith2014-04-211-1/+5
| | | | | | | | | This gross hack forces `hweight` into memory, preventing hidden precision from making `1 > 1` occasionally equal `true`. <rdar://problem/14292693> llvm-svn: 206765
* [msan] Enable out-of-line instrumentation for large functions by default.Evgeniy Stepanov2014-04-211-1/+1
| | | | llvm-svn: 206759
* Appease autoconf build since X86Disassembler.c has been disappeared in r206717.NAKAMURA Takumi2014-04-211-0/+2
| | | | | | It can be reverted a few days later, after X86Disassembler.d is updated not to contain "X86Disassembler.c". llvm-svn: 206758
* [asan] add a run-time flag detect_container_overflow=true/falseKostya Serebryany2014-04-211-1/+1
| | | | llvm-svn: 206756
* Convert getFileOffset to getOffset and move it to its only user.Rafael Espindola2014-04-212-16/+32
| | | | | | | | | | | | | We normally don't drop functions from the C API's, but in this case I think we can: * The old implementation of getFileOffset was fairly broken * The introduction of LLVMGetSymbolFileOffset was itself a C api breaking change as it removed LLVMGetSymbolOffset. * It is an incredibly specialized use case. The only reason MCJIT needs it is because of its odd position of being a dynamic linker of .o files. llvm-svn: 206750
* Reapply r206732. This time without optimization of branches.Michael Zolotukhin2014-04-213-0/+239
| | | | llvm-svn: 206749
* [asan] instead of inserting inline instrumentation around ↵Kostya Serebryany2014-04-211-29/+33
| | | | | | memset/memcpy/memmove, replace the intrinsic with __asan_memset/etc. This makes the memset/etc handling more complete and consistent with what we do in msan. It may slowdown some cases (when the intrinsic was actually inlined) and speedup other cases (when it was not inlined) llvm-svn: 206746
* [PM] Add a new-PM-style CGSCC pass manager using the newly addedChandler Carruth2014-04-212-0/+168
| | | | | | | | | | | | | | | | | | | | | | | LazyCallGraph analysis framework. Wire it up all the way through the opt driver and add some very basic testing that we can build pass pipelines including these components. Still a lot more to do in terms of testing that all of this works, but the basic pieces are here. There is a *lot* of boiler plate here. It's something I'm going to actively look at reducing, but I don't have any immediate ideas that don't end up making the code terribly complex in order to fold away the boilerplate. Until I figure out something to minimize the boilerplate, almost all of this is based on the code for the existing pass managers, copied and heavily adjusted to suit the needs of the CGSCC pass management layer. The actual CG management still has a bunch of FIXMEs in it. Notably, we don't do *any* updating of the CG as it is potentially invalidated. I wanted to get this in place to motivate the new analysis, and add update APIs to the analysis and the pass management layers in concert to make sure that the *right* APIs are present. llvm-svn: 206745
* [PM] Fix a bug where we didn't properly clear the list map when the listChandler Carruth2014-04-211-0/+2
| | | | | | | | | | 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. llvm-svn: 206744
* [asan] temporary disable generating __asan_loadN/__asan_storeNKostya Serebryany2014-04-211-11/+6
| | | | llvm-svn: 206741
* [C++11] Replace OwningPtr with std::unique_ptr in places where it doesn't ↵Benjamin Kramer2014-04-217-21/+15
| | | | | | | | break the API. No functionality change. llvm-svn: 206740
* [X86] ISEL (and X, <constant mask>) to BZHI when BMI2 is available.Lang Hames2014-04-211-0/+14
| | | | | | | | | | 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> llvm-svn: 206738
* Revert r206732 which is causing llc to crash on most of the build bots.Chandler Carruth2014-04-213-290/+0
| | | | | | | | 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). llvm-svn: 206735
* [asan] insert __asan_loadN/__asan_storeN as out-lined asan checks, llvm partKostya Serebryany2014-04-211-3/+15
| | | | llvm-svn: 206734
* Implement builtins for safe division: safe.sdiv.iN, safe.udiv.iN, safe.srem.iN,Michael Zolotukhin2014-04-213-0/+290
| | | | | | safe.urem.iN (iN = i8, i16, i32, or i64). llvm-svn: 206732
* [LCG] Add some basic debug output to the LCG pass.Chandler Carruth2014-04-211-2/+17
| | | | llvm-svn: 206730
* Protect the ArgList dtorDavid Blaikie2014-04-201-5/+0
| | | | | | | | | | | | | 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* llvm-svn: 206727
* Use unique_ptr to handle ownership of synthesized args in DerivedArgListDavid Blaikie2014-04-201-27/+26
| | | | | | | | 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. llvm-svn: 206724
* C++ has a bool type! (And C's had one too, for 15 years...)Richard Smith2014-04-202-38/+33
| | | | llvm-svn: 206723
* More C++ification.Richard Smith2014-04-202-226/+165
| | | | llvm-svn: 206722
* Remove some more C junk from these files.Richard Smith2014-04-202-16/+6
| | | | llvm-svn: 206721
* Don't provide two different definitions of ModRMDecision, OpcodeDecision, ↵Richard Smith2014-04-203-37/+23
| | | | | | and ContextDecision in different source files (depending on #define magic). llvm-svn: 206720
* Don't define llvm::X86Disassembler::InstructionSpecifier in different ways inRichard Smith2014-04-202-12/+8
| | | | | | different source files. llvm-svn: 206719
* Maybe if I touch this file the buildbots will actually rerun configure like ↵Richard Smith2014-04-201-1/+1
| | | | | | they need to... llvm-svn: 206718
* What year is it! This file has no reason to be written in C, and has doubly noRichard Smith2014-04-205-109/+103
| | | | | | | | | | 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. llvm-svn: 206717
* Remove some empty statementsAlp Toker2014-04-196-6/+6
| | | | | | Cleanup only. llvm-svn: 206710
* ProfileData: Remove an extra semicolonJustin Bogner2014-04-191-1/+1
| | | | | | Spotted by Nick Lewycky in review, thanks! llvm-svn: 206708
* Revert "blockfreq: Rewrite BlockFrequencyInfoImpl"Duncan P. N. Exon Smith2014-04-194-948/+5
| | | | | | This reverts commit r206704, as expected. llvm-svn: 206707
* Reapply "blockfreq: Rewrite BlockFrequencyInfoImpl"Duncan P. N. Exon Smith2014-04-194-5/+948
| | | | | | | | | | | | | | | | | | | | | 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> llvm-svn: 206704
* Patch by Vadim ChugunovYaron Keren2014-04-194-3/+17
| | | | | | | | | | | 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. llvm-svn: 206684
* Patch by Ray Donnelly to print register names instead of numbers.Yaron Keren2014-04-191-4/+11
| | | | | | http://reviews.llvm.org/D3422 llvm-svn: 206683
* Add parens to appease GCC warning.David Blaikie2014-04-191-4/+4
| | | | llvm-svn: 206678
* Revert "blockfreq: Rewrite BlockFrequencyInfoImpl" (#2)Duncan P. N. Exon Smith2014-04-194-949/+5
| | | | | | | | | | | 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.) llvm-svn: 206677
* OnDiskHashTable: Audit types and use offset_type consistentlyJustin Bogner2014-04-191-4/+4
| | | | llvm-svn: 206675
* Check whether functions have any lines associated before emitting coverage ↵Nick Lewycky2014-04-181-0/+17
| | | | | | info for them. This isn't just a size/time saving, gcov may crash on these. llvm-svn: 206671
* Change the ARM assembler to require a :lower16: or :upper16 on non-constantKevin Enderby2014-04-182-5/+29
| | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 206669
* Reapply "blockfreq: Rewrite BlockFrequencyInfoImpl" (#2)Duncan P. N. Exon Smith2014-04-184-5/+949
| | | | | | | | | | | | | | | | | | | 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 llvm-svn: 206666
* [llvm-symbolizer] Print file/line for a PC even if there is no DIE ↵Alexey Samsonov2014-04-181-9/+20
| | | | | | | | | | | 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. llvm-svn: 206665
* ProfileData: Don't forward declare ComputeHash and make it static inlineJustin Bogner2014-04-182-1/+6
| | | | llvm-svn: 206663
OpenPOWER on IntegriCloud