History log of /llvm-project-15.0.7/clang/lib/CodeGen/CodeGenModule.cpp (Results 726 – 750 of 1864)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 3fd61df1 25-Jan-2016 Evgeniy Stepanov <[email protected]>

[cfi] Cross-DSO CFI diagnostic mode (clang part)

* Runtime diagnostic data for cfi-icall changed to match the rest of
cfi checks
* Layout of all CFI diagnostic data changed to put Kind at the
be

[cfi] Cross-DSO CFI diagnostic mode (clang part)

* Runtime diagnostic data for cfi-icall changed to match the rest of
cfi checks
* Layout of all CFI diagnostic data changed to put Kind at the
beginning. There is no ABI stability promise yet.
* Call cfi_slowpath_diag instead of cfi_slowpath when needed.
* Emit __cfi_check_fail function, which dispatches a CFI check
faliure according to trap/recover settings of the current module.
* A tiny driver change to match the way the new handlers are done in
compiler-rt.

llvm-svn: 258745

show more ...


# cd2f6bbd 25-Jan-2016 Justin Lebar <[email protected]>

[CUDA] Don't generate aliases for static extern "C" functions.

Summary:
These aliases are done to support inline asm, but there's nothing we can
do: NVPTX doesn't support aliases.

Reviewers: tra

S

[CUDA] Don't generate aliases for static extern "C" functions.

Summary:
These aliases are done to support inline asm, but there's nothing we can
do: NVPTX doesn't support aliases.

Reviewers: tra

Subscribers: cfe-commits, jhen, echristo

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

llvm-svn: 258734

show more ...


Revision tags: llvmorg-3.8.0-rc1
# dc134531 16-Jan-2016 Peter Collingbourne <[email protected]>

Introduce -fsanitize-stats flag.

This is part of a new statistics gathering feature for the sanitizers.
See clang/docs/SanitizerStats.rst for further info and docs.

Differential Revision: http://re

Introduce -fsanitize-stats flag.

This is part of a new statistics gathering feature for the sanitizers.
See clang/docs/SanitizerStats.rst for further info and docs.

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

llvm-svn: 257971

show more ...


# 7aa88ce7 14-Jan-2016 Andrey Bokhanko <[email protected]>

PR25910: clang allows two var definitions with the same mangled name

Proper diagnostic and resolution of mangled names' conflicts in variables.
When there is a declaration and a definition using the

PR25910: clang allows two var definitions with the same mangled name

Proper diagnostic and resolution of mangled names' conflicts in variables.
When there is a declaration and a definition using the same name but different
types, we emit what is in the definition. When there are two conflicting
definitions, we issue an error.

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

llvm-svn: 257754

show more ...


# d2385c08 08-Jan-2016 David Majnemer <[email protected]>

[MS ABI] Complete and base constructor GlobalDecls must have the same name

Clang got itself into the situation where we mangled the same
constructor twice with two different constructor types. Afte

[MS ABI] Complete and base constructor GlobalDecls must have the same name

Clang got itself into the situation where we mangled the same
constructor twice with two different constructor types. After one of
the constructors were utilized, the tag used for one of the types
changed from class to struct because a class template became complete.
This resulted in one of the constructor types varying from the other
constructor.

Instead, force "base" constructor types to "complete" if the ABI doesn't
have constructor variants. This will ensure that GlobalDecls for both
variants will get the same mangled name.

This fixes PR26029.

llvm-svn: 257205

show more ...


# 7dbc9cf8 06-Jan-2016 Chad Rosier <[email protected]>

[Driver] Add support for -fno-builtin-foo options.

Addresses PR4941 and rdar://6756912.
http://reviews.llvm.org/D15195

llvm-svn: 256937


# ee8fb302 06-Jan-2016 Samuel Antao <[email protected]>

[OpenMP] Reapply rL256842: [OpenMP] Offloading descriptor registration and device codegen.

This patch attempts to fix the regressions identified when the patch was committed initially.

Thanks to M

[OpenMP] Reapply rL256842: [OpenMP] Offloading descriptor registration and device codegen.

