History log of /llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp (Results 576 – 600 of 1023)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# be22bcb1 10-Mar-2014 Aaron Ballman <aaron@aaronballman.com>

[C++11] Replacing DeclBase iterators specific_attr_begin() and specific_attr_end() with iterator_range specific_attrs(). Updating all of the usages of the iterators with range-based for loops.

llvm-

[C++11] Replacing DeclBase iterators specific_attr_begin() and specific_attr_end() with iterator_range specific_attrs(). Updating all of the usages of the iterators with range-based for loops.

llvm-svn: 203474

show more ...


# 4d01fff4 09-Mar-2014 Chandler Carruth <chandlerc@gmail.com>

[C++11] Update Clang for the change to LLVM's Use-Def chain iterators in
r203364: what was use_iterator is now user_iterator, and there is
a use_iterator for directly iterating over the uses.

This a

[C++11] Update Clang for the change to LLVM's Use-Def chain iterators in
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

show more ...


# 86c93906 06-Mar-2014 Aaron Ballman <aaron@aaronballman.com>

[C++11] Replacing iterators redecls_begin() and redecls_end() with iterator_range redecls(). Updating all of the usages of the iterators with range-based for loops, which allows the begin/end forms t

[C++11] Replacing iterators redecls_begin() and redecls_end() with 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

show more ...


# da1ebede 06-Mar-2014 Bob Wilson <bob.wilson@apple.com>

PGO: Use the main file name to help distinguish functions with local linkage.

In addition, for all functions, use the name from the llvm::Function to
identify the function in the profile data. Compu

PGO: Use the main file name to help distinguish functions with local linkage.

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

show more ...


# 68f475fa 06-Mar-2014 Bob Wilson <bob.wilson@apple.com>

Refactor PGO code in preparation for handling non-C/C++ code.

Move the PGO.assignRegionCounters() call out of StartFunction, because that
function is called from many places where it does not make s

Refactor PGO code in preparation for handling non-C/C++ code.

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

show more ...


# 867ea1d4 02-Mar-2014 Benjamin Kramer <benny.kra@googlemail.com>

[C++11] Replace llvm::tie with std::tie.

llvm-svn: 202639


# 19d7d546 25-Feb-2014 David Majnemer <david.majnemer@gmail.com>

IRGen: Remove a stale comment

This comment survived the transition from ForceInline to InlineAlways,
fix it.

llvm-svn: 202133


# 67e541e1 25-Feb-2014 David Majnemer <david.majnemer@gmail.com>

Attr: Remove ForceInline

The __forceinline keyword's semantics are now recast as AlwaysInline and
the kw___forceinline token has its language mode set for KEYMS.

This preserves the semantics of the

Attr: Remove ForceInline

The __forceinline keyword's semantics are now recast as AlwaysInline and
the kw___forceinline token has its language mode set for KEYMS.

This preserves the semantics of the previous implementation but with
less duplication of code.

llvm-svn: 202131

show more ...


# bf854f0f 17-Feb-2014 Bob Wilson <bob.wilson@apple.com>

Change PGO instrumentation to compute counts in a separate AST traversal.

Previously, we made one traversal of the AST prior to codegen to assign
counters to the ASTs and then propagated the count v

Change PGO instrumentation to compute counts in a separate AST traversal.

Previously, we made one traversal of the AST prior to codegen to assign
counters to the ASTs and then propagated the count values during codegen. This
patch now adds a separate AST traversal prior to codegen for the
-fprofile-instr-use option to propagate the count values. The counts are then
saved in a map from which they can be retrieved during codegen.

This new approach has several advantages:

1. It gets rid of a lot of extra PGO-related code that had previously been
added to codegen.

2. It fixes a serious bug. My original implementation (which was mailed to the
list but never committed) used 3 counters for every loop. Justin improved it to
move 2 of those counters into the less-frequently executed breaks and continues,
but that turned out to produce wrong count values in some cases. The solution
requires visiting a loop body before the condition so that the count for the
condition properly includes the break and continue counts. Changing codegen to
visit a loop body first would be a fairly invasive change, but with a separate
AST traversal, it is easy to control the order of traversal. I've added a
testcase (provided by Justin) to make sure this works correctly.

3. It improves the instrumentation overhead, reducing the number of counters for
a loop from 3 to 1. We no longer need dedicated counters for breaks and
continues, since we can just use the propagated count values when visiting
breaks and continues.

To make this work, I needed to make a change to the way we count case
statements, going back to my original approach of not including the fall-through
in the counter values. This was necessary because there isn't always an AST node
that can be used to record the fall-through count. Now case statements are
handled the same as default statements, with the fall-through paths branching
over the counter increments. While I was at it, I also went back to using this
approach for do-loops -- omitting the fall-through count into the loop body
simplifies some of the calculations and make them behave the same as other
loops. Whenever we start using this instrumentation for coverage, we'll need
to add the fall-through counts into the counter values.

llvm-svn: 201528

show more ...


# 95a27b0e 17-Feb-2014 Bob Wilson <bob.wilson@apple.com>

Fix some minor whitespace issues.

llvm-svn: 201526


# 9724752f 06-Feb-2014 Manman Ren <manman.ren@gmail.com>

Simplify code by combining ifs.

llvm-svn: 200893


# f9e58778 06-Feb-2014 Manman Ren <manman.ren@gmail.com>

Fix Werror introduced at r200874.

llvm-svn: 200891


# 67a28136 05-Feb-2014 Manman Ren <manman.ren@gmail.com>

PGO: instrumentation based profiling sets function attributes.

We collect a maximal function count among all functions in the pgo data file.
For functions that are hot, we set its InlineHint attribu

PGO: instrumentation based profiling sets function attributes.

