summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Simplify and generalize the SROA "convert to scalar" transformation toChris Lattner2009-01-311-317/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | be able to handle *ANY* alloca that is poked by loads and stores of bitcasts and GEPs with constant offsets. Before the code had a number of annoying limitations and caused it to miss cases such as storing into holes in structs and complex casts (as in bitfield-sroa) where we had unions of bitfields etc. This also handles a number of important cases that are exposed due to the ABI lowering stuff we do to pass stuff by value. One case that is pretty great is that we compile 2006-11-07-InvalidArrayPromote.ll into: define i32 @func(<4 x float> %v0, <4 x float> %v1) nounwind { %tmp10 = call <4 x i32> @llvm.x86.sse2.cvttps2dq(<4 x float> %v1) %tmp105 = bitcast <4 x i32> %tmp10 to i128 %tmp1056 = zext i128 %tmp105 to i256 %tmp.upgrd.43 = lshr i256 %tmp1056, 96 %tmp.upgrd.44 = trunc i256 %tmp.upgrd.43 to i32 ret i32 %tmp.upgrd.44 } which turns into: _func: subl $28, %esp cvttps2dq %xmm1, %xmm0 movaps %xmm0, (%esp) movl 12(%esp), %eax addl $28, %esp ret Which is pretty good code all things considering :). One effect of this is that SROA will start generating arbitrary bitwidth integers that are a multiple of 8 bits. In the case above, we got a 256 bit integer, but the codegen guys assure me that it can handle the simple and/or/shift/zext stuff that we're doing on these operations. This addresses rdar://6532315 llvm-svn: 63469
* Move CurDebugLoc into SelectionDAGLowering.Dale Johannesen2009-01-312-222/+233
| | | | llvm-svn: 63468
* back out my previous change, it exposes a latent bug. investigatingGabor Greif2009-01-311-5/+4
| | | | llvm-svn: 63463
* use precise accessorsGabor Greif2009-01-311-4/+5
| | | | llvm-svn: 63459
* Propagate debug info in LegalizeFloatTypes.Dale Johannesen2009-01-312-62/+74
| | | | | | Complete (modulo bugs). llvm-svn: 63458
* Propagate debug info. This file completeDale Johannesen2009-01-311-201/+255
| | | | | | (modulo bugs) llvm-svn: 63457
* Propagate debug info through MakeLibCall and aDale Johannesen2009-01-314-64/+81
| | | | | | couple of things that use it. llvm-svn: 63456
* More DebugLoc propagation.Bill Wendling2009-01-301-87/+120
| | | | llvm-svn: 63454
* More DebugLoc propagation.Bill Wendling2009-01-301-43/+62
| | | | llvm-svn: 63452
* More DebugLoc propagation in LOAD etc. methods.Bill Wendling2009-01-301-26/+42
| | | | llvm-svn: 63451
* More DebugLoc propagation in floating-point methods.Bill Wendling2009-01-301-27/+40
| | | | llvm-svn: 63446
* Make LowerCallTo and LowerArguments take a DebugLocDale Johannesen2009-01-3016-51/+80
| | | | | | argument. Adjust all callers and overloaded versions. llvm-svn: 63444
* Standardize comments about folding xforms.Bill Wendling2009-01-301-10/+10
| | | | llvm-svn: 63443
* Get rid of the non-DebugLoc-ified getNOT() method.Bill Wendling2009-01-305-28/+15
| | | | llvm-svn: 63442
* Propagate debug loc info for some FP arithmetic methods.Bill Wendling2009-01-301-13/+13
| | | | llvm-svn: 63441
* Propagate debug loc info for some FP arithmetic methods.Bill Wendling2009-01-301-22/+30
| | | | llvm-svn: 63440
* Propagate debug loc info for BIT_CONVERT.Bill Wendling2009-01-301-29/+46
| | | | llvm-svn: 63439
* Propagate debug loc info for more *_EXTEND methods.Bill Wendling2009-01-301-15/+24
| | | | llvm-svn: 63437
* Propagate debug loc info for ANY_EXTEND.Bill Wendling2009-01-301-12/+16
| | | | llvm-svn: 63436
* Propagate debug loc info for some of the *_EXTEND functions.Bill Wendling2009-01-302-33/+63
| | | | llvm-svn: 63434
* DebugLoc form of getNOT().Bill Wendling2009-01-301-0/+17
| | | | llvm-svn: 63433
* - Propagate debug loc info for SELECT.Bill Wendling2009-01-301-25/+32
| | | | | | | - Added xform for (select X, 1, Y) and (select X, Y, 0), which was commented on, but missing. llvm-svn: 63428
* Propagate debug loc info for Shifts.Bill Wendling2009-01-301-60/+68
| | | | llvm-svn: 63424
* Propagate debug loc info for XOR and MatchRotate.Bill Wendling2009-01-301-32/+38
| | | | llvm-svn: 63420
* Propagate debug loc info for OR. Also clean up some comments.Bill Wendling2009-01-301-21/+24
| | | | llvm-svn: 63419
* Perform obvious constant arithmetic folding.Bill Wendling2009-01-301-6/+8
| | | | llvm-svn: 63417
* Propagate debug loc info for AND. Also clean up some comments.Bill Wendling2009-01-301-21/+31
| | | | llvm-svn: 63416
* Propagate debug loc info in SimplifyBinOpWithSameOpcodeHands.Bill Wendling2009-01-301-8/+9
| | | | llvm-svn: 63411
* use precise gettersGabor Greif2009-01-301-5/+8
| | | | llvm-svn: 63403
* use precise gettersGabor Greif2009-01-301-2/+2
| | | | llvm-svn: 63402
* Each input file is encoded as a separate compile unit in LLVM debuggingDevang Patel2009-01-302-72/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | information output. However, many target specific tool chains prefer to encode only one compile unit in an object file. In this situation, the LLVM code generator will include debugging information entities in the compile unit that is marked as main compile unit. The code generator accepts maximum one main compile unit per module. If a module does not contain any main compile unit then the code generator will emit multiple compile units in the output object file. [Part 1] Update DebugInfo APIs to accept optional boolean value while creating DICompileUnit to mark the unit as "main" unit. By defaults all units are considered non-main. Update SourceLevelDebugging.html to document "main" compile unit. Update DebugInfo APIs to not accept and encode separate source file/directory entries while creating various llvm.dbg.* entities. There was a recent, yet to be documented, change to include this additional information so no documentation changes are required here. Update DwarfDebug to handle "main" compile unit. If "main" compile unit is seen then all DIEs are inserted into "main" compile unit. All other compile units are used to find source location for llvm.dbg.* values. If there is not any "main" compile unit then create unique compile unit DIEs for each llvm.dbg.compile_unit. [Part 2] Create separate llvm.dbg.compile_unit for each input file. Mark compile unit create for main_input_filename as "main" compile unit. Use appropriate compile unit, based on source location information collected from the tree node, while creating llvm.dbg.* values using DebugInfo APIs. --- This is Part 1. llvm-svn: 63400
* As Duncan suggested, add braces for the one-line "else branch".Zhou Sheng2009-01-301-1/+2
| | | | | | Thanks, Duncan. llvm-svn: 63389
* This is to fix the bug in IntrinsicLowering.cpp,Zhou Sheng2009-01-301-1/+2
| | | | | | | | the LowerPartSet(). It didn't handle the situation correctly when the low, high argument values are in reverse order (low > high) with 'Val' type i32 (a corner case). llvm-svn: 63388
* Fixed the comment. No functionality change.Sanjiv Gupta2009-01-301-1/+1
| | | | llvm-svn: 63387
* Add opposite_of and inverse_opt to support -fno- style options. ThisMike Stump2009-01-301-1/+21
| | | | | | is necessary for eventual gcc commmand line compatibility. llvm-svn: 63384
* Use sublw for comparison with literals instead of subwf.Sanjiv Gupta2009-01-301-9/+11
| | | | llvm-svn: 63382
* When PerformBuildVectorCombine, avoid creating a X86ISD::VZEXT_LOAD ofMon P Wang2009-01-301-1/+5
| | | | | | an illegal type. llvm-svn: 63380
* Enable emitting of constant values in non-default address space as well. The ↵Sanjiv Gupta2009-01-305-98/+97
| | | | | | APIs emitting constants now take an additional parameter signifying the address space in which to emit. The APIs like getData8BitsDirective() etc are made virtual enabling targets to be able to define appropirate directivers for various sizes and address spaces. llvm-svn: 63377
* Propagate debug loc info in SimplifyNodeWithTwoResults.Bill Wendling2009-01-301-7/+8
| | | | llvm-svn: 63376
* Propagate debug loc info for MULHS.Bill Wendling2009-01-301-2/+2
| | | | llvm-svn: 63375
* Propagate debug loc info for SREM and UREM.Bill Wendling2009-01-301-10/+12
| | | | llvm-svn: 63374
* Propagate debug loc info for UDIV.Bill Wendling2009-01-301-6/+7
| | | | llvm-svn: 63373
* Propagate debug loc info for SDIV.Bill Wendling2009-01-301-12/+21
| | | | llvm-svn: 63372
* Forgot to propagate debug loc info here.Bill Wendling2009-01-301-2/+4
| | | | llvm-svn: 63371
* Fix a post-RA scheduling dependency bug.Dan Gohman2009-01-302-12/+91
| | | | | | | | | | | | | | | If a MachineInstr doesn't have a memoperand but has an opcode that is known to load or store, assume its memory reference may alias *anything*, including stack slots which the compiler completely controls. To partially compensate for this, teach the ScheduleDAG building code to do basic getUnderlyingValue analysis. This greatly reduces the number of instructions that require restrictive dependencies. This code will need to be revisited when we start doing real alias analysis, but it should suffice for now. llvm-svn: 63370
* Propagate debug loc info for MUL.Bill Wendling2009-01-301-16/+21
| | | | llvm-svn: 63369
* Propagate debug loc info in SUB.Bill Wendling2009-01-301-7/+8
| | | | llvm-svn: 63368
* Propagate debug loc info in ADDC and ADDE.Bill Wendling2009-01-301-11/+13
| | | | llvm-svn: 63367
* Propagate debug loc info in DAG combine's "ADD".Bill Wendling2009-01-301-20/+18
| | | | llvm-svn: 63366
* - Propagate debug loc info in combineSelectAndUse().Bill Wendling2009-01-301-16/+23
| | | | | | | - Modify ReassociateOps so that the resulting SDValue is what the comment claims it is. llvm-svn: 63365
OpenPOWER on IntegriCloud