summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Fix PR3452 (an infinite loop bootstrapping) by disabling the recentChris Lattner2009-01-313-10/+497
| | | | | | | | | | | improvements to the EvaluateInDifferentType code. This code works by just inserted a bunch of new code and then seeing if it is useful. Instcombine is not allowed to do this: it can only insert new code if it is useful, and only when it is converging to a more canonical fixed point. Now that we iterate when DCE makes progress, this causes an infinite loop when the code ends up not being used. llvm-svn: 63483
* Fix PR3401: when using large integers, the typeDuncan Sands2009-01-3112-101/+155
| | | | | | | | | | | | | returned by getShiftAmountTy may be too small to hold shift values (it is an i8 on x86-32). Before and during type legalization, use a large but legal type for shift amounts: getPointerTy; afterwards use getShiftAmountTy, fixing up any shift amounts with a big type during operation legalization. Thanks to Dan for writing the original patch (which I shamelessly pillaged). llvm-svn: 63482
* now that all the pieces are in place, teach instcombine'sChris Lattner2009-01-312-2/+82
| | | | | | | | | | | | | | simplifydemandedbits to simplify instructions with *multiple uses* in contexts where it can get away with it. This allows it to simplify the code in multi-use-or.ll into a single 'add double'. This change is particularly interesting because it will cover up for some common codegen bugs with large integers created due to the recent SROA patch. When working on fixing those bugs, this should be disabled. llvm-svn: 63481
* simplify/clarify control flow and improve comments, no functionality change.Chris Lattner2009-01-311-13/+21
| | | | llvm-svn: 63480
* make some fairly meaty internal changes to how SimplifyDemandedBits works.Chris Lattner2009-01-311-206/+172
| | | | | | | | | | | | | Now, if it detects that "V" is the same as some other value, SimplifyDemandedBits returns the new value instead of RAUW'ing it immediately. This has two benefits: 1) simpler code in the recursive SimplifyDemandedBits routine. 2) it allows future fun stuff in instcombine where an operation has multiple uses and can be simplified in one context, but not all. #2 isn't implemented yet, this patch should have no functionality change. llvm-svn: 63479
* add accessorsChris Lattner2009-01-311-0/+9
| | | | llvm-svn: 63478
* minor cleanupsChris Lattner2009-01-311-3/+3
| | | | llvm-svn: 63477
* make sure to set Changed=true when instcombine hacks on the code,Chris Lattner2009-01-312-5/+33
| | | | | | | not doing so prevents it from properly iterating and prevents it from deleting the entire body of dce-iterate.ll llvm-svn: 63476
* Used "-enable-unsafe-fp-math" to allow this transformation - (a * b -c) = c ↵Mon P Wang2009-01-311-1/+1
| | | | | | - a *b. llvm-svn: 63475
* If unsafe FP optimization is not set, don't allow -(A-B) => B-A becauseMon P Wang2009-01-312-1/+14
| | | | | | when A==B, -0.0 != +0.0. llvm-svn: 63474
* Don't use DebugLoc::getUnknownLoc(). Default to something hopefully sensible.Bill Wendling2009-01-311-58/+55
| | | | llvm-svn: 63473
* Simplify and generalize the SROA "convert to scalar" transformation toChris Lattner2009-01-315-325/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-313-228/+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
* Fix build on case-sensitive filesystems (i.e. everybody else)Dale Johannesen2009-01-301-1/+1
| | | | llvm-svn: 63448
* 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-3017-53/+83
| | | | | | 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-306-29/+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-303-33/+64
| | | | llvm-svn: 63434
* DebugLoc form of getNOT().Bill Wendling2009-01-302-0/+18
| | | | 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-305-128/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* This is case is to uncover the bug in IntrinsicLowering.cpp,Zhou Sheng2009-01-301-0/+17
| | | | | | | | the LowerPartSet(). It didn't handle the situation correctly when the low, high argument values are in reverse order (low > high) with 'Val' type is i32 (a corner case). llvm-svn: 63386
* Add opposite_of and inverse_opt to support -fno- style options. ThisMike Stump2009-01-302-1/+54
| | | | | | 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
OpenPOWER on IntegriCloud