summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Use PredIteratorCache in LCSSA, which gives a 37% overall speedup on the ↵Owen Anderson2009-04-221-2/+5
| | | | | | testcase from PR3549. More improvements to come. llvm-svn: 69788
* use predicate instead of hand-rolled loopChris Lattner2009-04-211-11/+4
| | | | llvm-svn: 69752
* De-pImpl-ify ScalarEvolution. The pImpl pattern doesn't provide muchDan Gohman2009-04-211-452/+165
| | | | | | | practical benefit in the case of ScalarEvolution, and it's otherwise a nuisance. llvm-svn: 69749
* It has finally happened. Spiller is now using live interval info.Evan Cheng2009-04-215-40/+68
| | | | | | This fixes a very subtle bug. vr defined by an implicit_def is allowed overlap with any register since it doesn't actually modify anything. However, if it's used as a two-address use, its live range can be extended and it can be spilled. The spiller must take care not to emit a reload for the vn number that's defined by the implicit_def. This is both a correctness and performance issue. llvm-svn: 69743
* When turning (ashr(shl(x, n), n)) into sext(trunc(x)), the width of theDan Gohman2009-04-211-1/+1
| | | | | | | | type to truncate to should be the number of bits of the value that are preserved, not the number that are clobbered with sign-extension. This fixes regressions in ldecod. llvm-svn: 69704
* fix a crash on a pointless but valid zero-length memset, rdar://6808691Chris Lattner2009-04-211-13/+15
| | | | llvm-svn: 69680
* Silence warnings.Anton Korobeynikov2009-04-211-5/+5
| | | | | | Patch by Jay Foad! llvm-svn: 69679
* Drop obsolete reference to __eprintf.Anton Korobeynikov2009-04-211-2/+0
| | | | | | Patch by Jay Foad! llvm-svn: 69678
* Get rid of what looks like a copy-and-pasted typo.Duncan Sands2009-04-211-3/+3
| | | | | | Spotted by gcc-4.5. llvm-svn: 69673
* TLS_addr64 and TLS_addr32 define RDI and EAX. They don't use them.Rafael Espindola2009-04-212-2/+2
| | | | | | This fixes PR4002. llvm-svn: 69672
* Handle direct aggregate type arguments.Sanjiv Gupta2009-04-212-51/+36
| | | | llvm-svn: 69665
* Teach ScalarEvolution how to recognize zext-inreg and sext-inreg,Dan Gohman2009-04-211-0/+27
| | | | | | | as they appear in LLVM IR. This isn't particularly interesting on its own; this is just setting up some infrastructure. llvm-svn: 69655
* This FIXME is fixed, now that SCEV understands pointers.Dan Gohman2009-04-211-3/+0
| | | | llvm-svn: 69651
* Factor out a common base class from SCEVTruncateExpr, SCEVZeroExtendExpr,Dan Gohman2009-04-212-21/+15
| | | | | | and SCEVSignExtendExpr. llvm-svn: 69649
* Usage getAnalysisToUpdate for TargetData, per PR760.Dan Gohman2009-04-211-2/+1
| | | | llvm-svn: 69645
* Introduce encapsulation for ScalarEvolution's TargetData object, and refactorDan Gohman2009-04-214-179/+222
| | | | | | the code to minimize dependencies on TargetData. llvm-svn: 69644
* Move some assertion checks so they can do more complete checking.Dan Gohman2009-04-211-6/+8
| | | | llvm-svn: 69643
* Convert ScalarEvolution to use raw_ostream instead of OStream.Dan Gohman2009-04-211-22/+32
| | | | llvm-svn: 69640
* Fix Visual Studio 2008 build failure.Devang Patel2009-04-211-3/+3
| | | | | | Patch by Marius Wachtler llvm-svn: 69637
* Make X86's copyRegToReg able to handle copies to and from subclasses.Dan Gohman2009-04-202-45/+29
| | | | | | | This makes the extra copyRegToReg calls in ScheduleDAGSDNodesEmit.cpp unnecessary. Derived from a patch by Jakob Stoklund Olesen. llvm-svn: 69635
* Simplify this code. getConstant knows how to makeDan Gohman2009-04-201-10/+3
| | | | | | broadcasted vector constants. llvm-svn: 69634
* Adjust loop size estimate for full unrolling;Dale Johannesen2009-04-201-0/+2
| | | | | | GEP's don't usually become instructions. llvm-svn: 69631
* Make Unix.h:MakeErrMsg separate the prefix and errno string, so we get:Daniel Dunbar2009-04-204-7/+10
| | | | | | | | | | | | | | | | | clang: error: unable to make temporary file: /etc/cc: can't make unique filename: Permission denied instead of clang: error: unable to make temporary file: /etc/cc: can't make unique filenamePermission denied for example. Also, audited the uses of MakeErrMsg to make the prefix strings consistent (not end with newline/punctuation/space/": "). llvm-svn: 69626
* Remove unused variable.Daniel Dunbar2009-04-201-1/+0
| | | | llvm-svn: 69624
* Move duplicated AddLiveIn function from X86 and ARM backends to be a methodBob Wilson2009-04-203-30/+18
| | | | | | | in the MachineFunction class, renaming it to addLiveIn for consistency with the same method in MachineBasicBlock. Thanks for Anton for suggesting this. llvm-svn: 69615
* Match C backend only if it explicitly requested.Devang Patel2009-04-201-2/+3
| | | | llvm-svn: 69613
* Revise my previous change 68996 as suggested by Duncan.Bob Wilson2009-04-203-9/+5
| | | | llvm-svn: 69607
* - Remove an arbitrary spill weight tweak that should not have been there.Evan Cheng2009-04-201-5/+26
| | | | | | - Find more reloads from SS. llvm-svn: 69606
* Emit the auto variables of a function into a different section than parameters.Sanjiv Gupta2009-04-202-24/+46
| | | | llvm-svn: 69605
* It's not necessary for PrintModulePass to flush the output streamsDan Gohman2009-04-201-2/+0
| | | | | | now that errs() is properly non-buffered. llvm-svn: 69602
* Don't discard an AssemblyAnnotationWriter when writing GlobalValues,Dan Gohman2009-04-201-1/+1
| | | | | | | which include Functions, where it can be quite useful to use an AssemblyAnnotationWriter. llvm-svn: 69598
* Implement operator<<(raw_ostream &OS, const Type &T).Dan Gohman2009-04-201-0/+5
| | | | llvm-svn: 69596
* Added a linearscan register allocation optimization. When the register ↵Evan Cheng2009-04-202-67/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | allocator spill an interval with multiple uses in the same basic block, it creates a different virtual register for each of the reloads. e.g. %reg1498<def> = MOV32rm %reg1024, 1, %reg0, 12, %reg0, Mem:LD(4,4) [sunkaddr39 + 0] %reg1506<def> = MOV32rm %reg1024, 1, %reg0, 8, %reg0, Mem:LD(4,4) [sunkaddr42 + 0] %reg1486<def> = MOV32rr %reg1506 %reg1486<def> = XOR32rr %reg1486, %reg1498, %EFLAGS<imp-def,dead> %reg1510<def> = MOV32rm %reg1024, 1, %reg0, 4, %reg0, Mem:LD(4,4) [sunkaddr45 + 0] => %reg1498<def> = MOV32rm %reg2036, 1, %reg0, 12, %reg0, Mem:LD(4,4) [sunkaddr39 + 0] %reg1506<def> = MOV32rm %reg2037, 1, %reg0, 8, %reg0, Mem:LD(4,4) [sunkaddr42 + 0] %reg1486<def> = MOV32rr %reg1506 %reg1486<def> = XOR32rr %reg1486, %reg1498, %EFLAGS<imp-def,dead> %reg1510<def> = MOV32rm %reg2038, 1, %reg0, 4, %reg0, Mem:LD(4,4) [sunkaddr45 + 0] From linearscan's point of view, each of reg2036, 2037, and 2038 are separate registers, each is "killed" after a single use. The reloaded register is available and it's often clobbered right away. e.g. In thise case reg1498 is allocated EAX while reg2036 is allocated RAX. This means we end up with multiple reloads from the same stack slot in the same basic block. Now linearscan recognize there are other reloads from same SS in the same BB. So it'll "downgrade" RAX (and its aliases) after reg2036 is allocated until the next reload (reg2037) is done. This greatly increase the likihood reloads from SS are reused. This speeds up sha1 from OpenSSL by 5.8%. It is also an across the board win for SPEC2000 and 2006. llvm-svn: 69585
* Make all raw_ostreams support the tell() function.Douglas Gregor2009-04-201-0/+11
| | | | llvm-svn: 69583
* Before trying to introduce/eliminate cast/ext/trunc to make indices type asSanjiv Gupta2009-04-201-1/+6
| | | | | | pointer type, make sure that the pointer size is a valid sequential index type. llvm-svn: 69574
* Use an AssertingVH to detect the case where the Function was deleted butNick Lewycky2009-04-191-10/+11
| | | | | | freeMachineCodeForFunction was never called. llvm-svn: 69531
* Now that BUILD_VECTOR operands are allowed to beDuncan Sands2009-04-191-9/+6
| | | | | | | | bigger than the vector element type, turn checking of the operand type back on again, appropriately adjusted. llvm-svn: 69516
* Fix PR3898, which manifests as failures on are an Xcore,Chris Lattner2009-04-181-1/+1
| | | | | | patch by Jakob Stoklund Olesen! llvm-svn: 69472
* Don't try to make BUILD_VECTOR operands have the sameDuncan Sands2009-04-186-63/+35
| | | | | | | | | | | | | | | | | type as the vector element type: allow them to be of a wider integer type than the element type all the way through the system, and not just as far as LegalizeDAG. This should be safe because it used to be this way (the old type legalizer would produce such nodes), so backends should be able to handle it. In fact only targets which have legal vector types with an illegal promoted element type will ever see this (eg: <4 x i16> on ppc). This fixes a regression with the new type legalizer (vec_splat.ll). Also, treat SCALAR_TO_VECTOR the same as BUILD_VECTOR. After all, it is just a special case of BUILD_VECTOR. llvm-svn: 69467
* Add a ScalarEvolution::getCouldNotCompute() function, and use itDan Gohman2009-04-181-12/+21
| | | | | | instead of allocating and leaking new SCEVCouldNotCompute objects. llvm-svn: 69452
* More const qualifiers.Dan Gohman2009-04-181-14/+14
| | | | llvm-svn: 69451
* Use more const qualifiers with SCEV interfaces.Dan Gohman2009-04-183-45/+46
| | | | llvm-svn: 69450
* Add a new LiveInterval::overlaps(). It checks if the live interval overlaps ↵Evan Cheng2009-04-181-0/+16
| | | | | | a range specified by [Start, End). llvm-svn: 69434
* Fixed a few 64 bit cases in X86InstrInfo::commuteInstructionMon P Wang2009-04-181-3/+3
| | | | llvm-svn: 69417
* Inline asm's were still introducing bogus dependencies;Dale Johannesen2009-04-181-1/+7
| | | | | | my earlier patch to this code only fixed half of it. llvm-svn: 69408
* remove trailing whitespaceJim Grosbach2009-04-171-50/+50
| | | | llvm-svn: 69402
* Recommit r69335 and r69336. These were not causing problems.Bill Wendling2009-04-171-3/+5
| | | | llvm-svn: 69394
* Move the AddLiveIn function definition closer to its uses.Bob Wilson2009-04-171-11/+11
| | | | llvm-svn: 69382
* Rearrange code to reduce indentation.Bob Wilson2009-04-171-41/+38
| | | | llvm-svn: 69381
* Clean up formatting, remove trailing whitespace, fix comment typos andBob Wilson2009-04-173-44/+31
| | | | | | punctuation. No functional changes. llvm-svn: 69378
OpenPOWER on IntegriCloud