summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Temporarily revert r130176, it appears to have broken a few tests.Eric Christopher2011-04-261-22/+11
| | | | llvm-svn: 130179
* Emit intrinsic at current insert point, not at the end of current block.Devang Patel2011-04-251-1/+1
| | | | llvm-svn: 130177
* Turn on byval parameters in Clang for ARM APCS. rdar://problem/7662569Stuart Hastings2011-04-251-11/+22
| | | | llvm-svn: 130176
* Simplify. There is no need to have a method to just call another method.Devang Patel2011-04-252-26/+14
| | | | llvm-svn: 130175
* Generalize case for built-in expressions havingFariborz Jahanian2011-04-251-11/+4
| | | | | | | side-effect to generate their ir. Not just for __builtin_expect. // rdar://9330105 llvm-svn: 130172
* Ir-gen the side-effect(s) when __builtin_expect isFariborz Jahanian2011-04-251-0/+9
| | | | | | constant-folded. // rdar://9330105 llvm-svn: 130163
* t/clang/expr-traitsJohn Wiegley2011-04-251-0/+4
| | | | | | | | | Patch authored by David Abrahams. These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for parsing code that employs certain features of the Embarcadero C++ compiler. llvm-svn: 130122
* Convert size and alignment variables to CharUnits in EmitAggregateCopy(). NoKen Dyck2011-04-241-7/+10
| | | | | | change in functionality intended. llvm-svn: 130113
* Convert type size and alignment to CharUnits in CheckAggExprForMemSetUse().Ken Dyck2011-04-241-8/+9
| | | | | | No change in functionality intended. llvm-svn: 130112
* Convert the return type of GetNumNonZeroBytesInInit() to CharUnits. NoKen Dyck2011-04-241-7/+8
| | | | | | change in functionality intended. llvm-svn: 130111
* Eliminate some literal 8s by converting size variables in EmitGCMove() andKen Dyck2011-04-241-4/+4
| | | | | | EmitFinalDestCopy() to CharUnits. No change in functionality intended. llvm-svn: 130110
* Replace calls to ASTContext::getTypeInfo() with calls toKen Dyck2011-04-241-6/+2
| | | | | | | ASTContext::getTypeSize() when only the size part is used. No change in functionality intended. llvm-svn: 130109
* Simplify AppendTailPadding() by converting its parameter to CharUnits. NoKen Dyck2011-04-241-11/+7
| | | | | | change in functionality intended. llvm-svn: 130108
* Eliminate literal 8s from LayoutUnionField by converting NumBytesToAppend toKen Dyck2011-04-241-4/+5
| | | | | | CharUnits. No change in functionality intended. llvm-svn: 130107
* Eliminate literal 8s from LayoutBitField(), converting variables toKen Dyck2011-04-241-10/+16
| | | | | | | CharUnits or replacing the 8s with char align. No change in functionality intended. llvm-svn: 130106
* Convert AccessInfo::AccessAlignment to CharUnits. No change in functionalityKen Dyck2011-04-243-9/+10
| | | | | | intended. llvm-svn: 130087
* PR9214: Convert the DIBuilder API to use ArrayRef.Jay Foad2011-04-241-29/+17
| | | | llvm-svn: 130086
* Convert CGBitFieldInfo::FieldByteOffset to CharUnits. No change inKen Dyck2011-04-243-9/+13
| | | | | | functionality intended. llvm-svn: 130085
* Remove unused STL header includes.Jay Foad2011-04-232-2/+0
| | | | llvm-svn: 130068
* Tie debug information for method declaration with debug information for ↵Devang Patel2011-04-232-3/+32
| | | | | | method definition. llvm-svn: 130037
* Add -fdelayed-template-parsing option. Using this option all templated ↵Francois Pichet2011-04-221-2/+6
| | | | | | | | | function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup. Using this flag is necessary for compatibility with Microsoft template code. This also provides some parsing speed improvement. llvm-svn: 130022
* Fixes an instance method meta-data generation bug inFariborz Jahanian2011-04-221-0/+8
| | | | | | | | | | | ObjC NeXt runtime where method pointer registered in metadata belongs to an unrelated method. Ast part of this fix, I turned at @end missing warning (for class implementations) into an error as we can never be sure that meta-data being generated is correct. // rdar://9072317 llvm-svn: 130019
* Replace a couple of literal 8s with ASTContext::getCharWidth(). No change inKen Dyck2011-04-221-4/+8
| | | | | | functionality intended. llvm-svn: 130002
* Eliminate some literal 8s from EmitNullInitialization() by convertingKen Dyck2011-04-221-7/+9
| | | | | | variables to CharUnits. No change in functionality intended. llvm-svn: 130001
* Eliminate some literal 8s from EmitDeclare by converting to CharUnits. NoKen Dyck2011-04-221-5/+5
| | | | | | change in functionality intended. llvm-svn: 129999
* Use CharUnits to eliminate some literal 8s inKen Dyck2011-04-221-9/+11
| | | | | | EmitTypeForVarWithBlocksAttr(). No change in functionality intended. llvm-svn: 129998
* Replace some literal 8s with char width and char align. No change inKen Dyck2011-04-221-2/+2
| | | | | | functionality intended. llvm-svn: 129996
* PTX: Add default PTX calling conventionsJustin Holewinski2011-04-221-0/+72
| | | | llvm-svn: 129987
* Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (atNick Lewycky2011-04-213-3/+15
| | | | | | | | | compile time) and .gcda emission (at runtime). --coverage enables both. This does not yet add the profile_rt library to the link step if -fprofile-arcs is enabled when linking. llvm-svn: 129956
* PR9214: Convert Metadata API to use ArrayRef.Jay Foad2011-04-215-7/+8
| | | | llvm-svn: 129929
* The 0.98 revision of the x86-64 ABI clarified a lot of things, someJohn McCall2011-04-211-6/+24
| | | | | | | of which break strict compatibility with previous compilers. Implement one of them and then immediately opt out on Darwin. llvm-svn: 129899
* ForArgyrios Kyrtzidis2011-04-212-1/+11
| | | | | | | | | | | | | | double data[20000000] = {0}; we would blow out the memory by creating 20M Exprs to fill out the initializer. To fix this, if the initializer list initializes an array with more elements than there are initializers in the list, have InitListExpr store a single 'ArrayFiller' expression that specifies an expression to be used for value initialization of the rest of the elements. Fixes rdar://9275920. llvm-svn: 129896
* Don't add type names for enums; they're never used in LLVM IR.Anders Carlsson2011-04-202-15/+16
| | | | llvm-svn: 129894
* fix a crash on code that uses the result value of __builtin___memcpy_chk.Chris Lattner2011-04-201-3/+3
| | | | llvm-svn: 129892
* IRgen/ARM: Fix a think-o in conversion-to-null for member function pointers, weDaniel Dunbar2011-04-191-5/+6
| | | | | | | | were computing the conversion as (ptr != 0 && non-virtual), when it should be (ptr != 0 || is-virtual). - Test to follow in LLVM test-suite. llvm-svn: 129830
* some cleanups to use IRBuilder methods instead of llvm:: foo methods.Chris Lattner2011-04-191-42/+34
| | | | llvm-svn: 129829
* ADT/Triple: Switch to using .isOSDarwin() predicate.Daniel Dunbar2011-04-193-4/+5
| | | | llvm-svn: 129823
* use the newly introduced IRBuilder getInt() method to reduce someChris Lattner2011-04-191-17/+12
| | | | | | redundancy pointed out by John. llvm-svn: 129808
* Fix typo in comment.Devang Patel2011-04-182-2/+2
| | | | llvm-svn: 129703
* Get rid of std::vector usage when getting function types in CGException.cppAnders Carlsson2011-04-181-30/+22
| | | | llvm-svn: 129698
* Clean up code generation of typeid expressions and add C++ standard references.Anders Carlsson2011-04-181-37/+53
| | | | llvm-svn: 129682
* Fix a miscompilation I introduced in r129652, thanks for Eli for tracking Chris Lattner2011-04-171-1/+9
| | | | | | | | | | | | | | | it down. we effectively were compile the testcase into: void test14(int x) { switch (x) { case 11: break; case 42: test14(97); // fallthrough default: test14(42); break; which is not the same thing at all. This fixes a miscompilation of MallocBench/gs seen on the clang-x86_64-linux-fnt buildbot. llvm-svn: 129679
* When laying out bases in, always try the "base subobject" LLVM type. If itAnders Carlsson2011-04-171-14/+66
| | | | | | | | | | | | | turns out that a field or base needs to be laid out in the tail padding of the base, CGRecordLayoutBuilder::ResizeLastBaseFieldIfNecessary will convert it to an array of i8. I've audited the new test results to make sure that they are still valid. I've also verified that we pass a self-host with this change. This (finally) fixes PR5589! llvm-svn: 129673
* Add addBaseSubobjectTypeName which isn't used yet.Anders Carlsson2011-04-172-0/+14
| | | | llvm-svn: 129671
* Move code to add a type name to a TagDecl type out into a helper function. ↵Anders Carlsson2011-04-172-25/+37
| | | | | | No functionality change. llvm-svn: 129669
* Use a SmallVector for field types in CGRecordLayoutBuilder now that ↵Anders Carlsson2011-04-171-1/+1
| | | | | | llvm::StructType::get takes an ArrayRef. llvm-svn: 129667
* Hack to turn the valgrind buildbot green, until Devang can address itEli Friedman2011-04-171-1/+1
| | | | | | properly. llvm-svn: 129657
* implement rdar://9289524 - case followed immediately by break results in ↵Chris Lattner2011-04-173-0/+42
| | | | | | | | empty IR block, a -O0 code quality issue. llvm-svn: 129652
* fold memcpy/set/move_chk to llvm.memcpy/set/move when the sizesChris Lattner2011-04-171-1/+50
| | | | | | | | | are trivial. This exposes opportunities earlier, and allows fastisel to do good things with these at -O0. This addresses rdar://9289468 - clang doesn't fold memset_chk at -O0 llvm-svn: 129651
* fix rdar://9289603 - clang should fold trivial ?: for enums as well as ↵Chris Lattner2011-04-161-3/+2
| | | | | | | | integer constants into select at -O0 by making the isCheapEnoughToEvaluateUnconditionally predicate handle anything that folds to a constant. In particular, we now fold enums. llvm-svn: 129649
OpenPOWER on IntegriCloud