summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add test case for array and struct variable lvalue evaluation.Zhongxing Xu2008-10-171-0/+14
| | | | llvm-svn: 57670
* Use INT64_C to emit constant values, to avoid problems withDan Gohman2008-10-171-2/+3
| | | | | | | | constants that don't fit in an int. This fixes "this decimal constant is unsigned only in ISO C90" warnings. llvm-svn: 57668
* NeXT: Use objc_msgSend_fpret for calling functions which returnDaniel Dunbar2008-10-171-14/+40
| | | | | | floating point. This is only correct for x86-32 at the moment. llvm-svn: 57667
* Get array's lvalue through standard interface.Zhongxing Xu2008-10-171-5/+3
| | | | llvm-svn: 57666
* Return the corresponding MemRegionVal for both rvalue and lvalue of array ofZhongxing Xu2008-10-171-5/+5
| | | | | | type T. llvm-svn: 57665
* Array and struct variables do have lvalue. For example,Zhongxing Xu2008-10-171-2/+0
| | | | | | | | | | | | | | | | | | struct s {}; void f() { int a[10]; int (*p)[10]; p = &a; (*p)[3] =1; struct s d; struct s *q; q = &d; } We return the corresponding MemRegionVal for them. llvm-svn: 57664
* Fun x86 encoding tricks: when adding an immediate value of 128,Dan Gohman2008-10-1714-37/+95
| | | | | | | | | | | | | use a SUB instruction instead of an ADD, because -128 can be encoded in an 8-bit signed immediate field, while +128 can't be. This avoids the need for a 32-bit immediate field in this case. A similar optimization applies to 64-bit adds with 0x80000000, with the 32-bit signed immediate field. To support this, teach tablegen how to handle 64-bit constants. llvm-svn: 57663
* Define patterns for shld and shrd that match immediateDan Gohman2008-10-177-25/+364
| | | | | | | | | | | | | | | | | | shift counts, and patterns that match dynamic shift counts when the subtract is obscured by a truncate node. Add DAGCombiner support for recognizing rotate patterns when the shift counts are defined by truncate nodes. Fix and simplify the code for commuting shld and shrd instructions to work even when the given instruction doesn't have a parent, and when the caller needs a new instruction. These changes allow LLVM to use the shld, shrd, rol, and ror instructions on x86 to replace equivalent code using two shifts and an or in many more cases. llvm-svn: 57662
* Quick patch for PR2784, assert genereting debug info for opaqueDaniel Dunbar2008-10-172-1/+15
| | | | | | | | | | structure. - I'm not sure yet about the behavior, but this at least prevents the crash. Add some asserts on RegionStack usage. llvm-svn: 57661
* Use 0 instead of false to return a null pointer.Dan Gohman2008-10-171-1/+1
| | | | llvm-svn: 57660
* Remove an untrue assertion: lval::FuncVals can be returned in both rvalue ↵Ted Kremenek2008-10-171-2/+4
| | | | | | and lvalue contexts. llvm-svn: 57659
* Mark these tests XFAIL. We need to add back assumption logic when doing ↵Ted Kremenek2008-10-172-0/+2
| | | | | | array and field accesses. llvm-svn: 57658
* Remove lval::FieldOffset, lval::ArrayOffset. These will be replaced with ↵Ted Kremenek2008-10-1710-243/+70
| | | | | | | | | | | regions. Remove GRExprEngine::getLVal and RValues::MakeVal. Enhance StoreManager "GetLValue" methods to dispatch for specific kinds of lvalue queries, as opposed to interogating the expression tree (GRExprEngine already does this). Added FIXMEs. In particular, we no longer "assume" that a base pointer in a field/array access is null (this logic was removed). Perhaps we should do this when fetching the lvalue for fields and array elements? llvm-svn: 57657
* Add transfer function support for ObjCIvarRefExpr.Ted Kremenek2008-10-175-2/+57
| | | | llvm-svn: 57654
* Fix this test so it actually runs the grep lines.Dan Gohman2008-10-161-3/+3
| | | | llvm-svn: 57653
* Trim #includes.Dan Gohman2008-10-1616-33/+4
| | | | llvm-svn: 57649
* In C++, an empty parameter list indicates a function that takes no parameters.Argyrios Kyrtzidis2008-10-161-2/+8
| | | | llvm-svn: 57646
* Add basic FreeBSD target support, patch by Roman Divacky!Chris Lattner2008-10-161-0/+51
| | | | llvm-svn: 57645
* fix typo noticed by sdtChris Lattner2008-10-161-1/+1
| | | | llvm-svn: 57644
* Add --disable-free flag to clang.Daniel Dunbar2008-10-163-14/+31
| | | | | | | | - Disables the freeing of the ASTContext and the TranslationUnit after parsing & sema. - Primarily for timing the impact on -fsyntax-only timings. llvm-svn: 57643
* Using dyn_cast_or_null here is redundant, use dyn_cast instead.Argyrios Kyrtzidis2008-10-161-6/+6
| | | | llvm-svn: 57642
* Introduce a typing refinenement on tagged dataGabor Greif2008-10-162-10/+8
| | | | | | | | | | | | using the 'volatile' qualifier. This should not have any operational consequences on code, because tags should always be stripped off (giving a non-volatile pointer) before dereferencing. The new qualification is there to catch some attempts to use tagged pointers in a context where an untagged pointer is appropriate. Notably this approach does not catch dereferencing of tagged pointers, but helps in separating the two concepts a bit. llvm-svn: 57641
* Fix <rdar://problem/6239726> Parser rejects: type of property 'list' does ↵Steve Naroff2008-10-162-3/+39
| | | | | | | | | not match type of ivar and http://llvm.org/bugs/show_bug.cgi?id=2893 llvm-svn: 57640
* Re-apply Makefile changes. Fix build with srcdir != objdir.Mikhail Glushenkov2008-10-1610-13/+60
| | | | llvm-svn: 57636
* Fix warnings about mb/me being potentially usedDuncan Sands2008-10-161-2/+2
| | | | | | uninitialized in these functions with gcc-4.3. llvm-svn: 57635
* Fix "large integer implicitly truncated to unsigned type"Duncan Sands2008-10-161-3/+3
| | | | | | warning on x86-64 with gcc-4.3. llvm-svn: 57634
* Testcase for PR2762.Duncan Sands2008-10-161-0/+8
| | | | llvm-svn: 57633
* Speed up NumericLiteralParser::GetIntegerValue.Daniel Dunbar2008-10-161-0/+20
| | | | | | | - Implement fast path when value easily fits in a uint64. - ~6x faster, translates to 1-2% on Cocoa.h llvm-svn: 57632
* add some notesChris Lattner2008-10-161-1/+1
| | | | llvm-svn: 57631
* add some notes and a file to collect unimplemented features in theChris Lattner2008-10-161-0/+14
| | | | | | | x86 backend. These will all be answered with "patches welcome", so a PR doesn't help drive them along. llvm-svn: 57630
* Simplify overflow-on-add check in NumericLiteralParser::GetIntegerValue.Daniel Dunbar2008-10-161-2/+1
| | | | llvm-svn: 57629
* mark some targets as experimental. Andrew, if you think that Alpha isChris Lattner2008-10-164-4/+5
| | | | | | | basically working, feel free to remove the tag. The other targets have really basic things that break them. llvm-svn: 57628
* This is the first step to build a better evaluation model for GRExprEngine. AZhongxing Xu2008-10-168-125/+157
| | | | | | | | new VisitLValue method is added to replace the old VisitLVal. The semantics model becomes more explicit to separate rvalue evaluation from lvalue evaluation. llvm-svn: 57627
* Verify prefetch arguments, PR2576.Chris Lattner2008-10-161-0/+8
| | | | llvm-svn: 57626
* apply Eli's patch for PR2165 and provide a testcase.Chris Lattner2008-10-162-0/+14
| | | | llvm-svn: 57625
* Teach tryEvaluate that fabs, copysign, and unary +/- are constants forDaniel Dunbar2008-10-162-1/+86
| | | | | | | | floats. - With testcase, which also has some other things GCC folds but we don't commented out in it. llvm-svn: 57624
* Implement #pragma pack use in structure packing. The general approachDaniel Dunbar2008-10-166-17/+127
| | | | | | | | | | | | | | | | | | | | | | is to encode the state of the #pragma pack stack as an attribute when the structure is declared. - Extend PackedAttr to take an alignment (in bits), and reuse for both __attribute__((packed)) (which takes no argument, instead packing tightly (to "minimize the memory required") and for #pragma pack (which allows specification of the maximum alignment in bytes). __attribute__((packed)) is just encoded as Alignment=1. This conflates two related but different mechanisms, but it didn't seem worth another attribute. - I have attempted to follow the MSVC semantics as opposed to the gcc ones, since if I understand correctly #pragma pack originated with MSVC. The semantics are generally equivalent except when the stack is altered during the definition of a structure; its not clear if anyone does this in practice. See testcase if curious. llvm-svn: 57623
* Const-ify several TargetInstrInfo methods.Dan Gohman2008-10-1616-54/+57
| | | | llvm-svn: 57622
* Remove an unused variable.Dan Gohman2008-10-161-1/+0
| | | | llvm-svn: 57621
* Fix Instruction::isIdenticalTo and isSameOperationAs to recognizeDan Gohman2008-10-161-6/+57
| | | | | | | additional information in Loads, Stores, Calls, Invokes, InsertValueInsts, and ExtractValueInsts. llvm-svn: 57620
* Fix a calculation error in comments.Zhongxing Xu2008-10-161-1/+1
| | | | llvm-svn: 57619
* Rename AliasSet to SubRegs, to reflect changes in the surrounding code.Dan Gohman2008-10-161-3/+3
| | | | llvm-svn: 57618
* Move the include of MachineLocation.h into MachineModuleInfo.hDan Gohman2008-10-162-2/+1
| | | | | | | | because it declares a std::vector<MachineMove>, and strict concept checking requires the definition of MachineMove to be available. llvm-svn: 57617
* Implement a SmallVector insert method that can insert multipleDan Gohman2008-10-161-0/+62
| | | | | | | copies of a value, and add several additional utilities to make SmallVector better conform to the Container concept. llvm-svn: 57616
* Fix several places that called mapped_iterator's constructor withoutDan Gohman2008-10-161-3/+8
| | | | | | passing in a function object. llvm-svn: 57615
* Fix a subtle bug in DeadMachineInstructionElim's livenessDan Gohman2008-10-161-1/+4
| | | | | | | computation. A def of a register doesn't necessarily kill live super-registers. llvm-svn: 57614
* ccc: support -XlinkerDaniel Dunbar2008-10-161-1/+1
| | | | llvm-svn: 57613
* Fix the predicate for memop64 to be a regular load, not justDan Gohman2008-10-161-1/+1
| | | | | | an unindexed load. llvm-svn: 57612
* Issue a warning when there's an ambiguous function declarator (that could be ↵Argyrios Kyrtzidis2008-10-155-8/+21
| | | | | | | | a direct initializer for a variable defition). Idea originated from here: http://thread.gmane.org/gmane.comp.gcc.devel/101524 llvm-svn: 57609
* Teach instcombine's visitLoad to scan back several instructionsDan Gohman2008-10-153-10/+68
| | | | | | | | | | | | | | to find opportunities for store-to-load forwarding or load CSE, in the same way that visitStore scans back to do DSE. Also, define a new helper function for testing whether the addresses of two memory accesses are known to have the same value, and use it in both visitStore and visitLoad. These two changes allow instcombine to eliminate loads in code produced by front-ends that frequently emit obviously redundant addressing for memory references. llvm-svn: 57608
OpenPOWER on IntegriCloud