| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Nested if statements can generate empty BBs whose terminator branches
unconditionally to its successor. These branches are not eliminated
to help generate better line number information in some cases, but there
is no reason to keep the empty blocks that result from nested ifs.
Reviewers: mehdi_amini, dblaikie, echristo
Subscribers: mehdi_amini, cfe-commits
Differential review: http://reviews.llvm.org/D11360
llvm-svn: 275115
|
|
|
|
|
|
|
| |
Imported variables cannot really be definitions for the purposes of
IR generation.
llvm-svn: 275040
|
|
|
|
|
|
|
|
| |
Reviewers: tstellardAMD
Differential Revision: http://reviews.llvm.org/D20299
llvm-svn: 275030
|
|
|
|
|
|
| |
We were just setting DisableUnitAtATime to its default value.
llvm-svn: 275005
|
|
|
|
|
|
|
|
| |
Don't create unnecessary truncations if the result will not be used.
Also prefer preforming math before the truncation, it makes it a little
easier to reason about.
llvm-svn: 274984
|
|
|
|
|
|
|
|
|
| |
Place the structure data into `cfstring`. This both isolates the structures to
permit coalescing in the future (by the linker) as well as ensures that it
doesnt get marked as read-only data. The structures themselves are not
read-only, only the string contents.
llvm-svn: 274956
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add OCL option -cl-no-signed-zeros to driver options.
Also added to opencl.cl testcases.
Patch by Aaron En Ye Shi.
Differential Revision: http://reviews.llvm.org/D22067
llvm-svn: 274923
|
|
|
|
|
|
| |
llvm::VectorType and calling getNumElements. This is equivalent and shorter.
llvm-svn: 274823
|
|
|
|
|
|
| |
builtin handling. NFC
llvm-svn: 274821
|
|
|
|
|
|
| |
handling. Just get the type from the operand of the builtin instead. NFC
llvm-svn: 274820
|
|
|
|
|
|
|
|
|
| |
ArrayRef is a little better than passing around a pointer/length
pair.
No functional change is intended.
llvm-svn: 274732
|
|
|
|
|
|
|
|
|
|
| |
Reverting because it causes a test failure on build bots (Modules/ModuleDebugInfo.cpp). Failure does not reproduce locally.
svn revision: rL274698
This reverts commit 3c5ed6599b086720aab5b8bd6941149d066806a6.
llvm-svn: 274706
|
|
|
|
|
|
|
|
|
|
| |
This should work now that the LLVM-side of the change has landed successfully.
Original Differential Revision: http://reviews.llvm.org/D21705
This reverts commit a30322e861c387e1088f47065d0438c6bb019879.
llvm-svn: 274698
|
|
|
|
|
|
|
|
| |
For the purpose of emitting debug info, entities with private linkage
should be treated the same as internal linkage. While this doesn't
change anything in practice, it makes the code a little less confusing.
llvm-svn: 274677
|
|
|
|
|
|
| |
This reverts commit 0af5ee9631c7c167dc40498b415876553e314c95.
llvm-svn: 274633
|
|
|
|
|
|
|
|
| |
This includes nested types in the member list, even if there are no members of that type. Note that structs and classes have themselves as an "implicit struct" as the first member, so we skip implicit ones.
Differential Revision: http://reviews.llvm.org/D21705
llvm-svn: 274628
|
|
|
|
|
|
| |
makes them the same as what is done when using the SSE builtins for these same encodings.
llvm-svn: 274608
|
|
|
|
|
|
|
|
| |
Summary: This patch is an implementation of sema and parsing for the OpenMP composite pragma 'distribute simd'.
Differential Revision: http://reviews.llvm.org/D22007
llvm-svn: 274604
|
|
|
|
| |
llvm-svn: 274603
|
|
|
|
|
|
| |
Found using clang's code coverage tool.
llvm-svn: 274599
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
s6.13.17.
- Added new Builtins: enqueue_kernel, get_kernel_work_group_size
and get_kernel_preferred_work_group_size_multiple.
These Builtins use custom check to diagnose parameters of the passed Blocks
i. e. variable number of 'local void*' type params, and check different
overloads specified in Table 6.31 of OpenCL v2.0.
- IR is generated as an internal library call for each OpenCL Builtin,
reusing ObjC Block implementation.
Review: http://reviews.llvm.org/D20249
llvm-svn: 274540
|
|
|
|
|
|
|
|
| |
Summary: This patch is an implementation of sema and parsing for the OpenMP composite pragma 'distribute parallel for simd'.
Differential Revision: http://reviews.llvm.org/D21977
llvm-svn: 274530
|
|
|
|
|
|
|
|
|
|
| |
Currently we only have OpenCL 2.0 Builtins i.e. pipes or address space conversions.
They have to be added only in the version 2.0 compilation mode to make the identifiers
available for use in the other versions.
Review: http://reviews.llvm.org/D20249
llvm-svn: 274509
|
|
|
|
|
|
| |
extension of the result of a v2i1 or v4i1 masked compare. This way we emit something that the backend easily interprets as a concatenation rather than a true shuffle. This delivers slightly better codegen with the current backend capabilities.
llvm-svn: 274484
|
|
|
|
| |
llvm-svn: 274433
|
|
|
|
|
|
|
|
| |
where possible.
No functionality change intended
llvm-svn: 274432
|
|
|
|
|
|
|
|
| |
member is redundantly redeclared outside the class definition in code built in
c++17 mode, ensure we emit a non-discardable definition of the data member for
c++11 and c++14 compilations to use.
llvm-svn: 274416
|
|
|
|
|
|
|
|
| |
The CodeView printer expects to be able to generate fully qualified
names from the debug info graph. This means that we need to include the
MSVC-style name in the debug info for anonymous types.
llvm-svn: 274401
|
|
|
|
|
|
|
|
|
| |
With all MaterializeTemporaryExprs coming with a ExprWithCleanups, it's
easy to add correct lifetime.end marks into the right RunCleanupsScope.
Differential Revision: http://reviews.llvm.org/D20499
llvm-svn: 274385
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is important for building libclc. Since r273039 tests are failing
due to now emitting calls to these functions instead of emitting the
DAG node. The libm function names are implemented for OpenCL, and should
call the locally defined versions, so -fno-builtin is used. The IR
Some functions use the __builtins and expect the intrinsics to be
emitted. Without this we end up with nobuiltin calls to intrinsics
or to unsupported library calls.
llvm-svn: 274370
|
|
|
|
| |
llvm-svn: 274326
|
|
|
|
| |
llvm-svn: 274278
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
external linkage.
Summary:
This lets LLVM perform IPO over these functions. In particular, it
allows LLVM to emit ld.global.nc for loads to __restrict pointers in
kernels that are never written to.
Reviewers: rsmith
Subscribers: cfe-commits, tra
Differential Revision: http://reviews.llvm.org/D21337
llvm-svn: 274261
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When -gmlt is on, we don't emit namespace or class scope information,
and the CodeView emission code in LLVM can't compute the fully qualified
name. If we know LLVM won't be able to get the name right, go ahead and
emit the qualified name in the frontend.
We could change our -gmlt emission strategy to include those scopes when
emitting codeview, but that would increase memory usage and slow down
LTO and add more complexity to debug info emission.
The same problem exists when you debug a -gmlt binary with GDB, so we
should consider removing '&& EmitCodeView' from the condition here at
some point in the future after evaluating the impact on object file
size.
llvm-svn: 274246
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Summary:
Change Clang calling convention SpirKernel to OpenCLKernel.
Set calling convention OpenCLKernel for amdgcn as well.
Add virtual method .getOpenCLKernelCallingConv() to TargetCodeGenInfo
and use it to set target calling convention for AMDGPU and SPIR.
Update tests.
Reviewers: rsmith, tstellarAMD, Anastasia, yaxunl
Subscribers: kzhuravl, cfe-commits
Differential Revision: http://reviews.llvm.org/D21367
llvm-svn: 274220
|
|
|
|
|
|
|
|
|
|
|
| |
Emit the underlying storage offset in addition to the starting bit
position of the field.
This fixes PR28162.
Differential Revision: http://reviews.llvm.org/D21783
llvm-svn: 274201
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instantiations"
Reverts r273305 and re-instates r273296.
We needed to fix a bug in Sema::MarkVTableUsed to ensure that operator
delete lookup occurs when the vtable is referenced. We already had a
special case to look up operator delete when dllimport was used, but I
think should really mark virtual destructors referenced any time the
vtable is used.
llvm-svn: 274147
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D21746
llvm-svn: 274110
|
|
|
|
|
|
|
|
|
| |
This reverts commit 161ff9db3a3d0d62880d1cb18d58182cd3034912 (r273056).
This is breaking stage2 instrumented builds with "malformed coverage
data" errors.
llvm-svn: 274104
|
|
|
|
|
|
|
|
|
|
| |
For the new hotness attribute, the API will take the pass rather than
the pass name so we can no longer play the trick of AlwaysPrint being a
special pass name. This adds a getter to help the transition.
There is also a corresponding llvm patch.
llvm-svn: 274101
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace inheriting constructors implementation with new approach, voted into
C++ last year as a DR against C++11.
Instead of synthesizing a set of derived class constructors for each inherited
base class constructor, we make the constructors of the base class visible to
constructor lookup in the derived class, using the normal rules for
using-declarations.
For constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived
class that tracks the requisite additional information. We create shadow
constructors (not found by name lookup) in the derived class to model the
actual initialization, and have a new expression node,
CXXInheritedCtorInitExpr, to model the initialization of a base class from such
a constructor. (This initialization is special because it performs real perfect
forwarding of arguments.)
In cases where argument forwarding is not possible (for inalloca calls,
variadic calls, and calls with callee parameter cleanup), the shadow inheriting
constructor is not emitted and instead we directly emit the initialization code
into the caller of the inherited constructor.
Note that this new model is not perfectly compatible with the old model in some
corner cases. In particular:
* if B inherits a private constructor from A, and C uses that constructor to
construct a B, then we previously required that A befriends B and B
befriends C, but the new rules require A to befriend C directly, and
* if a derived class has its own constructors (and so its implicit default
constructor is suppressed), it may still inherit a default constructor from
a base class
llvm-svn: 274049
|
|
|
|
| |
llvm-svn: 273965
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for'
This patch is an initial implementation for #distribute parallel for.
The main differences that affect other pragmas are:
The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds.
As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value.
As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound.
llvm-svn: 273884
|
|
|
|
|
|
|
|
| |
-fwhole-program-vtables are enabled.
Differential Revision: http://reviews.llvm.org/D21122
llvm-svn: 273757
|
|
|
|
|
|
|
| |
variable weak discardable linkage and partially-ordered initialization, and is
implied for constexpr static data members.)
llvm-svn: 273754
|
|
|
|
|
|
| |
Patch by Lei Zhang!
llvm-svn: 273735
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D21054
llvm-svn: 273730
|
|
|
|
|
|
| |
[OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for'
llvm-svn: 273709
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'distribute parallel for'
http://reviews.llvm.org/D21564
This patch is an initial implementation for #distribute parallel for.
The main differences that affect other pragmas are:
The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds.
As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value.
As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound.
llvm-svn: 273705
|
|
|
|
|
|
|
|
| |
smaller than register as argument in variadic functions on
big endian architectures.
Differential Revision: http://reviews.llvm.org/D21611
llvm-svn: 273665
|