summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fix a typo in the comment.Nadav Rotem2012-09-101-2/+2
| | | | llvm-svn: 163496
* Add an assertion that the frame index is indeed inside the declared lifetime ↵Nadav Rotem2012-09-101-0/+16
| | | | | | region. llvm-svn: 163495
* Teach the DAGBuilder about lifetime markers which are generated from PHINodes.Nadav Rotem2012-09-101-18/+22
| | | | llvm-svn: 163494
* Teach DAG combiner to constant fold fneg of a BUILD_VECTOR of constants.Craig Topper2012-09-091-1/+25
| | | | llvm-svn: 163483
* LiveVariables: Compute a set of defs and kills to speed up updating LV ↵Benjamin Kramer2012-09-091-4/+30
| | | | | | | | | | | | | | | during critical edge splitting. Previously we checked if the register is def'd in a block via the def/use list a nd walked the list of kills to check if the register is killed in a block. Both of these checks can be made much cheaper by walking the block first and recording all defs and kills. This reduces the compile time of the test case from PR13651 from 40s to 15s at -O2. The compile time is still dominated by LV updating but now the main culprit is SparseBitVector's slowness. llvm-svn: 163478
* Fix alignment of .comm and .lcomm on mingw32.Benjamin Kramer2012-09-071-1/+2
| | | | | | | | For some reason .lcomm uses byte alignment and .comm log2 alignment so we can't use the same setting for both. Fix this by reintroducing the LCOMM enum. I verified this against mingw's gcc. llvm-svn: 163420
* Fix indent.Chad Rosier2012-09-071-2/+2
| | | | llvm-svn: 163416
* Update function names to conform to guidelines. No functional change intended.Chad Rosier2012-09-072-49/+48
| | | | llvm-svn: 163401
* MC: Overhaul handling of .lcommBenjamin Kramer2012-09-071-2/+1
| | | | | | | | | | | | | - Darwin lied about not supporting .lcomm and turned it into zerofill in the asm parser. Push the zerofill-conversion down into macho-specific code. - This makes the tri-state LCOMMType enum superfluous, there are no targets without .lcomm. - Do proper error reporting when trying to use .lcomm with alignment on a target that doesn't support it. - .comm and .lcomm alignment was parsed in bytes on COFF, should be power of 2. - Fixes PR13755 (.lcomm crashes on ELF). llvm-svn: 163395
* Stop emitting lifetime region info when stack coloring is not enabled in O0Michael Liao2012-09-071-0/+6
| | | | | | - this should fix PR13780 llvm-svn: 163370
* Release build: guard dump functions with "ifndef NDEBUG"Manman Ren2012-09-0618-0/+50
| | | | | | No functional change. llvm-svn: 163339
* Allow overlaps between virtreg and physreg live ranges.Jakob Stoklund Olesen2012-09-063-1/+53
| | | | | | | | | | | | | | | | | The RegisterCoalescer understands overlapping live ranges where one register is defined as a copy of the other. With this change, register allocators using LiveRegMatrix can do the same, at least for copies between physical and virtual registers. When a physreg is defined by a copy from a virtreg, allow those live ranges to overlap: %CL<def> = COPY %vreg11:sub_8bit; GR32_ABCD:%vreg11 %vreg13<def,tied1> = SAR32rCL %vreg13<tied0>, %CL<imp-use,kill> We can assign %vreg11 to %ECX, overlapping the live range of %CL. llvm-svn: 163336
* Handle overlapping regunit intervals in LiveIntervals::addKillFlags().Jakob Stoklund Olesen2012-09-062-3/+45
| | | | | | | | | | | | | | | | | | We will soon allow virtual register live ranges to overlap regunit live ranges when the physreg is defined as a copy of the virtreg: %EAX = COPY %vreg5 FOO %vreg5 BAR %EAX<kill> There is no real interference since %vreg5 and %EAX have the same value where they overlap. This patch prevents addKillFlags from adding virtreg kill flags to FOO where the assigned physreg is overlapping the virtual register live range. llvm-svn: 163335
* Clear kill flags while computing live ranges.Jakob Stoklund Olesen2012-09-061-1/+5
| | | | | | | | | Kill flags are difficult to maintain, and liveness queries are better handled by live intervals. Kill flags are reinserted after register allocation by addKillFlags(). llvm-svn: 163334
* Dont cast away const needlessly. Found by gcc48 -Wcast-qual.Roman Divacky2012-09-061-1/+1
| | | | llvm-svn: 163324
* Disable stack coloring by default in order to resolve the i386 failures.Nadav Rotem2012-09-061-1/+1
| | | | llvm-svn: 163316
* Fix a few old-GCC warnings. No functional change.Nadav Rotem2012-09-061-1/+1
| | | | llvm-svn: 163309
* Add a new optimization pass: Stack Coloring, that merges disjoint static ↵Nadav Rotem2012-09-0612-8/+712
| | | | | | | | allocations (allocas). Allocas are known to be disjoint if they are marked by disjoint lifetime markers (@llvm.lifetime.XXX intrinsics). llvm-svn: 163299
* [ms-inline asm] Use the asm dialect from the MI to set the parser dialect.Chad Rosier2012-09-051-2/+4
| | | | llvm-svn: 163273
* Cleanup a few magic numbers.Chad Rosier2012-09-052-2/+2
| | | | llvm-svn: 163263
* Stop casting away const qualifier needlessly.Roman Divacky2012-09-055-7/+7
| | | | llvm-svn: 163258
* [ms-inline asm] We only need one bit to represent the AsmDialect in theChad Rosier2012-09-052-11/+5
| | | | | | MachineInstr. llvm-svn: 163257
OpenPOWER on IntegriCloud