| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
statements using the "x" constraint.
llvm-svn: 122679
|
|
|
|
| |
llvm-svn: 122670
|
|
|
|
| |
llvm-svn: 122669
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Fix a bug in the emission of complex compound assignment l-values.
Introduce a method to emit an expression whose value isn't relevant.
Make that method evaluate its operand as an l-value if it is one.
Fixes our volatile compliance in C++.
llvm-svn: 120931
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of all the lines of the inline asm. With the refactoring and enhancement
of the backend, we can now reports errors on the correct source line when
an asm contains multiple lines of text. For something like this:
void foo() {
asm("push %rax\n"
".code32\n");
}
we used to get this: (note that the line 4 in t.c isn't helpful)
t.c:4:7: error: warning: ignoring directive for now
asm("push %rax\n"
^
<inline asm>:2:1: note: instantiated into assembly here
.code32
^
now we get:
t.c:5:8: error: warning: ignoring directive for now
".code32\n"
^
<inline asm>:2:1: note: instantiated into assembly here
.code32
^
Note that we're pointing to line 5 properly now. This implements
rdar://7839391 - inline asm errors should point to the right line in the asm
and makes the error message in PR8595 much less confusing.
llvm-svn: 119489
|
|
|
|
| |
llvm-svn: 119464
|
|
|
|
|
|
|
|
|
| |
in asm's. PR 8501, 8602988.
I don't like including Type.h where it is; the idea was
to get references to X86_MMXTy out of the common code.
Maybe there's a better way?
llvm-svn: 117736
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the scope checker. With that done, turn an indirect goto into a
protected scope into a hard error; otherwise IR generation has to start
worrying about declarations not dominating their scopes, as exemplified
in PR8473.
If this really affects anyone, I can probably adjust this to only hard-error
on possible indirect gotos into VLA scopes rather than arbitrary scopes.
But we'll see how people cope with the aggressive change on the marginal
feature.
llvm-svn: 117539
|
|
|
|
|
|
| |
ambiguous context.
llvm-svn: 116567
|
|
|
|
|
|
| |
for Clang side of support.
llvm-svn: 114253
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
slot. The easiest way to do that was to bundle up the information
we care about for aggregate slots into a new structure which demands
that its creators at least consider the question.
I could probably be convinced that the ObjC 'needs GC' bit should
be rolled into this structure.
Implement generalized copy elision. The main obstacle here is that
IR-generation must be much more careful about making sure that exactly
llvm-svn: 113962
|
|
|
|
| |
llvm-svn: 112002
|
|
|
|
| |
llvm-svn: 111768
|
|
|
|
|
|
| |
we have the full fix.
llvm-svn: 110706
|
|
|
|
|
|
|
| |
as well as some significant asymptotic inefficiencies with threading
multiple jumps through deep cleanups.
llvm-svn: 109274
|
|
|
|
|
|
|
|
|
|
|
|
| |
#line 41 "bar.c"
dummy (1, i);
#line 24 "bar.h"
i = f2 (i);
#line 44 "bar.c"
This is tested by step-line.exp in gdb testsuite.
llvm-svn: 109189
|
|
|
|
| |
llvm-svn: 108946
|
|
|
|
|
|
| |
asm operand twice.
llvm-svn: 108489
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
self-host. Hopefully these results hold up on different platforms.
I tried to keep the GNU ObjC runtime happy, but it's hard for me to test.
Reimplement how clang generates IR for exceptions. Instead of creating new
invoke destinations which sequentially chain to the previous destination,
push a more semantic representation of *why* we need the cleanup/catch/filter
behavior, then collect that information into a single landing pad upon request.
Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional
control flow) are generated, since it's actually fairly closely tied in with
the former. Remove the need to track which cleanup scope a block is associated
with.
Document a lot of previously poorly-understood (by me, at least) behavior.
The new framework implements the Horrible Hack (tm), which requires every
landing pad to have a catch-all so that inlining will work. Clang no longer
requires the Horrible Hack just to make exceptions flow correctly within
a function, however. The HH is an unfortunate requirement of LLVM's EH IR.
llvm-svn: 107631
|
|
|
|
|
|
|
|
| |
have CGF create and make accessible standard int32,int64 and
intptr types. This fixes a ton of 80 column violations
introduced by LLVMContextification and cleans up stuff a lot.
llvm-svn: 106977
|
|
|
|
| |
llvm-svn: 106949
|
|
|
|
| |
llvm-svn: 104473
|
|
|
|
|
|
|
| |
This works around a crash where malloc reused the memory of an erased BB for a
new BB leaving old cleanup information pointing at the new block.
llvm-svn: 104472
|
|
|
|
|
|
|
|
| |
emitted the increment expression. Fixes PR7189.
If someone knows how to write a useful test for this, I'd be grateful.
llvm-svn: 104335
|
|
|
|
|
|
|
| |
function does not return. Thanks to Eli for pointing out this corner
case.
llvm-svn: 103941
|
|
|
|
|
|
|
|
|
| |
return statements. We perform NRVO only when all of the return
statements in the function return the same variable. Fixes some link
failures in Boost.Interprocess (which is relying on NRVO), and
probably improves performance for some C++ applications.
llvm-svn: 103867
|
|
|
|
|
|
| |
This is meaningful for blocks. This patch fixes bunch of test failures in gdb testsuite.
llvm-svn: 103533
|
|
|
|
|
|
|
| |
pointer operand. This fixes an abort on
MultiSource/Applications/ClamAV/libclamav_mbox.c.
llvm-svn: 102238
|
|
|
|
|
|
|
|
| |
input and output types when the smaller value isn't mentioned in the
asm string. Extend this support from integers to also allowing
fp values to be mismatched (if not mentioned in the asm string).
llvm-svn: 102188
|
|
|
|
|
|
|
| |
because EmitBranch actually clears the insert point. This version
actually accomplishes what I initially wanted.
llvm-svn: 101998
|
|
|
|
|
|
|
|
|
|
|
| |
(if there's a current block). The chief advantage of doing this is that it
lets us pick blocks (e.g. EH blocks) to push to the end of the function so
that fallthrough happens consistently --- i.e. it gives us the flexibility
of ordering blocks as we please without having to change the order in which
we generate code. There are standard (?) optimization passes which can do some
of that for us, but better to generate reasonable code to begin with.
llvm-svn: 101997
|
|
|
|
| |
llvm-svn: 101100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
have the code generate slap a srcloc metadata on inline asm nodes.
This allows us to diagnose invalid inline asms with such nice
diagnostics as:
<inline asm>:1:2: error: unrecognized instruction
abc incl %eax
^
asm.c:2:12: note: generated from here
__asm__ ("abc incl %0" : "+r" (X));
^
2 diagnostics generated.
llvm-svn: 100608
|
|
|
|
|
|
|
|
| |
EmitReferenceBindingToExpr() rather than assuming we have an
lvalue. This is just the lowest hanging fruit for PR6024, which still
requires a bit of work.
llvm-svn: 99447
|
|
|
|
| |
llvm-svn: 97669
|
|
|
|
|
|
| |
element type always matched the converted LLVM type for ExprType.
llvm-svn: 95596
|
|
|
|
| |
llvm-svn: 95430
|
|
|
|
|
|
|
|
| |
need to deal with aggregates specially; this is consistent with the rest of IRgen.
Also, simplify EmitParmDecl and don't worry about using Decl::getNameAsString.
llvm-svn: 95393
|
|
|
|
| |
llvm-svn: 94920
|
|
|
|
| |
llvm-svn: 94917
|
|
|
|
|
|
|
|
|
|
| |
statements, e.g.,
for(; X x = X(); ) { ... }
Daniel or Anders, please review!
llvm-svn: 89832
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All statements that involve conditions can now hold on to a separate
condition declaration (a VarDecl), and will use a DeclRefExpr
referring to that VarDecl for the condition expression. ForStmts now
have such a VarDecl (I'd missed those in previous commits).
Also, since this change reworks the Action interface for
if/while/switch/for, use FullExprArg for the full expressions in those
expressions, to ensure that we're emitting
Note that we are (still) not generating the right cleanups for
condition variables in for statements. That will be a follow-on
commit.
llvm-svn: 89817
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cleanups for while loops:
1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g.,
while (shared_ptr<WorkInt> p = getWorkItem()) {
// ...
}
2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g.,
while (blah)
RAIIObject raii(blah+1);
llvm-svn: 89800
|
|
|
|
|
|
|
| |
make sure that this variable is destroyed when we exit the switch
statement.
llvm-svn: 89776
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Outside the "if", to ensure that we destroy the condition variable
at the end of the "if" statement rather than at the end of the
block containing the "if" statement.
- Inside the "then" and "else" branches, so that we emit then- or
else-local cleanups at the end of the corresponding block when the
block is not a compound statement.
To make adding these new cleanup scopes easier (and since
switch/do/while will all need the same treatment), added the
CleanupScope RAII object to introduce a new cleanup scope and make
sure it gets cleaned up.
llvm-svn: 89773
|
|
|
|
|
|
|
|
|
| |
rather than burying it in a CXXConditionDeclExpr (that occassionally
hides behind implicit conversions). Similar changes for
switch, while, and do-while will follow, then the removal of
CXXConditionDeclExpr. This commit is the canary.
llvm-svn: 89717
|
|
|
|
| |
llvm-svn: 87087
|
|
|
|
|
|
| |
Now make it permanent and remove old way of inserting intrinsics to encode debug info for locations and types.
llvm-svn: 87007
|
|
|
|
| |
llvm-svn: 86263
|