summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* blockfreq: Rename PackagedLoopData => LoopDataDuncan P. N. Exon Smith2014-04-221-7/+7
| | | | | | No functionality change. llvm-svn: 206855
* [Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-222-2/+4
| | | | | | definition below all of the header #include lines, lib/Support edition. llvm-svn: 206847
* [Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-2215-17/+30
| | | | | | | definition below all the header #include lines. This updates most of the miscellaneous other lib/... directories. A few left though. llvm-svn: 206845
* [Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-2298-111/+202
| | | | | | | | | | | | | | | | | definition below all of the header #include lines, lib/Transforms/... edition. This one is tricky for two reasons. We again have a couple of passes that define something else before the includes as well. I've sunk their name macros with the DEBUG_TYPE. Also, InstCombine contains headers that need DEBUG_TYPE, so now those headers #define and #undef DEBUG_TYPE around their code, leaving them well formed modular headers. Fixing these headers was a large motivation for all of these changes, as "leaky" macros of this form are hard on the modules implementation. llvm-svn: 206844
* [Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-2221-25/+44
| | | | | | | | | | definition below all the header #include lines, lib/Analysis/... edition. This one has a bit extra as there were *other* #define's before #include lines in addition to DEBUG_TYPE. I've sunk all of them as a block. llvm-svn: 206843
* [Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-22152-186/+304
| | | | | | | definition below all of the header #include lines, lib/Target/... edition. llvm-svn: 206842
* [cleanup] Fix two headers where we included a standard library headerChandler Carruth2014-04-222-4/+2
| | | | | | after including the generated code from tablegen. llvm-svn: 206841
* [cleanup] Fix another place where we were including the tablegen'ed codeChandler Carruth2014-04-221-2/+1
| | | | | | | of a '.inc' file before including actual headers. In this case we had both duplicated a header's include and were including a standard header. llvm-svn: 206840
* [cleanup] Lift using directives, DEBUG_TYPE definitions, and even someChandler Carruth2014-04-2248-117/+113
| | | | | | | | | | | | system headers above the includes of generated '.inc' files that actually contain code. In a few targets this was already done pretty consistently, but it wasn't done *really* consistently anywhere. It is strictly cleaner IMO and necessary in a bunch of places where the DEBUG_TYPE is referenced from the generated code. Consistency with the necessary places trumps. Hopefully the build bots are OK with the movement of intrin.h... llvm-svn: 206838
* [Modules] Remove potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-2290-99/+180
| | | | | | | | | | | | define below all header includes in the lib/CodeGen/... tree. While the current modules implementation doesn't check for this kind of ODR violation yet, it is likely to grow support for it in the future. It also removes one layer of macro pollution across all the included headers. Other sub-trees will follow. llvm-svn: 206837
* [CodeGenPrepare] Use APInt to check the value of the immediate in a andQuentin Colombet2014-04-221-2/+2
| | | | | | | | | | while checking candidate for bit field extract. Otherwise the value may not fit in uint64_t and this will trigger an assertion. This fixes PR19503. llvm-svn: 206834
* [Modules] Followup to r206822 to add a DEBUG_TYPE which is used on ARMChandler Carruth2014-04-211-0/+2
| | | | | | and PPC, but not x86. llvm-svn: 206830
* [Modules] Make Support/Debug.h modular. This requires it to not changeChandler Carruth2014-04-2149-2/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | behavior based on other files defining DEBUG_TYPE, which means it cannot define DEBUG_TYPE at all. This is actually better IMO as it forces folks to define relevant DEBUG_TYPEs for their files. However, it requires all files that currently use DEBUG(...) to define a DEBUG_TYPE if they don't already. I've updated all such files in LLVM and will do the same for other upstream projects. This still leaves one important change in how LLVM uses the DEBUG_TYPE macro going forward: we need to only define the macro *after* header files have been #include-ed. Previously, this wasn't possible because Debug.h required the macro to be pre-defined. This commit removes that. By defining DEBUG_TYPE after the includes two things are fixed: - Header files that need to provide a DEBUG_TYPE for some inline code can do so by defining the macro before their inline code and undef-ing it afterward so the macro does not escape. - We no longer have rampant ODR violations due to including headers with different DEBUG_TYPE definitions. This may be mostly an academic violation today, but with modules these types of violations are easy to check for and potentially very relevant. Where necessary to suppor headers with DEBUG_TYPE, I have moved the definitions below the includes in this commit. I plan to move the rest of the DEBUG_TYPE macros in LLVM in subsequent commits; this one is big enough. The comments in Debug.h, which were hilariously out of date already, have been updated to reflect the recommended practice going forward. llvm-svn: 206822
* Set default value of HasExtractBitsInsn to falseYi Jiang2014-04-211-0/+1
| | | | llvm-svn: 206803
* ARM64: Refactor away a few redundant helpers.Jim Grosbach2014-04-211-66/+33
| | | | | | | | | The comment claimed that the register class information wasn't available in the assembly parser, but that's not really true. It's just annoying to get to. Replace the helper functions with references to the auto-generated information. llvm-svn: 206802
* Simplify a vpermil* with constant mask.Rafael Espindola2014-04-211-0/+15
| | | | | | | | With a constant mask a vpermil* is just a shufflevector. This patch implements that simplification. This allows us to produce denser code. It should also allow more folding down the line. llvm-svn: 206801
* ARM64: Improve diagnostics for malformed reg+reg addressing mode.Jim Grosbach2014-04-211-1/+12
| | | | | | | Make sure only general purpose registers are valid for offset regs and that 32-bit regs are only valid for sxtw and uxtw extends. llvm-svn: 206799
* Move helper functions earlier in the file.Jim Grosbach2014-04-211-54/+53
| | | | | | No functional change. llvm-svn: 206798
* ARM64: Extended addressing mode source reg is 64-bit.Jim Grosbach2014-04-211-5/+1
| | | | | | | | | | | | | | The canonical form for the extended addressing mode (e.g., "[x1, w2, uxtw #3]" is for the MCInst to have the second register be the full 64-bit GPR64 register class. The instruction printer cleans up the output for display to show the 32-bit register instead, per the specification. This simplifies 205893 now that the aliasing is handled in the printer in 206495 so that the codegen path and the disassembler path give the same MCInst form. llvm-svn: 206797
* Use unique_ptr to manage ownership of GCOVFunctions, Blocks, and Edges.David Blaikie2014-04-211-36/+21
| | | | llvm-svn: 206796
* Remove seemingly-unneeded artificial dependencyHal Finkel2014-04-211-5/+0
| | | | | | | | | | | | | | | | The rationale for this artificial dependency seems to have been lost to the ravages of time, it is covered by no regression tests, and has no impact on test-suite performance numbers on either x86 or PPC. For the test suite, on both x86 and PPC, I ran the test suite 10 times (both as a baseline and with this change), and found no statistically-significant changes. For PPC, I used a P7 box. For x86, I used an Intel Xeon E5430. Both with -O3 -mcpu=native. This was discussed on-list back in January, but I've not had a chance to run the performance tests until today. llvm-svn: 206795
* Simplify destruction of Modules in LLVContextImpl.David Blaikie2014-04-211-6/+5
| | | | | | | | | | | | | | | | | | | | This avoids copying the container by simply deleting until empty. While I'd rather move to a stricter ownership semantic (unique_ptr), SmallPtrSet can't cope with unique_ptr and the ownership semantics here are a bit incestuous (Module sort of owns itself, but sort of doesn't (if the LLVMContext is destroyed before the Module, then it deregisters itself from the context... )). Ideally Modules would be given to the context, or possibly an emplace-like function to construct them there. Modules then shouldn't be destroyed by LLVM API clients, but by interacting with the owner (LLVMContext) directly (but even then, passing a Module* to LLVMContext doesn't provide an easy way to destroy the Module, since the set would be over unique_ptrs and you'd need a heterogenous lookup function which SmallPtrSet doesn't have either). llvm-svn: 206794
* Handle _GLOBAL_OFFSET_TABLE_ in 64 bit mode.Rafael Espindola2014-04-214-1/+15
| | | | | | | | | With this MC is able to handle _GLOBAL_OFFSET_TABLE_ in 64 bit mode, which is needed for medium and large code models. This fixes pr19470. llvm-svn: 206793
* clang-format this function.Rafael Espindola2014-04-211-5/+10
| | | | | | No functionality change, it will just make the next patch easier to read. llvm-svn: 206792
* Use unique_ptr to handle GlobalOpt's Evaluator membersDavid Blaikie2014-04-211-17/+10
| | | | llvm-svn: 206790
* Fix PR7272 in -tailcallelim instead of the inlinerReid Kleckner2014-04-212-8/+10
| | | | | | | | | | | | | | | | The -tailcallelim pass should be checking if byval or inalloca args can be captured before marking calls as tail calls. This was the real root cause of PR7272. With a better fix in place, revert the inliner change from r105255. The test case it introduced still passes and has been moved to test/Transforms/Inline/byval-tail-call.ll. Reviewers: chandlerc Differential Revision: http://reviews.llvm.org/D3403 llvm-svn: 206789
* Simplify expression that was explicitly naming an operator overload in a call.David Blaikie2014-04-211-1/+1
| | | | llvm-svn: 206788
* Use unique_ptr to handle ownership of GCOVFunctions in GCOVProfiler.David Blaikie2014-04-211-14/+10
| | | | llvm-svn: 206786
* Use unique_ptr to handle ownership of UserValues in LiveDebugVariablesImplDavid Blaikie2014-04-211-4/+6
| | | | llvm-svn: 206785
* Use unique_ptr to manage objects owned by the ScheduleDAGMI.David Blaikie2014-04-214-14/+14
| | | | llvm-svn: 206784
* 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
OpenPOWER on IntegriCloud