summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* In Dwarf 3 (and Dwarf 2) attributes whose value are offsets into aEric Christopher2013-11-214-52/+92
| | | | | | | | | | | | | | | | | | | | | section use the form DW_FORM_data4 whilst in Dwarf 4 and later they use the form DW_FORM_sec_offset. This patch updates the places where such attributes are generated to use the appropriate form depending on the Dwarf version. The DIE entries affected have the following tags: DW_AT_stmt_list, DW_AT_ranges, DW_AT_location, DW_AT_GNU_pubnames, DW_AT_GNU_pubtypes, DW_AT_GNU_addr_base, DW_AT_GNU_ranges_base It also adds a hidden command line option "--dwarf-version=<uint>" to llc which allows the version of Dwarf to be generated to override what is specified in the metadata; this makes it possible to update existing tests to check the debugging information generated for both Dwarf 4 (the default) and Dwarf 3 using the same metadata. Patch (slightly modified) by Keith Walker! llvm-svn: 195391
* SHLD/SHRD are VectorPath (microcode) instructions known to have poor latency ↵Ekaterina Romanova2013-11-214-18/+53
| | | | | | | | | | on certain architectures. While generating SHLD/SHRD instructions is acceptable when optimizing for size, optimizing for speed on these platforms should be implemented using alternative sequences of instructions composed of add, adc, shr, shl, or and lea which are directPath instructions. These alternative instructions not only have a lower latency but they also increase the decode bandwidth by allowing simultaneous decoding of a third directPath instruction. AMD's processors family K7, K8, K10, K12, K15 and K16 are known to have SHLD/SHRD instructions with very poor latency. Optimization guides for these processors recommend using an alternative sequence of instructions. For these AMD's processors, I disabled folding (or (x << c) | (y >> (64 - c))) when we are not optimizing for size. It might be beneficial to disable this folding for some of the Intel's processors. However, since I couldn't find specific recommendations regarding using SHLD/SHRD instructions on Intel's processors, I haven't disabled this peephole for Intel. llvm-svn: 195383
* Introduce two command-line flags for the instrumentation pass to control ↵Peter Collingbourne2013-11-211-10/+33
| | | | | | | | | | | | | | whether the labels of pointers should be ignored in load and store instructions The new command line flags are -dfsan-ignore-pointer-label-on-store and -dfsan-ignore-pointer-label-on-load. Their default value matches the current labelling scheme. Additionally, the function __dfsan_union_load is marked as readonly. Patch by Lorenzo Martignoni! Differential Revision: http://llvm-reviews.chandlerc.com/D2187 llvm-svn: 195382
* Move member variable up to where the rest of non-DWARF5 variables reside.Eric Christopher2013-11-211-3/+3
| | | | llvm-svn: 195380
* [mips][msa] Fix a corner case in performORCombine() when combining nodes ↵Daniel Sanders2013-11-211-4/+8
| | | | | | | | | | | | | | | into VSELECT. Mask == ~InvMask asserts if the width of Mask and InvMask differ. The combine isn't valid (with two exceptions, see below) if the widths differ so test for this before testing Mask == ~InvMask. In the specific cases of Mask=~0 and InvMask=0, as well as Mask=0 and InvMask=~0, the combine is still valid. However, there are more appropriate combines that could be used in these cases such as folding x & 0 to 0, or x & ~0 to x. llvm-svn: 195364
* [ARM] add basic Cortex-A7 support to LLVM backendArtyom Skrobov2013-11-212-1/+13
| | | | llvm-svn: 195358
* Add support for legalizing SETNE/SETEQ by inverting the condition code and ↵Daniel Sanders2013-11-211-14/+54
| | | | | | | | | | | | | | | | | | | | | | | | | the result of the comparison. Summary: LegalizeSetCCCondCode can now legalize SETEQ and SETNE by returning the inverse condition and requesting that the caller invert the result of the condition. The caller of LegalizeSetCCCondCode must handle the inverted CC, and they do so as follows: SETCC, BR_CC: Invert the result of the SETCC with SelectionDAG::getNOT() SELECT_CC: Swap the true/false operands. This is necessary for MSA which lacks an integer SETNE instruction. Reviewers: resistor CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2229 llvm-svn: 195355
* [msan] Propagate condition origin in select instruction.Evgeniy Stepanov2013-11-211-5/+12
| | | | llvm-svn: 195349
* [mips][msa/dsp] Only do DSP combines if DSP is enabled.Daniel Sanders2013-11-211-0/+3
| | | | | | Fixes a crash (null pointer dereferenced) when MSA is enabled. llvm-svn: 195343
* Whitespace.NAKAMURA Takumi2013-11-211-1/+1
| | | | llvm-svn: 195341
* Revert r195317 (and r195333), "Teach ISel not to optimize 'optnone' functions."NAKAMURA Takumi2013-11-212-45/+1
| | | | | | | | It broke, at least, i686 target. It is reproducible with "llc -mtriple=i686-unknown". FYI, it didn't appear to add either "-O0" or "-fast-isel". llvm-svn: 195339
* [PM] Widen the interface for invalidate on an analysis result now thatChandler Carruth2013-11-211-7/+15
| | | | | | | | | | | | | | | | | | | it is completely optional, and sink the logic for handling the preserved analysis set into it. This allows us to implement the delegation logic desired in the proxy module analysis for the function analysis manager where if the proxy itself is preserved we assume the set of functions hasn't changed and we do a fine grained invalidation by walking the functions in the module and running the invalidate for them all at the manager level and letting it try to invalidate any passes. This in turn makes it blindingly obvious why we should hoist the invalidate trait and have two collections of results. That allows handling invalidation for almost all analyses without indirect calls and it allows short circuiting when the preserved set is all. llvm-svn: 195338
* Implemented Neon scalar vdup_lane intrinsics.Ana Pazos2013-11-211-2/+23
| | | | | | Fixed scalar dup alias and added test case. llvm-svn: 195330
* Implemented Neon scalar by element intrinsics.Ana Pazos2013-11-211-39/+155
| | | | | | | Intrinsics implemented: vqdmull_lane, vqdmulh_lane, vqrdmulh_lane, vqdmlal_lane, vqdmlsl_lane scalar Neon intrinsics. llvm-svn: 195327
* Don't speculate loads under ThreadSanitizerKostya Serebryany2013-11-211-1/+3
| | | | | | | | | | | | | | | | | Summary: Don't speculate loads under ThreadSanitizer. This fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=40 Also discussed here: http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-November/067929.html Reviewers: chandlerc Reviewed By: chandlerc CC: llvm-commits, dvyukov Differential Revision: http://llvm-reviews.chandlerc.com/D2227 llvm-svn: 195324
* The basic problem is that some mainstream programs cannot deal with the wayBill Wendling2013-11-211-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang optimizes tail calls, as in this example: int foo(void); int bar(void) { return foo(); } where the call is transformed to: calll .L0$pb .L0$pb: popl %eax .Ltmp0: addl $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %eax movl foo@GOT(%eax), %eax popl %ebp jmpl *%eax # TAILCALL However, the GOT references must all be resolved at dlopen() time, and so this approach cannot be used with lazy dynamic linking (e.g. using RTLD_LAZY), which usually populates the PLT with stubs that perform the actual resolving. This patch changes X86TargetLowering::LowerCall() to skip tail call optimization, if the called function is a global or external symbol. Patch by Dimitry Andric! PR15086 llvm-svn: 195318
* Teach ISel not to optimize 'optnone' functions.Paul Robinson2013-11-212-1/+45
| | | | | | Based on work by Andrea Di Biagio. llvm-svn: 195317
* Add, to constant islands, long jumps similar to ARM far branch.Reed Kotler2013-11-212-2/+23
| | | | llvm-svn: 195312
* llvm-cov: Don't assume FileChecksum was generated.Yuchen Wu2013-11-211-2/+3
| | | | | | | For cases where emitProfileArcs() was called but emitProfileNotes() was not, set the CfgChecksum to 0. llvm-svn: 195311
* llvm-cov: Formatting change.Yuchen Wu2013-11-211-2/+1
| | | | llvm-svn: 195310
* llvm-cov: Fixed some bugs related to file checksum.Yuchen Wu2013-11-211-7/+10
| | | | | | | Added call to update CfgChecksum. Made FileChecksum a vector, separate for each source file. llvm-svn: 195309
* [PM] Add a module analysis pass proxy for the function analysis manager.Chandler Carruth2013-11-211-0/+37
| | | | | | | | | | | | | | | | This proxy will fill the role of proxying invalidation events down IR unit layers so that when a module changes we correctly invalidate function analyses. Currently this is a very coarse solution -- any change blows away the entire thing -- but the next step is to make invalidation handling more nuanced so that we can propagate specific amounts of invalidation from one layer to the next. The test is extended to place a module pass between two function pass managers each of which have preserved function analyses which get correctly invalidated by the module pass that might have changed what functions are even in the module. llvm-svn: 195304
* Move DebugInfoOffset member near the other data member it helps describe.Eric Christopher2013-11-212-7/+7
| | | | llvm-svn: 195299
* Reflow some documentation and remove whitespace comments. MoveEric Christopher2013-11-211-27/+10
| | | | | | DebugInfoOffset data member up with the rest of the data members. llvm-svn: 195298
* Add more documenation for the lookup tables data members.Eric Christopher2013-11-211-0/+3
| | | | llvm-svn: 195297
* Reorder language in the CompileUnit description and add a comment.Eric Christopher2013-11-212-6/+7
| | | | | | Language may only be a temporary addition. llvm-svn: 195296
* Update comment.Eric Christopher2013-11-211-2/+2
| | | | llvm-svn: 195293
* Constify the DIEs used for pubname and pubtype tables. PropagateEric Christopher2013-11-214-15/+15
| | | | | | through findAttribute etc. llvm-svn: 195290
* revert r194655Nick Kledzik2013-11-211-2/+2
| | | | llvm-svn: 195285
* PPC popcnt[dw] do not have record formsHal Finkel2013-11-201-6/+6
| | | | | | | The instruction definitions incorrectly specified that popcntd and popcntw have record forms; they do not. This mistake was causing invalid code generation. llvm-svn: 195272
* MachineBlockPlacement: Strengthen the source order bias when picking an exit ↵Benjamin Kramer2013-11-201-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | block. We now only allow breaking source order if the exit block frequency is significantly higher than the other exit block. The actual bias is currently under a flag so the best cut-off can be found; the flag defaults to the old behavior. The idea is to get some benchmark coverage over different values for the flag and pick the best one. When we require the new frequency to be at least 20% higher than the old frequency I see a 5% speedup on zlib's deflate when compressing a random file on x86_64/westmere. Hal reported a small speedup on Fhourstones on a BG/Q and no regressions in the test suite. The test case is the full long_match function from zlib's deflate. I was reluctant to add it for previous tweaks to branch probabilities because it's large and potentially fragile, but changed my mind since it's an important use case and more likely to break with all the current work going into the PGO infrastructure. Differential Revision: http://llvm-reviews.chandlerc.com/D2202 llvm-svn: 195265
* DwarfCompileUnit: Initialize DebugInfoOffset.David Blaikie2013-11-201-2/+2
| | | | | | | | | | | | While not strictly necessary (the class has an invariant that "setDebugInfoOffset" is called before "getDebugInfoOffset" - anyone client that actually gets the default zero offset is buggy/broken) this is consistent with the code as originally written and the removal of the initialization was an accident in r195166. Suggested by Manman Ren. llvm-svn: 195263
* CR feedback for r195166: Add comments regarding type unit mapping and type ↵David Blaikie2013-11-202-3/+12
| | | | | | | | units disabling cross-CU sharing. Changes suggested by Manman Ren. llvm-svn: 195262
* Make the moved-from SmallPtrSet be a valid, empty, small-state object.Chandler Carruth2013-11-201-1/+13
| | | | | | | | | | | Enhance the tests to actually require moves in C++11 mode, in addition to testing the moved-from state. Further enhance the tests to cover copy-assignment into a moved-from object and moving a large-state object. (Note that we can't really test small-state vs. large-state as that isn't an observable property of the API really.) This should finish addressing review on r195239. llvm-svn: 195261
* [mips][msa] Pseudo instructions require HasMSA too. Inherit from MSAPseudo ↵Daniel Sanders2013-11-202-18/+18
| | | | | | | | | | | instead of MipsPseudo There's no test case for this commit. This is because it is doubtful that the incorrect behaviour can actually trigger. When MSA is not enabled, the type legalizer should have eliminated all occurrences of patterns the affected pseudo-instruction could possibly match before instruction selection occurs. llvm-svn: 195252
* [mips][msa] Remove unused instruction class MSA_I8_X_DESC_BASEDaniel Sanders2013-11-201-11/+0
| | | | llvm-svn: 195245
* [PM] Add the preservation system to the new pass manager.Chandler Carruth2013-11-201-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new set-like type which represents a set of preserved analysis passes. The set is managed via the opaque PassT::ID() void*s. The expected convenience templates for interacting with specific passes are provided. It also supports a symbolic "all" state which is represented by an invalid pointer in the set. This state is nicely saturating as it comes up often. Finally, it supports intersection which is used when finding the set of preserved passes after N different transforms. The pass API is then changed to return the preserved set rather than a bool. This is much more self-documenting than the previous system. Returning "none" is a conservatively correct solution just like returning "true" from todays passes and not marking any passes as preserved. Passes can also be dynamically preserved or not throughout the run of the pass, and whatever gets returned is the binding state. Finally, preserving "all" the passes is allowed for no-op transforms that simply can't harm such things. Finally, the analysis managers are changed to instead of blindly invalidating all of the analyses, invalidate those which were not preserved. This should rig up all of the basic preservation functionality. This also correctly combines the preservation moving up from one IR-layer to the another and the preservation aggregation across N pass runs. Still to go is incrementally correct invalidation and preservation across IR layers incrementally during N pass runs. That will wait until we have a device for even exposing analyses across IR layers. While the core of this change is obvious, I'm not happy with the current testing, so will improve it to cover at least some of the invalidation that I can test easily in a subsequent commit. llvm-svn: 195241
* Give SmallPtrSet move semantics when we have R-value references.Chandler Carruth2013-11-201-0/+44
| | | | | | | | | | | | Somehow, this ADT got missed which is moderately terrifying considering the efficiency of move for it. The code to implement move semantics for it is pretty horrible currently but was written to reasonably closely match the rest of the code. Unittests that cover both copying and moving (at a basic level) added. llvm-svn: 195239
* X86ISelLowering.cpp: Mark a variable VT as LLVM_ATTRIBUTE_UNUSED. ↵NAKAMURA Takumi2013-11-201-1/+1
| | | | | | [-Wunused-variable] llvm-svn: 195238
* Whitespace.NAKAMURA Takumi2013-11-201-22/+22
| | | | llvm-svn: 195237
* Fixed compilation error.Elena Demikhovsky2013-11-201-3/+3
| | | | llvm-svn: 195230
* AVX-512: Concat 4 128-bit vectors in one 512-bit vector.Elena Demikhovsky2013-11-201-2/+15
| | | | llvm-svn: 195229
* [PM] Make the function pass manager more regular.Chandler Carruth2013-11-201-8/+7
| | | | | | | | | | | | | | | | The FunctionPassManager is now itself a function pass. When run over a function, it runs all N of its passes over that function. This is the 1:N mapping in the pass dimension only. This allows it to be used in either a ModulePassManager or potentially some other manager that works on IR units which are supersets of Functions. This commit also adds the obvious adaptor to map from a module pass to a function pass, running the function pass across every function in the module. The test has been updated to use this new pattern. llvm-svn: 195192
* llvm-cov: Added file checksum to gcno and gcda files.Yuchen Wu2013-11-202-40/+89
| | | | | | | | | | | | Instead of permanently outputting "MVLL" as the file checksum, clang will create gcno and gcda checksums by hashing the destination block numbers of every arc. This allows for llvm-cov to check if the two gcov files are synchronized. Regenerated the test files so they contain the checksum. Also added negative test to ensure error when the checksums don't match. llvm-svn: 195191
* [PM] Split the analysis manager into a function-specific interface andChandler Carruth2013-11-201-85/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a module-specific interface. This is the first of many steps necessary to generalize the infrastructure such that we can support both a Module-to-Function and Module-to-SCC-to-Function pass manager nestings. After a *lot* of attempts that never worked and didn't even make it to a committable state, it became clear that I had gotten the layering design of analyses flat out wrong. Four days later, I think I have most of the plan for how to correct this, and I'm starting to reshape the code into it. This is just a baby step I'm afraid, but starts separating the fundamentally distinct concepts of function analysis passes and module analysis passes so that in subsequent steps we can effectively layer them, and have a consistent design for the eventual SCC layer. As part of this, I've started some interface changes to make passes more regular. The module pass accepts the module in the run method, and some of the constructor parameters are gone. I'm still working out exactly where constructor parameters vs. method parameters will be used, so I expect this to fluctuate a bit. This actually makes the invalidation less "correct" at this phase, because now function passes don't invalidate module analysis passes, but that was actually somewhat of a misfeature. It will return in a better factored form which can scale to other units of IR. The documentation has gotten less verbose and helpful. llvm-svn: 195189
* PPC: Optimize rldicl generation for masked shiftsHal Finkel2013-11-201-1/+15
| | | | | | | | | | | | | | Masking operations (where only some number of the low bits are being kept) are selected to rldicl(x, 0, mb). If x is a logical right shift (which would become rldicl(y, 64-n, n)), we might be able to fold the two instructions together: rldicl(rldicl(x, 64-n, n), 0, mb) -> rldicl(x, 64-n, mb) for n <= mb The right shift is really a left rotate followed by a mask, and if the explicit mask is a more-restrictive sub-mask of the mask implied by the shift, only one rldicl is needed. llvm-svn: 195185
* Remove polymorphic destruction for DIE. DIEBlocks are owned elsewhereEric Christopher2013-11-201-1/+1
| | | | | | | and not polymorphically deleted and they are the only thing that derive from DIE. llvm-svn: 195183
* Remove capability for polymorphic destruction from LexicalScopeEric Christopher2013-11-202-7/+5
| | | | | | and LexicalScopes, we're not using it. llvm-svn: 195182
* Grammar.Eric Christopher2013-11-201-1/+1
| | | | llvm-svn: 195181
* Formatting, 80-col, trailing whitespace.Eric Christopher2013-11-201-37/+36
| | | | llvm-svn: 195180
OpenPOWER on IntegriCloud