summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.Craig Topper2012-09-153-6/+6
| | | | llvm-svn: 163974
* Don't depend on kill flags in removeCopyByCommutingDef().Jakob Stoklund Olesen2012-09-151-1/+1
| | | | | | | Kill flags are removed more and more aggressively during the register allocation passes, it is better to get information from LiveIntervals. llvm-svn: 163972
* TargetSchedModel interface. To be implemented...Andrew Trick2012-09-142-0/+33
| | | | llvm-svn: 163934
* misched: add a hook for custom DAG postprocessing.Andrew Trick2012-09-141-0/+9
| | | | llvm-svn: 163915
* Remove silly dead store. Patch by Ettl Martin.Duncan Sands2012-09-141-2/+1
| | | | llvm-svn: 163882
* Fix both the test for zero and what we do if we have a zero forEric Christopher2012-09-131-1/+4
| | | | | | | | umulo legalization. Fixes PR13839 llvm-svn: 163856
* Reformat, remove a couple unused variables and move some variablesEric Christopher2012-09-131-8/+8
| | | | | | closer to where they're needed. llvm-svn: 163855
* Enhance type legalization on bitcast from vector to integerMichael Liao2012-09-131-5/+34
| | | | | | | | - Find a legal vector type before casting and extracting element from it. - As the new vector type may have more than 2 elements, build the final hi/lo pair by BFS pairing them from bottom to top. llvm-svn: 163830
* Rename the flag which protects from escaped allocas, which may come from ↵Nadav Rotem2012-09-131-5/+12
| | | | | | bugs in user code or in the compiler. Also, dont assert if the protection is not enabled. llvm-svn: 163807
* Fix a dagcombine optimization. The optimization attempts to optimize a ↵Nadav Rotem2012-09-131-1/+2
| | | | | | | | | | | bitcast of fneg to integers by xoring the high-bit. This fails if the source operand is a vector because we need to negate each of the elements in the vector. Fix rdar://12281066 PR13813. llvm-svn: 163802
* Fix a typo.Nadav Rotem2012-09-131-1/+1
| | | | llvm-svn: 163801
* Stack Coloring: We have code that checks that all of the uses of allocasNadav Rotem2012-09-131-5/+17
| | | | | | | | | | | | | are within the lifetime zone. Sometime legitimate usages of allocas are hoisted outside of the lifetime zone. For example, GEPS may calculate the address of a member of an allocated struct. This commit makes sure that we only check (abort regions or assert) for instructions that read and write memory using stack frames directly. Notice that by allowing legitimate usages outside the lifetime zone we also stop checking for instructions which use derivatives of allocas. We will catch less bugs in user code and in the compiler itself. llvm-svn: 163791
* Recommit, with fixes:Eric Christopher2012-09-123-1/+24
| | | | | | | | | | | Add some support for dealing with an object pointer on arguments. Part of rdar://9797999 which now supports adding the object pointer attribute to the subprogram as it should. llvm-svn: 163754
* Fix PR11985Michael Liao2012-09-124-5/+18
| | | | | | | | | | | - BlockAddress has no support of BA + offset form and there is no way to propagate that offset into machine operand; - Add BA + offset support and a new interface 'getTargetBlockAddress' to simplify target block address forming; - All targets are modified to use new interface and X86 backend is enhanced to support BA + offset addressing. llvm-svn: 163743
* Remove an overly-aggressive assertion. The code following this assertion ↵Owen Anderson2012-09-121-2/+0
| | | | | | already knows how to handle the case where DstRC was NULL, so it's not actually protecting us from anything, and this pattern can come up when using unknown_class operands in the SelectionDAG. llvm-svn: 163736
* Delete dead code.Jakob Stoklund Olesen2012-09-121-36/+0
| | | | llvm-svn: 163735
* Revert "Add some support for dealing with an object pointer on arguments."Eric Christopher2012-09-123-16/+0
| | | | | | This should be done on the subprogram, not the variable itself. llvm-svn: 163734
* Fix a couple of Doxygen comment issues pointed out by -Wdocumentation.Dmitri Gribenko2012-09-121-1/+1
| | | | llvm-svn: 163721
* Fix constant folding through bitcasts by no longer relying on undefined ↵Kristof Beyls2012-09-121-2/+2
| | | | | | | | | | | | behaviour (converting NaN values between float and double). SelectionDAG::getConstantFP(double Val, EVT VT, bool isTarget); should not be used when Val is not a simple constant (as the comment in SelectionDAG.h indicates). This patch avoids using this function when folding an unknown constant through a bitcast, where it cannot be guaranteed that Val will be a simple constant. llvm-svn: 163703
* Add a flag to disable the code that looks for allocas which escaped the ↵Nadav Rotem2012-09-121-6/+18
| | | | | | lifetime regions. This is useful for debugging. No testcase because without this check we fail on assertions when finding escaped allocas. llvm-svn: 163702
* Add a function computeRegisterLiveness() to MachineBasicBlock. This uses ↵James Molloy2012-09-121-0/+74
| | | | | | | | analyzePhysReg() from r163694 to heuristically try and determine the liveness state of a physical register upon arrival at a particular instruction in a block. The search for liveness is clipped to a specific number of instructions around the target MachineInstr, in order to avoid degenerating into an O(N^2) algorithm. It tries to use various clues about how instructions around (both before and after) a given MachineInstr use that register, to determine its state at the MachineInstr. llvm-svn: 163695
* Add an analyzePhysReg() function to MachineOperandIteratorBase that analyses ↵James Molloy2012-09-122-4/+54
| | | | | | | | an instruction's use of a physical register, analogous to analyzeVirtReg. Rename RegInfo to VirtRegInfo so as not to be confused with the new PhysRegInfo. llvm-svn: 163694
* Enable stack-coloring, in hope that the recent fixes will enable correct ↵Nadav Rotem2012-09-121-1/+1
| | | | | | dragonegg self-hosting. llvm-svn: 163687
* Make findLastUseBefore handle reg-unit liveness.Lang Hames2012-09-121-8/+29
| | | | | | | | | findLastUseBefore was previous considering virtreg liveness only, leading to incorrect live intervals for reg units when instrs with physreg operands were moved up. llvm-svn: 163685
* Stack coloring: remove lifetime intervals which contain escaped allocas.Nadav Rotem2012-09-121-0/+47
| | | | | | | | | | The input program may contain intructions which are not inside lifetime markers. This can happen due to a bug in the compiler or due to a bug in user code (for example, returning a reference to a local variable). This commit adds checks that all of the instructions in the function and invalidates lifetime ranges which do not contain all of the instructions. llvm-svn: 163678
* Add some support for dealing with an object pointer on arguments.Eric Christopher2012-09-123-0/+16
| | | | | | Part of rdar://9797999 llvm-svn: 163667
* Release build: guard dump functions withManman Ren2012-09-1118-25/+25
| | | | | | | | "#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)" No functional change. Update r163339. llvm-svn: 163653
* [ms-inline asm] Split the parsing of IR asm strings into GCC and MS variants.Chad Rosier2012-09-111-67/+158
| | | | | | Add support in the EmitMSInlineAsmStr() function for handling integer consts. llvm-svn: 163645
* Dragonegg selfhost exposed additional cases where alloca usage moved outside ↵Nadav Rotem2012-09-111-1/+1
| | | | | | of lifetime markers. Disabling the pass for now. llvm-svn: 163623
* Enable stack coloring.Nadav Rotem2012-09-111-1/+1
| | | | llvm-svn: 163617
* Stack Coloring: Dont crash on dbg values which use stack frames.Nadav Rotem2012-09-111-3/+5
| | | | llvm-svn: 163616
* Teach DAG combiner to constant fold FABS of a BUILD_VECTOR of ConstantFPs. ↵Craig Topper2012-09-111-22/+47
| | | | | | Factor similar code out of FNEG DAG combiner. llvm-svn: 163587
* Reorganize MachineScheduler interfaces and publish them in the header.Andrew Trick2012-09-111-256/+100
| | | | | | | | | | | | | | The Hexagon target decided to use a lot of functionality from the target-independent scheduler. That's fine, and other targets should be able to do the same. This reorg and API update makes that easy. For the record, ScheduleDAGMI was not meant to be subclassed. Instead, new scheduling algorithms should be able to implement MachineSchedStrategy and be done. But if need be, it's nice to be able to extend ScheduleDAGMI, so I also made that easier. The target scheduler is somewhat more apt to break that way though. llvm-svn: 163580
* Revert r160148 it seems to cause more problems than it shouldEric Christopher2012-09-101-1/+1
| | | | | | right now. We'll fix PR13303 a different way. llvm-svn: 163570
* 80-col fixup.Eric Christopher2012-09-103-4/+6
| | | | llvm-svn: 163569
* 80-col fixup.Eric Christopher2012-09-101-1/+2
| | | | llvm-svn: 163568
* No reason to construct this twice.Eric Christopher2012-09-102-2/+2
| | | | llvm-svn: 163567
* [ms-inline asm] Properly emit the asm directives when the AsmPrinterVariantChad Rosier2012-09-101-1/+17
| | | | | | and InlineAsmVariant don't match. llvm-svn: 163550
* Remove redundant semicolons which are null statements.Dmitri Gribenko2012-09-102-3/+3
| | | | llvm-svn: 163547
* Disable stack coloring because it makes dragonegg fail bootstrapping.Nadav Rotem2012-09-101-1/+1
| | | | llvm-svn: 163545
* [ms-inline asm] Pass the correct AsmVariant to the PrintAsmOperand() functionChad Rosier2012-09-101-3/+4
| | | | | | and update the printOperand() function accordingly. llvm-svn: 163544
* Enable stack coloring.Nadav Rotem2012-09-101-1/+1
| | | | llvm-svn: 163539
* Stack Coloring: Handle the case where END markers come before BEGIN markers ↵Nadav Rotem2012-09-101-0/+12
| | | | | | properly. llvm-svn: 163530
* Fold multiply by 0 or 1 when in UnsafeFPMath mode in SelectionDAG::getNode().Michael Ilseman2012-09-101-0/+18
| | | | | | This folding happens as early as possible for performance reasons, and to make sure it isn't foiled by other transforms (e.g. forming FMAs). llvm-svn: 163519
* whitespaceMichael Ilseman2012-09-101-10/+10
| | | | llvm-svn: 163518
* Fix an assertion failure when optimising a shufflevector incorrectly into ↵James Molloy2012-09-102-10/+12
| | | | | | concat_vectors, and a followup bug with SelectionDAG::getNode() creating nodes with invalid types. llvm-svn: 163511
* Minor cleanup. No functional change.Nadav Rotem2012-09-101-3/+3
| | | | llvm-svn: 163510
* Stack Coloring: Debug prints to print the slot number and not the array index.Nadav Rotem2012-09-101-1/+2
| | | | llvm-svn: 163509
* Stack Coloring: When searching for disjoint regions, do not compare ↵Nadav Rotem2012-09-101-1/+1
| | | | | | intervals twice or to theirself. llvm-svn: 163508
* Stack Coloring: Add support for multiple regions of the same slot, within a ↵Nadav Rotem2012-09-101-23/+33
| | | | | | single basic block. llvm-svn: 163507
OpenPOWER on IntegriCloud