summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Update for CMakeLists; untested, so tell me if there are issues.Eli Friedman2009-05-241-0/+1
| | | | llvm-svn: 72360
* Remove checks of getTypeAction from LegalizeOp; we already assert that Eli Friedman2009-05-241-503/+105
| | | | | | | all results and all operands are legal, so this change shouldn't affect behavior at all. llvm-svn: 72359
* Disable type legalization in LegalizeDAG.Eli Friedman2009-05-241-94/+39
| | | | | | | This leaves around 4000 lines of dead code; I'll clean that up in subsequent commits. llvm-svn: 72358
* Make the PPC backend use a legal type for the operands to the BUILD_VECTOREli Friedman2009-05-241-5/+3
| | | | | | nodes it generates. llvm-svn: 72356
* Fix a bug in the expansion of EXTRACT_SUBVECTOR in Eli Friedman2009-05-231-1/+2
| | | | | | ExpandExtractFromVectorThroughStack. llvm-svn: 72351
* Make the X86 backend mark EXTRACT_SUBVECTOR as Expand, at least for the Eli Friedman2009-05-231-0/+1
| | | | | | moment. llvm-svn: 72350
* Add a proper implementation of EXTRACT_SUBVECTOR legalization that Eli Friedman2009-05-231-19/+42
| | | | | | | | doesn't split legal vector operands. This is necessary because the type legalization (and therefore, vector splitting) code will be going away soon. llvm-svn: 72349
* Add ARMv7 architecture, Cortex processors and different FPU modes handling.Anton Korobeynikov2009-05-233-13/+28
| | | | llvm-svn: 72337
* Emit ARM Build AttributesAnton Korobeynikov2009-05-232-0/+91
| | | | llvm-svn: 72336
* Propagate CPU string out of SubtargetFeaturesAnton Korobeynikov2009-05-2312-18/+40
| | | | llvm-svn: 72335
* Work around a page size issue on Cygwin.Jay Foad2009-05-231-1/+6
| | | | llvm-svn: 72332
* Fix PR4254.Torok Edwin2009-05-231-2/+2
| | | | | | | | | | | The DAGCombiner created a negative shiftamount, stored in an unsigned variable. Later the optimizer eliminated the shift entirely as being undefined. Example: (srl (shl X, 56) 48). ShiftAmt is 4294967288. Fix it by checking that the shiftamount is positive, and storing in a signed variable. llvm-svn: 72331
* stat64/open64/lseek64 for the interpreterTorok Edwin2009-05-231-1/+4
| | | | llvm-svn: 72329
* available_externall linkage is not local, this was confusing the codegenerator,Torok Edwin2009-05-234-5/+8
| | | | | | | | | and it wasn't generating calls through @PLT for these functions. hasLocalLinkage() is now false for available_externally, I attempted to fix the inliner and dce to handle available_externally properly. It passed make check. llvm-svn: 72328
* Add a new step to legalization to legalize vector math operations. This Eli Friedman2009-05-232-0/+362
| | | | | | | | | | | will allow simplifying LegalizeDAG to eliminate type legalization. (I have a patch to do that, but it's not quite finished; I'll commit it once it's finished and I've fixed any review comments for this patch.) See the comment at the beginning of lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp for more details on the motivation for this patch. llvm-svn: 72325
* Make the x86 backend custom-lower UINT_TO_FP and FP_TO_UINT on 32-bit Eli Friedman2009-05-232-25/+64
| | | | | | | | | | | | | systems instead of attempting to promote them to a 64-bit SINT_TO_FP or FP_TO_SINT. This is in preparation for removing the type legalization code from LegalizeDAG: once type legalization is gone from LegalizeDAG, it won't be able to handle the i64 operand/result correctly. This isn't quite ideal, but I don't think any other operation for any target ends up in this situation, so treating this case specially seems reasonable. llvm-svn: 72324
* Fix bug in FoldFCmp_IntToFP_Cst. If inttofp is a uintofp, use unsigned ↵Evan Cheng2009-05-221-61/+67
| | | | | | instead of signed integer constant. llvm-svn: 72300
* CMake: Use libpthread in tblgen when needed. Updated list of sourceOscar Fuentes2009-05-221-0/+1
| | | | | | files for PIC16 target. llvm-svn: 72277
* Add a new codegen pass that normalizes dwarf exception handlingDuncan Sands2009-05-226-12/+407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | code in preparation for code generation. The main thing it does is handle the case when eh.exception calls (and, in a future patch, eh.selector calls) are far away from landing pads. Right now in practice you only find eh.exception calls close to landing pads: either in a landing pad (the common case) or in a landing pad successor, due to loop passes shifting them about. However future exception handling improvements will result in calls far from landing pads: (1) Inlining of rewinds. Consider the following case: In function @f: ... invoke @g to label %normal unwind label %unwinds ... unwinds: %ex = call i8* @llvm.eh.exception() ... In function @g: ... invoke @something to label %continue unwind label %handler ... handler: %ex = call i8* @llvm.eh.exception() ... perform cleanups ... "rethrow exception" Now inline @g into @f. Currently this is turned into: In function @f: ... invoke @something to label %continue unwind label %handler ... handler: %ex = call i8* @llvm.eh.exception() ... perform cleanups ... invoke "rethrow exception" to label %normal unwind label %unwinds unwinds: %ex = call i8* @llvm.eh.exception() ... However we would like to simplify invoke of "rethrow exception" into a branch to the %unwinds label. Then %unwinds is no longer a landing pad, and the eh.exception call there is then far away from any landing pads. (2) Using the unwind instruction for cleanups. It would be nice to have codegen handle the following case: invoke @something to label %continue unwind label %run_cleanups ... handler: ... perform cleanups ... unwind This requires turning "unwind" into a library call, which necessarily takes a pointer to the exception as an argument (this patch also does this unwind lowering). But that means you are using eh.exception again far from a landing pad. (3) Bugpoint simplifications. When bugpoint is simplifying exception handling code it often generates eh.exception calls far from a landing pad, which then causes codegen to assert. Bugpoint then latches on to this assertion and loses sight of the original problem. Note that it is currently rare for this pass to actually do anything. And in fact it normally shouldn't do anything at all given the code coming out of llvm-gcc! But it does fire a few times in the testsuite. As far as I can see this is almost always due to the LoopStrengthReduce codegen pass introducing pointless loop preheader blocks which are landing pads and only contain a branch to another block. This other block contains an eh.exception call. So probably by tweaking LoopStrengthReduce a bit this can be avoided. llvm-svn: 72276
* Only 64-bit targets support TImode libcalls. Disable the TImode shift libcallsBob Wilson2009-05-221-0/+5
| | | | | | for ARM. This fixes rdar://6908807. llvm-svn: 72269
* Teach IndVarSimplify's FixUsesBeforeDefs to handle InvokeInsts byDan Gohman2009-05-221-1/+5
| | | | | | | | | | | | | | | assuming that the use of the value is in a block dominated by the "normal" destination. LangRef.html and other documentation sources don't explicitly guarantee this, but it seems to be assumed in other places in LLVM at least. This fixes an assertion failure on the included testcase, which is derived from the Ada testsuite. FixUsesBeforeDefs is a temporary measure which I'm looking to replace with a more capable solution. llvm-svn: 72266
* Emit debug information for globals (which include automatic variables as ↵Sanjiv Gupta2009-05-224-0/+282
| | | | | | well because on PIC16 they are emitted as globals by the frontend). llvm-svn: 72262
* Always verify dominfo if expensive checking is enabled.Duncan Sands2009-05-221-0/+5
| | | | llvm-svn: 72253
* Fix a thinko in the code that adapted SCEVMulExpr operands forDan Gohman2009-05-221-3/+13
| | | | | | | use in expanding SCEVAddExprs with GEPs. The operands of a SCEVMulExpr need to be multiplied together, not added. llvm-svn: 72250
* Revert this. There's no way to verifiy indirect calls, and an optimizer can turnTorok Edwin2009-05-221-25/+0
| | | | | | | indirect call into direct call, thus the verifier would reject something it previously accepted. llvm-svn: 72249
* Verify that calling conventions match function prototype.Torok Edwin2009-05-221-0/+25
| | | | | | | | | This only rejects mismatches between target specific calling convention and C/LLVM specific calling convention. There are too many fastcc/C, coldcc/cc42 mismatches in the testsuite, these are not reject by the verifier. llvm-svn: 72248
* Fix loop-index-split to correctly preserve dominance frontiers. Part of Eli Friedman2009-05-221-17/+12
| | | | | | PR4238. llvm-svn: 72244
* Add llvm::triple constructor from arch, vendor, os strings, and recognizeDaniel Dunbar2009-05-221-0/+3
| | | | | | DragonFly OS type. llvm-svn: 72242
* Update an assertion string to new-style type names.Dan Gohman2009-05-221-1/+1
| | | | llvm-svn: 72239
* 80 column violation.Evan Cheng2009-05-211-1/+1
| | | | llvm-svn: 72235
* Fix some incorrect logic in DominanceFrontier::splitBlock. Part of Eli Friedman2009-05-211-5/+3
| | | | | | PR4238. llvm-svn: 72223
* Add a getAlignOf helper for getting the ABI alignment of aDuncan Sands2009-05-212-0/+15
| | | | | | | | | type as a target independent constant expression. I confess that I didn't check that this method works as intended (though I did test the equivalent hand-written IR a little). But what could possibly go wrong! llvm-svn: 72213
* Use v.data() instead of &v[0] when SmallVector v might be empty.Jay Foad2009-05-216-24/+26
| | | | llvm-svn: 72210
* Teach ValueTracking a new way to analyze PHI nodes, and and teachDan Gohman2009-05-212-4/+31
| | | | | | | | Instcombine to be more aggressive about using SimplifyDemandedBits on shift nodes. This allows a shift to be simplified to zero in the included test case. llvm-svn: 72204
* Add Atomic.cpp to the CMake build system.Owen Anderson2009-05-211-0/+1
| | | | llvm-svn: 72202
* Temporarily revert r72191. It was causing an assert during llvm-gccBill Wendling2009-05-216-124/+27
| | | | | | bootstrapping. llvm-svn: 72200
* Minor code cleanup. No functionality change.Bill Wendling2009-05-201-18/+7
| | | | llvm-svn: 72198
* Merge 'ConstructFunctionDbgScope' and 'ConstructAbstractDbgScope'.Bill Wendling2009-05-202-41/+14
| | | | llvm-svn: 72197
* Rename 'New*' methods to 'Create*' to be consistent. 'NewString' isn't used.Bill Wendling2009-05-202-20/+13
| | | | llvm-svn: 72196
* Add comment for emit section.Bill Wendling2009-05-201-0/+4
| | | | llvm-svn: 72195
* Move 'Emit' methods down to their own place.Bill Wendling2009-05-201-720/+720
| | | | llvm-svn: 72194
* Revert r72192. It was causing a build failure.Bill Wendling2009-05-202-779/+807
| | | | llvm-svn: 72193
* Do some mechanical changes. Combine the 'construct abastract dbg thingy' in withBill Wendling2009-05-202-807/+779
| | | | | | | the 'constract function dbg thingy'. Rename some methods to make them consistent with the rest of the methods. Move the 'Emit' methods to the end of the file. llvm-svn: 72192
* Introduce DebugScope which gets embedded into the machine instructions' ↵Argyrios Kyrtzidis2009-05-206-27/+124
| | | | | | | | DebugLoc. DebugScope refers to a debug region, function or block. llvm-svn: 72191
* Have llvm_start_multithreaded return a bool indicating whether multithreadedOwen Anderson2009-05-201-2/+3
| | | | | | initialization succeeded or not, rather than just asserting. llvm-svn: 72182
* Tabs, be gone!Owen Anderson2009-05-201-3/+3
| | | | llvm-svn: 72180
* I just fail today.Owen Anderson2009-05-201-3/+3
| | | | | | Hopefully this fixes the last build errors on systems with GCC < 4.1. llvm-svn: 72179
* Copy-and-paste-o.Owen Anderson2009-05-201-1/+1
| | | | llvm-svn: 72177
* Move atomic operations' definitions out of line. While this seems kind of ↵Owen Anderson2009-05-201-0/+52
| | | | | | | | silly, all kinds of problems caused by including windows.h and/or config.h in an LLVM header. llvm-svn: 72174
* Minor formatting fixes.Bob Wilson2009-05-201-2/+2
| | | | llvm-svn: 72172
OpenPOWER on IntegriCloud