summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Minor optimization:Evan Cheng2009-03-011-29/+237
| | | | | | | | | | | Look for situations like this: %reg1024<def> = MOV r1 %reg1025<def> = MOV r0 %reg1026<def> = ADD %reg1024, %reg1025 r0 = MOV %reg1026 Commute the ADD to hopefully eliminate an otherwise unavoidable copy. llvm-svn: 65752
* Combine PPC's GetConstantBuildVectorBits and isConstantSplat functions to a newBob Wilson2009-03-011-0/+91
| | | | | | method in a BuildVectorSDNode "pseudo-class". llvm-svn: 65747
* Last commit accidentially deleted this code.Evan Cheng2009-02-281-0/+4
| | | | llvm-svn: 65679
* It is possible that subprgoram definition is only encoding return value ↵Devang Patel2009-02-271-2/+6
| | | | | | directly, instsad of an DIArray of all argument types. llvm-svn: 65643
* Refactor TLS code and add some tests. The tests and expected results are:Rafael Espindola2009-02-271-0/+22
| | | | | | | | | | | | | | | | | | | | | pic | declaration | linkage | visibility | !pic | declaration | external | default | tls1.ll tls2.ll | local exec pic | declaration | external | default | tls1-pic.ll tls2-pic.ll | general dynamic !pic | !declaration | external | default | tls3.ll tls4.ll | initial exec pic | !declaration | external | default | tls3-pic.ll tls4-pic.ll | general dynamic !pic | declaration | external | hidden | tls7.ll tls8.ll | local exec pic | declaration | external | hidden | X | local dynamic !pic | !declaration | external | hidden | tls9.ll tls10.ll | local exec pic | !declaration | external | hidden | X | local dynamic !pic | declaration | internal | default | tls5.ll tls6.ll | local exec pic | declaration | internal | default | X | local dynamic The ones marked with an X have not been implemented since local dynamic is not implemented. llvm-svn: 65632
* MachineLICM CSE should match destination register classes; avoid hoisting ↵Evan Cheng2009-02-271-3/+13
| | | | | | implicit_def's. llvm-svn: 65592
* Enable stack slot coloring DCE. Evan's spiller fixes were needed before ↵Owen Anderson2009-02-261-7/+2
| | | | | | this could happen. llvm-svn: 65501
* The last commit was overly conservative. It's ok to reuse value that's ↵Evan Cheng2009-02-261-7/+0
| | | | | | already marked livein. llvm-svn: 65498
* If an available register falls through to a succ block, unset the last kill. ↵Evan Cheng2009-02-261-37/+76
| | | | | | Sorry, it's impossible to reduce a sensible test case. It basically requires the moon and stars to align in order to cause a failure. llvm-svn: 65497
* Revert BuildVectorSDNode related patches: 65426, 65427, and 65296.Evan Cheng2009-02-257-219/+104
| | | | llvm-svn: 65482
* Fix big-endian codegen bug. We're splitting upDale Johannesen2009-02-251-1/+2
| | | | | | | | | | | overly long ints, e.g. i96, into pieces at PHIs and the nodes that feed into them; however big-endian reverses the order of the pieces (for some reason), and wasn't doing it the same way on both sides, so the pieces didn't match and runtime failures ensued. Fixes 188.ammp and sqlite3 on ppc32. llvm-svn: 65481
* Print variable's display name in dwarf DIE.Devang Patel2009-02-251-1/+1
| | | | llvm-svn: 65468
* Clean up dwarf writer, part 1. This eliminated the horrible recursive ↵Evan Cheng2009-02-254-335/+414
| | | | | | | | getGlobalVariablesUsing and replaced it something readable. It eliminated use of slow UniqueVector and replaced it with StringMap, SmallVector, and DenseMap, etc. It also fixed some non-deterministic behavior. This is a very minor compile time win. llvm-svn: 65438
* Expand tabs to spaces (overlooked in previous commit)Scott Michel2009-02-251-12/+12
| | | | llvm-svn: 65427
* Remove all "cached" data from BuildVectorSDNode, preferring to retrieveScott Michel2009-02-251-13/+8
| | | | | | | | | results via reference parameters. This patch also appears to fix Evan's reported problem supplied as a reduced bugpoint test case. llvm-svn: 65426
* Overhaul my earlier submission due to feedback. It's a large patch, but most ofBill Wendling2009-02-243-4/+2
| | | | | | | | | | | | them are generic changes. - Use the "fast" flag that's already being passed into the asm printers instead of shoving it into the DwarfWriter. - Instead of calling "MI->getParent()->getParent()" for every MI, set the machine function when calling "runOnMachineFunction" in the asm printers. llvm-svn: 65379
* Add a debugging option for SSC DCE.Owen Anderson2009-02-241-0/+5
| | | | llvm-svn: 65375
* - Use the "Fast" flag instead of "OptimizeForSize" to determine whether to emitBill Wendling2009-02-244-14/+15
| | | | | | | | | | a DBG_LABEL or not. We want to fall back to the original way of emitting debug info when we're in -O0/-fast mode. - Add plumbing in to pass the "Fast" flag to places that need it. - XFAIL DebugInfo/deaddebuglabel.ll. This is finding 11 labels instead of 8. I need to investigate still. llvm-svn: 65367
* Fix a ValueTracking rule: RHS means operand 1, not 0. Add a simpleDan Gohman2009-02-241-1/+1
| | | | | | | ashr instcombine to help expose this code. And apply the fix to SelectionDAG's copy of this code too. llvm-svn: 65364
* gdb uses DW_AT_prototyped to identify K&R style in C based languages.Devang Patel2009-02-241-0/+5
| | | | | | This fixes objc.dg/dwarf-prototypes.m scan-assembler DW_AT_prototyped from llvmgcc42 test suite. llvm-svn: 65357
* If there is not any debug info available for any global variables and any ↵Devang Patel2009-02-241-13/+26
| | | | | | subprograms then there is not any debug info to emit. llvm-svn: 65352
* Introduce the BuildVectorSDNode class that encapsulates the ISD::BUILD_VECTORScott Michel2009-02-227-101/+220
| | | | | | | | | instruction. The class also consolidates the code for detecting constant splats that's shared across PowerPC and the CellSPU backends (and might be useful for other backends.) Also introduces SelectionDAG::getBUID_VECTOR() for generating new BUILD_VECTOR nodes. llvm-svn: 65296
* If a use operand is marked isKill, don't forget to add kill to its live ↵Evan Cheng2009-02-221-4/+6
| | | | | | interval as well. llvm-svn: 65279
* bug 3610: Floating point vaarg not softened.Richard Pennington2009-02-212-0/+18
| | | | llvm-svn: 65239
* Drop bunch of half-working stuff in the ext_weak linkage support.Anton Korobeynikov2009-02-211-10/+0
| | | | | | | | | | | Now we're using one gross, but quite robust hack :) (previous ones did not work, for example, when ext_weak symbol was used deep inside constant expression in the initializer). The proper fix of this problem will require some quite huge asmprinter changes and that's why was postponed. This fixes PR3629 by the way :) llvm-svn: 65230
* If two-address def is dead and the instruction does not define other ↵Evan Cheng2009-02-211-0/+30
| | | | | | registers, and it doesn't produce side effects, just delete the instruction. llvm-svn: 65218
* Fix a bug that David Greene found in the DAGCombiner's logicDan Gohman2009-02-201-2/+2
| | | | | | | that checks whether it's safe to transform a store of a bitcast value into a store of the original value. llvm-svn: 65201
* - Early exit a nested block.Bill Wendling2009-02-201-23/+27
| | | | | | | - Correct comment. - Whitespace changes. llvm-svn: 65149
* Fix a crash in the pre-alloc splitter exposed by recent codegen changes.Owen Anderson2009-02-201-0/+6
| | | | llvm-svn: 65121
* Add a quick pass to the stack slot colorer to eliminate some trivially ↵Owen Anderson2009-02-201-0/+62
| | | | | | | | | redundant spills after coloring. Ideally these would never get created in the first place, but until we enhance the spiller to have a more global picture of what's happening, this is necessary for code quality in some circumstances. llvm-svn: 65120
* Add an accessor method to DwarfWriter to tell of debugging info should be ↵Bill Wendling2009-02-201-5/+11
| | | | | | emitted. llvm-svn: 65092
* Temporarily revert r65065. It was causing test failures.Bill Wendling2009-02-191-1/+3
| | | | llvm-svn: 65068
* Print out debug info when printing the machine instruction.Bill Wendling2009-02-191-0/+9
| | | | llvm-svn: 65067
* Check for -fast here too.Bill Wendling2009-02-191-3/+1
| | | | llvm-svn: 65065
* Generate these labels when we're in "fast" mode, not simply when we're no inBill Wendling2009-02-193-11/+9
| | | | | | "optimize-for-size" mode. llvm-svn: 65064
* The subprogram die may not exist while creating "default" scope.Devang Patel2009-02-181-1/+4
| | | | llvm-svn: 64920
* Add support to the JIT for true non-lazy operation. When a call to a functionNate Begeman2009-02-182-0/+9
| | | | | | | | | | | | | | | | | | | | that has not been JIT'd yet, the callee is put on a list of pending functions to JIT. The call is directed through a stub, which is updated with the address of the function after it has been JIT'd. A new interface for allocating and updating empty stubs is provided. Add support for removing the ModuleProvider the JIT was created with, which would otherwise invalidate the JIT's PassManager, which is initialized with the ModuleProvider's Module. Add support under a new ExecutionEngine flag for emitting the infomration necessary to update Function and GlobalVariable stubs after JITing them, by recording the address of the stub and the name of the GlobalValue. This allows code to be copied from one address space to another, where libraries may live at different virtual addresses, and have the stubs updated with their new correct target addresses. llvm-svn: 64906
* Eliminate several more unnecessary intptr_t casts.Dan Gohman2009-02-183-4/+4
| | | | llvm-svn: 64888
* The debugger sometimes lookup dynamically in the runtime to find ivar info ↵Devang Patel2009-02-171-0/+6
| | | | | | | | of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF. Add support for two additional DWARF attributes to encode Objective-C runtime version number. llvm-svn: 64834
* Remove trailing whitespace to reduce later commit patch noise.Scott Michel2009-02-176-1014/+1014
| | | | | | | | (Note: Eventually, commits like this will be handled via a pre-commit hook that does this automagically, as well as expand tabs to spaces and look for 80-col violations.) llvm-svn: 64827
* Emit debug info for bitfields.Devang Patel2009-02-171-1/+18
| | | | llvm-svn: 64815
* A couple of places where reused use operands should be marked kill. This is ↵Evan Cheng2009-02-171-0/+11
| | | | | | exposed by recent availability fallthrough changes. llvm-svn: 64745
* --- Merging (from foreign repository) r64714 into '.':Bill Wendling2009-02-172-24/+47
| | | | | | | | | | | | U include/llvm/CodeGen/DebugLoc.h U lib/CodeGen/SelectionDAG/LegalizeDAG.cpp U lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp Enable debug location generation at -Os. This goes with the reapplication of the r63639 patch. llvm-svn: 64715
* Don't assume that a left-shift of a value with one bit set will haveDan Gohman2009-02-151-6/+23
| | | | | | | | one bit set, because the bit may be shifted off the end. Instead, just check for a constant 1 being shifted. This is still sufficient to handle all the cases in test/CodeGen/X86/bt.ll. This fixes PR3583. llvm-svn: 64622
* Fix PR3522. It's not safe to sink into landing pad BB's.Evan Cheng2009-02-151-0/+5
| | | | llvm-svn: 64582
* Unbreak the build on win32.Cedric Venet2009-02-141-1/+2
| | | | | | | | | | Cleanup some warning. Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync. Only tested with VS2008. hope it does not break anything. feel free to revert. llvm-svn: 64554
* Revert this. It was breaking stuff.Bill Wendling2009-02-134-18/+104
| | | | llvm-svn: 64428
* Turn off the old way of handling debug information in the code generator. UseBill Wendling2009-02-134-104/+18
| | | | | | | the new way, where all of the information is passed on SDNodes and machine instructions. llvm-svn: 64427
* Arrange to print constants that match "n" and "i" constraintsDale Johannesen2009-02-121-2/+5
| | | | | | | | in inline asm as signed (what gcc does). Add partial support for x86-specific "e" and "Z" constraints, with appropriate signedness for printing. llvm-svn: 64400
* Adjust the sizes for a few SmallVectors to reflect their usage.Dan Gohman2009-02-122-3/+3
| | | | llvm-svn: 64381
OpenPOWER on IntegriCloud