This patch attempts to fix the regressions identified when the patch was committed initially.

Thanks to Michael Liao for identifying the fix in the offloading metadata generation
related with side effects in evaluation of function arguments.


llvm-svn: 256933

show more ...


# 7d5de9a1 05-Jan-2016 Samuel Antao <[email protected]>

[OpenMP] Revert rL256842: [OpenMP] Offloading descriptor registration and device codegen.

It was causing two regression, so I'm reverting until the cause is found.

llvm-svn: 256858


# 4d5f0bbe 05-Jan-2016 Samuel Antao <[email protected]>

[OpenMP] Offloading descriptor registration and device codegen.

Summary:
In order to offloading work properly two things need to be in place:
- a descriptor with all the offloading information (devi

[OpenMP] Offloading descriptor registration and device codegen.

Summary:
In order to offloading work properly two things need to be in place:
- a descriptor with all the offloading information (device entry functions, and global variable) has to be created by the host and registered in the OpenMP offloading runtime library.
- all the device functions need to be emitted for the device and a convention has to be in place so that the runtime library can easily map the host ID of an entry point with the actual function in the device.

This patch adds support for these two things. However, only entry functions are being registered given that 'declare target' directive is not yet implemented.

About offloading descriptor:

The details of the descriptor are explained with more detail in http://goo.gl/L1rnKJ. Basically the descriptor will have fields that specify the number of devices, the pointers to where the device images begin and end (that will be defined by the linker), and also pointers to a the begin and end of table whose entries contain information about a specific entry point. Each entry has the type:
```
struct __tgt_offload_entry{
void *addr;
char *name;
int64_t size;
};
```
and will be implemented in a pre determined (ELF) section `.omp_offloading.entries` with 1-byte alignment, so that when all the objects are linked, the table is in that section with no padding in between entries (will be like a C array). The code generation ensures that all `__tgt_offload_entry` entries are emitted in the same order for both host and device so that the runtime can have the corresponding entries in both host and device in same index of the table, and efficiently implement the mapping.

The resulting descriptor is registered/unregistered with the runtime library using the calls `__tgt_register_lib` and `__tgt_unregister_lib`. The registration is implemented in a high priority global initializer so that the registration happens always before any initializer (that can potentially include target regions) is run.

The driver flag -omptargets= was created to specify a comma separated list of devices the user wants to support so that the new functionality can be exercised. Each device is specified with its triple.


About target codegen:

The target codegen is pretty much straightforward as it reuses completely the logic of the host version for the same target region. The tricky part is to identify the meaningful target regions in the device side. Unlike other programming models, like CUDA, there are no already outlined functions with attributes that mark what should be emitted or not. So, the information on what to emit is passed in the form of metadata in host bc file. This requires a new option to pass the host bc to the device frontend. Then everything is similar to what happens in CUDA: the global declarations emission is intercepted to check to see if it is an "interesting" declaration. The difference is that instead of checking an attribute, the metadata information in checked. Right now, there is only a form of metadata to pass information about the device entry points (target regions). A class `OffloadEntriesInfoManagerTy` was created to manage all the information and queries related with the metadata. The metadata looks like this:
```
!omp_offload.info = !{!0, !1, !2, !3, !4, !5, !6}

!0 = !{i32 0, i32 52, i32 77426347, !"_ZN2S12r1Ei", i32 479, i32 13, i32 4}
!1 = !{i32 0, i32 52, i32 77426347, !"_ZL7fstatici", i32 461, i32 11, i32 5}
!2 = !{i32 0, i32 52, i32 77426347, !"_Z9ftemplateIiET_i", i32 444, i32 11, i32 6}
!3 = !{i32 0, i32 52, i32 77426347, !"_Z3fooi", i32 99, i32 11, i32 0}
!4 = !{i32 0, i32 52, i32 77426347, !"_Z3fooi", i32 272, i32 11, i32 3}
!5 = !{i32 0, i32 52, i32 77426347, !"_Z3fooi", i32 127, i32 11, i32 1}
!6 = !{i32 0, i32 52, i32 77426347, !"_Z3fooi", i32 159, i32 11, i32 2}
```
The fields in each metadata entry are (in sequence):
Entry 1) an ID of the type of metadata - right now only zero is used meaning "OpenMP target region".
Entry 2) a unique ID of the device where the input source file that contain the target region lives.
Entry 3) a unique ID of the file where the input source file that contain the target region lives.
Entry 4) a mangled name of the function that encloses the target region.
Entries 5) and 6) line and column number where the target region was found.
Entry 7) is the order the entry was emitted.

