History log of /llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp (Results 551 – 575 of 1023)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 8e6c36eb 14-Oct-2014 David Blaikie <dblaikie@gmail.com>

DebugInfo: Don't leak location information from one function into the prologue of the next function.

CodeGenFunction objects aren't really designed to be reused for more
than one function, and doing

DebugInfo: Don't leak location information from one function into the prologue of the next function.

CodeGenFunction objects aren't really designed to be reused for more
than one function, and doing so can leak debug info location information
from one function into the prologue of the next.

Add an assertion in to catch reuses of CodeGenFunction, which
surprisingly only caught the ObjC atomic getter/setter cases. Fix those
and add a test to demonstrate the issue.

The test is a bit slim, because we're just testing for the absence of a
debug location on the prologue instructions, which by itself probably
wouldn't be the end of the world - but the particular debug location
that was ending up there was for the previous function's last
instruction. This produced debug info for another function within this
function, which is something I'm trying to remove all cases of as its a
substantial source of bugs, especially around inlining (see r219215).

llvm-svn: 219690

show more ...


# 5d1159eb 10-Oct-2014 Nick Lewycky <nicholas@mxc.ca>

Revert r218865 because it introduced PR21236, a crash in codegen emitting the try block.

llvm-svn: 219470


# 42d314d1 02-Oct-2014 Arnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>

Emit lifetime.start / lifetime.end markers for unnamed temporary objects.

This will give more information to the optimizers so that they can reuse stack slots
and reduce stack usage.

llvm-svn: 2188

Emit lifetime.start / lifetime.end markers for unnamed temporary objects.

This will give more information to the optimizers so that they can reuse stack slots
and reduce stack usage.

llvm-svn: 218865

show more ...


# 99281065 18-Sep-2014 David Majnemer <david.majnemer@gmail.com>

MS ABI: Don't ICE for pointers to pointers to members of incomplete classes

CodeGen would try to come up with an LLVM IR type for a pointer to
member type on the way to forming an LLVM IR type for a

MS ABI: Don't ICE for pointers to pointers to members of incomplete classes

CodeGen would try to come up with an LLVM IR type for a pointer to
member type on the way to forming an LLVM IR type for a pointer to
pointer to member type.

However, if the pointer to member representation has not been locked in yet,
we would not be able to come up with a pointer to member IR type.

In these cases, make the pointer to member type an incomplete type.
This will make the pointer to pointer to member type a pointer to an
incomplete type. If the class eventually obtains an inheritance model,
we will make the pointer to member type represent the actual inheritance
model.

Differential Revision: http://reviews.llvm.org/D5373

llvm-svn: 218084

show more ...


# 9b3e3dfc 04-Sep-2014 Reid Kleckner <reid@kleckner.net>

MS inline asm: Allow __asm blocks to set a return value

If control falls off the end of a function after an __asm block, MSVC
assumes that the inline assembly filled the EAX and possibly EDX
registe

MS inline asm: Allow __asm blocks to set a return value

If control falls off the end of a function after an __asm block, MSVC
assumes that the inline assembly filled the EAX and possibly EDX
registers with an appropriate return value. This functionality is used
in inline functions returning 64-bit integers in system headers, so we
need some amount of compatibility.

This is implemented in Clang by adding extra output constraints to every
inline asm block, and storing the resulting output registers into the
return value slot. If we see an asm block somewhere in the function
body, we emit a normal epilogue instead of marking the end of the
function with a return type unreachable.

Normal returns in functions not using this functionality will overwrite
the return value slot, and in most cases LLVM should be able to
eliminate the dead stores.

Fixes PR17201.

Reviewed By: majnemer

Differential Revision: http://reviews.llvm.org/D5177

llvm-svn: 217187

show more ...


Revision tags: llvmorg-3.5.0
# 39c81e28 28-Aug-2014 Alexey Bataev <a.bataev@hotmail.com>

[C++11] Support for capturing of variable length arrays in lambda expression.
Differential Revision: http://reviews.llvm.org/D4368

llvm-svn: 216649


Revision tags: llvmorg-3.5.0-rc4
# 5fc8fc2d 27-Aug-2014 Craig Topper <craig.topper@gmail.com>

Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created.

llvm-svn: 216528


# 4ee69042 26-Aug-2014 Kostya Serebryany <kcc@google.com>

[clang/asan] call __asan_poison_cxx_array_cookie after operator new[]

Summary:
PR19838
When operator new[] is called and an array cookie is created
we want asan to detect buffer overflow bugs that t

[clang/asan] call __asan_poison_cxx_array_cookie after operator new[]

