summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* [SystemZ] Use SRST to implement strlen and strnlenRichard Sandiford2013-08-162-0/+63
| | | | | | It would also make sense to use it for memchr; I'm working on that now. llvm-svn: 188547
* [SystemZ] Use MVST to implement strcpy and stpcpyRichard Sandiford2013-08-162-0/+38
| | | | llvm-svn: 188546
* [SystemZ] Use CLST to implement strcmpRichard Sandiford2013-08-162-0/+34
| | | | llvm-svn: 188544
* [SystemZ] Fix handling of 64-bit memcmp resultsRichard Sandiford2013-08-162-19/+31
| | | | | | | | | | | | | Generalize r188163 to cope with return types other than MVT::i32, just as the existing visitMemCmpCall code did. I've split this out into a subroutine so that it can be used for other upcoming patches. I also noticed that I'd used the wrong API to record the out chain. It's a load that uses DAG.getRoot() rather than getRoot(), so the out chain should go on PendingLoads. I don't have a testcase for that because we don't do any interesting scheduling on z yet. llvm-svn: 188540
* Make a few more things const.Bill Wendling2013-08-151-2/+2
| | | | llvm-svn: 188484
* Use a reference instead of making an unnecessary copy. Also use 'const'.Bill Wendling2013-08-151-3/+3
| | | | llvm-svn: 188483
* Replace getValueType().getSimpleVT() with getSimpleValueType().Craig Topper2013-08-155-15/+15
| | | | llvm-svn: 188442
* Auto-compute live intervals on demand.Mark Lacey2013-08-147-90/+115
| | | | | | | | | | | | | | | When new virtual registers are created during splitting/spilling, defer creation of the live interval until we need to use the live interval. Along with the recent commits to notify LiveRangeEdit when new virtual registers are created, this makes it possible for functions like TargetInstrInfo::loadRegFromStackSlot() and TargetInstrInfo::storeRegToStackSlot() to create multiple virtual registers as part of the process of generating loads/stores for different register classes, and then have the live intervals for those new registers computed when they are needed. llvm-svn: 188437
* Notify LiveRangeEdit of new virtual registers.Mark Lacey2013-08-142-3/+14
| | | | | | | | | Add a delegate class to MachineRegisterInfo with a single virtual function, MRI_NoteNewVirtualRegister(). Update LiveRangeEdit to inherit from this delegate class and override the definition of the callback with an implementation that tracks the newly created virtual registers. llvm-svn: 188435
* Track new virtual registers by register number.Mark Lacey2013-08-1410-68/+78
| | | | | | | | | | Track new virtual registers by register number, rather than by the live interval created for them. This is the first step in separating the creation of new virtual registers and new live intervals. Eventually live intervals will be created and populated on demand after the virtual registers have been created and used in instructions. llvm-svn: 188434
* DebugInfo: Prefer references over pointers, pass by const reference for a ↵David Blaikie2013-08-142-7/+7
| | | | | | type that will grow in the future llvm-svn: 188422
* Remove unnecessary parameter to RenumberValues.Jakob Stoklund Olesen2013-08-143-3/+3
| | | | | | Patch by Matthias Braun! llvm-svn: 188393
* Improve misleading comment.Jakob Stoklund Olesen2013-08-141-1/+1
| | | | | | Patch by Matthias Braun! llvm-svn: 188391
* Remove declaration of nonexistant function.Jakob Stoklund Olesen2013-08-141-4/+0
| | | | | | Patch by Matthias Braun! llvm-svn: 188390
* LiveIntervalUnion is not used in RegAllocBase.Jakob Stoklund Olesen2013-08-141-1/+1
| | | | | | Patch by Matthias Braun! llvm-svn: 188389
* DAG: Combine (and (setne X, 0), (setne X, -1)) -> (setuge (add X, 1), 2)Jim Grosbach2013-08-131-0/+13
| | | | | | | | | | | | | | | | | | | | | | | A common idiom is to use zero and all-ones as sentinal values and to check for both in a single conditional ("x != 0 && x != (unsigned)-1"). That generates code, for i32, like: testl %edi, %edi setne %al cmpl $-1, %edi setne %cl andb %al, %cl With this transform, we generate the simpler: incl %edi cmpl $1, %edi seta %al Similar improvements for other integer sizes and on other platforms. In general, combining the two setcc instructions into one is better. rdar://14689217 llvm-svn: 188315
* Update makeLibCall to return both the call and the chain associated with the ↵Michael Gottesman2013-08-134-63/+73
| | | | | | | | | | | | | | | libcall instead of just the call. This allows us to specify libcalls that return void. LowerCallTo returns a pair with the return value of the call as the first element and the chain associated with the return value as the second element. If we lower a call that has a void return value, LowerCallTo returns an SDValue with a NULL SDNode and the chain for the call. Thus makeLibCall by just returning the first value makes it impossible for you to set up the chain so that the call is not eliminated as dead code. I also updated all references to makeLibCall to reflect the new return type. llvm-svn: 188300
* Output DW_AT_stmt_list dwarf debug info as DW_FORM_sec_offset instead of ↵Carlo Kok2013-08-131-1/+1
| | | | | | DW_FORM_data4 as it is a section offset (fixes the coff/dwarf debug info statement locations) llvm-svn: 188297
* For COFF only: dwarf debug info output a label reference as a section ↵Carlo Kok2013-08-132-3/+5
| | | | | | relative item only when it's one of dw_from strp, sec_offset, ref_addr or op_call_ref instead of going by size. llvm-svn: 188296
* Pass DIEHash::collectAttributes output argument by-pointer instead of by-value.Evgeniy Stepanov2013-08-132-5/+5
| | | | | | Before this, collectAttributes() was operating on a local object. llvm-svn: 188254
* [-cxx-abi microsoft] Stick zero initialized symbols into the .bss section ↵David Majnemer2013-08-131-4/+7
| | | | | | | | | | | | | | | | | | | | | | | for COFF Summary: We need to do two things: - Initialize BSSSection in MCObjectFileInfo::InitCOFFMCObjectFileInfo - Teach TargetLoweringObjectFileCOFF::SelectSectionForGlobal what to do with it This fixes PR16861. Reviewers: rnk Reviewed By: rnk CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1361 llvm-svn: 188244
* Add the start of DIE hashing for DWARF4 type units and split dwarfEric Christopher2013-08-133-5/+149
| | | | | | | | | | CUs. Currently only hashes the name of CUs and the names of any children, but it's an obvious first step to show the framework. The testcase should continue to be correct, however, as it's an empty TU. llvm-svn: 188243
* Reflow comment.Eric Christopher2013-08-121-2/+2
| | | | llvm-svn: 188233
* Remove empty constructor.Eric Christopher2013-08-121-3/+0
| | | | llvm-svn: 188232
* Fixed SelectionDAGBuilder.h C++ filetype declaration to use the canonical ↵Michael Gottesman2013-08-121-1/+1
| | | | | | C++ instead of c++. llvm-svn: 188203
* Fixed another place in CodeGen where we had a typo in our editor C++ ↵Michael Gottesman2013-08-121-1/+1
| | | | | | filetype declaration. llvm-svn: 188202
* [branchfolding] Fix typo in C++ editor declaration.Michael Gottesman2013-08-121-1/+1
| | | | llvm-svn: 188201
* Move the addition of the dwo_id as late as possible after everythingEric Christopher2013-08-121-21/+24
| | | | | | has been finalized except for sizes and offsets. Update test accordingly. llvm-svn: 188199
* [stackprotector] Add in the stackprotector libcall.Michael Gottesman2013-08-121-0/+7
| | | | | | | We support this libcall on all platforms except for OpenBSD (See lib/Codegen/StackProtector.cpp). llvm-svn: 188193
* [SystemZ] Use CLC and IPM to implement memcmpRichard Sandiford2013-08-121-0/+21
| | | | | | | For now this is restricted to fixed-length comparisons with a length in the range [1, 256], as for memcpy() and MVC. llvm-svn: 188163
* Allow compatible extension attributes for tail callsTim Northover2013-08-121-14/+36
| | | | | | | | If the tail-callee and caller give the same bits via the same signext/zeroext attribute then a tail-call should be allowed, since the extension has already been done by the callee. llvm-svn: 188159
* [stackprotector] Simplify SP Pass so that we emit different fail basic ↵Michael Gottesman2013-08-091-10/+10
| | | | | | | | | | | | | blocks for each fail condition. This patch decouples the stack protector pass so that we can support stack protector implementations that do not use the IR level generated stack protector fail basic block. No codesize increase is caused by this change since the MI level tail merge pass properly merges together the fail condition blocks (see the updated test). llvm-svn: 188105
* Make helper static and fix formatting.Benjamin Kramer2013-08-091-5/+4
| | | | llvm-svn: 188074
* Change asserts at the top of getVectorShuffle to check that LHS and RHS have ↵Craig Topper2013-08-091-6/+3
| | | | | | | | | | the same type as the result. Previously the asserts were only checking that RHS and LHS were the same type and had the same element type as the result. All downstream code for ISD::VECTOR_SHUFFLE requires the types to be the same. Also removed one unnecessary check of matched element counts that was present in the code. llvm-svn: 188051
* Set ISD::FROUND to Expand by default for all typesHal Finkel2013-08-091-4/+3
| | | | | | | | | | | For most libm ISD nodes, TargetLoweringBase::initActions sets the default scalar-type action to Expand, and leaves the vector-type action default as Legal. This is not appropriate for the new ISD::FROUND node (which no backend but PowerPC handles explicitly). Fixes PR16842. llvm-svn: 188048
* Update the CMake build files.Eric Christopher2013-08-081-0/+1
| | | | llvm-svn: 188030
* Move hash computation code into a separate class and file.Eric Christopher2013-08-083-99/+191
| | | | | | No functional change intended. llvm-svn: 188028
* Revert "Reapply r185872 now that the address sanitizer has been changed to ↵Arnold Schwaighofer2013-08-081-6/+6
| | | | | | | | support this." This reverts commit r187939. It broke an O0 build of a spec benchmark. llvm-svn: 188012
* For DW_TAG_template_type_parameter the actual passed in type couldEric Christopher2013-08-081-1/+3
| | | | | | | be void and therefore not have a type entry. Only add the type if it is non-void and provide a testcase. llvm-svn: 187966
* Remove AllUndef check from one of the loops in getVectorShuffle. It was ↵Craig Topper2013-08-081-5/+1
| | | | | | already handled by the 'AllLHS && AllRHS' check after the previous loop. llvm-svn: 187965
* The conversion to bool is fine here, no need to check isType.Eric Christopher2013-08-081-1/+1
| | | | llvm-svn: 187964
* Make sure that if we're going to attempt to add a type to a DIE thatEric Christopher2013-08-081-10/+16
| | | | | | | | | | | | the type exists. Fix up cases where we weren't checking for optional types and add an assert to addType to make sure we catch this in the future. Fix up a testcase that was using the tag for DW_TAG_array_type when it meant DW_TAG_enumeration_type. llvm-svn: 187963
* Change variable name and reflow formatting.Eric Christopher2013-08-081-10/+10
| | | | llvm-svn: 187962
* Optimize mask generation for one of the DAG combiner shufflevector cases.Craig Topper2013-08-081-3/+3
| | | | llvm-svn: 187961
* Revert "coff also doesn't have a ReadOnlySection yet, (!)"David Majnemer2013-08-081-0/+3
| | | | | | | | | | | This reverts commit r77814. We were sticking global constants in the .data section instead of in the .rdata section when emitting for COFF. This fixes PR16831. llvm-svn: 187956
* Reflow for loop.Eric Christopher2013-08-081-2/+2
| | | | llvm-svn: 187954
* Be more rigorous about the sizes of forms and attributes.Eric Christopher2013-08-086-81/+81
| | | | llvm-svn: 187953
* Reapply r185872 now that the address sanitizer has been changed to support this.Bill Wendling2013-08-071-6/+6
| | | | | | | | | | | | | | | | | | | | | Original commit message: Stop emitting weak symbols into the "coal" sections. The Mach-O linker has been able to support the weak-def bit on any symbol for quite a while now. The compiler however continued to place these symbols into a "coal" section, which required the linker to map them back to the base section name. Replace the sections like this: __TEXT/__textcoal_nt instead use __TEXT/__text __TEXT/__const_coal instead use __TEXT/__const __DATA/__datacoal_nt instead use __DATA/__data <rdar://problem/14265330> llvm-svn: 187939
* Add ISD::FROUND for libm round()Hal Finkel2013-08-079-1/+59
| | | | | | | | | | | | | | | All libm floating-point rounding functions, except for round(), had their own ISD nodes. Recent PowerPC cores have an instruction for round(), and so here I'm adding ISD::FROUND so that round() can be custom lowered as well. For the most part, this is straightforward. I've added an intrinsic and a matching ISD node just like those for nearbyint() and friends. The SelectionDAG pattern I've named frnd (because ISD::FP_ROUND has already claimed fround). This will be used by the PowerPC backend in a follow-up commit. llvm-svn: 187926
* Using the integrated assembler we'd fail to change section to theEric Christopher2013-08-071-2/+3
| | | | | | | | | .tbss section for zerofill thread locals. Make sure we do this before emitting the zerofills. Fixes PR15972. llvm-svn: 187913
OpenPOWER on IntegriCloud