| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Even though these symbols are in a comdat group, the Microsoft linker
really wants them to have internal linkage.
I'm planning to tweak the mangling in a follow-up change. This is a
straight revert with a 1-line fix.
llvm-svn: 234613
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The placement of the 'delete' call that was removed in the unique_ptr
migration in r234597 was not an accident. The raw_ostream has to be
destroyed before you do the rename on Windows, otherwise you get
ERROR_ACCESS_DENIED. We can still use unique_ptr, we just need to do a
manual reset().
Also, range-for-loop-ify this code.
llvm-svn: 234612
|
| |
|
|
| |
llvm-svn: 234600
|
| |
|
|
| |
llvm-svn: 234599
|
| |
|
|
| |
llvm-svn: 234598
|
| |
|
|
| |
llvm-svn: 234597
|
| |
|
|
| |
llvm-svn: 234592
|
| |
|
|
| |
llvm-svn: 234591
|
| |
|
|
| |
llvm-svn: 234590
|
| |
|
|
|
|
| |
No functional change intended.
llvm-svn: 234587
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Emit a code for reduction clause. Next code should be emitted for reductions:
static kmp_critical_name lock = { 0 };
void reduce_func(void *lhs[<n>], void *rhs[<n>]) {
...
*(Type<i> *)lhs[i] = RedOp<i>(*(Type<i> *)lhs[i], *(Type<i> *)rhs[i]);
...
}
... void *RedList[<n>] = {&<RHSExprs>[0], ..., &<RHSExprs>[<n> - 1]};
switch (__kmpc_reduce{_nowait}(<loc>, <gtid>, <n>, sizeof(RedList), RedList, reduce_func, &<lock>)) {
case 1:
...
<LHSExprs>[i] = RedOp<i>(*<LHSExprs>[i], *<RHSExprs>[i]);
...
__kmpc_end_reduce{_nowait}(<loc>, <gtid>, &<lock>);
break;
case 2:
...
Atomic(<LHSExprs>[i] = RedOp<i>(*<LHSExprs>[i], *<RHSExprs>[i]));
...
break;
default:
;
}
Reduction variables are a kind of a private variables, they have private copies, but initial values are chosen in accordance with the reduction operation.
Differential Revision: http://reviews.llvm.org/D8915
llvm-svn: 234583
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that TailRecursionElimination has been fixed with r222354, the
threshold on size for lifetime marker insertion can be removed. This
only affects named temporary though, as the patch for unnamed temporaries
is still in progress.
My previous commit (r222993) was not handling debuginfo correctly, but
this could only be seen with some asan tests. Basically, lifetime markers
are just instrumentation for the compiler's usage and should not affect
debug information; however, the cleanup infrastructure was assuming it
contained only destructors, i.e. actual code to be executed, and was
setting the breakpoint for the end of the function to the closing '}', and
not the return statement, in order to show some destructors have been
called when leaving the function. This is wrong when the cleanups are only
lifetime markers, and this is now fixed.
llvm-svn: 234581
|
| |
|
|
| |
llvm-svn: 234578
|
| |
|
|
| |
llvm-svn: 234577
|
| |
|
|
| |
llvm-svn: 234575
|
| |
|
|
| |
llvm-svn: 234574
|
| |
|
|
| |
llvm-svn: 234572
|
| |
|
|
| |
llvm-svn: 234568
|
| |
|
|
|
|
|
|
| |
Given something like 'int({}, 1)', we would try to emit a diagnostic
regarding the excess element in the scalar initializer. However, we
assumed that the initializer list had an element in it.
llvm-svn: 234565
|
| |
|
|
|
|
|
| |
Refactored API of OpenMPRuntime for compatibility with combined directives.
Differential Revision: http://reviews.llvm.org/D8859
llvm-svn: 234564
|
| |
|
|
| |
llvm-svn: 234563
|
| |
|
|
| |
llvm-svn: 234560
|
| |
|
|
| |
llvm-svn: 234555
|
| |
|
|
|
|
|
|
|
|
|
| |
ISA 2.06
This patch corresponds to review:
http://reviews.llvm.org/D8398
It adds some builtin functions to access the extended divide and bit permute instructions.
llvm-svn: 234547
|
| |
|
|
|
|
|
| |
of a CFType bridged to some unknown Objective-C type.
rdar://20113785
llvm-svn: 234545
|
| |
|
|
| |
llvm-svn: 234544
|
| |
|
|
|
|
|
| |
We were still using the MaterializeTemporaryExpr's type to check if the
transform is legal. Always use the inner Expr type.
llvm-svn: 234543
|
| |
|
|
| |
llvm-svn: 234538
|
| |
|
|
| |
llvm-svn: 234536
|
| |
|
|
|
|
|
|
| |
We don't actually need a real Mac sysroot to make the test pass, just a
linker. This makes the test pass in environments where no ld is on
PATH.
llvm-svn: 234533
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WinEHPrepare was going to have to pattern match the control flow merge
and split that the old lowering used, and that wasn't really feasible.
Now we can teach WinEHPrepare to pattern match this, which is much
simpler:
%fp = call i8* @llvm.frameaddress(i32 0)
call void @func(iN [01], i8* %fp)
This prototype happens to match the prototype used by the Win64 SEH
personality function, so this is really simple.
llvm-svn: 234532
|
| |
|
|
|
|
|
|
| |
A [*] is only allowed in a declaration for a function, not in its
definition. We didn't correctly recurse on reference types while
looking for it, causing us to crash in CodeGen instead of rejecting it.
llvm-svn: 234528
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous implementation would copy the attribute from the class to
functions that have the class as their return type when the functions
are first declared. This proved to have two flaws:
1) if the class is forward-declared without the attribute and a
function or method with the class as a its return type is declared,
and afterward the class is defined with warn_unused_result, the
function or method would never inherit the attribute, and
2) the check simply failed for functions and methods that are part of
a template instantiation, regardless of whether the class with
warn_unused_result is part of a specific instantiation or part of
the template itself (presumably because those function/method
declaration does not hit the same code path as a non-template one
and so never inherits the attribute).
The new approach is to instead modify the two places where a function or
method call is checked for the warn_unused_result attribute on the decl
by extending the checks to also look for the attribute on the decl's
return type.
Additionally, the check for return types that have the warn_unused_result
now excludes pointers and references to such types, as such return types do
not necessarily imply a transfer of ownership for the underlying object
being referred to by the return value. This does not change the behavior
of functions that are directly given the warn_unused_result attribute.
llvm-svn: 234526
|
| |
|
|
|
|
|
| |
This is a follow-up to r233860 which added -lc++abi when using ASan
on Mac, and broke Chromium's ASan build which doesn't use libc++.
llvm-svn: 234521
|
| |
|
|
|
|
|
| |
objc_msgSend's first argument to "Class" because
objc_getClass is passed. rdar://20477025
llvm-svn: 234520
|
| |
|
|
|
|
| |
instead of isel is more efficient in some cases.
llvm-svn: 234509
|
| |
|
|
|
|
|
|
|
| |
type to fold it.
The MaterializeTemporaryExpr can have a different type than the inner
expression, miscompiling the constant. PR23165.
llvm-svn: 234499
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The driver currently accepts but ignores the -freciprocal-math flag.
This patch passes the flag through and enables 'arcp' fast-math-flag
generation in IR.
Note that this change does not actually enable the optimization for
any target. The reassociation optimization that this flag specifies
was implemented by http://reviews.llvm.org/D6334 :
http://llvm.org/viewvc/llvm-project?view=revision&revision=222510
Because the optimization is done in the backend rather than IR,
the backend must be modified to understand instruction-level
fast-math-flags or a new function-level attribute must be created.
Also note that -freciprocal-math is independent of any target-specific
usage of reciprocal estimate hardware instructions. That requires
its own flag ('-mrecip').
https://llvm.org/bugs/show_bug.cgi?id=20912
llvm-svn: 234493
|
| |
|
|
|
|
|
|
| |
Adds ARM Cortex-R4 and R4F support and tests in Clang. Though Cortex-R4
support was present, the support for hwdiv in thumb-mode was not defined
or tested properly. This has also been added.
llvm-svn: 234488
|
| |
|
|
|
|
|
|
|
|
|
| |
This hooks up the /fp options as aliases for -f[no-]fast-math and
-f[no]-trapping-math. It probably doesn't match cl.exe's behaviour
completely (e.g. LLVM is currently never as precise as /fp:precise),
but it's close enough.
Differential revision: http://reviews.llvm.org/D8909
llvm-svn: 234449
|
| |
|
|
|
|
|
|
| |
_CxxFrameHandler3 calls terminate if a cleanup action throws, regardless
of what bits you put in the xdata tables. There's no need to model this
in the IR, since we just have to take it out later.
llvm-svn: 234448
|
| |
|
|
|
|
|
|
|
|
|
| |
The test should be fixed. It was failing in NDEBUG builds due to a
missing '*' character in a regex. In asserts builds, the pattern matched
a single digit value, which became a double digit value in NDEBUG
builds. Go figure.
This reverts commit r234261.
llvm-svn: 234447
|
| |
|
|
|
|
|
| |
redeclaration of property in class extension and to avoid
bogus error. rdar://20469452
llvm-svn: 234440
|
| |
|
|
| |
llvm-svn: 234417
|
| |
|
|
|
|
| |
No need to emit an error message if the variable is redeclared as threadprivate.
llvm-svn: 234402
|
| |
|
|
| |
llvm-svn: 234376
|
| |
|
|
|
|
| |
hierarchy inversion with regards to other catch handlers for the same block.
llvm-svn: 234375
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This affects this test case:
void foo();
template <typename T> class C {
friend inline void foo();
};
inline void foo() {}
C<int> c;
Here, we instantiate the foo friend decl and add it to foo's redecl
chain. However, our previous decl pointer happens to reference the first
declaration of foo, which is not marked inline. When we check to see if
foo was already defined, we implicitly search all previous decls. We
should do the same for the inline check, instead of just checking this
particular previous decl.
Reviewers: rsmith
Differential Revision: http://reviews.llvm.org/D8872
llvm-svn: 234374
|
| |
|
|
|
|
|
|
|
|
| |
A [*] is only allowed in a declaration for a function, not in its
definition. We didn't correctly recurse while looking for it, causing
us to crash in CodeGen instead of rejecting it.
This fixes PR23151.
llvm-svn: 234363
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It breaks down on this test case:
void foo();
template <typename T> class C {
friend void foo();
};
inline void foo() {}
C<int> c;
We shouldn't be marking the instantiation of the friend decl of foo as
inline-specified. It may be possible to fix this by determining if the
full definition is part of the current template, but it seems better to
rever tot green until we come up with a full solution.
This reverts commit r233817, as well as follow-ups r233820 and r233821.
llvm-svn: 234355
|