Summary:
PR19838
When operator new[] is called and an array cookie is created
we want asan to detect buffer overflow bugs that touch the cookie.
For that we need to
a) poison the shadow for the array cookie (call __asan_poison_cxx_array_cookie).
b) ignore the legal accesses to the cookie generated by clang (add 'nosanitize' metadata)

Reviewers: timurrrr, samsonov, rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4774

llvm-svn: 216434

show more ...


Revision tags: llvmorg-3.5.0-rc3
# 3551e311 13-Aug-2014 Alexey Samsonov <vonosmas@gmail.com>

Simplify a few loops over CallArgList/FunctionArgList. NFC

llvm-svn: 215571


Revision tags: llvmorg-3.5.0-rc2
# ee02499a 04-Aug-2014 Alex Lorenz <arphaman@gmail.com>

Add coverage mapping generation.

This patch adds the '-fcoverage-mapping' option which
allows clang to generate the coverage mapping information
that can be used to provide code coverage analysis us

Add coverage mapping generation.

This patch adds the '-fcoverage-mapping' option which
allows clang to generate the coverage mapping information
that can be used to provide code coverage analysis using
the execution counts obtained from the instrumentation
based profiling (-fprofile-instr-generate).

llvm-svn: 214752

show more ...


# dadc371e 30-Jul-2014 Fraser Cormack <fraser@codeplay.com>

Add OpenCL/SPIR kernel_arg_base_type metadata node

As defined in the SPIR 1.2 specification, this node behaves similarly to
kernel_arg_type but will print the underlying type name, e.g., without
typ

Add OpenCL/SPIR kernel_arg_base_type metadata node

As defined in the SPIR 1.2 specification, this node behaves similarly to
kernel_arg_type but will print the underlying type name, e.g., without
typedefs.

Example:
typedef unsigned int myunsignedint;
would report:
'myunsignedint' in the kernel_arg_type node
'uint' in the kernel_arg_base_type node

llvm-svn: 214308

show more ...


# 152493b6 30-Jul-2014 Fraser Cormack <fraser@codeplay.com>

Fix OpenCL/SPIR kernel_arg_type metadata node

This fixes a bug where kernel_arg_type was always changing 'unsigned ' to 'u'
for any parameter type, including non-canonical types.

Example:
typedef

Fix OpenCL/SPIR kernel_arg_type metadata node

This fixes a bug where kernel_arg_type was always changing 'unsigned ' to 'u'
for any parameter type, including non-canonical types.

Example:
typedef unsigned int myunsignedint;
would report:
"myunt"

llvm-svn: 214305

show more ...


# 19819446 25-Jul-2014 Reid Kleckner <reid@kleckner.net>

MS ABI: Don't push destructor cleanups for aggregate parameters in thunks

The target method of the thunk will perform the cleanup. This can't be
tested in 32-bit x86 yet because passing something b

MS ABI: Don't push destructor cleanups for aggregate parameters in thunks

The target method of the thunk will perform the cleanup. This can't be
tested in 32-bit x86 yet because passing something by value would create
an inalloca, and we refuse to generate broken code for that.

llvm-svn: 213976

show more ...


Revision tags: llvmorg-3.5.0-rc1
# 24cad993 17-Jul-2014 Alexey Samsonov <vonosmas@gmail.com>

[UBSan] Add !nosanitize metadata to the code generated by UBSan.

This is used to mark the instructions emitted by Clang to implement
variety of UBSan checks. Generally, we don't want to instrument t

[UBSan] Add !nosanitize metadata to the code generated by UBSan.

This is used to mark the instructions emitted by Clang to implement
variety of UBSan checks. Generally, we don't want to instrument these
instructions with another sanitizers (like ASan).

Reviewed in http://reviews.llvm.org/D4544

llvm-svn: 213291

show more ...


# cb1ad6f5 08-Jul-2014 Alexey Samsonov <vonosmas@gmail.com>

Remove unnecessary check for NULL

llvm-svn: 212564


# ac4afe49 07-Jul-2014 Alexey Samsonov <vonosmas@gmail.com>

[Sanitizer] Remove brittle cache variable and slightly simplify blacklisting code.
Now CodeGenFunction is responsible for looking at sanitizer blacklist
(in CodeGenFunction::StartFunction) and turnin

[Sanitizer] Remove brittle cache variable and slightly simplify blacklisting code.
Now CodeGenFunction is responsible for looking at sanitizer blacklist
(in CodeGenFunction::StartFunction) and turning off instrumentation,
if necessary.

No functionality change.

llvm-svn: 212501

show more ...


# 515ad8c4 22-May-2014 Alexander Musman <alexander.musman@gmail.com>

