aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
AgeCommit message (Collapse)Author
2012-08-21[asan] If we are compiling with ASan, add metadata indicating dynamically ↵Kostya Serebryany
initialized globals. Patch by Reid Watson, reviewed by Richard Smith git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162259 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-21When performing a trivial copy of a C++ type, we must be careful notJohn McCall
to overwrite objects that might have been allocated into the type's tail padding. This patch is missing some potential optimizations where the destination is provably a complete object, but it's necessary for correctness. Patch by Jonathan Sauer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162254 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-21Screw around with ObjCRuntime some more, changing theJohn McCall
diagnostics for bad deployment targets and adding a few more predicates. Includes a patch by Jonathan Schleifer to enable ARC for ObjFW. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162252 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-20Fix a pair of bugs relating to properties in ARC.John McCall
First, when synthesizing an explicitly strong/retain/copy property of Class type, don't pretend during compatibility checking that the property is actually assign. Instead, resolve incompatibilities by secretly changing the type of *implicitly* __unsafe_unretained Class ivars to be strong. This is moderately evil but better than what we were doing. Second, when synthesizing the setter for a strong property of non-retainable type, be sure to use objc_setProperty. This is possible when the property is decorated with the NSObject attribute. This is an ugly, ugly corner of the language, and we probably ought to deprecate it. The first is rdar://problem/12039404; the second was noticed by inspection while fixing the first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162244 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-20Reapply:Eric Christopher
Author: Eric Christopher <echristo@apple.com> Date: Thu Aug 16 23:50:46 2012 +0000 Add some caching here for the builtin types. rdar://12117935 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162066 91177308-0d34-0410-b5e6-96231b3b80d8 after fixing a thinko. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162243 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-17Reapply:Eric Christopher
Make isa part of objc_object at metadata generation time. Noticed on inspection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162145 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-17Temporarily revert r162066 and r162062 to see if it brings the gdbEric Christopher
bots back. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162080 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-17Fix undefined behavior in debug info emission: operator* on WeakVH returns aRichard Smith
reference, so &* on an empty WeakVH binds a reference to a dereferenced null pointer. So don't do that; we have a perfectly good implicit conversion to Value*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162079 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16Add some caching here for the builtin types.Eric Christopher
rdar://12117935 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162066 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16Make isa part of objc_object at metadata generation time.Eric Christopher
Noticed on inspection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162062 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16Convert loads and stores of vec3 to vec4 to achieve better code generation. ↵Tanya Lattner
Add test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162002 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15Devirtualize calls on glvalues produced by class member access expressions.Richard Smith
Based on a patch by Yin Ma! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161998 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15Fix for PR#13606: http://llvm.org/bugs/show_bug.cgi?id=13606John Criswell
Changed the alignment of an LValue to be 64 bits so that we can handle alignment values up to half of a 64-bit address space. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161971 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[ms-inline asm] Add support for clobbers in CodeGen.Chad Rosier
This is a reapplication of r161914 now that the scoping issue has been resolved in r161966. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161967 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15Revert this to try to bring the i386 bots back.Eric Christopher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161931 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-15[ms-inline asm] Add support for clobbers in CodeGen.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161914 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14irgen: inline code for several of complex builtinFariborz Jahanian
calls. // rdar://8315199 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161891 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14Avoid using i64 types for vld1q_lane/vst1q_lane intrinsics.Bob Wilson
The backend has to legalize i64 types by splitting them into two 32-bit pieces, which leads to poor quality code. If we produce code for these intrinsics that uses one-element vector types, which can live in Neon vector registers without getting split up, then the generated code is much better. Radar 11998303. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161879 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-13ARM: enable struct byval for AAPCS-VFP.Manman Ren
rdar://9877866 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161790 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-13Factor out computation of whether a typeid's expression is potentiallyRichard Smith
evaluated into a CXXTypeid member function. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161779 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-13This is always going to be true so the cast isn't necessary.Eric Christopher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161744 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-10Add comments for turning on byvalManman Ren
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161702 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-10Don't emit an invoke whose normal destination is a landingpad. Fixes testEli Friedman
regression on test/CodeGenObjC/2008-10-3-EhValue.m on non-Darwin targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161700 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-10ARM: enable struct byval for AAPCS.Manman Ren
rdar://9877866 PR://13350 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161694 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-10Decrementing std::string::end is not portable, use array access instead.Joerg Sonnenberger
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161659 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-10[ms-inline asm] Use the new Inline Asm Non-Standard Dialect attribute.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161642 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-09Fix AAPCS ABI. I can't actually test this, but it restores the behavior ↵Eli Friedman
from before r159168. PR13562. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161554 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-08clang support for Bitrig (an OpenBSD fork); patch by David Hill.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161546 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-08[ms-inline asm] Add basic codegen support for simple asm stmts. Currently,Chad Rosier
only machine specific clobbers are modeled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161524 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-08Fix an assertion failure with a C++ constructor initializing aEli Friedman
member of reference type in an anonymous struct. PR13154. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161473 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-07objc-arc: set nonlazybind attribute on objc_retain/Fariborz Jahanian
objc_release for performance for these most often called APIs. // rdar://12040837 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161448 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-07If we don't have a complete type for the array type yet either thenEric Christopher
just let the alignment be zero. PR13531 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161379 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-07Remove some unintended changes from my last patch.Eric Christopher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161369 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-07Make sure when we get the replacement type for a template argumentEric Christopher
that we attach the lost qualifiers. Fixes rdar://11882155 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161368 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-05Add __builtin_readcyclecounter() to produce the @llvm.readcyclecounter() ↵Hal Finkel
intrinsic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161310 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04Simplify code, no functionality change.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161303 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04Fix the name of this variable.Eric Christopher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161287 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04Update comment to accurately reflect what should happen.Eric Christopher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161286 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02Make sure we don't emit IR for unused EH cleanups. PR13359.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161148 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-01When devirtualizing the conversion to a virtual base subobject,John McCall
don't explode if the offset we get is zero. This can happen if you have an empty virtual base class. While I'm at it, remove an unnecessary block from the IR-generation of the null-check, mark the eventual GEP as inbounds, and generally prettify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161100 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-31Remove deprecated getNameAsCString methods.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161044 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-31Introduce new queries on ObjCRuntime for how to interpret subscriptsJohn McCall
on object pointers and whether pointer arithmetic on object pointers is supported. Make ObjFW interpret subscripts as pseudo-objects. Based on a patch by Jonathan Schleifer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161028 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-31Handle functions with struct arguments or return types and the regparmRafael Espindola
attribute. It is a variation of the x86_64 ABI: * A struct returned indirectly uses the first register argument to pass the pointer. * Floats, Doubles and structs containing only one of them are not passed in registers. * Other structs are split into registers if they fit on the remaining ones. Otherwise they are passed in memory. * When a struct doesn't fit it still consumes the registers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161022 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-31Don't crash *or* insert a bogus autorelease when emitting aJohn McCall
this-adjustment thunk in ARC++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161014 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-27clang/lib: [CMake] Update tblgen'd dependencies.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160851 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-24ABIArgInfo's constructor is private and only used by the static get* methods.Rafael Espindola
No need to abuse default arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160684 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-24Emit debug info for dynamic initializers. Permit __attribute__((nodebug)) onNick Lewycky
variables that have static storage duration, it removes debug info on the emitted initializer function but not all debug info about this variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160659 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-24move X86_32ABIInfo::computeInfo out of line.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160652 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-23Make classifyReturnType and classifyArgumentType private.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160648 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-23Change APInt to APSInt in one instance. Also change a call to operator==() toRichard Trieu
APSInt::isSameValue() when comparing different sized APSInt's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160641 91177308-0d34-0410-b5e6-96231b3b80d8