| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
| |
Reference temporaries inherited many properties from the variable that
they correspond to but visibility wasn't one of them.
llvm-svn: 207496
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
A reference temporary should inherit the linkage of the variable it
initializes. Otherwise, we may hit cases where a reference temporary
wouldn't have the same value in all translation units.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3515
llvm-svn: 207451
|
| |
|
|
| |
llvm-svn: 207401
|
| |
|
|
| |
llvm-svn: 207390
|
| |
|
|
| |
llvm-svn: 207360
|
| |
|
|
|
|
|
|
|
|
|
| |
Prior to this patch, CGRecordLower assumed that virtual bases could not
be placed before the nvsize of an object. This isn't true in Itanium
mode, virtual bases are placed at dsize rather than vnsize and in the
case of zero sized non-virtual bases nvsize can be larger than dsize.
This patch fixes CGRecordLowering to avoid an assert and to clip
bitfields properly in this case. A test case is included.
llvm-svn: 207280
|
| |
|
|
|
|
|
|
|
| |
The __yield intrinsic generates a hint instruction to indicate that the thread
is not performing any useful operations at the moment. This is for
compatibility with MSVC, although, the intrinsic is also part of the ACLE, and
is enabled globally as a result.
llvm-svn: 207275
|
| |
|
|
|
|
|
| |
Use the new generic @llvm.arm.hint hint intrinsic rather than the specialised
@llvm.arm.sevl hint instruction.
llvm-svn: 207243
|
| |
|
|
|
|
|
|
|
|
| |
Almost all linkage calculation for VarDecls occured inside of
GetLLVMLinkageVarDefinition except for static data members. Centralize
the logic so that it can be more readily reused.
No functionality change.
llvm-svn: 207241
|
| |
|
|
|
|
|
|
|
|
| |
It turns out that linkage and visibility have rather similar logic for
both functions and non-variable globals. Split the calculation out so
that both sides may share this code.
No functionality change.
llvm-svn: 207239
|
| |
|
|
|
|
|
|
|
|
| |
We don't assign counters for implicit Decls, but we were emitting code
to increment the (non-existent) counters and adding empty counter
lists in the output. This fixes the checks in assignRegionCounters and
emitInstrumentationData to do the right thing, and adds an assert for
the pathological case of emitting zero counters.
llvm-svn: 207203
|
| |
|
|
|
|
|
|
|
|
| |
We were using the same guard variable and failing to initialize the
second global.
Clang is still not MS ABI compatible in this area. Fixing that is
PR16959, which will require LLVM changes to @llvm.global_ctors.
llvm-svn: 207008
|
| |
|
|
|
|
|
| |
'typeof' to extract type of an @encode expression used
in an initializer. // rdar://16655340
llvm-svn: 207004
|
| |
|
|
|
|
|
|
| |
test for arm64_be.
This ensures that r203917 (cpirker "AArch64_be varargs processing for ARM ABI") is ported to ARM64.
llvm-svn: 206961
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We previously treated ARM separately from the generic Itanium ABI for
initializing guard variables. This code duplication led to things like
the ARM path missing the memory barrier for threadsafe handling, and a
highly misleading comment about how we were (mis)using the generic ABI
for ARM64 when really it went through the ARM codepath.
This unifies the two code paths. Functionally, this changes the ARM
and ARM64 codepath to use one byte loads instead of 4 and 8,
respectively, and adds the missing atomic acquire to these loads.
Other architectures are unchanged.
llvm-svn: 206937
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This addresses the feedback to
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140421/103598.html
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3453
llvm-svn: 206920
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This allows callers of Diags.Report() to append a value to the name of
the flag associated with the diagnostic. This is useful in cases like
the -Rpass flag, where we want the diagnostic to show the name of the
pass that matched the pattern. Instead of showing "... [-Rpass]", this
allows us to show "... [-Rpass=passname]".
Reviewers: rsmith
CC: cfe-commits
Differential Revision: http://reviews.llvm.org/D3441
llvm-svn: 206826
|
| |
|
|
|
|
|
|
| |
parts of Clang. I don't really have any opinion about whether using that
macro is good or bad, but its odd that this is the only one, and Eric
seemed happy with just nuking it for now.
llvm-svn: 206806
|
| |
|
|
|
|
|
|
|
|
|
| |
Unlike the standard AAPCS64 ABI, variadic arguments are always passed on the
stack with the Darwin ABI, and this was not being considered when deciding
whether to expand HFA/HVA arguments in a call. An HFA argument with a "float"
base type was being expanded into separate "float" arguments, each of which
was then extended to a double, resulting in a serious mismatch from what is
expected by the va_arg implementation. <rdar://problem/15777067>
llvm-svn: 206729
|
| |
|
|
| |
llvm-svn: 206728
|
| |
|
|
|
|
| |
Cleanup only.
llvm-svn: 206709
|
| |
|
|
|
|
| |
imported from another module, emit an update record, rather than using the broken decl rewriting mechanism. If multiple modules do this, merge the definitions together, much as we would if they were separate declarations.
llvm-svn: 206680
|
| |
|
|
| |
llvm-svn: 206667
|
| |
|
|
|
|
|
|
|
| |
Update clang to use the InstrProfReader from LLVM to read
instrumentation based profile data. This also switches us from the
naive text format to the binary format, since that's what's
implemented in the reader.
llvm-svn: 206658
|
| |
|
|
| |
llvm-svn: 206657
|
| |
|
|
|
|
|
| |
This is one of those DarwinPCS differences. It'd been caught in
arguments, but not return values.
llvm-svn: 206594
|
| |
|
|
|
|
| |
Another AAPCS bug, part of PR19432.
llvm-svn: 206580
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The frontend option -fno-optimize-sibling-calls resolves to -cc1's
-mdisable-tail-calls, which is passed to the TargetMachine in the
backend. PassManagerBuilder was adding the -tailcallelim pass anyway.
Use a new DisableTailCalls option in PassManagerBuilder to disable tail
calls harder.
Requires the matching commit in LLVM that adds DisableTailCalls.
<rdar://problem/16050591>
llvm-svn: 206543
|
| |
|
|
|
|
|
| |
Getting a pointer into a struct at a non-zero offset would try to
use the default address space.
llvm-svn: 206478
|
| |
|
|
|
|
|
|
|
|
| |
My first attempt to make sure HFAs were contiguous was in the block dealing
with padding registers, which meant it only triggered on the first stack-based
HFA. This should extend it to the rest as well.
Another part of PR19432.
llvm-svn: 206456
|
| |
|
|
|
|
|
|
| |
Itanium ABI in 2.9.2 Place of Emission.
Differential Revision: http://reviews.llvm.org/D2750
llvm-svn: 206439
|
| |
|
|
|
|
| |
rdar://problem/16636569.
llvm-svn: 206434
|
| |
|
|
|
|
|
|
|
|
|
|
| |
specializations collect all arguments and not just the ones from the
class template partial specialization from which this class template
specialization was instantiated. The debug info does not represent the
partial specialization otherwise and so specialized parameters would
go missing.
rdar://problem/16636569.
llvm-svn: 206430
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch adds a new flag -Rpass=. The flag indicates the name
of the optimization pass that should emit remarks stating when it
made a transformation to the code.
This implements the design I proposed in:
https://docs.google.com/document/d/1FYUatSjZZO-zmFBxjOiuOzAy9mhHA8hqdvklZv68WuQ/edit?usp=sharing
Other changes:
- Add DiagnosticIDs::isRemark(). Use it in printDiagnosticOptions to
print "-R" instead of "-W" in the diagnostic message.
- In BackendConsumer::OptimizationRemarkHandler, get a SourceLocation
object out of the file name, line and column number. Use that location
in the call to Diags.Report().
- When -Rpass is used without debug info a note is emitted alerting
the user that they need to use -gline-tables-only -gcolumn-info to
get this information.
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3226
llvm-svn: 206401
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function hash should change when control flow changes. This patch
hashes the type of each AST node that affects counters, rather than just
counting how many there are. These types are combined into a small
enumerator that currently has 16 values.
The new hash algorithm packs the enums for consecutively visited types
into a `uint64_t`. In order to save space for new types, the types are
assumed to be 6-bit values (instead of 4-bit). In order to minimize
overhead for functions with little control flow, the `uint64_t` is used
directly as a hash if it never fills up; if it does, it's passed through
an MD5 context.
<rdar://problem/16435801>
llvm-svn: 206397
|
| |
|
|
|
|
|
|
|
| |
This adds a warning that triggers when profile data doesn't match for
the source that's being compiled with -fprofile-instr-use=. This fires
only once per translation unit, as warning on every mismatched
function would be quite noisy.
llvm-svn: 206322
|
| |
|
|
|
|
|
| |
This comment also appears elsewhere where it actually makes sense, and
it's just confusing here.
llvm-svn: 206321
|
| |
|
|
| |
llvm-svn: 206304
|
| |
|
|
|
|
|
|
|
|
| |
Sema does have a CUDALaunchBoundsAttr, but CodeGen was doing nothing with it.
This change translates CUDALaunchBoundsAttr to maxntidx and minctasm
metadata, which NVPTX then translates to the correct PTX directives.
Patch by Manjunath Kudlur.
llvm-svn: 206302
|
| |
|
|
|
|
|
|
|
| |
This is paired with a patch to LLVM that creates a separate pass for
verifying debug info.
<rdar://problem/15500563>
llvm-svn: 206301
|
| |
|
|
|
|
|
|
|
|
| |
This implements clause C.8 of the AAPCS in the front-end, so that Clang
accurately knows when the registers run out and it has to insert padding before
the stack objects begin.
PR19432.
llvm-svn: 206296
|
| |
|
|
|
|
|
|
| |
CapturedStmt was being ignored by instrumentation based profiling, and
its counters attributed to the containing function. Instead, we need
to treat this as a top level entity, like we do with blocks.
llvm-svn: 206231
|
| |
|
|
|
|
|
| |
argument to __builtin_va_arg. Patch by Rahul Jain, some test massaging and
IR emission order changes by me.
llvm-svn: 206223
|
| |
|
|
|
|
|
|
|
| |
for CXXGlobalInit/Dtor helper functions.
This makes _GLOBAL__I_a regain its DW_AT_high/low_pc in the debug info.
Thanks to echristo for catching this!
llvm-svn: 206088
|
| |
|
|
|
|
|
|
|
| |
Until now we were generating duplicate counters for lambdas: one set
in the function where the lambda was declared and another for the
lambda itself. Instead, we should skip over the bodies of lambdas in
their containing contexts.
llvm-svn: 206081
|
| |
|
|
|
|
|
| |
This avoids the overhead of specifying all the traversal code when using
ConstStmtVisitor and makes it a lot easier to maintain this.
llvm-svn: 206039
|
| |
|
|
|
|
|
| |
This treats binary conditional operators in the same way as ternary
conditional operators for instrumentation based profiling.
llvm-svn: 206021
|
| |
|
|
|
|
| |
Thanks dblaikie for the suggestion!
llvm-svn: 206012
|
| |
|
|
|
|
| |
Responding to Richard Smith's review of r205037.
llvm-svn: 206008
|