This patch adds a helper class (CGLoopInfo) for marking memory instructions with llvm.mem.parallel_loop_access metadata.
It also adds a simple initial version of codegen for pragma omp simd (it will

This patch adds a helper class (CGLoopInfo) for marking memory instructions with llvm.mem.parallel_loop_access metadata.
It also adds a simple initial version of codegen for pragma omp simd (it will change in the future to support all the clauses).

Differential revision: http://reviews.llvm.org/D3644

llvm-svn: 209411

show more ...


# 8a13c418 21-May-2014 Craig Topper <craig.topper@gmail.com>

[C++11] Use 'nullptr'. CodeGen edition.

llvm-svn: 209272


Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1
# 37abaca3 09-May-2014 Reid Kleckner <reid@kleckner.net>

MS ABI: Pass 'sret' as the second parameter of instance methods

Summary:
MSVC always passes 'sret' after 'this', unlike GCC. This required
changing a number of places in Clang that assumed the sret

MS ABI: Pass 'sret' as the second parameter of instance methods

Summary:
MSVC always passes 'sret' after 'this', unlike GCC. This required
changing a number of places in Clang that assumed the sret parameter was
always first in LLVM IR.

This fixes win64 MSVC ABI compatibility for methods returning structs.

Reviewers: rsmith, majnemer

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D3618

llvm-svn: 208458

show more ...


# 9959db5f 06-May-2014 Alexey Bataev <a.bataev@hotmail.com>

[OPENMP] Initial codegen for '#pragma omp parallel'

llvm-svn: 208077


# 2cede0f9 29-Apr-2014 Adrian Prantl <aprantl@apple.com>

Debug info: Improve line table for functions with cleanups an early exit
and no return expr at the end of the function.
The "function has only simple returns" check in FinishFunction tests
whether th

Debug info: Improve line table for functions with cleanups an early exit
and no return expr at the end of the function.
The "function has only simple returns" check in FinishFunction tests
whether the number of simple return exprs equals the number of return
exprs, but so far a fallthrough at the end of a function was not counted
as a return, which would result in cleanup code being associated with the
wrong source line.

rdar://problem/16733984.

llvm-svn: 207480

show more ...


Revision tags: llvmorg-3.4.1, llvmorg-3.4.1-rc2, llvmorg-3.4.1-rc1
# 42d71b99 10-Apr-2014 Adrian Prantl <aprantl@apple.com>

Debug info: (Bugfix) Make sure artificial functions like _GLOBAL__I_a
are not associated with any source lines.

Previously, if the Location of a Decl was empty, EmitFunctionStart would
just keep usi

Debug info: (Bugfix) Make sure artificial functions like _GLOBAL__I_a
are not associated with any source lines.

Previously, if the Location of a Decl was empty, EmitFunctionStart would
just keep using CurLoc, which would sometimes be correct (e.g., thunks)
but in other cases would just point to a hilariously random location.

This patch fixes this by completely eliminating all uses of CurLoc from
EmitFunctionStart and rather have clients explicitly pass in a
SourceLocation for the function header and the function body.

rdar://problem/14985269

llvm-svn: 205999

show more ...


# 92a47442 04-Apr-2014 Joey Gouly <joey.gouly@gmail.com>

When printing types for the OpenCL kernel metadata, use the PrintingPolicy.

This allows 'half' to be printed as 'half' and not as '__fp16'.

Patch by Fraser Cormack!

llvm-svn: 205624


# cb3f812b 20-Mar-2014 Alexey Samsonov <samsonov@google.com>

Kill -faddress-sanitizer, -fthread-sanitizer and -fcatch-undefined-behavior flags.

These flags are deprecated since at least Clang 3.3. Users should instead
use -fsanitize= with appropriate values.

Kill -faddress-sanitizer, -fthread-sanitizer and -fcatch-undefined-behavior flags.

These flags are deprecated since at least Clang 3.3. Users should instead
use -fsanitize= with appropriate values.

llvm-svn: 204330

show more ...


# 2fe531cb 17-Mar-2014 Duncan P. N. Exon Smith <dexonsmith@apple.com>

PGO: Statically generate data structures

In instrumentation-based profiling, we need a set of data structures to
represent the counters. Previously, these were built up during static
initialization

PGO: Statically generate data structures

In instrumentation-based profiling, we need a set of data structures to
represent the counters. Previously, these were built up during static
initialization. Now, they're shoved into a specially-named section so
that they show up as an array.

As a consequence of the reorganizing symbols, instrumentation data
structures for linkonce functions are now correctly coalesced.

This is the first step in a larger project to minimize runtime overhead
and dependencies in instrumentation-based profilng. The larger picture
includes removing all initialization overhead and making the dependency
on libc optional.

<rdar://problem/15943240>

llvm-svn: 204080

show more ...


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