summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* implement a trivial readme entry.Chris Lattner2007-11-273-18/+26
| | | | llvm-svn: 44380
* Fix a crash on invalid code due to memcpy lowering.Chris Lattner2007-11-271-25/+30
| | | | llvm-svn: 44378
* Make this actually work on systems that support ppc long double.Chris Lattner2007-11-271-3/+8
| | | | llvm-svn: 44374
* Unbreak all of the darwin/ppc32 JIT failures having to do Chris Lattner2007-11-271-0/+10
| | | | | | with not being able to find printf. llvm-svn: 44373
* Support returning non-power-of-2 vectors to unblock some workNate Begeman2007-11-272-4/+13
| | | | llvm-svn: 44371
* something wrong with this optAndrew Lenharth2007-11-271-12/+14
| | | | llvm-svn: 44370
* Unbreak backwards compatibility with bytecode format. RegressionChris Lattner2007-11-272-5/+8
| | | | | | | introduced by this patch: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071126/055824.html llvm-svn: 44364
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-2733-1341/+1368
| | | | | | | | | | | | the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. llvm-svn: 44359
* err, no really.Chris Lattner2007-11-271-1/+1
| | | | llvm-svn: 44352
* don't depend on ADL.Chris Lattner2007-11-271-1/+1
| | | | llvm-svn: 44351
* Make LoopInfoBase more generic, in preparation for having MachineLoopInfo. ↵Owen Anderson2007-11-278-16/+16
| | | | | | This involves a small interface change. llvm-svn: 44348
* Don't lower srem/urem X%C to X-X/C*C unless the division is actuallyDan Gohman2007-11-261-14/+18
| | | | | | | | | optimized. This avoids creating illegal divisions when the combiner is running after legalize; this fixes PR1815. Also, it produces better code in the included testcase by avoiding the subtract and multiply when the division isn't optimized. llvm-svn: 44341
* Fix another bug that was causing siod to fail.Owen Anderson2007-11-261-19/+29
| | | | llvm-svn: 44325
* Fix a silly bug that Nicholas noticed.Owen Anderson2007-11-261-1/+2
| | | | llvm-svn: 44324
* Allow GVN to eliminate read-only function calls when it can detect that they ↵Owen Anderson2007-11-262-5/+23
| | | | | | are redundant. llvm-svn: 44323
* Remove another leak. Due to some reason AliasSetTracker didn't had any dtor...Anton Korobeynikov2007-11-251-0/+5
| | | | llvm-svn: 44320
* Add new SCEV, SCEVSMax. This allows LLVM to analyze do-while loops.Nick Lewycky2007-11-252-80/+140
| | | | llvm-svn: 44319
* Implement PR1822Chris Lattner2007-11-251-0/+7
| | | | llvm-svn: 44318
* Fix PR1816. If a bitcast of a function only exists because of aDuncan Sands2007-11-253-35/+56
| | | | | | | | | trivial difference in function attributes, allow calls to it to be converted to direct calls. Based on a patch by Török Edwin. While there, move the various lists of mutually incompatible parameters etc out of the verifier and into ParameterAttributes.h. llvm-svn: 44315
* Fix a long standing deficiency in the X86 backend: we wouldChris Lattner2007-11-254-97/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sometimes emit "zero" and "all one" vectors multiple times, for example: _test2: pcmpeqd %mm0, %mm0 movq %mm0, _M1 pcmpeqd %mm0, %mm0 movq %mm0, _M2 ret instead of: _test2: pcmpeqd %mm0, %mm0 movq %mm0, _M1 movq %mm0, _M2 ret This patch fixes this by always arranging for zero/one vectors to be defined as v4i32 or v2i32 (SSE/MMX) instead of letting them be any random type. This ensures they get trivially CSE'd on the dag. This fix is also important for LegalizeDAGTypes, as it gets unhappy when the x86 backend wants BUILD_VECTOR(i64 0) to be legal even when 'i64' isn't legal. This patch makes the following changes: 1) X86TargetLowering::LowerBUILD_VECTOR now lowers 0/1 vectors into their canonical types. 2) The now-dead patterns are removed from the SSE/MMX .td files. 3) All the patterns in the .td file that referred to immAllOnesV or immAllZerosV in the wrong form now use *_bc to match them with a bitcast wrapped around them. 4) X86DAGToDAGISel::SelectScalarSSELoad is generalized to handle bitcast'd zero vectors, which simplifies the code actually. 5) getShuffleVectorZeroOrUndef is updated to generate a shuffle that is legal, instead of generating one that is illegal and expecting a later legalize pass to clean it up. 6) isZeroShuffle is generalized to handle bitcast of zeros. 7) several other minor tweaks. This patch is definite goodness, but has the potential to cause random code quality regressions. Please be on the lookout for these and let me know if they happen. llvm-svn: 44310
* Implement expand support for MERGE_VALUEs that only produces one result.Chris Lattner2007-11-241-0/+4
| | | | llvm-svn: 44304
* add a immAllZerosV_bc pattern fragment for consistency with others.Chris Lattner2007-11-241-3/+6
| | | | llvm-svn: 44303
* remove bogus assertion that broke CodeGen/Generic/cast-fp.ll on x86Chris Lattner2007-11-241-3/+0
| | | | | | among others. llvm-svn: 44302
* Implement support for custom legalization in DAGTypeLegalizer::ExpandOperand.Chris Lattner2007-11-241-30/+43
| | | | | | | | Improve a comment. Unbreak Duncan's carefully written path compression where I didn't realize what was happening! llvm-svn: 44301
* Several changes:Chris Lattner2007-11-247-146/+270
| | | | | | | | | | | | | | | | | | | | | 1) Change the interface to TargetLowering::ExpandOperationResult to take and return entire NODES that need a result expanded, not just the value. This allows us to handle things like READCYCLECOUNTER, which returns two values. 2) Implement (extremely limited) support in LegalizeDAG::ExpandOp for MERGE_VALUES. 3) Reimplement custom lowering in LegalizeDAGTypes in terms of the new ExpandOperationResult. This makes the result simpler and fully general. 4) Implement (fully general) expand support for MERGE_VALUES in LegalizeDAGTypes. 5) Implement ExpandOperationResult support for ARM f64->i64 bitconvert and ARM i64 shifts, allowing them to work with LegalizeDAGTypes. 6) Implement ExpandOperationResult support for X86 READCYCLECOUNTER and FP_TO_SINT, allowing them to work with LegalizeDAGTypes. LegalizeDAGTypes now passes several more X86 codegen tests when enabled and when type legalization in LegalizeDAG is ifdef'd out. llvm-svn: 44300
* add a noteChris Lattner2007-11-241-0/+21
| | | | llvm-svn: 44299
* Fix PR1816, by correcting the broken definition of APInt::countTrailingZeros.Chris Lattner2007-11-231-1/+1
| | | | llvm-svn: 44296
* simplify some code.Chris Lattner2007-11-231-5/+1
| | | | llvm-svn: 44295
* Fix APInt::countTrailingZeros to return BitWidth if the input is zero ↵Chris Lattner2007-11-231-2/+2
| | | | | | instead of returning some random large number. llvm-svn: 44294
* add a comment.Chris Lattner2007-11-231-1/+1
| | | | llvm-svn: 44293
* splice some lines together, no functionality change.Chris Lattner2007-11-231-11/+7
| | | | llvm-svn: 44292
* Ding dong, the DoesntAccessMemoryFns andDuncan Sands2007-11-231-113/+0
| | | | | | | | | OnlyReadsMemoryFns tables are dead! We get more, and more accurate, information from gcc via the readnone and readonly function attributes. llvm-svn: 44288
* Remove some logic I thoughtlessly copied overDuncan Sands2007-11-231-3/+0
| | | | | | | | from the old ADCE implementation (there it was correct because the transform was being done for read-only functions). llvm-svn: 44287
* Fix a bug where we'd try to find a scev value for a bitcast operand,Chris Lattner2007-11-231-0/+8
| | | | | | | even though the bitcast operand did not have integer type. This fixes PR1814. llvm-svn: 44286
* Fix PR1817.Chris Lattner2007-11-221-1/+6
| | | | llvm-svn: 44284
* Don't crash on bogus llvm.noinline. This is first part of PR1817 (preventing ↵Anton Korobeynikov2007-11-221-0/+4
| | | | | | reduction) llvm-svn: 44281
* Turn invokes of nounwind functions into ordinary calls.Duncan Sands2007-11-221-1/+49
| | | | llvm-svn: 44280
* Teach alias analysis about readnone/readonly functions.Duncan Sands2007-11-221-0/+6
| | | | | | Based on a patch by Török Edwin. llvm-svn: 44279
* Readonly/readnone functions are allowed to throwDuncan Sands2007-11-221-27/+1
| | | | | | | exceptions, so don't turn invokes of them into calls. llvm-svn: 44278
* Rename the 'const' parameter attribute to 'readnone',Duncan Sands2007-11-224-11/+11
| | | | | | | and the 'pure' parameter attribute to 'readonly'. Names suggested by DannyB. llvm-svn: 44273
* Instead of calculating constant factors, calculate the number of trailingNick Lewycky2007-11-221-54/+47
| | | | | | bits. Patch from Wojciech Matyjewicz. llvm-svn: 44268
* Create nodes for inline asm so that we don't crash looking for the node later.Nick Lewycky2007-11-221-0/+8
| | | | llvm-svn: 44267
* Fix a bug in which node A is replaced by node B, but laterDuncan Sands2007-11-211-7/+30
| | | | | | | | node A gets back into the DAG again because it was hiding in one of the node maps: make sure that node replacement happens in those maps too. llvm-svn: 44263
* typoNick Lewycky2007-11-211-1/+1
| | | | llvm-svn: 44262
* Fix compiler warning.Dale Johannesen2007-11-211-1/+1
| | | | llvm-svn: 44261
* This change does a couple of things. First it gets the Visual Studio builds ↵Chuck Rose III2007-11-212-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | working. I added the lexing files to the VStudio projects and removed the .l files from the VStudio projects. There was a problem with use of strtoll in TGLexer.cpp and Chris suggested switching to strtol, so that's included here. Additionally, this checkin adds minimal x64 builds to the VStudio builds. Build issues related to x64 in the windows specific files for DynamicLibrary.inc and Singals.inc are worked around, but not ultimately solved. Binaries used to be stored in ...\win32\{Debug|Release} but are now kept in ...\win32\bin\{win32|x64}\{Debug|Release} intermediate files will continue to be stored in the individual project directories under win32. Some names will likely change in the future to reflect that the vstudio projects are no longer 32-bit only, but I wanted to get things up and running today so kept away from bigger restructuring. llvm-svn: 44260
* Fix .eh table linkage issues on Darwin. Some EH supportDale Johannesen2007-11-207-13/+44
| | | | | | for Darwin PPC, but it's not fully working yet. llvm-svn: 44258
* In order for parameter attribute uniquing to makeDuncan Sands2007-11-202-8/+10
| | | | | | | | | | | | any sense it is important that ParamAttr::None gets treated the same as not supplying an attribute at all. Rather than stripping ParamAttr::None out of the list of attributes, assert if ParamAttr::None is seen. Fix up the bitcode reader which liked to insert ParamAttr::None all over the place. Patch based on one by Török Edwin. llvm-svn: 44250
* Small cleanup. Use APInt::getHighBitsSet method instead of shift left.Nick Lewycky2007-11-201-5/+4
| | | | | | "setcc" -> "icmp op" in comments. No functionality change. llvm-svn: 44249
* Be more careful when transforming | to +. Patch from Wojciech Matyjewicz.Nick Lewycky2007-11-201-6/+8
| | | | llvm-svn: 44248
OpenPOWER on IntegriCloud