summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Do not parse hexadecimal floating point literals in C++0x mode because they areAlexis Hunt2010-01-104-3/+20
| | | | | | | | | | | | | | | | | | incompatible with user-defined literals, specifically with the following form: 0x1p+1 The preprocessing-number token extends only as far as the 'p'; the '+' is not included. Previously we could get away with this extension as p was an invalid suffix, but now with user-defined literals, 'p' might well be a valid suffix and we are forced to consider it as such. This patch also adds a warning in non-0x C++ modes telling the user that this extension is incompatible with C++0x that is enabled by default (previously and with other languages, we warn only with a compliance option such as -pedantic). llvm-svn: 93135
* Improve code completion by introducing patterns for the various C andDouglas Gregor2010-01-1014-33/+853
| | | | | | | | | | | | | | | | | | | | | | C++ grammatical constructs that show up in top-level (namespace-level) declarations, member declarations, template declarations, statements, expressions, conditions, etc. For example, we now provide a pattern for static_cast<type>(expr) when we can have an expression, or using namespace identifier; when we can have a using directive. Also, improves the results of code completion at the beginning of a top-level declaration. Previously, we would see value names (function names, global variables, etc.); now we see types, namespace names, etc., but no values. llvm-svn: 93134
* Make sure this test case tests analyzing both x86_64 and i386 archs.Ted Kremenek2010-01-101-4/+8
| | | | llvm-svn: 93133
* teach sext optimization to handle truncs from types that are notChris Lattner2010-01-102-3/+30
| | | | | | the dest of the sext. llvm-svn: 93128
* teach zext optimization how to deal with truncs that don't come fromChris Lattner2010-01-102-13/+37
| | | | | | | | | | | | | | | | | the zext dest type. This allows us to handle test52/53 in cast.ll, and allows llvm-gcc to generate much better code for PR4216 in -m64 mode: _test_bitfield: ## @test_bitfield orl $32962, %edi movl %edi, %eax andl $-25350, %eax ret This also fixes a bug handling vector extends, ensuring that the mask produced is a vector constant, not an integer constant. llvm-svn: 93127
* fix a buggy assertion, CreateIntegerCast should allow Chris Lattner2010-01-101-1/+2
| | | | | | integer vectors as well as just integers. llvm-svn: 93126
* Silence MSVC warning.Benjamin Kramer2010-01-101-1/+1
| | | | | | RewriteObjC.cpp(4419) : warning C4804: '>' : unsafe use of type 'bool' in operation llvm-svn: 93124
* Suppress a warning on gcc 4.4.Mikhail Glushenkov2010-01-101-26/+26
| | | | | warning: suggest parentheses around ‘&&’ within ‘||’. llvm-svn: 93121
* Make clone() method out-of-line for Attr classes.Anton Korobeynikov2010-01-103-40/+166
| | | | llvm-svn: 93120
* Try to make cmake happyAnton Korobeynikov2010-01-102-1/+2
| | | | llvm-svn: 93119
* Generalize target weirdness handling having proper layering in mind:Anton Korobeynikov2010-01-1014-46/+339
| | | | | | | | | 1. Add helper class for sema checks for target attributes 2. Add helper class for codegen of target attributes As a proof-of-concept - implement msp430's 'interrupt' attribute. llvm-svn: 93118
* Rename file to generalization in next commitsAnton Korobeynikov2010-01-101-0/+0
| | | | llvm-svn: 93117
* Simplify code. No functionality change.Benjamin Kramer2010-01-101-18/+1
| | | | llvm-svn: 93114
* simplify CanEvaluateSExtd to return a bool now that we have aChris Lattner2010-01-101-63/+22
| | | | | | simpler profitability predicate. llvm-svn: 93111
* the NumCastsRemoved argument to CanEvaluateSExtd is dead, remove it.Chris Lattner2010-01-101-26/+13
| | | | llvm-svn: 93110
* now that the cost model has changed, we can always consider Chris Lattner2010-01-102-27/+60
| | | | | | | | elimination of a sign extend to be a win, which simplifies the client of CanEvaluateSExtd, and allows us to eliminate more casts (examples taken from real code). llvm-svn: 93109
* Compute isFunctionLocal in MDNode ctor or via argument in new function ↵Victor Hernandez2010-01-107-29/+80
| | | | | | | | getWhenValsUnresolved(). Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue(). llvm-svn: 93108
* change the preferred canonical form for a sign extension to beChris Lattner2010-01-103-30/+8
| | | | | | | | lshr+ashr instead of trunc+sext. We want to avoid type conversions whenever possible, it is easier to codegen expressions without truncates and extensions. llvm-svn: 93107
* fix indentation of switch statements, no functionality change.Chris Lattner2010-01-101-79/+79
| | | | llvm-svn: 93106
* fix pasto that broke bootstrap.Chris Lattner2010-01-101-1/+1
| | | | llvm-svn: 93105
* Enhance test case.Zhongxing Xu2010-01-101-0/+5
| | | | llvm-svn: 93101
* simplify CanEvaluateZExtd now that we don't care about the number of Chris Lattner2010-01-101-89/+23
| | | | | | | bits known clear in the result and don't care about the # casts eliminated. TD is also dead but keeping it for now. llvm-svn: 93098
* two changes: Chris Lattner2010-01-102-25/+53
| | | | | | | | | | | 1) don't try to optimize a sext or zext that is only used by a trunc, let the trunc get optimized first. This avoids some pointless effort in some common cases since instcombine scans down a block in the first pass. 2) Change the cost model for zext elimination to consider an 'and' cheaper than a zext. This allows us to do it more aggressively, and for the next patch to simplify the code quite a bit. llvm-svn: 93097
* enhance CanEvaluateZExtd to handle shift left and sext, allowingChris Lattner2010-01-102-3/+45
| | | | | | more expressions to be promoted and casts eliminated. llvm-svn: 93096
* remove an xform subsumed by EvaluateInDifferentType.Chris Lattner2010-01-101-27/+0
| | | | llvm-svn: 93095
* stringref'ize a bunch of filename handling logic. MuchChris Lattner2010-01-109-108/+86
| | | | | | nicer than passing around two const char*'s. llvm-svn: 93094
* Fix nondeterministic behavior.Julien Lerouge2010-01-101-9/+3
| | | | llvm-svn: 93093
* clean up this xform by using m_Trunc.Chris Lattner2010-01-101-12/+9
| | | | llvm-svn: 93092
* inline and remove the rest of commonIntCastTransforms.Chris Lattner2010-01-102-18/+18
| | | | llvm-svn: 93091
* try to make this more stable?Chris Lattner2010-01-101-1/+1
| | | | llvm-svn: 93090
* Inline the expression type promotion/demotion stuff out ofChris Lattner2010-01-101-417/+417
| | | | | | | | | commonIntCastTransforms into the callers, eliminating a switch, and allowing the static predicate methods to be moved down to live next to the corresponding function. No functionality change. llvm-svn: 93089
* Fix PR5982, a refacto in checking for '=' in a -D argument.Daniel Dunbar2010-01-102-8/+9
| | | | llvm-svn: 93088
* Fix a FIXME.Daniel Dunbar2010-01-101-2/+2
| | | | llvm-svn: 93087
* Darwin/ld: Don't pass '-weak_reference_mismatches non-weak' whenDaniel Dunbar2010-01-101-6/+0
| | | | | | -weak_reference_mismatches is not present, it is the default. llvm-svn: 93086
* add comment to test.Chris Lattner2010-01-101-1/+3
| | | | llvm-svn: 93085
* clarify comment.Chris Lattner2010-01-101-2/+2
| | | | llvm-svn: 93084
* implement rdar://7520940: published framework headers shouldChris Lattner2010-01-108-4/+33
| | | | | | | import other headers within the same framework with the full framework path, not with a relative include. llvm-svn: 93083
* hopefully unbreak the ocaml bindings.Chris Lattner2010-01-091-1/+1
| | | | llvm-svn: 93082
* Fix overzealous assertion in GRExprEngine::VisitLValue(). ATed Kremenek2010-01-092-7/+51
| | | | | | | | | CallExpr/ObjCMessageExpr can be visited in an "lvalue" context if it returns a struct temporary. Currently the analyzer doesn't reason about struct temporary returned by function calls, but we shouldn't crash here either. llvm-svn: 93081
* add 3 passes which have been added but aren't used afaik.Chris Lattner2010-01-091-0/+1
| | | | llvm-svn: 93080
* "In order to ease automatic bindings generation, it would be helpful if ↵Chris Lattner2010-01-0911-141/+147
| | | | | | | | boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for." Patch by James Y Knight! llvm-svn: 93079
* implement -ftabstop=width, patch by Christian AdåkerChris Lattner2010-01-096-2/+20
| | | | llvm-svn: 93078
* revert 91891, a workaround for PR5514.Chris Lattner2010-01-091-2/+1
| | | | llvm-svn: 93077
* implement codegen support for preinc as an lvalue, PR5514.Chris Lattner2010-01-092-2/+14
| | | | llvm-svn: 93076
* refactor pre/postinc logic into CGF and require the caller to pass in theChris Lattner2010-01-094-129/+139
| | | | | | lvalue to poke, no functionality change. llvm-svn: 93075
* revert r92749, which is just dead code.Chris Lattner2010-01-091-10/+0
| | | | llvm-svn: 93074
* make missing prototypes warn by default in c99 mode like GCC does,Chris Lattner2010-01-091-1/+1
| | | | | | rdar://7083878 llvm-svn: 93073
* add a bunch of missing prototypes to testsChris Lattner2010-01-0924-11/+52
| | | | llvm-svn: 93072
* Fix broken diagnostic when returning the address of a stack-allocated array.Ted Kremenek2010-01-092-3/+18
| | | | llvm-svn: 93071
* Clarify the requirements for a "tail call" to actually be optimized into aJeffrey Yasskin2010-01-091-9/+25
| | | | | | | jump. People clearly weren't finding the extra requirements in CodeGenerator.html. llvm-svn: 93070
OpenPOWER on IntegriCloud