summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* 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
* make fast isel fall back to selectiondags for VLA llvm.declare intrinsics.Chris Lattner2009-02-121-2/+2
| | | | llvm-svn: 64379
* It's (currently) not safe to keep certain physical registers live across ↵Evan Cheng2009-02-121-2/+12
| | | | | | basic blocks, e.g. x86 fp stack registers. llvm-svn: 64374
* Oops. Last second clean up messed things up.Evan Cheng2009-02-121-2/+3
| | | | llvm-svn: 64373
* If availability info is kept when fallthrough into a bb, add the available ↵Evan Cheng2009-02-121-3/+21
| | | | | | registers to live-in set. llvm-svn: 64372
* Replace one of burr scheduling heuristic with something more sensible. Now ↵Evan Cheng2009-02-121-18/+4
| | | | | | calcMaxScratches simply compute the number of true data dependencies. This actually improve a couple of tests in dejagnu suite as many tests in llvm nightly test suite. llvm-svn: 64369
* Apparently some MachineBasicBlock's don't have corresponding llvm basic blocks.Evan Cheng2009-02-111-3/+7
| | | | llvm-svn: 64340
* Remove a bogus assertion. It's possible a live-in available value is used by ↵Evan Cheng2009-02-111-2/+0
| | | | | | a previous instruction. llvm-svn: 64339
* Fix a comment.Dan Gohman2009-02-111-2/+2
| | | | llvm-svn: 64328
* Don't use special heuristics for nodes with no data predecessorsDan Gohman2009-02-111-8/+9
| | | | | | | unless they actually have data successors, and likewise for nodes with no data successors unless they actually have data precessors. llvm-svn: 64327
* Delete the heuristic for non-livein CopyFromReg nodes. Non-liveinnessDan Gohman2009-02-111-11/+0
| | | | | | | | | is determined by whether the node has a Flag operand. However, if the node does have a Flag operand, it will be glued to its register's def, so the heuristic would end up spuriously applying to whatever node is the def. llvm-svn: 64319
* Make a transformation added in 63266 a bit less aggressive.Dale Johannesen2009-02-111-5/+9
| | | | | | | | | | | It was transforming (x&y)==y to (x&y)!=0 in the case where y is variable and known to have at most one bit set (e.g. z&1). This is not correct; the expressions are not equivalent when y==0. I believe this patch salvages what can be salvaged, including all the cases in bt.ll. Dan, please review. Fixes gcc.c-torture/execute/20040709-[12].c llvm-svn: 64314
* Implement PR3495: local spiller optimization. The local spiller can now keep ↵Evan Cheng2009-02-111-91/+208
| | | | | | availability information over BB boundaries. It visits BB's in depth first order. After visiting a BB if it find a successor which has a single predecessor it visits the successor next without clearing the availability information. This allows the successor to omit reloads or change them into copies. llvm-svn: 64298
* When scheduling a block in parts, keep track of the overallDan Gohman2009-02-1112-47/+104
| | | | | | | | | | | instruction index across each part. Instruction indices are used to make live range queries, and live ranges can extend beyond scheduling region boundaries. Refactor the ScheduleDAGSDNodes class some more so that it doesn't have to worry about this additional information. llvm-svn: 64288
* Use iterators to iterate through the Preds array instead ofDan Gohman2009-02-111-2/+3
| | | | | | | an index. This code is on the hot-path because the current way SDep edges are uniqued has quadratic complexity. llvm-svn: 64262
* Consider any instruction that modifies the stack pointer to beDan Gohman2009-02-101-0/+10
| | | | | | | | | a scheduling region boundary. This isn't necessary for correctness; it helps with compile time, as it avoids the need for data- and anti-dependencies from all spills and reloads on the stack-pointer modification. llvm-svn: 64255
* Factor out more code for computing register live-range informationforDan Gohman2009-02-107-357/+509
| | | | | | | | | | | scheduling, and generalize is so that preserves state across scheduling regions. This fixes incorrect live-range information around terminators and labels, which are effective region boundaries. In place of looking for terminators to anchor inter-block dependencies, introduce special entry and exit scheduling units for this purpose. llvm-svn: 64254
* Fix PR3457: Ignore control successors when looking for closest scheduled ↵Evan Cheng2009-02-101-1/+1
| | | | | | successor. A control successor doesn't read result(s) produced by the scheduling unit being evaluated. llvm-svn: 64210
* Validate file id.Devang Patel2009-02-101-0/+3
| | | | llvm-svn: 64204
* If the target cannot issue a copy for the given source and dest registers, ↵Evan Cheng2009-02-091-5/+10
| | | | | | abort instead of silently continue. llvm-svn: 64184
* Simplify code.Evan Cheng2009-02-091-5/+6
| | | | llvm-svn: 64164
* Make sure constant subscript is truncated to ptr size if it may not fit.Evan Cheng2009-02-091-1/+8
| | | | llvm-svn: 64163
* Re-enable machine sinking pass now that the coalescer bugs and the ↵Evan Cheng2009-02-091-8/+2
| | | | | | AnalyzeBrnach bug are fixed. llvm-svn: 64126
OpenPOWER on IntegriCloud