We collect a maximal function count among all functions in the pgo data file.
For functions that are hot, we set its InlineHint attribute. For functions that
are cold, we set its Cold attribute.

We currently treat functions with >= 30% of the maximal function count as hot
and functions with <= 1% of the maximal function count are treated as cold.
These two numbers are from preliminary tuning on SPEC.

This commit should not affect non-PGO builds and should boost performance on
instrumentation based PGO.

llvm-svn: 200874

show more ...


# 314ef7ba 01-Feb-2014 Reid Kleckner <reid@kleckner.net>

[ms-cxxabi] Use inalloca on win32 when passing non-trivial C++ objects

When a non-trivial parameter is present, clang now gathers up all the
parameters that lack inreg and puts them into a packed st

[ms-cxxabi] Use inalloca on win32 when passing non-trivial C++ objects

When a non-trivial parameter is present, clang now gathers up all the
parameters that lack inreg and puts them into a packed struct. MSVC
always aligns each parameter to 4 bytes and no more, so this is a pretty
simple struct to lay out.

On win64, non-trivial records are passed indirectly. Prior to this
change, clang was incorrectly using byval on win64.

I'm able to self-host a working clang with this change and additional
LLVM patches.

Reviewers: rsmith

Differential Revision: http://llvm-reviews.chandlerc.com/D2636

llvm-svn: 200597

show more ...


# 314cc81b 25-Jan-2014 Alp Toker <alp@nuanti.com>

Rename getResultType() on function and method declarations to getReturnType()

A return type is the declared or deduced part of the function type specified in
the declaration.

A result type is the (

Rename getResultType() on function and method declarations to getReturnType()

A return type is the declared or deduced part of the function type specified in
the declaration.

A result type is the (potentially adjusted) type of the value of an expression
that calls the function.

Rule of thumb:

* Declarations have return types and parameters.
* Expressions have result types and arguments.

llvm-svn: 200082

show more ...


# be614c73 23-Jan-2014 Justin Bogner <mail@justinbogner.com>

CodeGen: Fix tracking of PGO counters for the logical or operator

This adds tests for both logical or and for logical and, which was
already correct.

llvm-svn: 199865


# dd9bfb2c 15-Jan-2014 Roman Divacky <rdivacky@freebsd.org>

Make -fno-inline attach NoInline attribute to all functions that are not
marked as AlwaysInline or ForceInline.

This moves us to what gcc does with -fno-inline. The attribute approach
was discussed

Make -fno-inline attach NoInline attribute to all functions that are not
marked as AlwaysInline or ForceInline.

This moves us to what gcc does with -fno-inline. The attribute approach
was discussed to be better than switching to InlineAlways inliner in presence
of LTO.

llvm-svn: 199324

show more ...


# 26891338 14-Jan-2014 Aaron Ballman <aaron@aaronballman.com>

Simplifying the OpenCL image attribute. It does not need a semantic integer parameter because the required information is encoded in the spelling. Added an appropriate subject to the attribute, and s

Simplifying the OpenCL image attribute. It does not need a semantic integer parameter because the required information is encoded in the spelling. Added an appropriate subject to the attribute, and simplified the semantic checking (which will likely be expanded upon in a future patch). Also, removed the GNU spelling since it was unsupported in the first place.

llvm-svn: 199229

show more ...


# 0718a3a4 13-Jan-2014 Justin Bogner <mail@justinbogner.com>

CodeGen: Rename adjustFallThroughCount -> adjustForControlFlow

adjustFallThroughCount isn't a good name, and the documentation was
even worse. This commit attempts to clarify what it's for and when

CodeGen: Rename adjustFallThroughCount -> adjustForControlFlow

adjustFallThroughCount isn't a good name, and the documentation was
even worse. This commit attempts to clarify what it's for and when to
use it.

llvm-svn: 199139

show more ...


# 3587b32e 09-Jan-2014 Pekka Jaaskelainen <pekka.jaaskelainen@tut.fi>

The OpenCL specification states that images are allocated
from the global address space (6.5.1 of the OpenCL 1.2 specification).
This makes clang construct the image arguments in the global address

The OpenCL specification states that images are allocated
from the global address space (6.5.1 of the OpenCL 1.2 specification).
This makes clang construct the image arguments in the global address
space and generate the argument metadata with the correct address space
descriptor.

Patch by Pedro Ferreira!

llvm-svn: 198868

show more ...


# e83b130d 07-Jan-2014 Adrian Prantl <aprantl@apple.com>

Revert "Debug info: Ensure that the last stop point in a function is still within"

This reverts commit r198461.

llvm-svn: 198714


# c6758879 07-Jan-2014 Adrian Prantl <aprantl@apple.com>

Revert "Debug info: Implement a cleaner version of r198461. For symmetry with"

This reverts commit 198699 so we can get a cleaner patch.

llvm-svn: 198713


# f5ff0dc2 07-Jan-2014 Adrian Prantl <aprantl@apple.com>

Debug info: Implement a cleaner version of r198461. For symmetry with
C and C++ don't emit an extra lexical scope for the compound statement
that is the body of an Objective-C method.

rdar://problem

Debug info: Implement a cleaner version of r198461. For symmetry with
C and C++ don't emit an extra lexical scope for the compound statement
that is the body of an Objective-C method.

rdar://problem/15010825

llvm-svn: 198699

show more ...


# ef512b99 06-Jan-2014 Justin Bogner <mail@justinbogner.com>

CodeGen: Initial instrumentation based PGO implementation

llvm-svn: 198640


# 96e70d91 03-Jan-2014 Adrian Prantl <aprantl@apple.com>

Debug info: Ensure that the last stop point in a function is still within
the lexical block formed by the compound statement that is the function
body.

rdar://problem/15010825

llvm-svn: 198461


1...<<21222324252627282930>>...41