Entry 2) and 3) are required to distinguish files that have the same function name.
Entry 4) is required to distinguish different instances of the same declaration (usually templated ones)
Entries 5) and 6) are required to distinguish the particular target region in body of the function (it is possible that a given target region is not an entry point - if clause can evaluate always to zero - and therefore we need to identify the "interesting" target regions. )

This patch replaces http://reviews.llvm.org/D12306.

Reviewers: ABataev, hfinkel, tra, rjmccall, sfantao

Subscribers: FBrygidyn, piotr.rak, Hahnfeld, cfe-commits

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

llvm-svn: 256842

show more ...


# 695890c9 17-Dec-2015 Easwaran Raman <[email protected]>

Attach maximum function count to Module when using PGO mode.

This sets the maximum entry count among all functions in the program to the module using module flags. This allows the optimizer to use t

Attach maximum function count to Module when using PGO mode.

This sets the maximum entry count among all functions in the program to the module using module flags. This allows the optimizer to use this information.

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

llvm-svn: 255918

show more ...


# fd6f92d5 15-Dec-2015 Evgeniy Stepanov <[email protected]>

Cross-DSO control flow integrity (Clang part).

Clang-side cross-DSO CFI.

* Adds a command line flag -f[no-]sanitize-cfi-cross-dso.
* Links a runtime library when enabled.
* Emits __cfi_slowpath cal

Cross-DSO control flow integrity (Clang part).

Clang-side cross-DSO CFI.

* Adds a command line flag -f[no-]sanitize-cfi-cross-dso.
* Links a runtime library when enabled.
* Emits __cfi_slowpath calls is bitset test fails.
* Emits extra hash-based bitsets for external CFI checks.
* Sets a module flag to enable __cfi_check generation during LTO.

This mode does not yet support diagnostics.

llvm-svn: 255694

show more ...


# 0b17d44f 15-Dec-2015 David Majnemer <[email protected]>

[WinEH] Update clang to use operand bundles on call sites

This updates clang to use bundle operands to associate an invoke with
the funclet which it is contained within.

Depends on D15517.

Differe

[WinEH] Update clang to use operand bundles on call sites

This updates clang to use bundle operands to associate an invoke with
the funclet which it is contained within.

Depends on D15517.

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

llvm-svn: 255675

show more ...


# dd4c71ca 12-Dec-2015 Easwaran Raman <[email protected]>

Revert r254647.

Reason: The testcase fails in many architectures.

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

llvm-svn: 255416


# d547e5e1 12-Dec-2015 Easwaran Raman <[email protected]>

Attach maximum function count to Module when using PGO mode

This sets the maximum entry count among all functions in the program to the
module using module flags. This allows the optimizer to use th

Attach maximum function count to Module when using PGO mode

This sets the maximum entry count among all functions in the program to the
module using module flags. This allows the optimizer to use this information.

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

llvm-svn: 255397

show more ...


# 953fe036 05-Dec-2015 Reid Kleckner <[email protected]>

Revert "[x86] Exclusion of incorrect include headers paths for MCU target"

This reverts commit r254195.

From the description, I suspect that the wrong patch was committed here,
and this is causing

Revert "[x86] Exclusion of incorrect include headers paths for MCU target"

This reverts commit r254195.

From the description, I suspect that the wrong patch was committed here,
and this is causing assertion failures in EmitDeferred() when the global
value ends up being a bitcast of a global.

llvm-svn: 254823

show more ...


# 3e3bb95b 02-Dec-2015 George Burgess IV <[email protected]>

Add the `pass_object_size` attribute to clang.

`pass_object_size` is our way of enabling `__builtin_object_size` to
produce high quality results without requiring inlining to happen
everywhere.

