summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Revert 121907 (it causes llc crash) and apply original patch from PR9817.Devang Patel2011-05-232-3/+3
| | | | llvm-svn: 131926
* Fixes related to coding style.Akira Hatanaka2011-05-231-36/+36
| | | | llvm-svn: 131922
* When checking for signed multiplication overflow, watch out for INT_MIN and -1.Dan Gohman2011-05-231-0/+2
| | | | | | This fixes PR9845. llvm-svn: 131919
* Propagate error correctly in the MC Asm parser for leading '$' expressions.Jim Grosbach2011-05-231-1/+1
| | | | llvm-svn: 131918
* Fix MipsAsmPrinter::printSavedRegsBitmaskChange. Remove functions and variablesAkira Hatanaka2011-05-232-38/+40
| | | | | | in MipsFunctionInfo that are no longer used. llvm-svn: 131917
* clarify this, apparently it is confusing :)Chris Lattner2011-05-231-1/+3
| | | | llvm-svn: 131916
* Change StackDirection from StackGrowsUp to StackGrowsDown.Akira Hatanaka2011-05-235-212/+60
| | | | | | | | | | | | | | | | The following improvements are accomplished as a result of applying this patch: - Fixed frame objects' offsets (relative to either the virtual frame pointer or the stack pointer) are set before instruction selection is completed. There is no need to wait until Prologue/Epilogue Insertion is run to set them. - Calculation of final offsets of fixed frame objects is straightforward. It is no longer necessary to assign negative offsets to fixed objects for incoming arguments in order to distinguish them from the others. - Since a fixed object has its relative offset set during instruction selection, there is no need to conservatively set its alignment to 4. - It is no longer necessary to reorder non-fixed frame objects in MipsFrameLowering::adjustMipsStackFrame. llvm-svn: 131915
* Preserve debug info during iSel by keeping DanglingDebugInfoMap live until ↵Devang Patel2011-05-233-1/+19
| | | | | | | | end of function. Patch by Micah Villmow llvm-svn: 131908
* While replacing all uses of a SDValue with another value, do not forget to ↵Devang Patel2011-05-231-0/+3
| | | | | | transfer SDDbgValue. llvm-svn: 131907
* Clear list of instructions without DebugLoc.Devang Patel2011-05-231-0/+1
| | | | llvm-svn: 131906
* Implement .seh_stackalloc and .seh_pushframe parsing.Charles Davis2011-05-231-4/+27
| | | | | | | | | I haven't implemented any of the ones that take registers yet. The problem is that for x86-64 the streamer methods expect a native x86 register number (note: %r8-%r15 want 8-15 instead of 0-7; same for %xmm8-%xmm15). I haven't figured out exactly how I want to do that yet. llvm-svn: 131899
* fix a really nasty basicaa mod/ref calculation bug that was causing ↵Chris Lattner2011-05-231-2/+5
| | | | | | | | miscompilation of UnitTests/ObjC/messages-2.m with the recent optimizer improvements. llvm-svn: 131897
* Fix <rdar://problem/9476260> by having tail calls always generate 32-bit ↵Cameron Zwarich2011-05-231-1/+3
| | | | | | | | branches in Darwin Thumb2 code. Tail calls are already disabled on Thumb1. llvm-svn: 131894
* rearrange two transforms, since one subsumes the other. Make the ↵Chris Lattner2011-05-231-16/+23
| | | | | | | | shift-exactness xform recurse. llvm-svn: 131888
* Transform any logical shift of a power of two into an exact/NUW shift whenChris Lattner2011-05-231-0/+17
| | | | | | in a known-non-zero context. llvm-svn: 131887
* use the valuetracking isPowerOfTwo function, which is more powerful than ↵Chris Lattner2011-05-231-4/+4
| | | | | | | | checking for a constant directly. Thanks to Duncan for pointing this out. llvm-svn: 131885
* Teach valuetracking that byval arguments with a specified alignment areChris Lattner2011-05-232-6/+21
| | | | | | | | | | | | | | | | | | | | | | aligned. Teach memcpyopt to not give up all hope when confonted with an underaligned memcpy feeding an overaligned byval. If the *source* of the memcpy can be determined to be adequeately aligned, or if it can be forced to be, we can eliminate the memcpy. This addresses PR9794. We now compile the example into: define i32 @f(%struct.p* nocapture byval align 8 %q) nounwind ssp { entry: %call = call i32 @g(%struct.p* byval align 8 %q) nounwind ret i32 %call } in both x86-64 and x86-32 mode. We still don't get a tailcall though, because tailcalls apparently can't handle byval. llvm-svn: 131884
* add a helper method to get the byval alignment of an argument.Chris Lattner2011-05-221-0/+6
| | | | llvm-svn: 131883
* Eliminate some temporary variables, and don't call getByValTypeAlignmentChris Lattner2011-05-221-6/+8
| | | | | | when we're just going to throw the result away. No functionality change. llvm-svn: 131880
* add a missing alias to make us more bug compatible with gcc, PR9378Chris Lattner2011-05-221-0/+1
| | | | llvm-svn: 131874
* implement PR9315, constant folding exp2 in terms of pow (since hosts withoutChris Lattner2011-05-221-1/+7
| | | | | | C99 runtimes don't have exp2). llvm-svn: 131872
* RTABI chapter 4.3.4 specifies __eabi_mem* calls. Specifically, __eabi_memset ↵Renato Golin2011-05-223-0/+79
| | | | | | accepts parameters (ptr, size, value) in a different order than GNU's memset (ptr, value, size), therefore the special lowering in AAPCS mode. Implementation by Evzen Muller. llvm-svn: 131868
* Add methods to parse the SEH directives to the COFFAsmParser. Implement someCharles Davis2011-05-223-3/+160
| | | | | | | of them, particularly the ones that don't take arguments. Also implement .seh_proc and .seh_handler. llvm-svn: 131866
* add a note.Chris Lattner2011-05-221-0/+10
| | | | llvm-svn: 131863
* add some random notes.Chris Lattner2011-05-221-0/+5
| | | | llvm-svn: 131862
* Teach ValueTracking about x86 crc32 intrinsics.Evan Cheng2011-05-221-0/+4
| | | | llvm-svn: 131861
* Carve out a place in instcombine to put transformations which work knowing ↵Chris Lattner2011-05-221-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that their result is non-zero. Implement an example optimization (PR9814), which allows us to transform: A / ((1 << B) >>u 2) into: A >>u (B-2) which we compile into: _divu3: ## @divu3 leal -2(%rsi), %ecx shrl %cl, %edi movl %edi, %eax ret instead of: _divu3: ## @divu3 movb %sil, %cl movl $1, %esi shll %cl, %esi shrl $2, %esi movl %edi, %eax xorl %edx, %edx divl %esi, %eax ret llvm-svn: 131860
* Fix Bug 9386 - ARM disassembler failed to disassemble conditional bxJohnny Chen2011-05-222-3/+13
| | | | | | | Modified the patch to .td file supplied by Jyun-Yan You. Add a test case and modified ARMDisassemblerCore.cpp a little bit. llvm-svn: 131859
* Fix PR9815: I was trying to get out of "generating code and thenChris Lattner2011-05-221-44/+66
| | | | | | | | failing to form a memset, then having to delete it" but my approximation isn't safe for self recurrent loops. Instead of doign a hack, just do it the right way. llvm-svn: 131858
* Add a parameter to ConstantFoldTerminator() that callers can use to ask it ↵Frits van Bommel2011-05-225-10/+22
| | | | | | | | to also clean up the condition of any conditional terminator it folds to be unconditional, if that turns the condition into dead code. This just means it calls RecursivelyDeleteTriviallyDeadInstructions() in strategic spots. It defaults to the old behavior. I also changed -simplifycfg, -jump-threading and -codegenprepare to use this to produce slightly better code without any extra cleanup passes (AFAICT this was the only place in -simplifycfg where now-dead conditions of replaced terminators weren't being cleaned up). The only other user of this function is -sccp, but I didn't read that thoroughly enough to figure out whether it might be holding pointers to instructions that could be deleted by this. llvm-svn: 131855
* fix PR9856, an incorrectly conservative assertion: a global can beChris Lattner2011-05-221-3/+3
| | | | | | "stored once" even if its address is compared. llvm-svn: 131849
* fix PR9841 by having GVN not process dead loads. This wasChris Lattner2011-05-221-0/+5
| | | | | | | causing it to get into infinite loops when it would widen a load (which can necessarily leave around dead loads). llvm-svn: 131847
* fix a bug for hosts without round, PR8893.Chris Lattner2011-05-221-1/+1
| | | | llvm-svn: 131842
* move PR9408 here.Chris Lattner2011-05-221-0/+40
| | | | llvm-svn: 131841
* Teach the inliner to emit llvm.lifetime.start/end, to scope the local variablesNick Lewycky2011-05-221-0/+70
| | | | | | of the inlinee to the code representing the original function. llvm-svn: 131838
* switch to using a smallvector to avoid allocations for most normal size ↵Chris Lattner2011-05-221-2/+2
| | | | | | instructions. llvm-svn: 131837
* tidy some things up.Chris Lattner2011-05-221-16/+6
| | | | llvm-svn: 131836
* Implement emission of all Win64 exception tables. Make the COFF streamer emitCharles Davis2011-05-223-1/+24
| | | | | | these tables. llvm-svn: 131833
* Make the COFF streamer emit unwind info when processing a .seh_handlerdataCharles Davis2011-05-223-0/+200
| | | | | | | | | | directive. Implement emission of Win64 EH unwind info. Pull in <cassert> in MCWin64EH.h so it can use the assert() macro. llvm-svn: 131832
* Don't allow unaligned offsets and sizes in the Win64 EH directives.Charles Davis2011-05-221-2/+10
| | | | | | Also, fix threshold for 'Big' register saves. llvm-svn: 131830
* random comment cleanups.Chris Lattner2011-05-221-4/+4
| | | | llvm-svn: 131829
* remove StandardPasses, it has been replaced with PassManagerBuilderChris Lattner2011-05-222-248/+0
| | | | llvm-svn: 131827
* eliminate dependence on StandardPasses.h. The code generator's pass pipelineChris Lattner2011-05-221-2/+6
| | | | | | should eventually convert to PMBuilder, but I don't plan to do this. llvm-svn: 131819
* Add CreateLifetimeStart and CreateLifetimeEnd to the IRBuilder, with plans toNick Lewycky2011-05-211-1/+30
| | | | | | use these soon. llvm-svn: 131812
* Revert commit 131781, to see if it fixes the x86-64 dragonegg buildbot.Duncan Sands2011-05-211-11/+1
| | | | | | | | | Original log message: When BasicAA can determine that two pointers have the same base but differ by a dynamic offset, return PartialAlias instead of MayAlias. See the comment in the code for details. This fixes PR9971. llvm-svn: 131809
* add a copy ctor to TargetLibraryInfo.Chris Lattner2011-05-211-0/+6
| | | | llvm-svn: 131806
* PR7952: Make isa<> use the same logic as cast<>, so that they both workEli Friedman2011-05-211-1/+1
| | | | | | consistently. llvm-svn: 131803
* X86: smulo -> add is now done target-independently in DAGCombiner, remove ↵Benjamin Kramer2011-05-211-6/+0
| | | | | | the patterns. llvm-svn: 131801
* Implement mulo x, 2 -> addo x, x in DAGCombiner.Benjamin Kramer2011-05-211-0/+24
| | | | llvm-svn: 131800
* Revert "InstCombine: Turn mul.with.overflow(X, 2) into the cheaper ↵Benjamin Kramer2011-05-211-14/+0
| | | | | | | | add.with.overflow(X, X)" It's better to do this in codegen, mul.with.overflow(X, 2) is more canonical because it has only one use on "X". llvm-svn: 131798
OpenPOWER on IntegriCloud