summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* add a new TargetConstant nodeChris Lattner2005-08-171-1/+19
| | | | llvm-svn: 22813
* Eliminate the RegSDNode class, which 3 nodes (CopyFromReg/CopyToReg/ImplicitDef)Chris Lattner2005-08-164-54/+82
| | | | | | | | | | | | | | used to tack a register number onto the node. Instead of doing this, make a new node, RegisterSDNode, which is a leaf containing a register number. These three operations just become normal DAG nodes now, instead of requiring special handling. Note that with this change, it is no longer correct to make illegal CopyFromReg/CopyToReg nodes. The legalizer will not touch them, and this is bad, so don't do it. :) llvm-svn: 22806
* Implement BR_CC and BRTWOWAY_CC. This allows the removal of a rather nastyNate Begeman2005-08-162-12/+139
| | | | | | | fixme from the PowerPC backend. Emit slightly better code for legalizing select_cc. llvm-svn: 22805
* Allow passing a dag into dump and getOperationName. If one is availableChris Lattner2005-08-161-9/+21
| | | | | | | when printing a node, use it to render target operations with their target instruction name instead of "<<unknown>>". llvm-svn: 22804
* Use a extant helper to do this.Chris Lattner2005-08-161-19/+7
| | | | llvm-svn: 22802
* Add some methods for dag->dag isel.Chris Lattner2005-08-162-19/+59
| | | | | | Split RemoveNodeFromCSEMaps out of DeleteNodesIfDead to do it. llvm-svn: 22801
* Fix last night's PPC32 regressions byNate Begeman2005-08-141-0/+1
| | | | | | | | | 1. Not selecting the false value of a select_cc in the false arm, which isn't legal for nested selects. 2. Actually returning the node we created and Legalized in the FP_TO_UINT Expander. llvm-svn: 22789
* Teach the legalizer how to legalize FP_TO_UINT.Nate Begeman2005-08-141-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach the legalizer to promote FP_TO_UINT to FP_TO_SINT if the wider FP_TO_UINT is also illegal. This allows us on PPC to codegen unsigned short foo(float a) { return a; } as: _foo: .LBB_foo_0: ; entry fctiwz f0, f1 stfd f0, -8(r1) lwz r2, -4(r1) rlwinm r3, r2, 0, 16, 31 blr instead of: _foo: .LBB_foo_0: ; entry fctiwz f0, f1 stfd f0, -8(r1) lwz r2, -4(r1) lis r3, ha16(.CPI_foo_0) lfs f0, lo16(.CPI_foo_0)(r3) fcmpu cr0, f1, f0 blt .LBB_foo_2 ; entry .LBB_foo_1: ; entry fsubs f0, f1, f0 fctiwz f0, f0 stfd f0, -16(r1) lwz r2, -12(r1) xoris r2, r2, 32768 .LBB_foo_2: ; entry rlwinm r3, r2, 0, 16, 31 blr llvm-svn: 22785
* Remove an unncessary argument to SimplifySelectCC and add an additionalNate Begeman2005-08-131-8/+10
| | | | | | assert when creating a select_cc node. llvm-svn: 22780
* Fix the fabs regression on x86 by abstracting the select_cc optimizationNate Begeman2005-08-131-68/+83
| | | | | | | out into SimplifySelectCC. This allows both ISD::SELECT and ISD::SELECT_CC to use the same set of simplifying folds. llvm-svn: 22779
* implement a couple of simple shift foldings.Chris Lattner2005-08-121-0/+18
| | | | | | e.g. (X & 7) >> 3 -> 0 llvm-svn: 22774
* Add a select_cc optimization for recognizing abs(int). This speeds up anNate Begeman2005-08-111-0/+16
| | | | | | integer MPEG encoding loop by a factor of two. llvm-svn: 22758
* Some SELECT_CC cleanups:Nate Begeman2005-08-112-53/+61
| | | | | | | | | | | | 1. move assertions for node creation to getNode() 2. legalize the values returned in ExpandOp immediately 3. Move select_cc optimizations from SELECT's getNode() to SELECT_CC's, allowing them to be cleaned up significantly. This paves the way to pick up additional optimizations on SELECT_CC, such as sum-of-absolute-differences. llvm-svn: 22757
* Add new node, SELECT_CC. This node is for targets that don't nativelyNate Begeman2005-08-102-3/+53
| | | | | | implement SELECT. llvm-svn: 22755
* Fix an oversight that may be causing PR617.Chris Lattner2005-08-101-4/+13
| | | | llvm-svn: 22753
* Fix spelling, fix some broken canonicalizations by my last patchChris Lattner2005-08-091-12/+11
| | | | llvm-svn: 22734
* add cc nodes to the AllNodes list so they show up in Graphviz outputChris Lattner2005-08-091-1/+3
| | | | llvm-svn: 22731
* Eliminate the SetCCSDNode in favor of a CondCodeSDNode class. This pulls theChris Lattner2005-08-093-175/+185
| | | | | | | | CC out of the SetCC operation, making SETCC a standard ternary operation and CC's a standard DAG leaf. This will make it possible for other node to use CC's as operands in the future... llvm-svn: 22728
* Handle 64-bit constant exprs on 64-bit targets.Chris Lattner2005-08-081-1/+3
| | | | llvm-svn: 22696
* add a small simplification that can be exposed after promotion/expansionChris Lattner2005-08-071-2/+7
| | | | llvm-svn: 22691
* Change FindEarliestCallSeqEnd (used by libcall insertion) to use a set toChris Lattner2005-08-051-5/+9
| | | | | | | | | avoid revisiting nodes more than once. This eliminates a source of potentially exponential behavior. For a small function in 191.fma3d (hexah_stress_divergence_), this speeds up isel from taking > 20mins to taking 0.07s. llvm-svn: 22680
* Fix a use-of-dangling-pointer bug, from the introduction of SrcValue's.Chris Lattner2005-08-051-0/+5
| | | | llvm-svn: 22679
* Fix a latent bug in the libcall inserter that was exposed by Nate's patchChris Lattner2005-08-051-6/+3
| | | | | | yesterday. This fixes whetstone and a bunch of programs in the External tests. llvm-svn: 22678
* Fix a fixme in LegalizeDAGNate Begeman2005-08-041-7/+2
| | | | llvm-svn: 22661
* * Unbreak release buildMisha Brukman2005-08-041-3/+6
| | | | | | * Add comments to #endif pragmas for readability llvm-svn: 22647
* Fix PR611, codegen'ing SREM of FP operands to fmod or fmodf instead ofChris Lattner2005-08-032-6/+14
| | | | | | the sequence used for integer ops llvm-svn: 22629
* Update to use the new MathExtras.h support for log2 computation.Chris Lattner2005-08-021-14/+6
| | | | | | Patch contributed by Jim Laskey! llvm-svn: 22594
* Fix casts from long to sbyte on ppcChris Lattner2005-08-011-1/+1
| | | | llvm-svn: 22570
* Keep tabs and trailing spaces out.Jeff Cohen2005-07-301-14/+15
| | | | llvm-svn: 22565
* fix float->long conversions on x86Chris Lattner2005-07-301-3/+10
| | | | llvm-svn: 22563
* Allow targets to have custom expanders for FP_TO_*INT conversions whereChris Lattner2005-07-301-3/+9
| | | | | | both the src and dest values are legal llvm-svn: 22555
* Allow targets to define custom expanders for FP_TO_*INTChris Lattner2005-07-291-0/+18
| | | | llvm-svn: 22548
* allow a target to request that unknown FP_TO_*INT conversion be promoted toChris Lattner2005-07-291-1/+74
| | | | | | a larger integer destination. llvm-svn: 22547
* instead of having all conversions be handled by one case value, and then haveChris Lattner2005-07-281-64/+86
| | | | | | subcases inside, break things out earlier. llvm-svn: 22546
* new is not a valid default anywhere, so make this pure virtualAndrew Lenharth2005-07-282-0/+12
| | | | llvm-svn: 22542
* Fix debug info to not print out recently freed memory.Chris Lattner2005-07-271-1/+1
| | | | llvm-svn: 22529
* Print symbolic register names in debug dumpsChris Lattner2005-07-271-2/+4
| | | | llvm-svn: 22528
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-275-56/+56
| | | | llvm-svn: 22523
* Remove unnecessary FP_EXTEND. This causes worse codegen for SSE.Nate Begeman2005-07-191-3/+0
| | | | llvm-svn: 22469
* The assertion was wrong: the code only worked for i64. While we're at it,Chris Lattner2005-07-181-3/+11
| | | | | | | expand the code to work for all integer datatypes. This should unbreak alpha. llvm-svn: 22464
* Only get the .bss and .data sections when needed instead of unconditionally.Chris Lattner2005-07-161-11/+3
| | | | | | This allows is to not emit empty sections when .data or .bss is not used. llvm-svn: 22457
* Refactor getSection() method to make it easier to use.Chris Lattner2005-07-161-19/+15
| | | | llvm-svn: 22455
* Major refactor of the ELFWriter code. Instead of building up one bigChris Lattner2005-07-161-143/+167
| | | | | | | | | | | vector that represents the .o file at once, build up a vector for each section of the .o file. This is needed because the .o file writer needs to be able to switch between sections as it emits them (e.g. switch between the .text section and the .rel section when emitting code). This patch has no functionality change. llvm-svn: 22453
* Teach the legalizer how to promote SINT_TO_FP to a wider SINT_TO_FP thatNate Begeman2005-07-161-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the target natively supports. This eliminates some special-case code from the x86 backend and generates better code as well. For an i8 to f64 conversion, before & after: _x87 before: subl $2, %esp movb 6(%esp), %al movsbw %al, %ax movw %ax, (%esp) filds (%esp) addl $2, %esp ret _x87 after: subl $2, %esp movsbw 6(%esp), %ax movw %ax, (%esp) filds (%esp) addl $2, %esp ret _sse before: subl $12, %esp movb 16(%esp), %al movsbl %al, %eax cvtsi2sd %eax, %xmm0 addl $12, %esp ret _sse after: subl $12, %esp movsbl 16(%esp), %eax cvtsi2sd %eax, %xmm0 addl $12, %esp ret llvm-svn: 22452
* Break the code for expanding UINT_TO_FP operations out into its ownChris Lattner2005-07-161-35/+116
| | | | | | | | | | | | | | SelectionDAGLegalize::ExpandLegalUINT_TO_FP method. Add a new method, PromoteLegalUINT_TO_FP, which allows targets to request that UINT_TO_FP operations be promoted to a larger input type. This is useful for targets that have some UINT_TO_FP or SINT_TO_FP operations but not all of them (like X86). The same should be done with SINT_TO_FP, but this patch does not do that yet. llvm-svn: 22447
* You can't use config options without config.hChris Lattner2005-07-151-0/+1
| | | | llvm-svn: 22446
* Make this use the new autoconf support for finding the executables forChris Lattner2005-07-141-5/+8
| | | | | | gv and Graphviz. llvm-svn: 22434
* As discussed on IRC, this stuff is just for debugging.Chris Lattner2005-07-141-0/+5
| | | | llvm-svn: 22432
* If the Graphviz program is available, use it to visualize dot graphs.Chris Lattner2005-07-141-1/+10
| | | | llvm-svn: 22429
* Fix Alpha/2005-07-12-TwoMallocCalls.ll and PR593.Chris Lattner2005-07-131-1/+2
| | | | | | | | | | It is not safe to call LegalizeOp on something that has already been legalized. Instead, just force another iteration of legalization. This could affect all platforms but X86, as this codepath is dynamically dead on X86 (ISD::MEMSET and friends are legal). llvm-svn: 22419
OpenPOWER on IntegriCloud