| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 133110
|
|
|
|
|
|
|
|
|
|
| |
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.
Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.
llvm-svn: 133103
|
|
|
|
|
|
|
| |
- llvm.dbg.declare already receives line number information from ParmDecl
- Additional extra stoppoint messes up gdb's understanding of where function body starts.
llvm-svn: 133065
|
|
|
|
|
|
| |
Emit debug info only if there is an insertion point. The debug info should not force an insertion point. Codegen may later on decide to not emit code for some reason, see extensive comment in CodeGenFunction::EmitStmt(), and debug info should not get in the way.
llvm-svn: 132610
|
|
|
|
|
|
| |
not force an insertion point. Codegen may later on decide to not emit code for some reason, see extensive comment in CodeGenFunction::EmitStmt(), and debug info should not get in the way.
llvm-svn: 132576
|
|
|
|
|
|
| |
memcpy. (Spotted by looking at IR.)
llvm-svn: 132226
|
|
|
|
| |
llvm-svn: 130953
|
|
|
|
|
|
| |
change.
llvm-svn: 130699
|
|
|
|
| |
llvm-svn: 129567
|
|
|
|
| |
llvm-svn: 128921
|
|
|
|
|
|
| |
change.
llvm-svn: 128608
|
|
|
|
|
|
|
|
|
| |
add support for the OpenCL __private, __local, __constant and
__global address spaces, as well as the __read_only, _read_write and
__write_only image access specifiers. Patch originally by ARM;
language-specific address space support by myself.
llvm-svn: 127915
|
|
|
|
|
|
| |
for a local variable.
llvm-svn: 127227
|
|
|
|
|
|
| |
corner cases like the one in PR9301." which caused PR9416.
llvm-svn: 127136
|
|
|
|
|
|
|
|
| |
in order.
This fixes few blocks.exp regressions.
llvm-svn: 126960
|
|
|
|
| |
llvm-svn: 126874
|
|
|
|
|
|
|
|
|
|
| |
in order.
This fixes few blocks.exp regressions.
Reapply r126795 with a fix (one character change) for gdb testsuite regressions.
llvm-svn: 126858
|
|
|
|
| |
llvm-svn: 126848
|
|
|
|
|
|
|
|
| |
in order.
This fixes few blocks.exp regressions.
llvm-svn: 126795
|
|
|
|
|
|
| |
in PR9301.
llvm-svn: 126422
|
|
|
|
|
|
|
|
|
|
| |
invocation function into the debug info. Rather than faking up a class,
which is tricky because of the custom layout we do, we just emit a struct
directly from the layout information we've already got.
Also, don't emit an unnecessarily parameter alloca for this "variable".
llvm-svn: 126255
|
|
|
|
|
|
|
| |
emitting the collection expression. Fixes some really, really broken
code.
llvm-svn: 126193
|
|
|
|
| |
llvm-svn: 126189
|
|
|
|
|
|
|
|
|
|
|
|
| |
_Block_object_* flags; it's just BLOCK_HAS_COPY_DISPOSE or not.
Also, we don't need to chase forwarding pointers prior to calling
_Block_object_dispose; _Block_object_dispose in fact already does
this.
rdar://problem/9006315
llvm-svn: 125823
|
|
|
|
|
|
|
|
|
| |
bugs from other clients that don't expect to see a LabelDecl in a DeclStmt,
but if so they should be easy to fix.
This implements most of PR3429 and rdar://8287027
llvm-svn: 125817
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LabelDecl and LabelStmt. There is a 1-1 correspondence between the
two, but this simplifies a bunch of code by itself. This is because
labels are the only place where we previously had references to random
other statements, causing grief for AST serialization and other stuff.
This does cause one regression (attr(unused) doesn't silence unused
label warnings) which I'll address next.
This does fix some minor bugs:
1. "The only valid attribute " diagnostic was capitalized.
2. Various diagnostics printed as ''labelname'' instead of 'labelname'
3. This reduces duplication of label checking between functions and blocks.
Review appreciated, particularly for the cindex and template bits.
llvm-svn: 125733
|
|
|
|
| |
llvm-svn: 125694
|
|
|
|
|
|
|
|
| |
constructor or destructor.
This patch rewrites r125142.
llvm-svn: 125632
|
|
|
|
|
|
|
|
|
| |
- Have CGM precompute a number of commonly-used types
- Have CGF copy that during initialization instead of recomputing them
- Use TBAA info when initializing a parameter variable
- Refactor the scalar ++/-- code
llvm-svn: 125562
|
|
|
|
|
|
|
|
| |
destructor or copy constructor than let debug info know about it.
Radar 8945514.
llvm-svn: 125142
|
|
|
|
|
|
|
|
| |
Block{Function,Module} base class. Minor other refactorings.
Fixed a few address-space bugs while I was there.
llvm-svn: 125085
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- BlockDeclRefExprs always store VarDecls
- BDREs no longer store copy expressions
- BlockDecls now store a list of captured variables, information about
how they're captured, and a copy expression if necessary
With that in hand, change IR generation to use the captures data in
blocks instead of walking the block independently.
Additionally, optimize block layout by emitting fields in descending
alignment order, with a heuristic for filling in words when alignment
of the end of the block header is insufficient for the most aligned
field.
llvm-svn: 125005
|
|
|
|
|
|
|
|
|
| |
fixing a crash which probably nobody was ever going to see. In doing so,
fix a horrendous number of problems with the conditional-cleanups code.
Also, make conditional cleanups re-use the cleanup's activation variable,
which avoids some unfortunate repetitiveness.
llvm-svn: 124481
|
|
|
|
|
|
|
| |
referenced in the block-literal initializer
of that variable. // rdar://8893785
llvm-svn: 124332
|
|
|
|
|
|
| |
ASTContext::toCharUnitsFromBits() when converting from bit sizes to char units.
llvm-svn: 123720
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
process, perform a number of refactorings:
- Move MiscNameMangler member functions to MangleContext
- Remove GlobalDecl dependency from MangleContext
- Make MangleContext abstract and move Itanium/Microsoft functionality
to their own classes/files
- Implement ASTContext::createMangleContext and have CodeGen use it
No (intended) functionality change.
llvm-svn: 123386
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in asm statements:
register int foo asm("rdi");
asm("..." : ... "r" (foo) ...
We also only accept these variables if the constraint in the asm statement is "r".
This fixes most of PR3933.
llvm-svn: 122643
|
|
|
|
| |
llvm-svn: 122640
|
|
|
|
| |
llvm-svn: 122634
|
|
|
|
|
|
|
|
| |
objects imported into blocks. //rdar://8594790.
Will have a test case coming (as well as one
sent to llvm test suite).
llvm-svn: 120713
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when an initializer is variable (I handled the constant case in a previous
patch). This has three pieces:
1. Enhance AggValueSlot to have a 'isZeroed' bit to tell CGExprAgg that
the memory being stored into has previously been memset to zero.
2. Teach CGExprAgg to not emit stores of zero to isZeroed memory.
3. Teach CodeGenFunction::EmitAggExpr to scan initializers to determine
whether they are profitable to emit a memset + inividual stores vs
stores for everything.
The heuristic used is that a global has to be more than 16 bytes and
has to be 3/4 zero to be candidate for this xform. The two testcases
are illustrative of the scenarios this catches. We now codegen test9 into:
call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 400, i32 4, i1 false)
%.array = getelementptr inbounds [100 x i32]* %Arr, i32 0, i32 0
%tmp = load i32* %X.addr, align 4
store i32 %tmp, i32* %.array
and test10 into:
call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 392, i32 8, i1 false)
%tmp = getelementptr inbounds %struct.b* %S, i32 0, i32 0
%tmp1 = getelementptr inbounds %struct.a* %tmp, i32 0, i32 0
%tmp2 = load i32* %X.addr, align 4
store i32 %tmp2, i32* %tmp1, align 4
%tmp5 = getelementptr inbounds %struct.b* %S, i32 0, i32 3
%tmp10 = getelementptr inbounds %struct.a* %tmp5, i32 0, i32 4
%tmp11 = load i32* %X.addr, align 4
store i32 %tmp11, i32* %tmp10, align 4
Previously we produced 99 stores of zero for test9 and also tons for test10.
This xforms should substantially speed up -O0 builds when it kicks in as well
as reducing code size and optimizer heartburn on insane cases. This resolves
PR279.
llvm-svn: 120692
|
|
|
|
| |
llvm-svn: 120688
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a global is larger than 32 bytes and has fewer than 6 non-zero values in the
initializer. Previously we'd turn something like this:
char test8(int X) {
char str[10000] = "abc";
into a 10K global variable which we then memcpy'd from. Now we generate:
%str = alloca [10000 x i8], align 16
%tmp = getelementptr inbounds [10000 x i8]* %str, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* %tmp, i8 0, i64 10000, i32 16, i1 false)
store i8 97, i8* %tmp, align 16
%0 = getelementptr [10000 x i8]* %str, i64 0, i64 1
store i8 98, i8* %0, align 1
%1 = getelementptr [10000 x i8]* %str, i64 0, i64 2
store i8 99, i8* %1, align 2
Which is much smaller in space and also likely faster.
This is part of PR279
llvm-svn: 120645
|
|
|
|
|
|
|
|
| |
http://llvm.org/bugs/show_bug.cgi?id=279#c3 better.
No functionality change yet.
llvm-svn: 120530
|
|
|
|
|
|
| |
using ConstantInt::get.
llvm-svn: 120527
|
|
|
|
|
|
|
| |
literal declaration caused crash in CodeGen.
This patch fixes it. pr8707
llvm-svn: 120486
|
|
|
|
| |
llvm-svn: 119924
|
|
|
|
|
|
| |
about a __block cxx object.
llvm-svn: 119411
|
|
|
|
| |
llvm-svn: 119174
|
|
|
|
|
|
|
|
|
| |
data members by delaying the emission of the initializer until after
linkage and visibility have been set on the global. Also, don't
emit a guard unless the variable actually ends up with vague linkage,
and don't use thread-safe statics in any case.
llvm-svn: 118336
|