summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Don't allow .seh_handler and .seh_handlerdata directives inside chainedCharles Davis2011-05-211-0/+5
| | | | | | unwind areas. llvm-svn: 131795
* A handler for a function in the Win64 EH scheme can be both an unwind handlerCharles Davis2011-05-211-3/+5
| | | | | | | | | and an exception handler. Handle that case. Also, add an 'Emitted' member to the MCWin64EHUnwindInfo struct. It will be needed later. llvm-svn: 131791
* InstCombine: Turn mul.with.overflow(X, 2) into the cheaper ↵Benjamin Kramer2011-05-211-0/+14
| | | | | | add.with.overflow(X, X) llvm-svn: 131789
* Fix PR9978 by adding RIP to GR64_TC so it can be used as an address in PIC ↵Cameron Zwarich2011-05-211-1/+1
| | | | | | | | | code. It is already in GR64 for the same reasons. Since it isn't allocatable it can't cause any problems. llvm-svn: 131787
* Use the correct register to access stack frame objects.Akira Hatanaka2011-05-211-10/+31
| | | | llvm-svn: 131785
* Insert instructions that copy $sp to or from $fp at the right locations. Akira Hatanaka2011-05-211-11/+26
| | | | llvm-svn: 131784
* When BasicAA can determine that two pointers have the same base butDan Gohman2011-05-211-1/+11
| | | | | | | differ by a dynamic offset, return PartialAlias instead of MayAlias. See the comment in the code for details. This fixes PR9971. llvm-svn: 131781
* Have Program::Wait return -2 for crashed and timeouts instead of embeddingAndrew Trick2011-05-213-14/+13
| | | | | | info in the error message. Per Dan's request. llvm-svn: 131780
* Set the "LastFrameInst" field when streaming a .seh_setframe directive. ThisCharles Davis2011-05-211-0/+1
| | | | | | is needed for an upcoming patch. llvm-svn: 131772
* Fix PR9962 by properly constraining register classes in ↵Cameron Zwarich2011-05-201-0/+4
| | | | | | | | RemoveCopyByCommutingDef(). This actually fixes most of the VerifyCoalescing failures in test-suite. llvm-svn: 131768
* Change the order fixed objects are created in MipsTargetLowering::LowerCall inAkira Hatanaka2011-05-201-25/+35
| | | | | | | | | | | | | | preparation for reversing StackDirection. Fixed objects are created in the following order: 1. Incoming arguments passed on stack. 2. va_arg objects (include both arguments that are passed in registers and pointer to the location of the first va_arg argument). 3. $gp restore slot. 4. Outgoing arguments passed on stack. 5. Pointer to alloca'd space. llvm-svn: 131767
* Fix typo. When will I learn?Charles Davis2011-05-201-1/+0
| | | | llvm-svn: 131765
* Add fast-isel support for byval calls on x86.Eli Friedman2011-05-201-17/+51
| | | | llvm-svn: 131764
* Add .pdata and .xdata sections to the COFF TLOF implementation.Charles Davis2011-05-201-0/+15
| | | | llvm-svn: 131763
* No reason not to allow defining the CFA as a reg w/ offset zero.Jim Grosbach2011-05-202-4/+0
| | | | llvm-svn: 131760
* In CC_MipsO32, allocate a stack space regardless of whether the argument isAkira Hatanaka2011-05-201-22/+25
| | | | | | passed in register or on the stack. llvm-svn: 131758
* Fix typo.Jim Grosbach2011-05-201-1/+1
| | | | llvm-svn: 131757
* Add support for frame info use of the .cfi_def_cfa directive.Jim Grosbach2011-05-201-1/+2
| | | | llvm-svn: 131756
* Add missing leading \t when printing .cfi_def_cfa in the asmstreamer.Jim Grosbach2011-05-201-1/+1
| | | | llvm-svn: 131755
* Define functions that get/set maximum call frame size.Akira Hatanaka2011-05-201-1/+6
| | | | llvm-svn: 131752
* adds some attributes to attribute section when cpu is "xscale"Rafael Espindola2011-05-201-0/+6
| | | | | | | | (this is what used in Android NDK, when architecture is ARMv5) patch by Koan-Sin Tan llvm-svn: 131751
* fixes target address tBL and tBLX and sets relocation typeRafael Espindola2011-05-202-2/+13
| | | | | | | | of tBL/tBLX to R_ARM_THM_CALL (ARM ELF 4.7.1.6) Patch by koan-sin tan. llvm-svn: 131748
* Re-commit 131641 with fixes; de-pseudoize MOVSX16rr8 and friends.Stuart Hastings2011-05-205-50/+38
| | | | | | rdar://problem/8614450 llvm-svn: 131746
OpenPOWER on IntegriCloud