| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
device codegen.
It was causing two regression, so I'm reverting until the cause is found.
llvm-svn: 256858
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows
Summary: This change enables clang to automatically link binaries built with the -fprofile-instr-generate against the clang_rt.profile-i386.lib library.
Reviewers: davidxl, dnovillo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15833
llvm-svn: 256855
|
| |
|
|
|
|
| |
This fixes a regression introduced by rL256842.
llvm-svn: 256854
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
aaaa
.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
.aaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
After:
aaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
.aaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
llvm-svn: 256841
|
| |
|
|
|
|
|
|
|
|
|
|
| |
An undecorated function designator implies taking the address of a function,
which is illegal in OpenCL. Implementing a check for this earlier to allow
the error to be reported even in the presence of other more obvious errors.
Patch by Neil Hickey!
http://reviews.llvm.org/D15691
llvm-svn: 256838
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang-format breaks multi-line streams after std::endl.
It now also break for '\n', the suggested replacement for std::endl:
http://llvm.org/docs/CodingStandards.html#avoid-std-endl
Before:
llvm::errs() << aaaaaaaaaaaaaaaaaaaaaa << '\n' << bbbbbbbbbbbbbbbbbbbbbb
<< '\n';
llvm::errs() << aaaa << "aaaaaaaaaaaaaaaaaa\n" << bbbb
<< "bbbbbbbbbbbbbbbbbb\n";
After:
llvm::errs() << aaaaaaaaaaaaaaaaaaaaaa << '\n'
<< bbbbbbbbbbbbbbbbbbbbbb << '\n';
llvm::errs() << aaaa << "aaaaaaaaaaaaaaaaaa\n"
<< bbbb << "bbbbbbbbbbbbbbbbbb\n";
This changeset ensure that multiline streams have a line break after:
- std::endl
- '\n'
- "\n"
- "Some Text\n"
Patch by Jean-Philippe Dufraigne, thank you.
llvm-svn: 256832
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
aaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaa)
.aaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
After:
aaaaaaaaaaaaaaaa
.aaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaa)
.aaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
llvm-svn: 256831
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r256750 has been leading to an undesired behavior:
aaaaaaaaaa
.aaaaaaaaaaaaaaaaaaaaaaaa.aaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
This change increases penalty for wrapping before member accesses that aren't
calls. Thus, this is again formatted as (as it has been before r256750):
aaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaa.aaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
llvm-svn: 256830
|
| |
|
|
|
|
|
|
| |
Adds core tuning support for new Samsung Exynos-M1 core (ARMv8-A).
Differential Revision: http://reviews.llvm.org/D15664
llvm-svn: 256829
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D15223
llvm-svn: 256822
|
| |
|
|
|
|
| |
prototype scope in a function definition.
llvm-svn: 256803
|
| |
|
|
|
|
| |
No functionality change is intended
llvm-svn: 256797
|
| |
|
|
|
|
|
|
|
| |
Build up a dependent expression for MS-style inline assembly if the
identifier's type is dependent.
This fixes PR26001.
llvm-svn: 256795
|
| |
|
|
|
|
|
|
|
|
|
| |
NFC. These hints are only used for inlining and the inliner now uses
the same criteria to identify hot and cold callees and set appropriate
thresholds without relying on these hints. Hence this removed code is
superfluous.
Differential Revision: http://reviews.llvm.org/D15726
llvm-svn: 256793
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D15704
llvm-svn: 256762
|
| |
|
|
| |
llvm-svn: 256759
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
export default[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb];
export default[];
After:
export default [
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
];
export default [];
llvm-svn: 256758
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the [] in the following example were recognized as an array
subscript leading to weird indentation.
Before:
var aaaa = aaaaa || // wrap
[];
After:
var aaaa = aaaaa || // wrap
[];
llvm-svn: 256753
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
return aaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaa)
.aaaa(aaaaaaaaaaaaaa);
After:
return aaaaaaaaaaaaaaaa
.aaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa)
.aaaa(aaaaaaaaaaaaaa);
llvm-svn: 256750
|
| |
|
|
|
|
|
| |
endings, since the file is supposed to have them, according to its
comments. Also set its svn:eol-style property. Noticed by Nico Weber.
llvm-svn: 256742
|
| |
|
|
|
|
| |
function calls.
llvm-svn: 256740
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Before:
std::function<std::string(const std::string &)> my_lambda = [](
const string &s) { return s; };
After:
std::function<std::string(const std::string &)> my_lambda =
[](const string &s) { return s; };
llvm-svn: 256739
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
- (void)shortf:(GTMFoo *)theFoo
longKeyword:(NSRect)theRect
longerKeyword:(float)theInterval
error:(NSError **)theError {
}
After:
- (void)shortf:(GTMFoo *)theFoo
longKeyword:(NSRect)theRect
longerKeyword:(float)theInterval
error:(NSError **)theError {
}
llvm-svn: 256738
|
| |
|
|
| |
llvm-svn: 256737
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
optional AAA aaa = 1 [foo =
{
key: "a" //
},
bar = {
key: "a" //
}];
After:
optional AAA aaa = 1 [
foo = {
key: "a" //
},
bar = {
key: "a" //
}
];
llvm-svn: 256736
|
| |
|
|
|
|
| |
in the support library will be deleted.
llvm-svn: 256731
|
| |
|
|
| |
llvm-svn: 256718
|
| |
|
|
| |
llvm-svn: 256717
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is one last remaining instrumentatation related structure
that needs to be migrate to use the centralized template
definition. With this change, instrumentation code
related to coverage module header will be kept in sync
with the coverage mapping reader. The remaining code
which makes implicit assumption about covmap control
structure layout in the the lowering pass will cleaned
up in a different patch. This patch is not intended to
have no functional change.
llvm-svn: 256714
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
There are a number of files in the tree which have been accidentally checked in with DOS line endings. Convert these to native line endings.
There are also a few files which have DOS line endings on purpose, and I have set the svn:eol-style property to 'CRLF' on those.
Reviewers: joerg, aaron.ballman
Subscribers: aaron.ballman, cfe-commits
Differential Revision: http://reviews.llvm.org/D15849
llvm-svn: 256704
|
| |
|
|
|
|
|
| |
Lean on LLVM to provide this functionality now that it provides the
necessary intrinsics.
llvm-svn: 256686
|
| |
|
|
|
|
|
| |
"friend class OMPVarListClause" -> "friend OMPVarListClause". It's a
template, not a class.
llvm-svn: 256684
|
| |
|
|
| |
llvm-svn: 256683
|
| |
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D15837
llvm-svn: 256672
|
| |
|
|
|
|
|
|
| |
modifiers.
OpenMP 4.5 adds support for monotonic/nonmonotonic modifiers in 'schedule' clause. Add codegen for these modifiers.
llvm-svn: 256666
|
| |
|
|
|
|
| |
(Detected by asan)
llvm-svn: 256665
|
| |
|
|
|
|
| |
It's dead code, no functional change is intended.
llvm-svn: 256664
|
| |
|
|
|
|
| |
Just a cleanup, no functional change is intended.
llvm-svn: 256663
|
| |
|
|
|
|
|
| |
As per C++ [dcl.ref]p1, cv-qualified references are not valid. As such,
change the mangler to assert that this event does not happen.
llvm-svn: 256662
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The MS ABI emits a special default constructor closure thunk if a
default constructor has a weird calling convention or default arguments.
The MS ABI has a quirk: there can be only one such thunk because the
mangling scheme does not have room for distinct manglings. We must
raise a diagnostic in this eventuality.
N.B. MSVC sorta gets this right. Multiple default constructors result
in the default constructor closure getting emitted but they seem to
get confused by which default constructors are reasonable to reference
from the closure. We try to be a little more careful which results in
mild differences in behavior.
llvm-svn: 256661
|
| |
|
|
| |
llvm-svn: 256659
|
| |
|
|
| |
llvm-svn: 256658
|
| |
|
|
|
|
|
|
| |
by overload resolution because deduction succeeds, but the substituted
parameter type for some parameter (with deduced type) doesn't exactly match the
corresponding adjusted argument type.
llvm-svn: 256657
|
| |
|
|
|
|
| |
dependent, the type is a non-deduced context.
llvm-svn: 256651
|
| |
|
|
| |
llvm-svn: 256644
|
| |
|
|
|
|
|
|
| |
must be *exactly* zero in order for the conversion to result in 0. This does not involve a conversion through an integer value, and so truncation of the value is not performed.
This patch address PR25876.
llvm-svn: 256643
|
| |
|
|
|
|
|
|
|
|
| |
It's sort of an hack, but we have no choice.
The linker in the base system doesn't handle that correctly (yet).
Once FreeBSD will import lld, this can be backed out.
Patch by: Andrew Turner!
llvm-svn: 256641
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
breaking between array subscripts.
Before:
if (aaaaaaaaaaaaaaaaaaaaaaaa && aaaaaaaaaaaaaaaaaaa[aaaaaaaaaaaaa]
[aaaaaaaaaaaaa])
After:
if (aaaaaaaaaaaaaaaaaaaaaaaa &&
aaaaaaaaaaaaaaaaaaa[aaaaaaaaaaaaa][aaaaaaaaaaaaa])
llvm-svn: 256640
|
| |
|
|
|
|
| |
OpenMP 4.5 allows to use 'ordered' clause without parameter on 'loop simd' constructs.
llvm-svn: 256639
|