summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert "DebugInfo: Generalize debug info location handling" and related commitsDavid Blaikie2015-01-091-7/+25
| | | | | | | | | | | | This reverts commit r225000, r225021, r225083, r225086, r225090. The root change (r225000) still has several issues where it's caused calls to be emitted without debug locations. This causes assertion failures if/when those calls are inlined. I'll work up some test cases and fixes before recommitting this. llvm-svn: 225555
* DebugInfo: Provide a less subtle way to set the debug location of simple ret ↵David Blaikie2015-01-021-1/+1
| | | | | | | | instructions un-XFAILing the test XFAIL'd in r225086 after it regressed in r225083. llvm-svn: 225090
* Reapply "DebugInfo: Generalize debug info location handling"David Blaikie2014-12-301-24/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally committed in r224385 and reverted in r224441 due to concerns this change might've introduced a crash. Turns out this change fixes the crash introduced by one of my earlier more specific location handling changes (those specific fixes are reverted by this patch, in favor of the more general solution). Recommitted in r224941 and reverted in r224970 after it caused a crash when building compiler-rt. Looks to be due to this change zeroing out the debug location when emitting default arguments (which were meant to inherit their outer expression's location) thus creating call instructions without locations - these create problems for inlining and must not be created. That is fixed and tested in this version of the change. Original commit message: This is a more scalable (fixed in mostly one place, rather than many places that will need constant improvement/maintenance) solution to several commits I've made recently to increase source fidelity for subexpressions. This resetting had to be done at the DebugLoc level (not the SourceLocation level) to preserve scoping information (if the resetting was done with CGDebugInfo::EmitLocation, it would've caused the tail end of an expression's codegen to end up in a potentially different scope than the start, even though it was at the same source location). The drawback to this is that it might leave CGDebugInfo out of sync. Ideally CGDebugInfo shouldn't have a duplicate sense of the current SourceLocation, but for now it seems it does... - I don't think I'm going to tackle removing that just now. I expect this'll probably cause some more buildbot fallout & I'll investigate that as it comes up. Also these sort of improvements might be starting to show a weakness/bug in LLVM's line table handling: we don't correctly emit is_stmt for statements, we just put it on every line table entry. This means one statement split over multiple lines appears as multiple 'statements' and two statements on one line (without column info) are treated as one statement. I don't think we have any IR representation of statements that would help us distinguish these cases and identify the beginning of each statement - so that might be something we need to add (possibly to the lexical scope chain - a scope for each statement). This does cause some problems for GDB and possibly other DWARF consumers. llvm-svn: 225000
* Revert "DebugInfo: Generalize debug info location handling"David Blaikie2014-12-291-6/+24
| | | | | | | | | Asserting when building compiler-rt when using a GCC host compiler. Reverting while I investigate. This reverts commit r224941. llvm-svn: 224970
* Reapply "DebugInfo: Generalize debug info location handling"David Blaikie2014-12-291-24/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally committed in r224385 and reverted in r224441 due to concerns this change might've introduced a crash. Turns out this change fixes the crash introduced by one of my earlier more specific location handling changes (those specific fixes are reverted by this patch, in favor of the more general solution). Original commit message: This is a more scalable (fixed in mostly one place, rather than many places that will need constant improvement/maintenance) solution to several commits I've made recently to increase source fidelity for subexpressions. This resetting had to be done at the DebugLoc level (not the SourceLocation level) to preserve scoping information (if the resetting was done with CGDebugInfo::EmitLocation, it would've caused the tail end of an expression's codegen to end up in a potentially different scope than the start, even though it was at the same source location). The drawback to this is that it might leave CGDebugInfo out of sync. Ideally CGDebugInfo shouldn't have a duplicate sense of the current SourceLocation, but for now it seems it does... - I don't think I'm going to tackle removing that just now. I expect this'll probably cause some more buildbot fallout & I'll investigate that as it comes up. Also these sort of improvements might be starting to show a weakness/bug in LLVM's line table handling: we don't correctly emit is_stmt for statements, we just put it on every line table entry. This means one statement split over multiple lines appears as multiple 'statements' and two statements on one line (without column info) are treated as one statement. I don't think we have any IR representation of statements that would help us distinguish these cases and identify the beginning of each statement - so that might be something we need to add (possibly to the lexical scope chain - a scope for each statement). This does cause some problems for GDB and possibly other DWARF consumers. llvm-svn: 224941
* Fix for PR21915: assert on multidimensional VLA in function arguments.Alexey Bataev2014-12-181-22/+7
| | | | | | | Fixed assertion on type checking for arguments and parameters on function call if arguments are pointers to VLA Differential Revision: http://reviews.llvm.org/D6655 llvm-svn: 224504
* Revert "DebugInfo: Generalize debug info location handling"David Blaikie2014-12-171-6/+24
| | | | | | | | | Fails an ASan bootstrap - I'll try to reproduce locally & sort that out before recommitting. This reverts commit r224385. llvm-svn: 224441
* DebugInfo: Generalize debug info location handlingDavid Blaikie2014-12-161-24/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a more scalable (fixed in mostly one place, rather than many places that will need constant improvement/maintenance) solution to several commits I've made recently to increase source fidelity for subexpressions. This resetting had to be done at the DebugLoc level (not the SourceLocation level) to preserve scoping information (if the resetting was done with CGDebugInfo::EmitLocation, it would've caused the tail end of an expression's codegen to end up in a potentially different scope than the start, even though it was at the same source location). The drawback to this is that it might leave CGDebugInfo out of sync. Ideally CGDebugInfo shouldn't have a duplicate sense of the current SourceLocation, but for now it seems it does... - I don't think I'm going to tackle removing that just now. I expect this'll probably cause some more buildbot fallout & I'll investigate that as it comes up. Also these sort of improvements might be starting to show a weakness/bug in LLVM's line table handling: we don't correctly emit is_stmt for statements, we just put it on every line table entry. This means one statement split over multiple lines appears as multiple 'statements' and two statements on one line (without column info) are treated as one statement. I don't think we have any IR representation of statements that would help us distinguish these cases and identify the beginning of each statement - so that might be something we need to add (possibly to the lexical scope chain - a scope for each statement). This does cause some problems for GDB and possibly other DWARF consumers. llvm-svn: 224385
* [OPENMP] Bugfix for processing of global variables in OpenMP regions.Alexey Bataev2014-12-161-1/+2
| | | | | | | | Currently, if global variable is marked as a private OpenMP variable, the compiler crashes in debug version or generates incorrect code in release version. It happens because in the OpenMP region the original global variable is used instead of the generated private copy. It happens because currently globals variables are not captured in the OpenMP region. This patch adds capturing of global variables iff private copy of the global variable must be used in the OpenMP region. Differential Revision: http://reviews.llvm.org/D6259 llvm-svn: 224323
* First patch with codegen of the 'omp for' directive. It implementsAlexander Musman2014-12-151-1/+6
| | | | | | | | | | | | | | | the simplest case, which is used when no chunk_size is specified in the schedule(static) or no 'schedule' clause is specified - the iteration space is divided by the library into chunks that are approximately equal in size, and at most one chunk is distributed to each thread. In this case, we do not need an outer loop in each thread - each thread requests once which iterations range it should handle (using __kmpc_for_static_init runtime call) and then runs the inner loop on this range. Differential Revision: http://reviews.llvm.org/D5865 llvm-svn: 224233
* Bugfix for Codegen of atomic load/store/other ops.Alexey Bataev2014-12-151-0/+6
| | | | | | | Currently clang fires assertions on x86-64 on any atomic operations for long double operands. Patch fixes codegen for such operations. Differential Revision: http://reviews.llvm.org/D6499 llvm-svn: 224230
* Implement the __builtin_call_with_static_chain GNU extension.Peter Collingbourne2014-12-121-2/+4
| | | | | | | | | | | | | | | | The extension has the following syntax: __builtin_call_with_static_chain(Call, Chain) where Call must be a function call expression and Chain must be of pointer type This extension performs a function call Call with a static chain pointer Chain passed to the callee in a designated register. This is useful for calling foreign language functions whose ABI uses static chain pointers (e.g. to implement closures). Differential Revision: http://reviews.llvm.org/D6332 llvm-svn: 224167
* DebugInfo: Correct the location of initializations of auto.David Blaikie2014-12-091-2/+1
| | | | llvm-svn: 223839
* DebugInfo: Emit the correct location for initialization of a complex variableDavid Blaikie2014-12-091-2/+4
| | | | | | Especially useful for sanitizer reports. llvm-svn: 223825
* DebugInfo: Correctly identify the location of C++ member initializer list ↵David Blaikie2014-12-091-6/+10
| | | | | | | | | | | | | elements This particularly helps the fidelity of ASan reports (which can occur even in these examples - if, for example, one uses placement new over a buffer of insufficient size - now ASan will correctly identify which member's initialization went over the end of the buffer). This doesn't cover all types of members - more coming. llvm-svn: 223726
* CodeGen: refactor ARM builtin handlingSaleem Abdulrasool2014-12-041-0/+2
| | | | | | | | Create a helper function to construct a value for the ARM hint intrinsic rather than inling the construction. In order to avoid the use of the sentinel value, inline the use of intrinsic instruction retrieval. NFC. llvm-svn: 223338
* Fix incorrect codegen for devirtualized calls to virtual overloaded operators.Nico Weber2014-12-031-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider this program: struct A { virtual void operator-() { printf("base\n"); } }; struct B final : public A { virtual void operator-() override { printf("derived\n"); } }; int main() { B* b = new B; -static_cast<A&>(*b); } Before this patch, clang saw the virtual call to A::operator-(), figured out that it can be devirtualized, and then just called A::operator-() directly, without going through the vtable. Instead, it should've looked up which operator-() the call devirtualizes to and should've called that. For regular virtual member calls, clang gets all this right already. So instead of giving EmitCXXOperatorMemberCallee() all the logic that EmitCXXMemberCallExpr() already has, cut the latter function into two pieces, call the second piece EmitCXXMemberOrOperatorMemberCallExpr(), and use it also to generate code for calls to virtual member operators. This way, virtual overloaded operators automatically don't get devirtualized if they have covariant returns (like it was done for regular calls in r218602), etc. This also happens to fix (or at least improve) codegen for explicit constructor calls (`A a; a.A::A()`) in MS mode with -fsanitize-address-field-padding=1. (This adjustment for virtual operator calls seems still wrong with the MS ABI.) llvm-svn: 223185
* Revert "Remove threshold for lifetime marker insertion of named temporaries"Arnaud A. de Grandmaison2014-12-011-3/+0
| | | | | | Revert r222993 while I investigate some MemorySanitizer failures. llvm-svn: 222995
* Remove threshold for lifetime marker insertion of named temporariesArnaud A. de Grandmaison2014-12-011-0/+3
| | | | | | | | | Now that TailRecursionElimination has been fixed with r222354, the threshold on size for lifetime marker insertion can be removed. This only affects named temporary though, as the patch for unnamed temporaries is still in progress. llvm-svn: 222993
* Bundle conditions checked by UBSan with sanitizer kinds they implement.Alexey Samsonov2014-11-111-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This change makes CodeGenFunction::EmitCheck() take several conditions that needs to be checked (all of them need to be true), together with sanitizer kinds these checks are for. This would allow to split one call into UBSan runtime into several calls in case different sanitizer kinds would have different recoverability settings. Tests should be fixed accordingly, I'm working on it. Test Plan: regression test suite. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6219 llvm-svn: 221716
* [Sanitizer] Refactor sanitizer options in LangOptions.Alexey Samsonov2014-11-111-2/+2
| | | | | | | | | | | | | | | | | | Get rid of ugly SanitizerOptions class thrust into LangOptions: * Make SanitizeAddressFieldPadding a regular language option, and rely on default behavior to initialize/reset it. * Make SanitizerBlacklistFile a regular member LangOptions. * Introduce the helper class "SanitizerSet" to represent the set of enabled sanitizers and make it a member of LangOptions. It is exactly the entity we want to cache and modify in CodeGenFunction, for instance. We'd also be able to reuse SanitizerSet in CodeGenOptions for storing the set of recoverable sanitizers, and in the Driver to represent the set of sanitizers turned on/off by the commandline flags. No functionality change. llvm-svn: 221653
* Propagate SanitizerKind into CodeGenFunction::EmitCheck() call.Alexey Samsonov2014-11-101-11/+1
| | | | | | | | | | | | | | | | Make sure CodeGenFunction::EmitCheck() knows which sanitizer it emits check for. Make CheckRecoverableKind enum an implementation detail and move it away from header. Currently CheckRecoverableKind is determined by the type of sanitizer ("unreachable" and "return" are unrecoverable, "vptr" is always-recoverable, all the rest are recoverable). This will change in future if we allow to specify which sanitizers are recoverable, and which are not by -fsanitize-recover= flag. No functionality change. llvm-svn: 221635
* Silence a warning from MSVC "14" by making an enum unsignedReid Kleckner2014-10-311-2/+2
| | | | | | | | | | It says there is a narrowing conversion when we assign it to an unsigned 3 bit bitfield. Also, use unsigned instead of size_t for the Size field of the struct in question. Otherwise they won't run together in MSVC or clang-cl. llvm-svn: 221019
* MS ABI: Properly call global delete when invoking virtual destructorsDavid Majnemer2014-10-311-0/+8
| | | | | | | | | | | | | | | | | | | | Summary: The Itanium ABI approach of using offset-to-top isn't possible with the MS ABI, it doesn't have that kind of information lying around. Instead, we do the following: - Call the virtual deleting destructor with the "don't delete the object flag" set. The virtual deleting destructor will return a pointer to 'this' adjusted to the most derived class. - Call the global delete using the adjusted 'this' pointer. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5996 llvm-svn: 220993
* Get rid of SanitizerOptions::Disabled global. NFC.Alexey Samsonov2014-10-301-1/+1
| | | | | | | | | SanitizerOptions is not even a POD now, so having global variable of this type, is not nice. Instead, provide a regular constructor and clear() method, and let each CodeGenFunction has its own copy of SanitizerOptions it uses. llvm-svn: 220920
* Improved capturing variable-length array types in CapturedStmt.Alexey Bataev2014-10-291-1/+2
| | | | | | | | An updated implemnentation of VLA types capturing based on previously committed solution for Lambdas. This version captures the whole VLA type instead of particular variables which are part of VLA size expression and allows to use previusly calculated size of VLA type in captured regions. Required for OpenMP. Differential Revision: http://reviews.llvm.org/D5099 llvm-svn: 220850
* Objective-C. revert patch for rdar://17554063.Fariborz Jahanian2014-10-281-2/+1
| | | | llvm-svn: 220812
* Fixing the MSVC build by removing friendship with CodeGenFunction; NFC.Aaron Ballman2014-10-211-1/+0
| | | | llvm-svn: 220293
* [OPENMP] Codegen for 'private' clause in 'parallel' directive.Alexey Bataev2014-10-211-0/+3
| | | | | | | This patch generates some helper variables which used as a private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by default (with the default constructor, if any). In outlined function references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables and implicit barier is set by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables. Differential Revision: http://reviews.llvm.org/D4752 llvm-svn: 220262
* Insert poisoned paddings between fields in C++ classes so that ↵Kostya Serebryany2014-10-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | AddressSanitizer can find intra-object-overflow bugs Summary: The general approach is to add extra paddings after every field in AST/RecordLayoutBuilder.cpp, then add code to CTORs/DTORs that poisons the paddings (CodeGen/CGClass.cpp). Everything is done under the flag -fsanitize-address-field-padding. The blacklist file (-fsanitize-blacklist) allows to avoid the transformation for given classes or source files. See also https://code.google.com/p/address-sanitizer/wiki/IntraObjectOverflow Test Plan: run SPEC2006 and some of the Chromium tests with -fsanitize-address-field-padding Reviewers: samsonov, rnk, rsmith Reviewed By: rsmith Subscribers: majnemer, cfe-commits Differential Revision: http://reviews.llvm.org/D5687 llvm-svn: 219961
* Moving CGF::EmitAlignmentAssumption to IRBuilderHal Finkel2014-10-151-1/+4
| | | | | | | | The functionality contained in CodeGenFunction::EmitAlignmentAssumption has been moved to IRBuilder (so that it can also be used by LLVM-level code). Remove this now-duplicate implementation in favor of the IRBuilder code. llvm-svn: 219877
* Sanitize upcasts and conversion to virtual base.Alexey Samsonov2014-10-131-3/+10
| | | | | | | | | | | This change adds UBSan check to upcasts. Namely, when we perform derived-to-base conversion, we: 1) check that the pointer-to-derived has suitable alignment and underlying storage, if this pointer is non-null. 2) if vptr-sanitizer is enabled, and we perform conversion to virtual base, we check that pointer-to-derived has a matching vptr. llvm-svn: 219642
* Unfriend CGOpenMPRegionInfo so it can go into an anonymous namespace.Benjamin Kramer2014-10-101-1/+0
| | | | | | Also remove some unnecessary virtual keywords. NFC. llvm-svn: 219497
* Code reformatting and improvement for OpenMP.Alexey Bataev2014-10-101-0/+4
| | | | | | Moved CGOpenMPRegionInfo from CGOpenMPRuntime.h to CGOpenMPRuntime.cpp file and reworked the code for this change. Also added processing of ThreadID variable passed as an argument in outlined functions in parallel and task directives. llvm-svn: 219490
* Code improvements in OpenMP CodeGen.Alexey Bataev2014-10-101-44/+63
| | | | | | This patch makes class OMPPrivateScope a common class for all private variables. Reworked processing of firstprivate variables (now it is based on OMPPrivateScope too). llvm-svn: 219486
* Revert r218865 because it introduced PR21236, a crash in codegen emitting ↵Nick Lewycky2014-10-101-27/+0
| | | | | | the try block. llvm-svn: 219470
* Promote null pointer constants used as arguments to variadic functionsReid Kleckner2014-10-101-1/+3
| | | | | | | | | | | | | | | Make it possible to pass NULL through variadic functions on 64-bit Windows targets. The Visual C++ headers define NULL to 0, when they should define it to 0LL on Win64 so that NULL is a pointer-sized integer. Fixes PR20949. Reviewers: thakis, rsmith Differential Revision: http://reviews.llvm.org/D5480 llvm-svn: 219456
* [OPENMP] 'omp teams' directive basic support.Alexey Bataev2014-10-091-0/+1
| | | | | | Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive. llvm-svn: 219385
* [OPENMP] Codegen for 'firstprivate' clause.Alexey Bataev2014-10-081-0/+13
| | | | | | | | This patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy. In outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables. Differential Revision: http://reviews.llvm.org/D5140 llvm-svn: 219306
* Revert commit r219297.Alexey Bataev2014-10-081-13/+0
| | | | | | Still troubles with OpenMP/parallel_firstprivate_codegen.cpp (now in ARM buildbots). llvm-svn: 219298
* [OPENMP] Codegen for 'firstprivate' clause.Alexey Bataev2014-10-081-0/+13
| | | | | | | | This patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy. In outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables. Differential Revision: http://reviews.llvm.org/D5140 llvm-svn: 219297
* Revert back r219295.Alexey Bataev2014-10-081-13/+0
| | | | | | To fix issues with test OpenMP/parallel_firstprivate_codegen.cpp llvm-svn: 219296
* [OPENMP] Codegen for 'firstprivate' clause.Alexey Bataev2014-10-081-0/+13
| | | | | | | | This patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy. In outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables. Differential Revision: http://reviews.llvm.org/D5140 llvm-svn: 219295
* Revert "[OPENMP] 'omp teams' directive basic support. Includes parsing and ↵Renato Golin2014-10-081-1/+0
| | | | | | | | | semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive." This reverts commit r219197 because it broke ARM self-hosting buildbots with segmentation fault errors in many tests. llvm-svn: 219289
* Fix IRGen for referencing a static local before emitting its declReid Kleckner2014-10-081-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously CodeGen assumed that static locals were emitted before they could be accessed, which is true for automatic storage duration locals. However, it is possible to have CodeGen emit a nested function that uses a static local before emitting the function that defines the static local, breaking that assumption. Fix it by creating the static local upon access and ensuring that the deferred function body gets emitted. We may not be able to emit the initializer properly from outside the function body, so don't try. Fixes PR18020. See also previous attempts to fix static locals in PR6769 and PR7101. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4787 llvm-svn: 219265
* [OPENMP] 'omp teams' directive basic support.Alexey Bataev2014-10-071-0/+1
| | | | | | Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive. llvm-svn: 219197
* [OPENMP] Small refactoring of EmitOMPSimdLoop helper routine.Alexander Musman2014-10-071-3/+4
| | | | | | | | | No functional changes intended. Renamed EmitOMPSimdLoop to EmitOMPInnerLoop, I plan to re-use it to emit inner loop in the future patches for CodeGen of the worksharing loop directives (omp for, omp for simd). llvm-svn: 219195
* MS ABI: Implement thread_local for global variablesDavid Majnemer2014-10-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This add support for the C++11 feature, thread_local global variables. The ABI Clang implements is an improvement of the MSVC ABI. Sadly, further improvements could be made but not without sacrificing ABI compatibility. The feature is implemented as follows: - All thread_local initialization routines are pointed to from the .CRT$XDU section. - All non-weak thread_local variables have their initialization routines call from a single function instead of getting their own .CRT$XDU section entry. This is done to open up optimization opportunities to the compiler. - All weak thread_local variables have their own .CRT$XDU section entry. This entry is in a COMDAT with the global variable it is initializing; this ensures that we will initialize the global exactly once. - Destructors are registered in the initialization function using __tlregdtor. Differential Revision: http://reviews.llvm.org/D5597 llvm-svn: 219074
* Emit lifetime.start / lifetime.end markers for unnamed temporary objects.Arnaud A. de Grandmaison2014-10-021-0/+27
| | | | | | | This will give more information to the optimizers so that they can reuse stack slots and reduce stack usage. llvm-svn: 218865
* [OPENMP] Loop collapsing and codegen for 'omp simd' directive.Alexander Musman2014-10-011-0/+48
| | | | | | | | | | | | | This patch implements collapsing of the loops (in particular, in presense of clause 'collapse'). It calculates number of iterations N and expressions nesessary to calculate the nested loops counters values based on new iteration variable (that goes from 0 to N-1) in Sema. It also adds Codegen for 'omp simd', which uses (and tests) this feature. Differential Revision: http://reviews.llvm.org/D5184 llvm-svn: 218743
OpenPOWER on IntegriCloud