summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* SCC: Change clients to use const, NFCDuncan P. N. Exon Smith2014-04-255-12/+11
| | | | | | | | | | It's fishy to be changing the `std::vector<>` owned by the iterator, and no one actual does it, so I'm going to remove the ability in a subsequent commit. First, update the users. <rdar://problem/14292693> llvm-svn: 207252
* Revert "This reapplies r207130 with an additional testcase+and a missing ↵Adrian Prantl2014-04-258-73/+45
| | | | | | | | check for" This reverts commit 207235 to investigate msan buildbot breakage. llvm-svn: 207250
* Make sure that DSUB does not duplicate the pattern of DSUBUReed Kotler2014-04-251-1/+1
| | | | | | | | | | | | | | Test Plan: Run test suite to make sure there is no regression. https://dmz-portal.mips.com/bb/builders/LLVM%20with%2064bit%20and%20delay%20slot%20optimizer%20and%20direct%20object%20emitter/builds/626 Reviewers: dsanders Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D3497 llvm-svn: 207247
* ARM: remove @llvm.arm.sevlSaleem Abdulrasool2014-04-252-3/+0
| | | | | | | | This intrinsic is no longer needed with the new @llvm.arm.hint(i32) intrinsic which provides a generic, extensible manner for adding hint instructions. This functionality can now be represented as @llvm.arm.hint(i32 5). llvm-svn: 207246
* [inline cold threshold] Command line argument for inline threshold willManman Ren2014-04-251-1/+6
| | | | | | | | | | | override the default cold threshold. When we use command line argument to set the inline threshold, the default cold threshold will not be used. This is in line with how we use OptSizeThreshold. When we want a higher threshold for all functions, we do not have to set both inline threshold and cold threshold. llvm-svn: 207245
* Refactor some common logic in DwarfUnit::constructVariableDIE and pass ↵David Blaikie2014-04-253-17/+23
| | | | | | non-null DIE by reference to DbgVariable::setDIE llvm-svn: 207244
* ARM: provide a new generic hint intrinsicSaleem Abdulrasool2014-04-253-3/+6
| | | | | | | | | Introduce the llvm.arm.hint(i32) intrinsic that can be used to inject hints into the instruction stream. This is particularly useful for generating IR from a compiler where the user may inject an intrinsic (e.g. __yield). These are then pattern substituted into the correct instruction which already existed. llvm-svn: 207242
* Reapply r207135 without modifications.Adrian Prantl2014-04-251-17/+3
| | | | | | | | | | Debug info: Let dbg.values inserted by LowerDbgDeclare inherit the location of the dbg.value. This gets rid of tons of redundant variable DIEs in subscopes. rdar://problem/14874886, rdar://problem/16679936 llvm-svn: 207236
* This reapplies r207130 with an additional testcase+and a missing check forAdrian Prantl2014-04-258-45/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AllocaInst that was missing in one location. Debug info for optimized code: Support variables that are on the stack and described by DBG_VALUEs during their lifetime. Previously, when a variable was at a FrameIndex for any part of its lifetime, this would shadow all other DBG_VALUEs and only a single fbreg location would be emitted, which in fact is only valid for a small range and not the entire lexical scope of the variable. The included dbg-value-const-byref testcase demonstrates this. This patch fixes this by Local - emitting dbg.value intrinsics for allocas that are passed by reference - dropping all dbg.declares (they are now fully lowered to dbg.values) SelectionDAG - renamed constructors for SDDbgValue for better readability. - fix UserValue::match() to handle indirect values correctly - not inserting an MMI table entries for dbg.values that describe allocas. - lowering dbg.values that describe allocas into *indirect* DBG_VALUEs. CodeGenPrepare - leaving dbg.values for an alloca were they are (see comment) Other - regenerated/updated instcombine.ll testcase and included source rdar://problem/16679879 http://reviews.llvm.org/D3374 llvm-svn: 207235
* [ARM64] When compiling for ELF in PIC mode, local symbols shouldn't go ↵Tilmann Scheller2014-04-251-1/+2
| | | | | | | | | | | | through the GOT There's no need for local symbols to go through the GOT, in fact it seems GNU ld is not even emitting GOT entries for local symbols and will error out when trying to resolve a GOT relocation for a local symbol. This bug triggers when bootstrapping clang on AArch64 Linux with -fPIC and the ARM64 backend. The AArch64 backend is not affected. With this commit it's now possible to bootstrap clang on AArch64 Linux with the ARM64 backend (-fPIC, -O3). llvm-svn: 207226
* [ARM64] Handle fp128 for parameter passing on stackJiangning Liu2014-04-251-1/+2
| | | | llvm-svn: 207222
* ARM64: fix assertion in ISelDAGToDAGTim Northover2014-04-251-2/+0
| | | | | | | | Also an unused variable, so double bonus! This should deal with PR19548. llvm-svn: 207221
* [ARM64] Print preferred aliases for SFBM/UBFM in InstPrinterBradley Smith2014-04-251-6/+29
| | | | llvm-svn: 207219
* [LCG] During the incremental update of an SCC, switch to using theChandler Carruth2014-04-251-26/+26
| | | | | | | | | | | | | | | | | | SCCMap to test for nodes that have been re-added to the root SCC rather than a set vector. We already have done the SCCMap lookup, we juts need to test it in two different ways. In turn, do most of the processing of these nodes as they go into the root SCC rather than lazily. This simplifies the final loop to just stitch the root SCC into its children's parent sets. No functionlatiy changed. However, this makes a few things painfully obvious, which was my intent. =] There is tons of repeated code introduced here and elsewhere. I'm splitting the refactoring of that code into helpers from this change so its clear that this is the change which switches the datastructures used around, and the other is a pure factoring & deduplication of code change. llvm-svn: 207217
* [ARM64] Add RUN lines for "–target arm64 –mattr=-fp-armv8" on AArch64 ↵Kevin Qin2014-04-251-3/+3
| | | | | | | | | | no-fp test. This patch is a supplement of implementing predicate of FP, enabling aarch64 backend no-fp tests on arm64 target for verification. During this, one bug is exposed and fixed by this patch. llvm-svn: 207215
* [ARM64] Support crc predicate on ARM64.Kevin Qin2014-04-255-5/+18
| | | | | | | According to the specification, CRC is an optional extension of the architecture. llvm-svn: 207214
* [LCG] During the incremental re-build of an SCC after removing an edge,Chandler Carruth2014-04-251-4/+5
| | | | | | | | | | | | | | | | | | remove the nodes in the SCC from the SCC map entirely prior to the DFS walk. This allows the SCC map to represent both the state of not-yet-re-added-to-an-SCC and added-back-to-this-SCC independently. The first is being missing from the SCC map, the second is mapping back to 'this'. In a subsequent commit, I'm going to use this property to simplify the new node list for this SCC. In theory, I think this also makes the contract for orphaning a node from the graph slightly less confusing. Now it is also orphaned from the SCC graph. Still, this isn't quite right either, and so I'm not adding test cases here. I'll add test cases for the behavior of orphaning nodes when the code *actually* supports it. The change here is mostly incidental, my goal is simplifying the algorithm. llvm-svn: 207213
* [LCG] Rather than doing a linear time SmallSetVector removal of eachChandler Carruth2014-04-251-6/+7
| | | | | | | | | child from the worklist, wait until we actually need to pop another element off of the worklist and skip over any that were already visited by the DFS. This also enables swapping the nodes of the SCC into the worklist. No functionality changed. llvm-svn: 207212
* [LCG] Remove a completely unnecessary loop. It wasn't even doing anyChandler Carruth2014-04-251-60/+54
| | | | | | | | | thing, just mucking up the code. I feel bad that I even wrote this loop. Very sorry. The diff is huge because of the indent change, but I promise all this is doing is realizing that the outer two loops were actually the exact same loops, and we didn't need two of them. llvm-svn: 207202
* [LCG] Now that the loop structure of the core SCC finding routine isChandler Carruth2014-04-251-1/+8
| | | | | | | | | factored into a more reasonable form, replace the tail call with a simple outer-loop continuation. It's sad that C++ makes this so awkward to write, but it seems more direct and clear than the tail call at this point. llvm-svn: 207201
* X86: convert object streamer selection to a switchSaleem Abdulrasool2014-04-251-5/+8
| | | | | | | | | | | Change the object streamer selection to a switch from a series of if conditions. Rather than defaulting to ELF, require that an ELF format is requested. The Windows/!ELF is maintained as MachO would have been selected first and will still provide a MachO format. Add an assertion that if COFF is requested that the target platform is Windows as only WinCOFF object emission is currently supported. llvm-svn: 207200
* Add missing cpp file headerDavid Blaikie2014-04-251-0/+8
| | | | | | Code review feedback from Paul Robinson on r207022 llvm-svn: 207198
* [C++] Use 'nullptr'. Target edition.Craig Topper2014-04-25189-1051/+1074
| | | | llvm-svn: 207197
* [C++] Use 'nullptr'. Transforms edition.Craig Topper2014-04-25100-1600/+1628
| | | | llvm-svn: 207196
* blockfreq: Only one mass distribution per nodeDuncan P. N. Exon Smith2014-04-251-61/+11
| | | | | | | | | | Remove the concepts of "forward" and "general" mass distributions, which was wrong. The split might have made sense in an early version of the algorithm, but it's definitely wrong now. <rdar://problem/14292693> llvm-svn: 207195
* blockfreq: Document assertionDuncan P. N. Exon Smith2014-04-251-1/+1
| | | | | | <rdar://problem/14292693> llvm-svn: 207194
* blockfreq: Document high-level functionsDuncan P. N. Exon Smith2014-04-251-1/+1
| | | | | | <rdar://problem/14292693> llvm-svn: 207191
* blockfreq: Scale LoopData::Scale on the way downDuncan P. N. Exon Smith2014-04-251-23/+12
| | | | | | | | | | | Rather than scaling loop headers and then scaling all the loop members by the header frequency, scale `LoopData::Scale` itself, and scale the loop members by it. It's much more obvious what's going on this way, and doesn't cost any extra multiplies. <rdar://problem/14292693> llvm-svn: 207189
* blockfreq: unwrapLoopPackage() => unwrapLoop()Duncan P. N. Exon Smith2014-04-251-10/+8
| | | | | | <rdar://problem/14292693> llvm-svn: 207188
* blockfreq: Pass the Loop directly into unwrapLoopPackage()Duncan P. N. Exon Smith2014-04-251-6/+4
| | | | | | <rdar://problem/14292693> llvm-svn: 207187
* blockfreq: Unwrap from LoopsDuncan P. N. Exon Smith2014-04-251-4/+2
| | | | | | | | When unwrapping loops, just visit the loops rather than all nodes. <rdar://problem/14292693> llvm-svn: 207186
* blockfreq: Separate unwrapLoops() from finalizeMetrics()Duncan P. N. Exon Smith2014-04-251-5/+9
| | | | | | <rdar://problem/14292693> llvm-svn: 207185
* blockfreq: Expose getPackagedNode()Duncan P. N. Exon Smith2014-04-251-24/+1
| | | | | | | | | Make `getPackagedNode()` a member function of `BlockFrequencyInfoImplBase` so that it's available for templated code. <rdar://problem/14292693> llvm-svn: 207183
* blockfreq: Store the header with the membersDuncan P. N. Exon Smith2014-04-251-2/+2
| | | | | | <rdar://problem/14292693> llvm-svn: 207182
* blockfreq: Encapsulate LoopData::HeaderDuncan P. N. Exon Smith2014-04-251-14/+12
| | | | | | <rdar://problem/14292693> llvm-svn: 207181
* blockfreq: Use LoopData directlyDuncan P. N. Exon Smith2014-04-251-30/+28
| | | | | | | | Instead of passing around loop headers, pass around `LoopData` directly. <rdar://problem/14292693> llvm-svn: 207179
* blockfreq: Use a std::list for LoopsDuncan P. N. Exon Smith2014-04-251-1/+1
| | | | | | | | | | | | As pointed out by David Blaikie in code review, a `std::list<T>` is simpler than a `std::vector<std::unique_ptr<T>>`. Another option is a `std::deque<T>` (which allocates in chunks), but I'd like to leave open the option of inserting in the middle of the sequence for handling irreducible control flow on the fly. <rdar://problem/14292693> llvm-svn: 207177
* Allow vectorization of bit intrinsics in BB Vectorizer.Karthik Bhat2014-04-251-8/+21
| | | | | | This patch adds support for vectorization of bit intrinsics such as bswap,ctpop,ctlz,cttz. llvm-svn: 207174
* ProfileData: Treat missing function counts as malformedJustin Bogner2014-04-251-2/+6
| | | | llvm-svn: 207172
* Fix quadratic performance during debug compression due to sections x symbols ↵David Blaikie2014-04-251-12/+21
| | | | | | | | | | | | | | | | iteration. When fixing the symbols in each compressed section we were iterating over all symbols for each compressed section. In extreme cases this could snowball severely (5min uncompressed -> 35min compressed) due to iterating over all symbols for each compressed section (large numbers of compressed sections can be generated by DWARF type units). To address this, build a map of the symbols in each section ahead of time, and access that map if a section is being compressed. This brings compile time for the aforementioned example down to ~6 minutes. llvm-svn: 207167
* Revert "This reapplies r207130 with an additional testcase+and a missing ↵Adrian Prantl2014-04-258-73/+45
| | | | | | | | check for" Typo in testcase. llvm-svn: 207166
* This reapplies r207130 with an additional testcase+and a missing check forAdrian Prantl2014-04-258-45/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AllocaInst that was missing in one location. Debug info for optimized code: Support variables that are on the stack and described by DBG_VALUEs during their lifetime. Previously, when a variable was at a FrameIndex for any part of its lifetime, this would shadow all other DBG_VALUEs and only a single fbreg location would be emitted, which in fact is only valid for a small range and not the entire lexical scope of the variable. The included dbg-value-const-byref testcase demonstrates this. This patch fixes this by Local - emitting dbg.value intrinsics for allocas that are passed by reference - dropping all dbg.declares (they are now fully lowered to dbg.values) SelectionDAG - renamed constructors for SDDbgValue for better readability. - fix UserValue::match() to handle indirect values correctly - not inserting an MMI table entries for dbg.values that describe allocas. - lowering dbg.values that describe allocas into *indirect* DBG_VALUEs. CodeGenPrepare - leaving dbg.values for an alloca were they are (see comment) Other - regenerated/updated instcombine.ll testcase and included source rdar://problem/16679879 http://reviews.llvm.org/D3374 llvm-svn: 207165
* Revert "Debug info for optimized code: Support variables that are on the ↵Adrian Prantl2014-04-257-66/+37
| | | | | | | | stack and" This reverts commit 207130 for buildbot breakage. llvm-svn: 207162
* Revert "Debug info: Let dbg.values inserted by LowerDbgDeclare inherit the ↵Adrian Prantl2014-04-241-3/+17
| | | | | | | | location" This reverts commit 207130 for buildbot breakage. llvm-svn: 207159
* [DWARF parser] Make a few methods non-publicAlexey Samsonov2014-04-243-10/+12
| | | | llvm-svn: 207156
* [DWARF parser] DWARFUnit ctor doesn't need both parsed and raw .debug_abbrev ↵Alexey Samsonov2014-04-245-36/+34
| | | | | | section. Remove the former. llvm-svn: 207153
* [DWARF parser] Simplify and re-format a methodAlexey Samsonov2014-04-242-11/+13
| | | | llvm-svn: 207151
* [LCG] Switch a weird do/while loop that actually couldn't fail itsChandler Carruth2014-04-241-5/+4
| | | | | | | condition into an obviously infinite loop with an assert about the degenerate condition. No functionality changed. llvm-svn: 207147
* X86: Don't transform shifts into ands when the sign bit is tested.Benjamin Kramer2014-04-241-1/+2
| | | | | | Should unbreak MultiSource/Benchmarks/mediabench/g721/g721encode/encode. llvm-svn: 207145
* Add 'musttail' marker to call instructionsReid Kleckner2014-04-2414-12/+145
| | | | | | | | | | | | This is similar to the 'tail' marker, except that it guarantees that tail call optimization will occur. It also comes with convervative IR verification rules that ensure that tail call optimization is possible. Reviewers: nicholas Differential Revision: http://llvm-reviews.chandlerc.com/D3240 llvm-svn: 207143
OpenPOWER on IntegriCloud