summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* available_externall linkage is not local, this was confusing the codegenerator,Torok Edwin2009-05-236-7/+28
| | | | | | | | | 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
* Fix test to account for legalization changes; I think this ends up Eli Friedman2009-05-231-1/+1
| | | | | | running an extra DAGCombine pass which improves the code a bit. llvm-svn: 72326
* Add a new step to legalization to legalize vector math operations. This Eli Friedman2009-05-233-0/+375
| | | | | | | | | | | 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
* CMake: Use libdl only when available. Fixes build on FreeBSD.Oscar Fuentes2009-05-232-1/+4
| | | | llvm-svn: 72311
* Fix bug in FoldFCmp_IntToFP_Cst. If inttofp is a uintofp, use unsigned ↵Evan Cheng2009-05-222-61/+76
| | | | | | instead of signed integer constant. llvm-svn: 72300
* Add a note mentioning that uses of the return value of an invokeDan Gohman2009-05-221-0/+4
| | | | | | must be dominated by the normal label. llvm-svn: 72285
* CMake: Use libpthread in tblgen when needed. Updated list of sourceOscar Fuentes2009-05-222-0/+4
| | | | | | files for PIC16 target. llvm-svn: 72277
* Add a new codegen pass that normalizes dwarf exception handlingDuncan Sands2009-05-2210-13/+419
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-222-1/+62
| | | | | | | | | | | | | | | 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
* Hopefully fix the build for people with ocaml.Duncan Sands2009-05-221-0/+1
| | | | llvm-svn: 72254
* 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-222-3/+71
| | | | | | | 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-223-45/+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-223-0/+45
| | | | | | | | | 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-222-0/+11
| | | | | | 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
* TableGen for fast isel seems to assume an 'imm'Dale Johannesen2009-05-211-2/+2
| | | | | | | | operand is the last in a pattern. There is no reason this should be true (although apparently it always is right now). llvm-svn: 72232
* Fix broken logic in DominatorTreeBase::Split. Part of PR4238.Eli Friedman2009-05-213-42/+9
| | | | llvm-svn: 72231
* Fix indentation.Eli Friedman2009-05-211-20/+20
| | | | llvm-svn: 72227
* Fix some incorrect logic in DominanceFrontier::splitBlock. Part of Eli Friedman2009-05-212-6/+4
| | | | | | PR4238. llvm-svn: 72223
* Add some missing steps to the sacred testing ritual scriptures.Stuart Hastings2009-05-211-14/+23
| | | | llvm-svn: 72222
* Tighten up the asserts in SmallVector::operator[]().Jay Foad2009-05-211-4/+2
| | | | | | | | If this causes any new assertion failures that I didn't catch in testing, the fix is usually to change "&v[0]" to "v.data()" for some SmallVector v. llvm-svn: 72221
* Add a getAlignOf helper for getting the ABI alignment of aDuncan Sands2009-05-214-1/+28
| | | | | | | | | 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-217-32/+30
| | | | llvm-svn: 72210
* Implement new SmallVector::data() methods.Jay Foad2009-05-211-0/+10
| | | | llvm-svn: 72209
* Teach ValueTracking a new way to analyze PHI nodes, and and teachDan Gohman2009-05-213-4/+66
| | | | | | | | 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
* Use DataTypes.h instead of stdint.h.Owen Anderson2009-05-211-1/+1
| | | | llvm-svn: 72201
* Temporarily revert r72191. It was causing an assert during llvm-gccBill Wendling2009-05-219-201/+34
| | | | | | 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-209-34/+201
| | | | | | | | DebugLoc. DebugScope refers to a debug region, function or block. llvm-svn: 72191
* Add an accessor method to return the insertion point.Dan Gohman2009-05-201-0/+2
| | | | llvm-svn: 72184
* Have llvm_start_multithreaded return a bool indicating whether multithreadedOwen Anderson2009-05-202-4/+7
| | | | | | 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-202-65/+58
| | | | | | | | 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
* When comparing DominanceFrontier's, advance iteratorsDuncan Sands2009-05-201-3/+4
| | | | | | | before erasing nodes, not after. Otherwise dom frontier checking reads from freed memory. llvm-svn: 72168
OpenPOWER on IntegriCloud