summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor the record decl forward declaration code a bit.Eric Christopher2012-01-252-37/+31
| | | | llvm-svn: 148904
* Typo.Eric Christopher2012-01-251-1/+1
| | | | llvm-svn: 148903
* use the new ConstantVector::getSplat method where it makes sense.Chris Lattner2012-01-253-48/+24
| | | | llvm-svn: 148902
* The following patch adds __attribute__((no_address_safety_analysis)) which ↵Kostya Serebryany2012-01-241-0/+8
| | | | | | | | | | | | | | | will allow to disable address safety analysis (such as e.g. AddressSanitizer or SAFECode) for a specific function. When building with AddressSanitizer, add AddressSafety function attribute to every generated function except for those that have __attribute__((no_address_safety_analysis)). With this patch we will be able to 1. disable AddressSanitizer for a particular function 2. disable AddressSanitizer-hostile optimizations (such as some cases of load widening) when AddressSanitizer is on. llvm-svn: 148842
* Make sure the integer type used to align the vaarg address is the same as theAkira Hatanaka2012-01-231-7/+9
| | | | | | type of pointers. llvm-svn: 148753
* Ignore return type if its size is zero.Akira Hatanaka2012-01-231-2/+3
| | | | llvm-svn: 148744
* Add support for -fno-optimize-sibling-calls. Currently only implemented in theNick Lewycky2012-01-231-0/+1
| | | | | | X86 backend in LLVM. llvm-svn: 148689
* Add an assertion that our use-marking actually covers all uses of a ↵Eli Friedman2012-01-211-0/+7
| | | | | | variable. The assertion doesn't cover quite as much as it should, but it's a good start, at least. llvm-svn: 148625
* When adding types to the context chain for record types, just emitEric Christopher2012-01-202-3/+57
| | | | | | | | | a forward declaration unless we already have a type. We can fill it in later if it's actually used. Fixes PR11345 llvm-svn: 148584
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-2015-40/+6
| | | | llvm-svn: 148577
* use llvm:Attributes instead of unsignedKostya Serebryany2012-01-201-10/+10
| | | | llvm-svn: 148554
* test svn commit accessSeth Cantrell2012-01-181-0/+1
| | | | llvm-svn: 148388
* Fix a string over-run detected by ASAN.Nick Lewycky2012-01-181-2/+3
| | | | llvm-svn: 148375
* Fix special king of typo.Nick Lewycky2012-01-181-1/+1
| | | | llvm-svn: 148368
* output body of folded case again.Fariborz Jahanian2012-01-171-1/+3
| | | | llvm-svn: 148361
* Folding away unreachable case statement.Fariborz Jahanian2012-01-171-7/+15
| | | | | | patch (slightly revised) by Aaron Ballman. llvm-svn: 148359
* Make sure to initialize ExternalProtocolPtrTyDouglas Gregor2012-01-171-1/+2
| | | | llvm-svn: 148358
* Add __builtin_labs and __builtin_llabs, to complete the set of ↵Eli Friedman2012-01-171-1/+3
| | | | | | __builtin_*abs. Patch by Ruben Van Boxem. llvm-svn: 148340
* Remove constant member pointer support from Expr-based constant emission nowRichard Smith2012-01-174-118/+13
| | | | | | that APValue-based constant emission knows how to emit member pointers. llvm-svn: 148336
* Enable the new ObjC ARC autorelease pool elimination pass.Dan Gohman2012-01-171-0/+7
| | | | llvm-svn: 148331
* When initializing a catch variable in ARC, be sure to emit retainsJohn McCall2012-01-172-3/+35
| | | | | | | | | or whatever else is required for the initialization instead of assuming it can be done with a simple store. Fixes PR11732. llvm-svn: 148325
* Don't eagerly deserialize the 'Protocol' type when initializing codeDouglas Gregor2012-01-171-8/+19
| | | | | | generation for Objective-C; it may not be needed. llvm-svn: 148317
* Remove unnecessary default cases in switches over enums.David Blaikie2012-01-173-7/+2
| | | | | | This allows -Wswitch-enum to find switches that need updating when these enums are modified. llvm-svn: 148281
* Add support for OpenCL 1.1 logical operations.Tanya Lattner2012-01-161-0/+33
| | | | llvm-svn: 148254
* Fixes a crash during constant folding of a switch and case Fariborz Jahanian2012-01-161-0/+10
| | | | | | | statement which has an unscoped case inside it. Patch by Aaron Ballman llvm-svn: 148243
* Some improvements to the handling of C11 atomic types:David Chisnall2012-01-167-18/+104
| | | | | | | | | | | | | | | | | | - Add atomic-to/from-nonatomic cast types - Emit atomic operations for arithmetic on atomic types - Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load - Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function. - Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it. Still to do: - Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg. - Add a signal fence builtin - Properly set the fenv state in atomic operations on floating point values - Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context) - Fix the many remaining corner cases llvm-svn: 148242
* De-virtualize getPreviousDecl() and getMostRecentDecl() when we knowDouglas Gregor2012-01-141-1/+1
| | | | | | | | | | | | we have a redeclarable type, and only use the new virtual versions (getPreviousDeclImpl() and getMostRecentDeclImpl()) when we don't have that type information. This keeps us from penalizing users with strict type information (and is the moral equivalent of a "final" method). Plus, settle on the names getPreviousDecl() and getMostRecentDecl() throughout. llvm-svn: 148187
* Remove a redundant word.Zhongxing Xu2012-01-141-1/+1
| | | | llvm-svn: 148179
* constexpr irgen: Add irgen support for APValue::Struct, APValue::Union,Richard Smith2012-01-149-223/+400
| | | | | | | | | | | | | | | | | | | | APValue::Array and APValue::MemberPointer. All APValue values can now be emitted as constants. Add new CGCXXABI entry point for emitting an APValue MemberPointer. The other entrypoints dealing with constant member pointers are no longer necessary and will be removed in a later change. Switch codegen from using EvaluateAsRValue/EvaluateAsLValue to VarDecl::evaluateValue. This performs caching and deals with the nasty cases in C++11 where a non-const object's initializer can refer indirectly to previously-initialized fields within the same object. Building the intermediate APValue object incurs a measurable performance hit on pathological testcases with huge initializer lists, so we continue to build IR directly from the Expr nodes for array and record types outside of C++11. llvm-svn: 148178
* A base subobject type doesn't make sense for unions; don't try to compute ↵Eli Friedman2012-01-131-1/+1
| | | | | | it. Based on patch by Yin Ma. Fixes PR11751. llvm-svn: 148093
* Formatting.Eric Christopher2012-01-121-1/+1
| | | | llvm-svn: 147989
* Formatting.Eric Christopher2012-01-121-1/+1
| | | | llvm-svn: 147988
* Take into account the pointer to an aggregate that is passed as a hiddenAkira Hatanaka2012-01-121-2/+6
| | | | | | argument when Offset is initialized. llvm-svn: 147986
* Call CodeGenTypes::ConvertType to get LLVM::Type*.Akira Hatanaka2012-01-121-25/+4
| | | | | | Remove function MipsABIInfo::GetFloatingPointTy. llvm-svn: 147985
* Fixed VLA code generation.Abramo Bagnara2012-01-111-14/+22
| | | | llvm-svn: 147933
* Remove switch/case statements and call GetFloatingPointTy() instead to get theAkira Hatanaka2012-01-101-13/+1
| | | | | | floating point type. llvm-svn: 147894
* Flatten float complex arguments. N32/64 requires float complex arguments beAkira Hatanaka2012-01-101-4/+28
| | | | | | passed in floating point registers. llvm-svn: 147892
* Remove space.Akira Hatanaka2012-01-101-2/+2
| | | | llvm-svn: 147889
* Add support for the androideabi environment to our triple support, andChandler Carruth2012-01-101-1/+1
| | | | | | | | | | for the arm-linux-androideabi triple in particular. Also use this to do a better job of selecting soft FP settings. Patch by Evgeniy Stepanov. llvm-svn: 147872
* Contrary to the other BSDs, NetBSD followed the ELF ABI for structureJoerg Sonnenberger2012-01-101-1/+0
| | | | | | passing on i386 and does not use registers. llvm-svn: 147856
* The `-fwritable-strings' flag doesn't make the backing store strings of allBill Wendling2012-01-101-10/+6
| | | | | | | | | | | CFStrings writable. The strings (both Unicode and ASCII) should reside in a read-only section. E.g., __TEXT,__cstring instead of __DATA,__data. This is done by making the global variable created for the strings constant despite the value of that flag. <rdar://problem/10657500> llvm-svn: 147845
* Implement the missing pieces of Evaluate for _Complex types. With that ↵Eli Friedman2012-01-101-30/+1
| | | | | | complete, remove some code from CGExprConstant which is no longer necessary. While I'm here, a couple minor tweaks to _Complex-in-C++. (Specifically, make _Complex types literal types, and don't warn for _Complex int.) llvm-svn: 147840
* objc++: patch for IRgen for atomic properties ofFariborz Jahanian2012-01-102-37/+164
| | | | | | | c++ objects with non-trivial assignment/copy functions. Also, one additional sema check. // rdar://6137845 llvm-svn: 147817
* Insert padding before unaligned long double arguments.Akira Hatanaka2012-01-091-13/+28
| | | | llvm-svn: 147791
* Move the piece of code up that skips the padding argument. Without this change,Akira Hatanaka2012-01-091-4/+4
| | | | | | padding insertion will not work if the coerced type is not a structure. llvm-svn: 147786
* objc++: more atomic property api code forFariborz Jahanian2012-01-082-12/+29
| | | | | | c++ object properties. wip. llvm-svn: 147750
* objc++: More codegen stuff for atomic properties of c++ objectsFariborz Jahanian2012-01-072-9/+22
| | | | | | with non-trivial copies. // rdar://6137845 llvm-svn: 147735
* Fixed TypeofExpr AST and code generation.Abramo Bagnara2012-01-071-5/+19
| | | | llvm-svn: 147730
* Add field PaddingType to ABIArgInfo which specifies the type of padding thatAkira Hatanaka2012-01-073-16/+55
| | | | | | | | is inserted before the real argument. Padding is needed to ensure the backend reads from or writes to the correct argument slots when the original alignment of a byval structure is unavailable due to flattening. llvm-svn: 147699
* objc++: more code gen stuff for atomic property api,Fariborz Jahanian2012-01-063-14/+77
| | | | | | | | currently turned off. // rdar://6137845 Also, fixes a test case which should be nonatomic under new API. llvm-svn: 147691
OpenPOWER on IntegriCloud