summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* DeadStoreElimination can treat byval parameters as if there were alloca's ↵Owen Anderson2008-01-252-5/+16
| | | | | | for the purpose of removing end-of-function stores. llvm-svn: 46351
* move this field back. Moving the field causes miscompilations (!) of ↵Chris Lattner2008-01-251-5/+5
| | | | | | voronoi and others. llvm-svn: 46350
* Add skeletal code to increase the alignment of loads and stores whenChris Lattner2008-01-251-0/+38
| | | | | | | we can infer it. This will eventually help stuff, though it doesn't do much right now because all fixed FI's have an alignment of 1. llvm-svn: 46349
* move MachineFrameInfo::CreateFixedObject out of line, give MachineFrameInfoChris Lattner2008-01-252-13/+27
| | | | | | | a reference to TargetFrameInfo. Rearrange order of fields in StackObject to save a word. llvm-svn: 46348
* include alignment and volatility information in -view-*-dags outputChris Lattner2008-01-251-3/+10
| | | | llvm-svn: 46347
* add a fixme.Chris Lattner2008-01-251-0/+2
| | | | llvm-svn: 46346
* optimize fxor like forChris Lattner2008-01-251-3/+6
| | | | llvm-svn: 46345
* Add target-specific dag combines for FAND(x,0) and FOR(x,0). This allowsChris Lattner2008-01-252-4/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | us to compile: double test(double X) { return copysign(0.0, X); } into: _test: andpd LCPI1_0(%rip), %xmm0 ret instead of: _test: pxor %xmm1, %xmm1 andpd LCPI1_0(%rip), %xmm1 movapd %xmm0, %xmm2 andpd LCPI1_1(%rip), %xmm2 movapd %xmm1, %xmm0 orpd %xmm2, %xmm0 ret llvm-svn: 46344
* Support checking and codegen of constant vector globalsNate Begeman2008-01-254-2/+19
| | | | llvm-svn: 46343
* Replace Sema::CheckVariableInitList, CheckConstantInitList, and ↵Steve Naroff2008-01-254-205/+238
| | | | | | | | | | CheckForCharArrayInitializer with CheckInitializerListTypes. The new routine now supports struct/union initializers. This is a modified version of a patch by Eli Friedman. This version passes all of the clang tests and supports vectors:-) Note that Eli and I are still unsatisfied the implementation of CheckInitializerListTypes(). We'd like to find a more elegant implementation. Nevertheless, this is a complex part of the standard (and may be hard to simplify). Since the complexity is localized to this routine, we can iterate without too much disruption:-) llvm-svn: 46339
* Provide correct DWARF register numbering for debug information emission on ↵Anton Korobeynikov2008-01-253-9/+9
| | | | | | | | x86-32/Darwin. This should fix bunch of issues. llvm-svn: 46337
* Fix a bug recovering from broken code with a goto that Eli reported.Chris Lattner2008-01-253-3/+12
| | | | llvm-svn: 46336
* Change the location we return for the EOF token to actually be on the lastChris Lattner2008-01-251-2/+18
| | | | | | line of the file, in the common case where a file ends with a newline. llvm-svn: 46335
* New test.Devang Patel2008-01-241-0/+6
| | | | llvm-svn: 46333
* Don't add an extra line to the end of the buffer, it doesn't really exist.Chris Lattner2008-01-241-1/+0
| | | | llvm-svn: 46330
* Some minor restructuring around LValue and RValue types. The value "kind"Ted Kremenek2008-01-241-55/+77
| | | | | | | | | | information is not separated into a "base" and "sub" type. Eventually the value-tracking logic will know about LValues and RValues, but not about specialized LValues and RValues; separating the "kind" information into bits indicating whether an ExprValue is an LValue or an RValue from the bits that specify the actual value type makes this separation easier. llvm-svn: 46329
* Exclude vectors from Type::isScalar() predicate.Steve Naroff2008-01-242-3/+3
| | | | llvm-svn: 46328
* enum value name change.Ted Kremenek2008-01-241-7/+6
| | | | llvm-svn: 46327
* More cleanups to pretty-printing of states in GraphViz output.Ted Kremenek2008-01-241-41/+47
| | | | llvm-svn: 46326
* Added transfer function for DeclStmt.Ted Kremenek2008-01-241-6/+39
| | | | llvm-svn: 46323
* Adjusted storage of values for Stmt* so that we need only query ifTed Kremenek2008-01-241-15/+23
| | | | | | | a Stmt* is a block-level expression when we INSERT a value into the map, and not also when we QUERY a value. llvm-svn: 46321
* Don't dump the function!Chris Lattner2008-01-241-2/+0
| | | | llvm-svn: 46320
* Fixed a bug where the values of block-level expressions were being recorded inTed Kremenek2008-01-241-3/+4
| | | | | | the value map as if the expressions were non-block-level expressions. llvm-svn: 46319
* getUnderlyingObject can return null, handle this.Chris Lattner2008-01-241-2/+3
| | | | llvm-svn: 46318
* Minor tweaks in the transfer functions for pre- and post- ++/-- whereTed Kremenek2008-01-241-8/+12
| | | | | | | we falsely constructed an APInt to represent the constant '1' instead of using an APSInt (which has a sign). llvm-svn: 46317
* Added additional overloaded operators for APSInt to match the operators ofTed Kremenek2008-01-241-24/+124
| | | | | | | | | | | | | | | APInt. While some operators were already specifically overloaded for APSInt, others resulted in using the overloaded operator methods in APInt, which would result in the signedness bit being lost. Modified the APSInt(APInt&) constructor to be "explicit" and to take an extra (optional) flag to indicate the signedness. Making the ctor explicit will catch any implicit conversations between APSInt -> APInt -> APSInt that results in the signedness flag being lost. llvm-svn: 46316
* Teach basicaa that 'byval' arguments define a new memory location thatChris Lattner2008-01-242-34/+52
| | | | | | | can't be aliased to other known objects. This allows us to know that byval pointer args don't alias globals, etc. llvm-svn: 46315
* Add hasByValAttr() and hasNoAliasAttr() methods to the Argument class.Chris Lattner2008-01-242-2/+44
| | | | llvm-svn: 46314
* clarify a comment, thanks Duncan.Chris Lattner2008-01-241-2/+3
| | | | llvm-svn: 46313
* Added support for unary operator '-' for equality sets.Ted Kremenek2008-01-241-8/+81
| | | | | | | | Added some workarounds for loss of signess information on some APSInt operations. Considering the best route to integrate these into APSInt directly. (FIXME's in GRConstants.cpp). llvm-svn: 46310
* Significantly simplify and improve handling of FP function results on x86-32.Chris Lattner2008-01-246-128/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This case returns the value in ST(0) and then has to convert it to an SSE register. This causes significant codegen ugliness in some cases. For example in the trivial fp-stack-direct-ret.ll testcase we used to generate: _bar: subl $28, %esp call L_foo$stub fstpl 16(%esp) movsd 16(%esp), %xmm0 movsd %xmm0, 8(%esp) fldl 8(%esp) addl $28, %esp ret because we move the result of foo() into an XMM register, then have to move it back for the return of bar. Instead of hacking ever-more special cases into the call result lowering code we take a much simpler approach: on x86-32, fp return is modeled as always returning into an f80 register which is then truncated to f32 or f64 as needed. Similarly for a result, we model it as an extension to f80 + return. This exposes the truncate and extensions to the dag combiner, allowing target independent code to hack on them, eliminating them in this case. This gives us this code for the example above: _bar: subl $12, %esp call L_foo$stub addl $12, %esp ret The nasty aspect of this is that these conversions are not legal, but we want the second pass of dag combiner (post-legalize) to be able to hack on them. To handle this, we lie to legalize and say they are legal, then custom expand them on entry to the isel pass (PreprocessForFPConvert). This is gross, but less gross than the code it is replacing :) This also allows us to generate better code in several other cases. For example on fp-stack-ret-conv.ll, we now generate: _test: subl $12, %esp call L_foo$stub fstps 8(%esp) movl 16(%esp), %eax cvtss2sd 8(%esp), %xmm0 movsd %xmm0, (%eax) addl $12, %esp ret where before we produced (incidentally, the old bad code is identical to what gcc produces): _test: subl $12, %esp call L_foo$stub fstpl (%esp) cvtsd2ss (%esp), %xmm0 cvtss2sd %xmm0, %xmm0 movl 16(%esp), %eax movsd %xmm0, (%eax) addl $12, %esp ret Note that we generate slightly worse code on pr1505b.ll due to a scheduling deficiency that is unrelated to this patch. llvm-svn: 46307
* Fix this buggy transformation. Two observations:Chris Lattner2008-01-241-17/+8
| | | | | | | | | | | | 1. we already know the value is dead, so don't bother replacing it with undef. 2. The very case the comment describes actually makes the load live which asserts in deletenode. If we do the replacement and the node becomes live, just treat it as new. This fixes a failure on X86/2008-01-16-InvalidDAGCombineXform.ll with some local changes in my tree. llvm-svn: 46306
* The dag combiner is missing revisiting nodes that it really should, and thus ↵Chris Lattner2008-01-241-0/+5
| | | | | | | | | | leaving dead stuff around. This gets fed into the isel pass and causes certain foldings from happening because nodes have extraneous uses floating around. For example, if we turned foo(bar(x)) -> baz(x), we sometimes left bar(x) around. llvm-svn: 46305
* fold fp_round(fp_round(x)) -> fp_round(x).Chris Lattner2008-01-241-0/+9
| | | | llvm-svn: 46304
* take these with a pr #Chris Lattner2008-01-242-2/+2
| | | | llvm-svn: 46303
* Fixing the stack walker.Gordon Henriksen2008-01-241-4/+7
| | | | llvm-svn: 46302
* Added transfer functions for pre- and post- increment/decrement operators.Ted Kremenek2008-01-241-5/+82
| | | | llvm-svn: 46300
* Added passing "ASTContext" to both GREngine and GRConstants.Ted Kremenek2008-01-244-35/+137
| | | | | | Added initial support for integer casting operations to GRConstants. llvm-svn: 46298
* Fix potential buffer overflowAnton Korobeynikov2008-01-241-1/+1
| | | | llvm-svn: 46296
* Move some functionality for adding flags to MachineInstr's into methods on ↵Owen Anderson2008-01-245-130/+126
| | | | | | MachineInstr rather than LiveVariables. llvm-svn: 46295
* Minor tweak in GetValue to avoid an extra check for ParenExprs.Ted Kremenek2008-01-241-11/+16
| | | | llvm-svn: 46294
* Forgot these.Evan Cheng2008-01-242-4/+8
| | | | llvm-svn: 46292
* Implemented value tracking support for '*' and '*='.Ted Kremenek2008-01-231-1/+38
| | | | | | Added "multiplication" support for equality sets. llvm-svn: 46289
* Implemented value tracking support for '+=' and '-='.Ted Kremenek2008-01-231-2/+17
| | | | llvm-svn: 46288
* add some assertions so that the rewriter dies violently with a usefulChris Lattner2008-01-231-0/+2
| | | | | | error instead of subtly with a mysterious one. llvm-svn: 46287
* Let each target decide byval alignment. For X86, it's 4-byte unless the ↵Evan Cheng2008-01-237-5/+85
| | | | | | aggregare contains SSE vector(s). For x86-64, it's max of 8 or alignment of the type. llvm-svn: 46286
* Removed extra GraphViz node attributes for GRConstants, as some of them wereTed Kremenek2008-01-231-5/+0
| | | | | | causing problems with Dot. llvm-svn: 46285
* some prettying of the GraphViz visualization of GRConstants analysis results.Ted Kremenek2008-01-231-17/+50
| | | | llvm-svn: 46284
* Added special escape sequences "\{", "\}", and "\|" when processingTed Kremenek2008-01-231-2/+7
| | | | | | | | getNodeLabel(); these sequences allow the user to specify the characters '{', '}', and '|' in the label, which facilitate breaking the label into multiple record segments. llvm-svn: 46283
* The last pieces needed for loading arbitraryDuncan Sands2008-01-238-78/+190
| | | | | | | | | | | | | | | precision integers. This won't actually work (and most of the code is dead) unless the new legalization machinery is turned on. While there, I rationalized the handling of i1, and removed some bogus (and unused) sextload patterns. For i1, this could result in microscopically better code for some architectures (not X86). It might also result in worse code if annotating with AssertZExt nodes turns out to be more harmful than helpful. llvm-svn: 46280
OpenPOWER on IntegriCloud