summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* In my last patch initialize the destination to null (with a simple store) ↵Fariborz Jahanian2013-01-051-0/+2
| | | | | | | | before doing a storeStrong to it. // rdar://12530881 llvm-svn: 171572
* objective-C arc: in copy helper function for Fariborz Jahanian2013-01-041-0/+5
| | | | | | | | | __strong __block variables, perform objc_storeStrong on source and destination instead of direct move. This is done with -O0 and to improve some analysis. // rdar://12530881 llvm-svn: 171555
* Debug Info: fix the line location for cleanup code of a block functionManman Ren2013-01-041-0/+3
| | | | | | | | | | The line information was changed when emitting debug information for all the DeclRefExprs and we should change it back to get ready for PopClenupBlocks called from FinishFunction. rdar://11562117 llvm-svn: 171493
* Fix fieldNo usage for lambdas. No behavior change since theEric Christopher2013-01-041-2/+2
| | | | | | field number was 0 anyhow. llvm-svn: 171472
* Don't assert/crash on reference variables in lambdas bound to aEli Friedman2013-01-032-9/+2
| | | | | | static local variable from the parent scope. PR14773. llvm-svn: 171433
* Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate toChandler Carruth2013-01-0240-102/+102
| | | | | | | | reflect the migration in r171366. Re-sort the #include lines to reflect the new paths. llvm-svn: 171369
* Re-sort #include lines using the llvm/utils/sort_includes.py script.Chandler Carruth2013-01-022-2/+2
| | | | | | | Removes a duplicate #include as well as cleaning up some sort order regressions since I last ran the script over Clang. llvm-svn: 171364
* Simplify vector splat code. No functionality change.Benjamin Kramer2013-01-011-18/+2
| | | | llvm-svn: 171350
* Remove the Function::getFnAttributes method in favor of using the AttributeSetBill Wendling2012-12-302-2/+4
| | | | | | | | | directly. This is in preparation for removing the use of the 'Attribute' class as a collection of attributes. That will shift to the AttributeSet class instead. llvm-svn: 171254
* Add proper support for -fsanitize-blacklist= flag for TSan and MSan. Clang part.Alexey Samsonov2012-12-281-4/+8
| | | | llvm-svn: 171184
* Add intel_ocl_bicc calling convention as a function attribute to clang. The ↵Guy Benyei2012-12-251-0/+4
| | | | | | calling convention is already implemented in LLVM. llvm-svn: 171056
* Support -fsanitize-memory-track-origins.Evgeniy Stepanov2012-12-241-1/+4
| | | | llvm-svn: 171020
* CGClass.cpp: [PR14335] Remove comma-separated \param, for now. [-Wdocumentation]NAKAMURA Takumi2012-12-241-4/+0
| | | | | | /// \param argBegin,argEnd the arguments to evaluate and pass to the constructor llvm-svn: 171015
* CGDecl.cpp: Prune three descriptions in two methods, ↵NAKAMURA Takumi2012-12-241-8/+0
| | | | | | | | | | CodeGenFunction::pushIrregularPartialArrayCleanup() and CodeGenFunction::pushRegularPartialArrayCleanup(). [-Wdocumentation] /// \param array - a value of type elementType* /// \param destructionKind - the kind of destruction required /// \param initializedElementCount - a value of type size_t* holding the number of successfully-constructed elements llvm-svn: 171013
* CGValue.h: Update one \param to Addr in MakeBitfield(). [-Wdocumentation]NAKAMURA Takumi2012-12-241-1/+1
| | | | llvm-svn: 171011
* Reinstate r170806, reverted in r170835, with a fix use i1 instead of i8 for ↵Richard Smith2012-12-212-8/+5
| | | | | | a value-initialized bool! llvm-svn: 170837
* Revert r170806, "Fix some bugs where we would sometimes use 0, not -1, when ↵NAKAMURA Takumi2012-12-212-5/+8
| | | | | | | | emitting a null constant of type pointer-to-data-member." It broke stage2. llvm-svn: 170835
* Don't eagerly emit a global static merged with a local extern.Rafael Espindola2012-12-212-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | When we are visiting the extern declaration of 'i' in static int i = 99; int foo() { extern int i; return i; } We should not try to handle it as if it was an function static. That is, we must consider the written storage class. Fixing this then exposes that the assert in EmitGlobalVarDeclLValue and the if leading to its call are not completely accurate. They were passing before because the second decl was marked as having external storage. I changed them to check the linkage, which I find easier to understand. Last but not least, there is something strange going on with cuda and opencl. My guess is that the linkage computation for these languages needs to be audited, but I didn't want to change that in this patch so I just updated the storage classes to keep the current behavior. Thanks to Reed Kotler for reporting this. llvm-svn: 170827
* Fix some bugs where we would sometimes use 0, not -1, when emitting a null ↵Richard Smith2012-12-202-8/+5
| | | | | | constant of type pointer-to-data-member. llvm-svn: 170806
* Rename llvm::Attributes to llvm::Attribute.Bill Wendling2012-12-2012-85/+85
| | | | llvm-svn: 170722
* Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling2012-12-2012-85/+85
| | | | | | which is wrong here. llvm-svn: 170721
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-1912-85/+85
| | | | | | single attribute in the future. llvm-svn: 170500
* Change DeclContextLookup(Const)Result to (Mutable)ArrayRef<NamedDecl*>, as ↵David Blaikie2012-12-191-1/+1
| | | | | | | | | | | | | | | per review discussion in r170365 This does limit these typedefs to being sequences, but no current usage requires them to be contiguous (we could expand this to a more general iterator pair range concept at some point). Also, it'd be nice if SmallVector were constructible directly from an ArrayRef but this is a bit tricky since ArrayRef depends on SmallVectorBaseImpl for the inverse conversion. (& generalizing over all range-like things, while nice, would require some nontrivial SFINAE I haven't thought about yet) llvm-svn: 170482
* Make sure CodeGen uses a value of the correct type as the result ofEli Friedman2012-12-191-1/+1
| | | | | | of assignment to a bool bitfield. PR14638. llvm-svn: 170480
* Similar to 170440 - fix build warning with gccEli Bendersky2012-12-181-1/+1
| | | | llvm-svn: 170461
* CodeGen: Expand creal and cimag into complex field loadsMeador Inge2012-12-181-2/+8
| | | | | | | | | | | | | | | PR 14529 was opened because neither Clang or LLVM was expanding calls to creal* or cimag* into instructions that just load the respective complex field. After some discussion, it was not considered realistic to do this in LLVM because of the platform specific way complex types are expanded. Thus a way to solve this in Clang was pursued. GCC does a similar expansion. This patch adds the feature to Clang by making the creal* and cimag* functions library builtins and modifying the builtin code generator to look for the new builtin types. llvm-svn: 170455
* Fix a compilation warning with gcc 4.6Eli Bendersky2012-12-181-1/+1
| | | | llvm-svn: 170440
* Re-commit r170428 changes with Linux style file endings.Guy Benyei2012-12-186-1/+91
| | | | | | Add OpenCL images as clang builtin types. llvm-svn: 170432
* Revert changes from r170428, as I accidentally changed the line endings of ↵Guy Benyei2012-12-186-4302/+4212
| | | | | | these files to Windows style. llvm-svn: 170431
* Add OpenCL images as clang builtin types.Guy Benyei2012-12-186-4212/+4302
| | | | llvm-svn: 170428
* Remove obsolete FIXMEs.David Chisnall2012-12-181-2/+0
| | | | llvm-svn: 170425
* Inline hasAtomicCopyHelperAPI.Rafael Espindola2012-12-181-6/+2
| | | | llvm-svn: 170408
* Fix typo (thanks to Jordan for spotting it!).Richard Smith2012-12-181-1/+1
| | | | llvm-svn: 170403
* Rein ubsan's vptr sanitizer back a bit. Per core issue 453, binding a referenceRichard Smith2012-12-181-1/+8
| | | | | | to an object outside its lifetime does not have undefined behavior. llvm-svn: 170387
* Reapply r170344, this time without forgetting to commit the header changes.David Chisnall2012-12-174-13/+92
| | | | llvm-svn: 170354
* Revert "Added support for new property helpers (GNUstep runtime)."Benjamin Kramer2012-12-174-92/+13
| | | | | | This reverts commit r170344. Doesn't even compile. llvm-svn: 170351
* Added support for new property helpers (GNUstep runtime).David Chisnall2012-12-174-13/+92
| | | | llvm-svn: 170344
* This patch fixes PR13624, which notes a 64-bit PowerPC ELF ABIBill Schmidt2012-12-171-0/+3
| | | | | | | | | | incompatibility with how complex values are returned. It is sufficient to flag all complex types as direct rather than indirect. A new test case is provided that checks correct IR generation for the various supported flavors of _Complex. llvm-svn: 170302
* [ubsan] Emit branch weight metadata to hint towards common case.Will Dietz2012-12-151-1/+9
| | | | | | | Results in better block placement that helps close the performance gap when making ubsan checks recoverable. llvm-svn: 170263
* Make sure the __invoke function for lambdas returns properly. Per bug ↵Eli Friedman2012-12-131-0/+2
| | | | | | report on IRC> llvm-svn: 170160
* Debug Info: Emit vtables pointer members as artificial.David Blaikie2012-12-131-1/+1
| | | | | | | | | | | | I wasn't sure where to put the test case for this, but this seemed like as good a place as any. I had to reorder the tests here to make them legible while still matching the order of metadata output in the IR file (for some reason making it virtual changed the ordering). Relevant commit to fix up LLVM to actually respect 'artificial' member variables is coming once I write up a test case for it. llvm-svn: 170154
* ubsan: Add -fsanitize=bool and -fsanitize=enum, which check for loads ofRichard Smith2012-12-131-11/+38
| | | | | | | bit-patterns which are not valid values for enumerated or boolean types. These checks are the ubsan analogue of !range metadata. llvm-svn: 170108
* Simplify. No functionality change.Richard Smith2012-12-131-12/+7
| | | | llvm-svn: 170100
* Rewrite calls to bitcast unprototyped functions when emitting a definition.John McCall2012-12-121-77/+113
| | | | | | | | | | | | My variadics patch, r169588, changed these calls to typically be bitcasts rather than calls to a supposedly variadic function. This totally subverted a hack where we intentionally dropped excess arguments from such calls in order to appease the inliner and a "warning" from the optimizer. This patch extends the hack to also work with bitcasts, as well as teaching it to rewrite invokes. llvm-svn: 170034
* Marking the objc_autoreleaseReturnValue and objc_retainAutoreleaseReturnValue Chad Rosier2012-12-121-3/+8
| | | | | | | | | | call sites as tail calls unconditionally. While it's theoretically true that this is just an optimization, it's an optimization that we very much want to happen even at -O0, or else ARC applications become substantially harder to debug. See r169796 for the llvm/fast-isel side of things. rdar://12553082 llvm-svn: 169996
* BackendUtil.cpp: Add #include "llvm/TargetTransformInfo.h"NAKAMURA Takumi2012-12-111-0/+1
| | | | | | llvm/Target/TargetMachine.h will not provide "llvm/TargetTransformInfo.h" any more. llvm-svn: 169816
* Specify if `-mno-red-zone' was used when creating the GCOV instrucmentation ↵Bill Wendling2012-12-101-1/+3
| | | | | | | | | pass. This prevents the functions generated by that pass from using the red zone. <rdar://problem/12843084> llvm-svn: 169755
* Unbreak the clang build after r169712.Benjamin Kramer2012-12-091-3/+3
| | | | llvm-svn: 169713
* Cleanup and fix an assert that was mis-firing.Chandler Carruth2012-12-091-5/+13
| | | | | | | | | | | | | | | | Note that there is no test suite update. This was found by a couple of tests failing when the test suite was run on a powerpc64 host (thanks Roman!). The tests don't specify a triple, which might seem surprising for a codegen test. But in fact, these tests don't even inspect their output. Not at all. I could add a bunch of triples to these tests so that we'd get the test coverage for normal builds, but really someone needs to go through and add actual *tests* to these tests. =[ The ones in question are: test/CodeGen/bitfield-init.c test/CodeGen/union.c llvm-svn: 169694
* Fix the bitfield record layout in codegen for big endian targets.Chandler Carruth2012-12-091-3/+7
| | | | | | | | | | | | | | | | | | This was an egregious bug due to the several iterations of refactorings that took place. Size no longer meant what it original did by the time I finished, but this line of code never got updated. Unfortunately we had essentially zero tests for this in the regression test suite. =[ I've added a PPC64 run over the bitfield test case I've been primarily using. I'm still looking at adding more tests and making sure this is the *correct* bitfield access code on PPC64 linux, but it looks pretty close to me, and it is *worlds* better than before this patch as it no longer asserts! =] More commits to follow with at least additional tests and maybe more fixes. Sorry for the long breakage due to this.... llvm-svn: 169691
OpenPOWER on IntegriCloud