A l

Add the `pass_object_size` attribute to clang.

`pass_object_size` is our way of enabling `__builtin_object_size` to
produce high quality results without requiring inlining to happen
everywhere.

A link to the design doc for this attribute is available at the
Differential review link below.

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

llvm-svn: 254554

show more ...


# 5a99c49d 01-Dec-2015 Richard Smith <[email protected]>

Fix use-after-free when a C++ thread_local variable gets replaced (because its
type changes when the initializer is attached). Don't hold onto the
GlobalVariable*; recompute it from the VarDecl* inst

Fix use-after-free when a C++ thread_local variable gets replaced (because its
type changes when the initializer is attached). Don't hold onto the
GlobalVariable*; recompute it from the VarDecl* instead.

llvm-svn: 254359

show more ...


Revision tags: llvmorg-3.7.1
# 2a4db901 27-Nov-2015 Andrey Bokhanko <[email protected]>

[x86] Exclusion of incorrect include headers paths for MCU target

Exclusion of /usr/include and /usr/local/include headers paths for MCU target.

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

[x86] Exclusion of incorrect include headers paths for MCU target

Exclusion of /usr/include and /usr/local/include headers paths for MCU target.

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

llvm-svn: 254195

show more ...


Revision tags: llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1
# f93fff27 11-Nov-2015 Manman Ren <[email protected]>

[TLS on Darwin] treat all Darwin platforms in the same way.

rdar://problem/9001553

llvm-svn: 252820


# 2b90a64e 11-Nov-2015 Eric Christopher <[email protected]>

Extract out a function onto CodeGenModule for getting the map of
features for a particular function, then use it to clean up some
code.

llvm-svn: 252819


# 68150269 11-Nov-2015 Manman Ren <[email protected]>

[TLS on Darwin] change how we handle globals with linkonce or weak linkage.

This is about how we handle static member of a template. Before this commit,
we use internal linkage for the IR thread-loc

[TLS on Darwin] change how we handle globals with linkonce or weak linkage.

This is about how we handle static member of a template. Before this commit,
we use internal linkage for the IR thread-local variable, which is inefficient.
With this commit, we will start to follow Itanium C++ ABI.

rdar://problem/23415206

Reviewed by John McCall.

llvm-svn: 252814

show more ...


# 9f5260ab 06-Nov-2015 Duncan P. N. Exon Smith <[email protected]>

CodeGen: Remove implicit ilist iterator conversions, NFC

Make ilist iterator conversions explicit in clangCodeGen. Eventually
I'll remove them everywhere.

llvm-svn: 252358


# 0e2d4222 05-Nov-2015 Keno Fischer <[email protected]>

Fix crash in EmitDeclMetadata mode

Summary: This fixes a bug that's easily encountered in LLDB
(https://llvm.org/bugs/show_bug.cgi?id=22875). The problem here is that we
mangle a name during debug i

Fix crash in EmitDeclMetadata mode

Summary: This fixes a bug that's easily encountered in LLDB
(https://llvm.org/bugs/show_bug.cgi?id=22875). The problem here is that we
mangle a name during debug info emission, but never actually emit the actual
Decl, so we run into problems in EmitDeclMetadata (which assumes such a Decl
exists). Fix that by just skipping metadata emissions for mangled names that
don't have associated Decls.

Reviewers: rjmccall

Subscribers: labath, cfe-commits

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

llvm-svn: 252229

show more ...


# 756447a6 30-Oct-2015 Tim Northover <[email protected]>

Watch and TV OS: wire up basic ABI choices

This sets the mostly expected Darwin default ABI options for these two
platforms. Active changes from these defaults for watchOS are in a later patch.

llv

Watch and TV OS: wire up basic ABI choices

This sets the mostly expected Darwin default ABI options for these two
platforms. Active changes from these defaults for watchOS are in a later patch.

llvm-svn: 251708

show more ...


# b04ecb75 21-Oct-2015 John McCall <[email protected]>

Unify the ObjC entrypoint caches.

llvm-svn: 250918


1...<<21222324252627282930>>...75