summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* [C++11] Replacing ObjCContainerDecl iterators classmeth_begin() and ↵Aaron Ballman2014-03-132-39/+21
| | | | | | classmeth_end() with iterator_range class_methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203840
* [C++11] Replacing ObjCContainerDecl iterators instmeth_begin() and ↵Aaron Ballman2014-03-132-38/+24
| | | | | | instmeth_end() with iterator_range instance_methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203839
* CodeGen: use symbolic enumerators for memory orderTim Northover2014-03-131-5/+10
| | | | | | | It makes the code clearer and less error-prone to use our (already known) special values for the various memory order cases. llvm-svn: 203838
* CodeGen: make use of weaker failure orders on cmpxchg.Tim Northover2014-03-131-67/+151
| | | | | | | | | | | | This makes Clang take advantage of the recent IR addition of a "failure" memory ordering requirement. As with the "success" ordering, we try to emit just a single version if the expression is constant, but fall back to runtime detection (to allow optimisation across function-call boundaries). rdar://problem/15996804 llvm-svn: 203837
* Renaming the recently-created (r203830) props() range API to properties() ↵Aaron Ballman2014-03-133-4/+4
| | | | | | for clarity. llvm-svn: 203835
* [C++11] Replacing ObjCContainerDecl iterators meth_begin() and meth_end() ↵Aaron Ballman2014-03-131-4/+2
| | | | | | with iterator_range methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203832
* [C++11] Replacing ObjCContainerDecl iterators prop_begin() and prop_end() ↵Aaron Ballman2014-03-133-17/+8
| | | | | | with iterator_range props(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203830
* [C++11] Replacing ObjCImplementationDecl iterators init_begin() and ↵Aaron Ballman2014-03-131-4/+2
| | | | | | init_end() with iterator_range inits(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203820
* [C++11] Replacing CXXRecordDecl iterators vbases_begin() and vbases_end() ↵Aaron Ballman2014-03-134-19/+9
| | | | | | with iterator_range vbases(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203808
* Simplify code. No functionality change.Rafael Espindola2014-03-131-5/+5
| | | | llvm-svn: 203804
* [C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with ↵Aaron Ballman2014-03-139-90/+62
| | | | | | iterator_range bases(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203803
* Revert "CodeGen: Use a binary format for instrumentation based profiling"Justin Bogner2014-03-124-52/+179
| | | | | | | | | I've clearly done something wrong with how to get this to link correctly. Reverting for now. This reverts commit r203711. llvm-svn: 203712
* CodeGen: Use a binary format for instrumentation based profilingJustin Bogner2014-03-124-179/+52
| | | | | | | | This updates CodeGenPGO to use the ProfileDataReader introduced to llvm in r203703 and the new API for writing out the profile introduced to compiler-rt in r203710. llvm-svn: 203711
* PR19113: Emit 'vtable' TBAA metadata when loading a vptr in a ↵Richard Smith2014-03-121-2/+1
| | | | | | pointer-to-member-function call. llvm-svn: 203691
* CodeGen: Move hot/cold logic out of PGOProfileDataJustin Bogner2014-03-122-39/+21
| | | | llvm-svn: 203689
* Don't recompute inlining threshold - use new overload provided by LLVMEli Bendersky2014-03-121-10/+3
| | | | | | Follow-up on LLVM r203669 llvm-svn: 203673
* ARM: Correct alignment of structs passed as byval pointerOliver Stannard2014-03-121-1/+1
| | | | | | | | | | When a struct has bitfields overlapping with other members (as required by the AAPCS), clang uses a packed struct to represent this. If such a struct is large enough for clang to pass it as a byval pointer (>64 bytes), we need to set the alignment of the argument to match the original type. llvm-svn: 203660
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-1217-599/+570
| | | | | | class. llvm-svn: 203643
* PGO: Scale large counters down to 32-bitsDuncan P. N. Exon Smith2014-03-111-12/+42
| | | | | | | | | PGO counters are 64-bit and branch weights are 32-bit. Scale them down when necessary, instead of just taking the lower 32 bits. <rdar://problem/16276448> llvm-svn: 203592
* Sema: produce error when invalid ordering is passed to atomic builtinTim Northover2014-03-111-20/+10
| | | | | | | | | This is a conservative check, because it's valid for the expression to be non-constant, and in cases like that we just don't know whether it's valid. rdar://problem/16242991 llvm-svn: 203561
* Update for IR: add a second AtomicOrdering to cmpxchg insts.Tim Northover2014-03-113-7/+13
| | | | | | rdar://problem/15996804 llvm-svn: 203560
* Objective-C IRGen. Fixes several regressions caused by changes madeFariborz Jahanian2014-03-111-5/+31
| | | | | | to setting of ObjC linkages. //rdar://16206443 llvm-svn: 203521
* RTTI symbols for visible local types may need weak linkage.John McCall2014-03-101-1/+1
| | | | | | | | | | | Previously, we would always emit them with internal linkage, but with hidden visibility when the function was hidden, which is an illegal combination, which could lead LLVM to actually emit them as strong hidden symbols with hilarious results. rdar://16265084 llvm-svn: 203503
* IRGen: __c11/__atomic compare-and-exchange should respect the standardDavid Majnemer2014-03-101-10/+36
| | | | | | | | | | | | | | | Summary: 'Expected' should only be modified if the operation fails. This fixes PR18899. Reviewers: chandlerc, rsmith, rjmccall CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2922 llvm-svn: 203493
* [C++11] Replacing DeclBase iterators specific_attr_begin() and ↵Aaron Ballman2014-03-102-12/+6
| | | | | | specific_attr_end() with iterator_range specific_attrs(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203474
* Reverting llvm::distance changes to use std::distance with iterators ↵Aaron Ballman2014-03-101-4/+2
| | | | | | | | instead, per post-commit review feedback. Replacing llvm::copy changes with SmallVector range-based construction which is a considerably cleaner approach. llvm-svn: 203461
* [C++11] Replace OwningPtr include with <memory>.Ahmed Charles2014-03-094-4/+4
| | | | llvm-svn: 203389
* [C++11] Update Clang for the change to LLVM's Use-Def chain iterators inChandler Carruth2014-03-096-14/+10
| | | | | | | | | r203364: what was use_iterator is now user_iterator, and there is a use_iterator for directly iterating over the uses. This also switches to use the range-based APIs where appropriate. llvm-svn: 203365
* [C++11] Replacing RecordDecl iterators field_begin() and field_end() with ↵Aaron Ballman2014-03-0810-96/+40
| | | | | | iterator_range fields(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203355
* [C++11] Replacing EnumDecl iterators enumerator_begin() and enumerator_end() ↵Aaron Ballman2014-03-081-3/+1
| | | | | | with iterator_range enumerators(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203353
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-078-13/+14
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* [C++11] Replacing DeclBase iterators decls_begin() and decls_end() with ↵Aaron Ballman2014-03-073-21/+14
| | | | | | iterator_range decls(). The same is true for the noload versions of these APIs. Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203278
* Change OwningPtr::take() to OwningPtr::release().Ahmed Charles2014-03-073-16/+10
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203275
* Remove dead return and simplify code.Ted Kremenek2014-03-071-3/+1
| | | | llvm-svn: 203266
* Renaming the chains() ranged iterator to chain() per suggestion by Richard ↵Aaron Ballman2014-03-071-1/+1
| | | | | | Smith. llvm-svn: 203262
* [C++11] Replacing IndirectFieldDecl iterators chain_begin() and chain_end() ↵Aaron Ballman2014-03-071-4/+2
| | | | | | with iterator_range chains(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203261
* [C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() ↵Aaron Ballman2014-03-074-15/+8
| | | | | | with iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203255
* [C++11] Replacing BlockDecl iterators param_begin() and param_end() with ↵Aaron Ballman2014-03-072-7/+4
| | | | | | iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203250
* [C++11] Replacing FunctionDecl iterators param_begin() and param_end() with ↵Aaron Ballman2014-03-071-5/+3
| | | | | | iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203248
* [C++11] Replace LLVM-style type traits with C++11 standard ones.Benjamin Kramer2014-03-071-3/+3
| | | | | | No functionality change. llvm-svn: 203241
* [C++11] Replacing iterators redecls_begin() and redecls_end() with ↵Aaron Ballman2014-03-062-5/+2
| | | | | | iterator_range redecls(). Updating all of the usages of the iterators with range-based for loops, which allows the begin/end forms to be removed entirely. llvm-svn: 203179
* Use llvm.compiler.used instead of llvm.used for objc symbols.Rafael Espindola2014-03-064-39/+52
| | | | | | | | | | | | | LLVM currently has a hack (shouldEmitUsedDirectiveFor) that causes it to not print no_dead_strip for symbols starting with 'l' or 'L'. These are exactly the ones that the clang's objc codegen is producing. The net result, is that it is equivalent to llvm.compiler.used. The need for putting the private symbol in llvm.compiler.used should be clear (the objc runtime uses them). The reason for also putting the weak symbols in it is for LTO: ld64 will not ask us to preserve the it. llvm-svn: 203172
* PGO: Add support for Objective-C blocks.Bob Wilson2014-03-062-1/+22
| | | | llvm-svn: 203157
* Revert "Use private linkage for remaining GlobalVariables with private names."Rafael Espindola2014-03-061-11/+11
| | | | | | | | This reverts commit r203059. Revert while we discuss what does it mean to be private and weak. llvm-svn: 203141
* PGO: add instrumentation for Objective-C methods.Bob Wilson2014-03-062-2/+30
| | | | llvm-svn: 203085
* Remove 'break' dominated by 'return' in 'EmitBuiltinExpr'.Ted Kremenek2014-03-061-1/+0
| | | | llvm-svn: 203080
* PGO: Use the main file name to help distinguish functions with local linkage.Bob Wilson2014-03-063-23/+56
| | | | | | | | | | | | In addition, for all functions, use the name from the llvm::Function to identify the function in the profile data. Compute that "function name", including the file name for local functions, once when assigning the PGO counters and store it in the CodeGenPGO class. Move the code to add InlineHint and Cold attributes out of StartFunction(), because the "function name" string isn't available at that point. llvm-svn: 203075
* PGO: Rename variables to avoid referring to the "MangledName" of a function.Bob Wilson2014-03-062-19/+18
| | | | | | | | | | | | For C++ functions, we will continue to use the mangled name to identify functions in the PGO profile data, but this name is confusing for things like Objective-C methods. For functions with local linkage, we're also going to include the file name to help distinguish those functions, so this changes to use more generic variable names. No functional changes. llvm-svn: 203074
* Refactor PGO code in preparation for handling non-C/C++ code.Bob Wilson2014-03-063-12/+11
| | | | | | | | | | | Move the PGO.assignRegionCounters() call out of StartFunction, because that function is called from many places where it does not make sense to do PGO instrumentation (e.g., compiler-generated helper functions). Change several functions to take a StringRef argument for the unique name associated with a function, so that the name can be set differently for things like Objective-C methods and block literals. llvm-svn: 203073
* PGO: don't emit counter increment if no counters have been allocated.Bob Wilson2014-03-061-1/+1
| | | | | | | | I hit this while debugging another issue where my sources were in an inconsistent state, so I don't have a testcase. Regardless, this check is simpler and more direct than checking if the option is enabled. llvm-svn: 203072
OpenPOWER on IntegriCloud