summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Changing name of enum for block literal flags to representFariborz Jahanian2012-10-251-3/+3
| | | | | | what it is meant for. llvm-svn: 166734
* Add some new types in preparation of encoding of captured block variableFariborz Jahanian2012-10-251-0/+69
| | | | | | layout meta-data work. wip. llvm-svn: 166717
* Provide comment describing what buildBlockDescriptor does.Fariborz Jahanian2012-10-251-1/+12
| | | | llvm-svn: 166703
* Cleanup some clang code to use new type functions instead of using cast<>.Micah Villmow2012-10-256-24/+16
| | | | llvm-svn: 166684
* Modify the targets to set appropriate calling convention defaults and C ↵David Tweed2012-10-251-3/+5
| | | | | | | | variables when using a gnueabihf or aapcs-vfp target. Tested by me and Wei-Ren Chen. llvm-svn: 166679
* Initialize debug info for special cases of functions that lack declarations ↵Alexey Samsonov2012-10-254-7/+36
| | | | | | and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942. llvm-svn: 166676
* -fcatch-undefined-behavior checking for appropriate vptr value: Clang ↵Richard Smith2012-10-253-11/+91
| | | | | | CodeGen side. llvm-svn: 166661
* When we're devirtualizing a method call, make sure the method has the ↵Eli Friedman2012-10-251-7/+7
| | | | | | | | correct IR type. Reported in the thread "devirtualisation appears to crash clang on covariant functions on ARM" on cfe-dev. llvm-svn: 166651
* Remove the HiddenWeakTemplateVTables CodeGen option. It's currently unused.Douglas Gregor2012-10-242-5/+2
| | | | llvm-svn: 166561
* Clang now attempts to create a TargetMachine whenever a triple is given.Nadav Rotem2012-10-241-8/+17
| | | | | | | | Many of our tests specify triples that are not built into clang. In this commit we allow clang to fail loading the triple if we are only using clang to emit llvm ir. llvm-svn: 166543
* Add padding inreg registers to cause llvm to skip ecx when needed withRafael Espindola2012-10-243-33/+62
| | | | | | the x86_fastcallcc calling convention. llvm-svn: 166538
* Add inreg markers with the x86_fastcallcc calling convention.Rafael Espindola2012-10-241-10/+39
| | | | llvm-svn: 166537
* Change EmitAssemblyHelper to create the target machine earlyNadav Rotem2012-10-241-17/+49
| | | | | | | | | and use it to initialize the TargetTransformInfo analysis pass. We need the TTI information for the loop vectorizer. rdar://12464901 llvm-svn: 166532
* Switch CodeGenOptions over to a .def file, like we do with LangOptions.Douglas Gregor2012-10-239-31/+36
| | | | llvm-svn: 166497
* Don't try to use inreg with 0 sized structs. Thanks to Eli for reporting theRafael Espindola2012-10-231-0/+4
| | | | | | regression. llvm-svn: 166461
* Move private classes into anonymous namespaces.Benjamin Kramer2012-10-201-0/+8
| | | | llvm-svn: 166377
* DR1472: A reference isn't odr-used if it has preceding initialization,Richard Smith2012-10-201-3/+17
| | | | | | | | | initialized by a reference constant expression. Our odr-use modeling still needs work here: we don't yet implement the 'set of potential results of an expression' DR. llvm-svn: 166361
* IRgen: Initialize TargetLoweringInfo with a triple.Daniel Dunbar2012-10-191-1/+2
| | | | | | | | - We create two TargetLoweringInfo instances for different pass managers, and they weren't consistent (the one for codegen didn't have the right info). I'm not sure this mattered anywhere in practice. llvm-svn: 166299
* Fix handling of the regparm attribute in the presence of classes with copyRafael Espindola2012-10-193-42/+48
| | | | | | | | | | | | | constructors. When I first moved regparm support to TargetInfo.cpp I tried to isolate it in classifyArgumentTypeWithReg, but it is actually a lot easier to flip the code around and check for regparm at the end of the decision tree. Without this refactoring classifyArgumentTypeWithReg would have to duplicate the logic about when to use non-byval indirect arguments. llvm-svn: 166266
* Reintroduce the TargetTransformInfo to the clang pass manager.Nadav Rotem2012-10-191-1/+5
| | | | llvm-svn: 166263
* Fix up comment and invert order. Most simple check first.Eric Christopher2012-10-181-4/+6
| | | | llvm-svn: 166240
* Add a new option for and disable column number information as thereEric Christopher2012-10-181-0/+2
| | | | | | | | | | are no known current users of column info. Robustify and fix up a few tests in the process. Reduces the size of debug information by a small amount. Part of PR14106 llvm-svn: 166236
* Revert svn r165741 "Add TargetTransformInfo to the clang driver."Bob Wilson2012-10-181-5/+1
| | | | | | | Nadav's llvm change r165665 caused problems with an LTO bootstrap of clang, so I'm reverting it for now, along with follow-on patches like this one. llvm-svn: 166164
* Revert r158009 since there are some uses of artificial functions inEric Christopher2012-10-171-6/+2
| | | | | | debug info. llvm-svn: 166109
* Set a special flag in class metadata when an Objective-C classJohn McCall2012-10-172-6/+28
| | | | | | | | | has ivars that require destruction, but none that require anything except zero-initialization. This is common in ARC and (when true throughout a class hierarchy) permits the elimination of an unnecessary message-send during allocation. llvm-svn: 166088
* Organize and rename the magic constants for class flags.John McCall2012-10-171-48/+54
| | | | | | No functionality change. llvm-svn: 166087
* At -O0, prefer objc_storeStrong with a null new value to theJohn McCall2012-10-173-28/+89
| | | | | | | | | | | combination of a load+objc_release; this is generally better for tools that try to track why values are retained and released. Also use objc_storeStrong when copying a block (again, only at -O0), which requires us to do a preliminary store of null in order to compensate for objc_storeStrong's assign semantics. llvm-svn: 166085
* "'Might as well make it static const.' -- John McCall" -- Michael ScottNico Weber2012-10-171-1/+1
| | | | llvm-svn: 166080
* PR13684: Emit vtable entries for deleted functions as __cxa_deleted_function.David Blaikie2012-10-164-1/+19
| | | | | | | | This is consistent/interoperable with GCC 4.7 (& __cxa_deleted_function isn't present in 4.4 - not sure when it got added, but you'll need something with that function available for this to work). llvm-svn: 166069
* Add pnaclcall convention to Native Client targets.Derek Schuff2012-10-162-1/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | Because PNaCl bitcode must be target-independent, it uses some different bitcode representations from other targets (e.g. byval and sret for structures). This means that without additional type information, it cannot meet some native ABI requirements for some targets (e.g. passing structures containing unions by value on x86-64). To allow generation of code which uses the correct native ABIs, we also support triples such as x86_64-nacl, which uses target-dependent IR (as opposed to le32-nacl, which uses byval and sret). To allow interoperation between the two types of code, this patch adds a calling convention attribute to be used in code compiled with the target-dependent triple, which will generate code using the le32-style bitcode. This calling convention does not need to be explicitly supported in the backend because it determines bitcode representation rather than native conventions (the backend just needs to undersand how to handle byval and sret for the Native Client OS). This patch implements __attribute__((pnaclcall)) to generate calls in bitcode according to the le32 bitcode conventions, an attribute which is accepted by any Native Client target, but issues a warning otherwise. llvm-svn: 166065
* ARM ABI: fix ABI alignment issues in varargs.Manman Ren2012-10-161-9/+6
| | | | | | | | We generalize r166040 to handle ABI alignment issues for all types. rdar://12439123 llvm-svn: 166052
* ARM ABI: passing illegal vector types as varargs.Manman Ren2012-10-161-2/+48
| | | | | | | | | | | | | | We expand varargs in clang and the call site is handled in the back end, it is hard to match exactly how illegal vectors are handled in the backend. Therefore, we legalize the illegal vector types in clang: if (Size <= 32), legalize to i32. if (Size == 64), legalize to v2i32. if (Size == 128), legalize to v4i32. if (Size > 128), use indirect. rdar://12439123 llvm-svn: 166043
* ARM ABI: fix ABI alignment issues when passing legal vector types as varargs.Manman Ren2012-10-161-6/+38
| | | | | | | | | | We create an aligned temporary space and copy the content over from ap.cur to the temporary space. This is necessary if the natural alignment of the type is greater than the ABI alignment. rdar://12439123 llvm-svn: 166040
* When using a symbol with attribute weakref, search for it first andJoerg Sonnenberger2012-10-161-5/+8
| | | | | | | | don't try the normal GetOrCreateLLVM. The latter could drop the weak atrtibute on the second reference, if there is no explicit declaration of the aliasee. llvm-svn: 166032
* GNUstep runtime version default to 1.6, generate correct property attributeDavid Chisnall2012-10-161-2/+23
| | | | | | metadata. llvm-svn: 166023
* Transform pattern:Alexey Samsonov2012-10-165-18/+22
| | | | | | | | | | | if (CGM.getModuleDebugInfo()) DebugInfo = CGM.getModuleDebugInfo() into a call: maybeInitializeDebugInfo(); This is a simplification for a possible future fix of PR13942. llvm-svn: 166019
* Use the Attributes::get method which takes an AttrVal value directly to ↵Bill Wendling2012-10-164-26/+12
| | | | | | simplify the code a bit. No functionality change. llvm-svn: 166010
* Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.Daniel Dunbar2012-10-151-7/+2
| | | | llvm-svn: 165988
* Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.Nico Weber2012-10-151-2/+7
| | | | | | See PR14013. llvm-svn: 165962
* Move the Attributes::Builder outside of the Attributes class and into its ↵Bill Wendling2012-10-156-14/+14
| | | | | | own class named AttrBuilder. No functionality change. llvm-svn: 165961
* [asan] make AddressSanitizer to be a FunctionPass instead of ModulePass. ↵Kostya Serebryany2012-10-151-1/+1
| | | | | | clang part: for FunctionPass we need to run asan at a different point, otherwise it will run before inlining llvm-svn: 165937
* Use enum values instead of magic numbers for indexing into the attribute list.Bill Wendling2012-10-154-7/+14
| | | | llvm-svn: 165925
* Attributes RewriteBill Wendling2012-10-157-16/+28
| | | | | | | | Convert the uses of the Attributes class over to the new format. The Attributes::get method call now takes an LLVM context so that the attributes object can be uniquified and stored. llvm-svn: 165918
* At -O0, emit an @llvm.trap() call at the end of a value-returning function whichRichard Smith2012-10-151-0/+2
| | | | | | fails to return a value, to make debugging this issue easier. llvm-svn: 165914
* Remove operator cast method in favor of querying with the correct method.Bill Wendling2012-10-141-3/+5
| | | | llvm-svn: 165900
* Use the Builder to create the stack alignment attribute.Bill Wendling2012-10-141-2/+3
| | | | llvm-svn: 165888
* "Implement" codegen support for __noop().Nico Weber2012-10-131-0/+2
| | | | | | | Eli discovered that __noop's sema behavior also needs some love. I filed PR14081 for that and intend to improve it. llvm-svn: 165886
* Simplify. Suggestion by Sean Silva.Nico Weber2012-10-131-11/+3
| | | | llvm-svn: 165885
* Make -mms-bitfields behave consistently.Eli Friedman2012-10-123-5/+5
| | | | | | Patch by Jeremiah Zanin. llvm-svn: 165849
* -fcatch-undefined-behavior: Trap undefined behavior due to conversions to orRichard Smith2012-10-121-0/+118
| | | | | | | from a floating-point type where the source value is not in the range of representable values of the destination type. llvm-svn: 165843
OpenPOWER on IntegriCloud