summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* As a temporary workaround for post-RA not handling DebugValue instructions,Bob Wilson2010-04-171-0/+11
| | | | | | | just remove them all. Radar 7873207 (working around the root problem of Radar 7759363). llvm-svn: 101604
* Revert "Use a simpler data structure to calculate the least recently used ↵Jakob Stoklund Olesen2010-04-171-41/+112
| | | | | | | | register in RegAllocLocal." This reverts commit 101392. It broke a buildbot. llvm-svn: 101595
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-167-177/+178
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* Add support to emit dwarf ranges.Devang Patel2010-04-164-5/+59
| | | | llvm-svn: 101575
* Use a simpler data structure to calculate the least recently used register ↵Jakob Stoklund Olesen2010-04-161-112/+41
| | | | | | | | in RegAllocLocal. This makes the local register allocator about 20% faster. llvm-svn: 101574
* (i32 sext_in_reg (i32 aext (i16 x)), i16) -> (i32 sext x). No known test ↵Evan Cheng2010-04-161-1/+2
| | | | | | case until -promote-16bit is enabled. llvm-svn: 101551
* Create a new TargetSelectionDAGInfo class. This will eventually acquireDan Gohman2010-04-162-0/+22
| | | | | | SelectionDAG-specific parts of TargetLowering. llvm-svn: 101537
* Commit this, which should have accompanied 101531.Dan Gohman2010-04-161-1/+2
| | | | llvm-svn: 101532
* 80 col.Evan Cheng2010-04-161-1/+2
| | | | llvm-svn: 101501
* 80 col.Evan Cheng2010-04-161-1/+1
| | | | llvm-svn: 101500
* Avoid creating virtual registers for unused values.Dan Gohman2010-04-162-5/+5
| | | | llvm-svn: 101480
* Fix an assertion string.Dan Gohman2010-04-161-1/+1
| | | | llvm-svn: 101478
* Fix a comment.Dan Gohman2010-04-161-1/+1
| | | | llvm-svn: 101477
* reapply r101434Gabor Greif2010-04-167-178/+177
| | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101465
* The JIT calls TidyLandingPads to tidy up the landing pads. However, because theBill Wendling2010-04-161-3/+8
| | | | | | | | | | | | | | | | JIT doesn't use the MC back-end asm printer to emit labels that it uses, the section for the MCSymbol is never set. And thus the MCSymbol for the EH label isn't marked as "defined". Because of that, TidyLandingPads removes the needed landing pads from the JIT output. This breaks EH for every JIT program. This is a work-around for this limitation. We pass in the label locations map. If the label has a non-zero value, then it was "emitted" by the JIT and TidyLandingPads shouldn't remove that label. A nicer solution would be to mark the MCSymbol as "used" by the JIT and not rely upon the section being set to determine if it's defined or not. llvm-svn: 101453
* Adding support for dag combiner to promote operations for profit. This ↵Evan Cheng2010-04-161-6/+47
| | | | | | | | | | requires target specific queries. For example, x86 should promote i16 to i32 when it does not impact load folding. x86 support is off by default. It can be enabled with -promote-16bit. Work in progress. llvm-svn: 101448
* Refine further the scope where the global DebugLoc value is active.Dan Gohman2010-04-161-7/+5
| | | | llvm-svn: 101443
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-167-175/+176
| | | | llvm-svn: 101434
* Avoid sinking machine instructions into a loop.Jakob Stoklund Olesen2010-04-151-0/+11
| | | | | | | | | | MachineLoopInfo is already available when MachineSinking runs, so the check is free. There is no test case because it would require a critical edge into a loop, and CodeGenPrepare splits those. This check is just to be extra careful. llvm-svn: 101420
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-157-176/+175
| | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101397
* Fix PR6847. RegScavenger should ignore DebugValues.Jakob Stoklund Olesen2010-04-151-0/+3
| | | | llvm-svn: 101392
* Make sure the initialization of a GC root is after its definition.Nicolas Geoffray2010-04-151-3/+4
| | | | llvm-svn: 101388
* prune includesGabor Greif2010-04-151-2/+0
| | | | llvm-svn: 101385
* Fix a bunch of namespace polution.Dan Gohman2010-04-153-3/+6
| | | | llvm-svn: 101376
* typosGabor Greif2010-04-151-2/+2
| | | | llvm-svn: 101371
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-157-175/+176
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-157-176/+175
| | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101364
* enhance the load/store narrowing optimization to handle aChris Lattner2010-04-151-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | tokenfactor in between the load/store. This allows us to optimize test7 into: _test7: ## @test7 ## BB#0: ## %entry movl (%rdx), %eax ## kill: SIL<def> ESI<kill> movb %sil, 5(%rdi) ret instead of: _test7: ## @test7 ## BB#0: ## %entry movl 4(%esp), %ecx movl $-65281, %eax ## imm = 0xFFFFFFFFFFFF00FF andl 4(%ecx), %eax movzbl 8(%esp), %edx shll $8, %edx addl %eax, %edx movl 12(%esp), %eax movl (%eax), %eax movl %edx, 4(%ecx) ret llvm-svn: 101355
* teach codegen to turn trunc(zextload) into load when possible.Chris Lattner2010-04-151-1/+1
| | | | | | | | This doesn't occur much at all, it only seems to formed in the case when the trunc optimization kicks in due to phase ordering. In that case it is saves a few bytes on x86-32. llvm-svn: 101350
* add a simple dag combine to replace trivial shl+lshr withChris Lattner2010-04-151-0/+9
| | | | | | and. This happens with the store->load narrowing stuff. llvm-svn: 101348
* Implement rdar://7860110 (also in target/readme.txt) narrowingChris Lattner2010-04-151-22/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a load/or/and/store sequence into a narrower store when it is safe. Daniel tells me that clang will start producing this sort of thing with bitfields, and this does trigger a few dozen times on 176.gcc produced by llvm-gcc even now. This compiles code like CodeGen/X86/2009-05-28-DAGCombineCrash.ll into: movl %eax, 36(%rdi) instead of: movl $4294967295, %eax ## imm = 0xFFFFFFFF andq 32(%rdi), %rax shlq $32, %rcx addq %rax, %rcx movq %rcx, 32(%rdi) and each of the testcases into a single store. Each of them used to compile into craziness like this: _test4: movl $65535, %eax ## imm = 0xFFFF andl (%rdi), %eax shll $16, %esi addl %eax, %esi movl %esi, (%rdi) ret llvm-svn: 101343
* Add more const qualifiers for LLVM IR pointers in CodeGen.Dan Gohman2010-04-157-23/+25
| | | | llvm-svn: 101342
* Add const qualifiers to CodeGen's use of LLVM IR constructs.Dan Gohman2010-04-1514-321/+327
| | | | llvm-svn: 101334
* More 80 violations.Evan Cheng2010-04-155-29/+54
| | | | llvm-svn: 101330
* 80 col violations.Evan Cheng2010-04-151-8/+16
| | | | llvm-svn: 101325
* Add comment.Devang Patel2010-04-151-0/+3
| | | | llvm-svn: 101317
* There is no need to track compile unit offsets if there is only one compile ↵Devang Patel2010-04-142-6/+0
| | | | | | unit. llvm-svn: 101315
* Remove dead code.Devang Patel2010-04-141-4/+0
| | | | llvm-svn: 101314
* Delete unneeeded arguments.Dan Gohman2010-04-141-1/+1
| | | | llvm-svn: 101276
* Delete unused arguments.Dan Gohman2010-04-141-6/+4
| | | | llvm-svn: 101275
* Factor out EH landing pad code into a separate function, and constifyDan Gohman2010-04-144-52/+61
| | | | | | a bunch of stuff to support it. llvm-svn: 101273
* Reset the debug location even if the instruction was a terminator.Dan Gohman2010-04-141-5/+3
| | | | llvm-svn: 101272
* Refine #includes.Dan Gohman2010-04-141-1/+1
| | | | llvm-svn: 101269
* Pull utility routines with no SelectionDAG dependence out ofDan Gohman2010-04-143-76/+95
| | | | | | | SelectionDAGBuilder. FunctionLoweringInfo isn't an ideal place for them to live, but it's better than SelectionDAGBuilder for now. llvm-svn: 101267
* Fix typos in comments.Dan Gohman2010-04-142-2/+2
| | | | llvm-svn: 101266
* Delete an obsolete comment.Dan Gohman2010-04-141-1/+0
| | | | llvm-svn: 101264
* Delete an unused function.Dan Gohman2010-04-141-4/+0
| | | | llvm-svn: 101263
* Clear the FunctionLoweringInfo object before doing other things thatDan Gohman2010-04-141-4/+4
| | | | | | don't need it. llvm-svn: 101262
* Move this assert out of SelectionDAGISel into FunctionLoweringInfo, andDan Gohman2010-04-142-5/+3
| | | | | | drop the redundant #ifndef NDEBUG. llvm-svn: 101261
* Add a comment.Dan Gohman2010-04-141-0/+2
| | | | llvm-svn: 101260
OpenPOWER on IntegriCloud