- Mar 11, 2012
-
-
Stepan Dyatkovskiy authored
Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default. Added some notes relative to case iterators. llvm-svn: 152533
-
- Mar 10, 2012
-
-
Benjamin Kramer authored
llvm-svn: 152503
-
John McCall authored
track whether the referenced declaration comes from an enclosing local context. I'm amenable to suggestions about the exact meaning of this bit. llvm-svn: 152491
-
John McCall authored
we correctly emit loads of BlockDeclRefExprs even when they don't qualify as ODR-uses. I think I'm adequately convinced that BlockDeclRefExpr can die. llvm-svn: 152479
-
Daniel Dunbar authored
- We do this when it is easy to determine that the backend will pass them on the stack properly by itself. Currently LLVM codegen is really bad in some cases with byval, for example, on the test case here (which is derived from Sema code, which likes to pass SourceLocations around):: struct s47 { unsigned a; }; void f47(int,int,int,int,int,int,struct s47); void test47(int a, struct s47 b) { f47(a, a, a, a, a, a, b); } we used to emit code like this:: ... movl %esi, -8(%rbp) movl -8(%rbp), %ecx movl %ecx, (%rsp) ... to handle moving the struct onto the stack, which is just appalling. Now we generate:: movl %esi, (%rsp) which seems better, no? llvm-svn: 152462
-
- Mar 09, 2012
-
-
Eli Friedman authored
Make sure we update the static local decl address map when we are forced to rebuild a global because of the initializer. <rdar://problem/10957867>. llvm-svn: 152372
-
Eli Friedman authored
Make sure constant emission handles initializer lists with strings correctly. Part of <rdar://problem/10957867>. llvm-svn: 152370
-
Daniel Dunbar authored
- This function is not at all free; pass it around along some hot paths instead of recomputing it deep inside various VarDecl methods. llvm-svn: 152363
-
- Mar 08, 2012
-
-
Rafael Espindola authored
HandleCXXStaticMemberVarInstantiation. Suggested by Argyrios. llvm-svn: 152320
-
Stepan Dyatkovskiy authored
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/136146.html Implemented CaseIterator and it solves almost all described issues: we don't need to mix operand/case/successor indexing anymore. Base iterator class is implemented as a template since it may be initialized either from "const SwitchInst*" or from "SwitchInst*". ConstCaseIt is just a read-only iterator. CaseIt is read-write iterator; it allows to change case successor and case value. Usage of iterator allows totally remove resolveXXXX methods. All indexing convertions done automatically inside the iterator's getters. Main way of iterator usage looks like this: SwitchInst *SI = ... // intialize it somehow for (SwitchInst::CaseIt i = SI->caseBegin(), e = SI->caseEnd(); i != e; ++i) { BasicBlock *BB = i.getCaseSuccessor(); ConstantInt *V = i.getCaseValue(); // Do something. } If you want to convert case number to TerminatorInst successor index, just use getSuccessorIndex iterator's method. If you want initialize iterator from TerminatorInst successor index, use CaseIt::fromSuccessorIndex(...) method. There are also related changes in llvm-clients: klee and clang. llvm-svn: 152298
-
- Mar 07, 2012
-
-
Richard Smith authored
analysis to make the AST representation testable. They are represented by a new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic properties, including full CodeGen support, are achieved for free by this representation. UserDefinedLiterals can never be dependent, so no custom instantiation behavior is required. They are mangled as if they were direct calls to the underlying literal operator. This matches g++'s apparent behavior (but not its actual mangling, which is broken for literal-operator-ids). User-defined *string* literals are now fully-operational, but the semantic analysis is quite hacky and needs more work. No other forms of user-defined literal are created yet, but the AST support for them is present. This patch committed after midnight because we had already hit the quota for new kinds of literal yesterday. llvm-svn: 152211
-
Richard Smith authored
is not usable in a constant expression. ~2.5% speedup on 403.gcc / combine.c. llvm-svn: 152193
-
- Mar 06, 2012
-
-
Ted Kremenek authored
NSNumber, and boolean literals. This includes both Sema and Codegen support. Included is also support for new Objective-C container subscripting. My apologies for the large patch. It was very difficult to break apart. The patch introduces changes to the driver as well to cause clang to link in additional runtime support when needed to support the new language features. Docs are forthcoming to document the implementation and behavior of these features. llvm-svn: 152137
-
- Mar 05, 2012
-
-
Rafael Espindola authored
In the included testcase, soma thinks that we already have a definition after we see the out of line decl. Codegen puts it in a deferred list, to be output if a use is seen. This would break when we saw an explicit template instantiation definition, since codegen would not be notified. This patch adds a method to the consumer interface so that soma can notify codegen that this decl is now required. llvm-svn: 152024
-
- Mar 04, 2012
-
-
Chandler Carruth authored
llvm-svn: 152005
-
Chris Lattner authored
reported by Richard Smith. llvm-svn: 151993
-
- Mar 03, 2012
-
-
Richard Smith authored
scalar emission of DeclRefExprs to const bools: emit scalar bools as i1, not as i8. In addition to the extra unit testing, this has successfully bootstrapped. llvm-svn: 151955
-
- Mar 02, 2012
-
-
Jay Foad authored
types of the pointer arguments. llvm-svn: 151927
-
Daniel Dunbar authored
Revert r151879, r151880, "PR12145: Avoid emitting loads of constexpr variables in contexts where there" and "Fix buildbot: make this test less dependent on the value names in the produced IR." They broke bootstrap. llvm-svn: 151922
-
Richard Smith authored
is no odr-use of the variable. Go slightly beyond what the standard requires for variables of reference type. llvm-svn: 151879
-
- Mar 01, 2012
-
-
Eli Friedman authored
llvm-svn: 151853
-
Kostya Serebryany authored
This flag enables ThreadSanitizer instrumentation committed to llvm as r150423. The patch includes one test for -fthread-sanitizer and one similar test for -faddress-sanitizer. This patch does not modify the linker flags (as we do it for -faddress-sanitizer) because the run-time library is not yet committed and it's structure in compiler-rt is not 100% clear. The users manual wil be changed in a separate commit. llvm-svn: 151846
-
Eric Christopher authored
correctly. Still rdar://10900684 llvm-svn: 151838
-
Eli Friedman authored
Implement "optimization" for lambda-to-block conversion which inlines the generated block literal for lambdas which are immediately converted to block pointer type. This simplifies the AST, avoids an unnecessary copy of the lambda and makes it much easier to avoid copying the result onto the heap. Note that this transformation has a substantial semantic effect outside of ARC: it gives the converted lambda lifetime semantics similar to a block literal. With ARC, the effect is much less obvious because the lifetime of blocks is already managed. llvm-svn: 151797
-
- Feb 29, 2012
-
-
Chad Rosier authored
by the BAA pass, which uses the default TargetLibraryInfo constructor. Unfortunately, the default TargetLibraryInfo constructor assumes all library calls are available and thus ignores -fno-builtin. rdar://10947759 llvm-svn: 151745
-
Daniel Dunbar authored
info.", which broke some -O0 -g tests. llvm-svn: 151730
-
Eric Christopher authored
This currently doesn't handle capturing the 'this' pointer for any enclosing class. Steal the lambda-expressions.cpp testcase and debugify it and try to use more variables to proof it against random changes. Part of rdar://10900684 llvm-svn: 151702
-
Eric Christopher authored
llvm-svn: 151700
-
Eli Friedman authored
llvm-svn: 151674
-
- Feb 28, 2012
-
-
Eli Friedman authored
Prefer bitcast+GEP over ptrtoint+sub+inttoptr: it's semantically equivalent here, and generally nicer to the optimizer. llvm-svn: 151659
-
Daniel Dunbar authored
llvm-svn: 151631
-
Eli Friedman authored
Implement IRGen for the retain-autorelease in the lambda conversion-to-block-pointer outside of ARC. Testcases coming up soon. llvm-svn: 151603
-
Sebastian Redl authored
llvm-svn: 151586
-
- Feb 27, 2012
-
-
-
Eric Christopher authored
Fixes rdar://10934887 llvm-svn: 151519
-
- Feb 26, 2012
-
-
Richard Smith authored
- variant members with nontrivial destructors make the containing class's destructor deleted - check for a virtual destructor after checking for overridden methods in the base class(es) - check for an inaccessible operator delete for a class with a virtual destructor. Do not try to call an anonymous union field's destructor from the destructor of the containing class. llvm-svn: 151483
-
- Feb 25, 2012
-
-
Sebastian Redl authored
This emits a backing array with internal linkage and fills it with data, then has the initializer_list point at the array. Dynamic initialization and global destructors are correctly supported. What doesn't work is nested initializer_lists. I have no idea how to get them to work, either. However, these should be very rare, and so I'll just call it a known bug and declare generalized initializers DONE! llvm-svn: 151457
-
Sebastian Redl authored
llvm-svn: 151456
-
Chad Rosier authored
rdar://10921594 llvm-svn: 151430
-
Eli Friedman authored
Work-in-progress for lambda conversion-to-block operator. Still need to implement the retain+autorelease outside of ARC, and there's a bug that causes the generated code to crash in ARC (which I think is unrelated to my code, although I'm not completely sure). llvm-svn: 151428
-