summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Fix build problems on Cygwin (PR1652), patch by Patrick Walton.Chris Lattner2007-09-131-10/+10
| | | | llvm-svn: 41923
* Bug fixes.Evan Cheng2007-09-131-4/+4
| | | | llvm-svn: 41900
* Remove dead code.Evan Cheng2007-09-121-1/+1
| | | | llvm-svn: 41899
* Yet another getTargetNode variant.Evan Cheng2007-09-121-0/+12
| | | | llvm-svn: 41898
* Fixed a typo that's causing a missing kill marker.Evan Cheng2007-09-121-4/+3
| | | | llvm-svn: 41893
* Revise previous patch per review comments.Dale Johannesen2007-09-125-28/+62
| | | | | | | Next round of x87 long double stuff. Getting close now, basically works. llvm-svn: 41875
* Sometimes a MI can define a register as well as defining a super-register at theEvan Cheng2007-09-111-6/+7
| | | | | | same time. Do not mark the "smaller" def as dead. llvm-svn: 41871
* Add APInt interfaces to APFloat (allows directlyDale Johannesen2007-09-115-28/+33
| | | | | | | | | access to bits). Use them in place of float and double interfaces where appropriate. First bits of x86 long double constants handling (untested, probably does not work). llvm-svn: 41858
* Add a bool to indicate if we should set the "indirect encoding" bit in the DwarfBill Wendling2007-09-111-1/+6
| | | | | | information for EH. llvm-svn: 41852
* Fold the adjust_trampoline intrinsic intoDuncan Sands2007-09-113-25/+16
| | | | | | | init_trampoline. There is now only one trampoline intrinsic. llvm-svn: 41841
* The personality function on Darwin needs a global stub. We then refer toBill Wendling2007-09-111-20/+9
| | | | | | that global stub instead of doing the ".set" thingy we were doing before. llvm-svn: 41838
* Observation of rematerialization.Evan Cheng2007-09-101-0/+5
| | | | llvm-svn: 41809
* Emit:Chris Lattner2007-09-101-0/+10
| | | | | | | | | | | | | | | | | cmpl %eax, %ecx setae %al movzbl %al, %eax instead of: cmpl %eax, %ecx setb %al xorb $1, %al movzbl %al, %eax when using logical not of a C comparison. llvm-svn: 41807
* 1. Don't call Value::getName(), which is slow.Chris Lattner2007-09-101-38/+52
| | | | | | | | | | | | | | | | | | | 2. Lower calls to fabs and friends to FABS nodes etc unless the function has internal linkage. Before we wouldn't lower if it had a definition, which is incorrect. This allows us to compile: define double @fabs(double %f) { %tmp2 = tail call double @fabs( double %f ) ret double %tmp2 } into: _fabs: fabs f1, f1 blr llvm-svn: 41805
* Implement misaligned FP loads and stores.Dale Johannesen2007-09-081-11/+48
| | | | llvm-svn: 41786
* Add support for having different alignment for objects on call frames.Rafael Espindola2007-09-071-2/+4
| | | | | | | The x86-64 ABI states that objects passed on the stack have 8 byte alignment. Implement that. llvm-svn: 41768
* Split eh.select / eh.typeid.for intrinsics into i32/i64 versions. This is ↵Anton Korobeynikov2007-09-072-12/+21
| | | | | | | | needed, because they just "mark" register liveins and we let frontend solve type issue, not lowering code :) llvm-svn: 41763
* Add lengthof and endof templates that hide a lot of sizeof computations.Owen Anderson2007-09-072-4/+5
| | | | | | Patch by Sterling Stein! llvm-svn: 41758
* Constify to catch bugs.David Greene2007-09-061-2/+2
| | | | llvm-svn: 41751
* Next round of APFloat changes.Dale Johannesen2007-09-063-5/+9
| | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) llvm-svn: 41747
* Proper handle case, when aliasee is external weak symbol referenced only by ↵Anton Korobeynikov2007-09-061-6/+13
| | | | | | | | alias itself. Also, fix a case, when target doesn't have weak symbols supported. llvm-svn: 41746
* Add instruction dump output. This helps find bugs.David Greene2007-09-061-0/+6
| | | | llvm-svn: 41744
* Pluggable coalescers inplementation.David Greene2007-09-063-1/+63
| | | | llvm-svn: 41743
* Fix a memory leak.Evan Cheng2007-09-062-1/+4
| | | | llvm-svn: 41739
* Use pool allocator for all the VNInfo's to improve memory access locality. ↵Evan Cheng2007-09-053-66/+50
| | | | | | This reduces coalescing time on siod Mac OS X PPC by 35%. Also remove the back ptr from VNInfo to LiveInterval and other tweaks. llvm-svn: 41729
* Due to label merging, the last label for an invokeDuncan Sands2007-09-051-3/+2
| | | | | | | | may be the same as the first label for the following invoke. Remove a micro-optimization which was wrong in this case. llvm-svn: 41720
* Fix PR1628. When exception handling is turned on,Duncan Sands2007-09-053-87/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | labels are generated bracketing each call (not just invokes). This is used to generate entries in the exception table required by the C++ personality. However it gets in the way of tail-merging. This patch solves the problem by no longer placing labels around ordinary calls. Instead we generate entries in the exception table that cover every instruction in the function that wasn't covered by an invoke range (the range given by the labels around the invoke). As an optimization, such entries are only generated for parts of the function that contain a call, since for the moment those are the only instructions that can throw an exception [1]. As a happy consequence, we now get a smaller exception table, since the same region can cover many calls. While there, I also implemented folding of invoke ranges - successive ranges are merged when safe to do so. Finally, if a selector contains only a cleanup, there's a special shorthand for it - place a 0 in the call-site entry. I implemented this while there. As a result, the exception table output (excluding filters) is now optimal - it cannot be made smaller [2]. The problem with throw filters is that folding them optimally is hard, and the benefit of folding them is minimal. [1] I tested that having trapping instructions (eg divide by zero) in such a region doesn't cause trouble. [2] It could be made smaller with the help of higher layers, eg by having branch folding reorder basic blocks ending in invokes with the same landing pad so they follow each other. I don't know if this is worth doing. llvm-svn: 41718
* Fix for PR1632. EHSELECTION always produces a i32 value.Evan Cheng2007-09-041-1/+1
| | | | llvm-svn: 41712
* Silence warning while compiling with gcc 4.2Anton Korobeynikov2007-09-021-1/+2
| | | | llvm-svn: 41676
* Emit proper "secrel" directive, where possible. This fixes invalid asm ↵Anton Korobeynikov2007-09-021-43/+28
| | | | | | | | syntax of debug info on mingw32. Also, cleanup some stuff. llvm-svn: 41675
* More tweaks to improve compile time.Evan Cheng2007-09-012-41/+56
| | | | llvm-svn: 41669
* Add mod, copysign, abs operations to APFloat.Dale Johannesen2007-08-312-37/+67
| | | | | | | | Implement some constant folding in SelectionDAG and DAGCombiner using APFloat. Remove double versions of constructor and getValue from ConstantFPSDNode. llvm-svn: 41664
* std::map -> DenseMap for slight compile time benefit.Evan Cheng2007-08-311-7/+7
| | | | llvm-svn: 41650
* Revise per review of previous patch.Dale Johannesen2007-08-311-12/+24
| | | | llvm-svn: 41645
* Remove an unnecessary element, saving 4 bytes per LiveInterval.Evan Cheng2007-08-311-3/+0
| | | | llvm-svn: 41641
* Use std::map instead of a (potentially very sparse) array to track val# ↵Evan Cheng2007-08-311-36/+27
| | | | | | defined by copy from the other live range. Minor compile time win when number of val# is large. llvm-svn: 41640
* Enhance APFloat to retain bits of NaNs (fixes oggenc).Dale Johannesen2007-08-312-16/+45
| | | | | | | Use APFloat interfaces for more references, mostly of ConstantFPSDNode. llvm-svn: 41632
* Try fold re-materialized load instructions into its uses.Evan Cheng2007-08-301-11/+22
| | | | llvm-svn: 41598
* Change LegalFPImmediates to use APFloat.Dale Johannesen2007-08-302-12/+53
| | | | | | | | | Add APFloat interfaces to ConstantFP, SelectionDAG. Fix integer bit in double->APFloat conversion. Convert LegalizeDAG to use APFloat interface in ConstantFPSDNode uses. llvm-svn: 41587
* Fix use of declaration inside case blockAnton Korobeynikov2007-08-291-1/+2
| | | | llvm-svn: 41584
* Change LiveRange so it keeps a pointer to the VNInfo rather than an index.Evan Cheng2007-08-293-213/+252
| | | | | | | Changes related modules so VNInfo's are not copied. This decrease copy coalescing time by 45% and overall compilation time by 10% on siod. llvm-svn: 41579
* Lower FRAME_TO_ADDR_OFFSET to zero by default (if not custom lowered)Anton Korobeynikov2007-08-291-1/+13
| | | | llvm-svn: 41578
* Add an option, -view-sunit-dags, for viewing the actual SUnit DAGs used byDan Gohman2007-08-282-1/+77
| | | | | | scheduling. llvm-svn: 41556
* Recover most of the compile time regression due to recent live interval changes.Evan Cheng2007-08-282-44/+46
| | | | | | | | 1. Eliminate the costly live interval "swapping". 2. Change ValueNumberInfo container from SmallVector to std::vector. The former performs slowly when the vector size is very large. llvm-svn: 41536
* Make DAGCombiner's global alias analysis query more precise in the caseDan Gohman2007-08-271-2/+3
| | | | | | where both pointers have non-zero offsets. llvm-svn: 41491
* If the source and destination pointers in an llvm.memmove are knownDan Gohman2007-08-271-12/+25
| | | | | | to not alias each other, it can be translated as an llvm.memcpy. llvm-svn: 41489
* There is an impedance matching problem between LLVM andDuncan Sands2007-08-272-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc exception handling: if an exception unwinds through an invoke, then execution must branch to the invoke's unwind target. We previously tried to enforce this by appending a cleanup action to every selector, however this does not always work correctly due to an optimization in the C++ unwinding runtime: if only cleanups would be run while unwinding an exception, then the program just terminates without actually executing the cleanups, as invoke semantics would require. I was hoping this wouldn't be a problem, but in fact it turns out to be the cause of all the remaining failures in the LLVM testsuite (these also fail with -enable-correct-eh-support, so turning on -enable-eh didn't make things worse!). Instead we need to append a full-blown catch-all to the end of each selector. The correct way of doing this depends on the personality function, i.e. it is language dependent, so can only be done by gcc. Thus this patch which generalizes the eh.selector intrinsic so that it can handle all possible kinds of action table entries (before it didn't accomodate cleanups): now 0 indicates a cleanup, and filters have to be specified using the number of type infos plus one rather than the number of type infos. Related gcc patches will cause Ada to pass a cleanup (0) to force the selector to always fire, while C++ will use a C++ catch-all (null). llvm-svn: 41484
* Add explicit keywords and remove spurious trailing semicolons.Dan Gohman2007-08-272-10/+11
| | | | llvm-svn: 41482
* Revise per review comments.Dale Johannesen2007-08-262-2/+2
| | | | llvm-svn: 41409
* Add APFloat interface to ConstantFPSDNode. ChangeDale Johannesen2007-08-252-13/+8
| | | | | | | over uses in DAGCombiner. Fix interfaces to work with APFloats. llvm-svn: 41407
OpenPOWER on IntegriCloud