| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
struct assignment.
llvm-svn: 164853
|
|
|
|
|
|
| |
See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766
llvm-svn: 164769
|
|
|
|
| |
llvm-svn: 164766
|
|
|
|
| |
llvm-svn: 163983
|
|
|
|
|
|
| |
This allows for setting the default TLS model. (PR9788)
llvm-svn: 159336
|
|
|
|
|
|
|
|
|
|
|
|
| |
literal helper functions. All helper functions (global
and locals) use block_invoke as their prefix. Local literal
helper names are prefixed by their enclosing mangled function
names. Blocks in non-local initializers (e.g. a global variable
or a C++11 field) are prefixed by their mangled variable name.
The descriminator number added to end of the name starts off
with blank (for first block) and _<N> (for the N+2-th block).
llvm-svn: 159206
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for the tls_model attribute. This allows the user to
choose a TLS model that is better than what LLVM would select by
default. For example, a variable might be declared as:
__thread int x __attribute__((tls_model("initial-exec")));
if it will not be used in a shared library that is dlopen'ed.
This depends on LLVM r159077.
llvm-svn: 159078
|
|
|
|
|
|
|
|
|
| |
Because in CUDA types do not have associated address spaces,
globals are declared in their "native" address space, and accessed
by bitcasting the pointer to address space 0. This relies on address
space 0 being a unified address space.
llvm-svn: 157167
|
|
|
|
|
|
|
|
| |
what I'm going to treat as basically universal properties of
array-cookie code. Implement MS array cookies on top of that.
Based on a patch by Timur Iskhodzhanov!
llvm-svn: 155886
|
|
|
|
|
|
|
|
| |
the function body, but do so in a way that doesn't make any assumptions
about the static local actually having a proper, unique mangling,
since apparently we don't do that correctly at all.
llvm-svn: 153776
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These patches cause us to miscompile and/or reject code with static
function-local variables in an extern-C context. Previously, we were
papering over this as long as the variables are within the same
translation unit, and had not seen any failures in the wild. We still
need a proper fix, which involves mangling static locals inside of an
extern-C block (as GCC already does), but this patch causes pretty
widespread regressions. Firefox, and many other applications no longer
build.
Lots of test cases have been posted to the list in response to this
commit, so there should be no problem reproducing the issues.
llvm-svn: 153768
|
|
|
|
|
|
| |
other things which might mess with the variable's type.
llvm-svn: 153733
|
|
|
|
| |
llvm-svn: 153447
|
|
|
|
|
|
|
|
|
|
| |
(Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
|
|
|
|
|
|
| |
rebuild a global because of the initializer. <rdar://problem/10957867>.
llvm-svn: 152372
|
|
|
|
|
|
| |
HandleCXXStaticMemberVarInstantiation. Suggested by Argyrios.
llvm-svn: 152320
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
as constants.
Refactor and simplify all the separate checks for whether a type can be
emitted as a constant.
llvm-svn: 150793
|
|
|
|
|
|
|
|
|
| |
-fno-objc-arc-exceptions. This will allow the optimizer to perform
optimizations which are only safe under that flag.
This is a part of rdar://10803830.
llvm-svn: 150644
|
|
|
|
|
|
|
|
|
|
|
| |
constructor, and that constructor is used to initialize an object of static
storage duration such that all members and bases are initialized by constant
expressions, constant initialization is performed. In this case, the object
can still have a non-trivial destructor, and if it does, we must emit a dynamic
initializer which performs no initialization and instead simply registers that
destructor.
llvm-svn: 150419
|
|
|
|
|
|
| |
CodeGenModule.
llvm-svn: 149943
|
|
|
|
| |
llvm-svn: 149916
|
|
|
|
| |
llvm-svn: 148577
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
APValue::Array and APValue::MemberPointer. All APValue values can now be emitted
as constants.
Add new CGCXXABI entry point for emitting an APValue MemberPointer. The other
entrypoints dealing with constant member pointers are no longer necessary and
will be removed in a later change.
Switch codegen from using EvaluateAsRValue/EvaluateAsLValue to
VarDecl::evaluateValue. This performs caching and deals with the nasty cases in
C++11 where a non-const object's initializer can refer indirectly to
previously-initialized fields within the same object.
Building the intermediate APValue object incurs a measurable performance hit on
pathological testcases with huge initializer lists, so we continue to build IR
directly from the Expr nodes for array and record types outside of C++11.
llvm-svn: 148178
|
|
|
|
|
|
| |
c++ object properties. wip.
llvm-svn: 147750
|
|
|
|
|
|
|
|
| |
currently turned off. // rdar://6137845
Also, fixes a test case which should be nonatomic under
new API.
llvm-svn: 147691
|
|
|
|
|
|
|
| |
the inner decl being a builtin. This is needed to support the glibc headers
in fedora 16 (2.14).
llvm-svn: 146867
|
|
|
|
|
|
| |
appear in non-constant initializers in C++.
llvm-svn: 145087
|
|
|
|
| |
llvm-svn: 144210
|
|
|
|
|
|
|
|
|
|
| |
native representation of integers for the elements. This fixes a bunch of nastiness involving
treating wide strings as a series of bytes.
Patch by Seth Cantrell.
llvm-svn: 143417
|
|
|
|
|
|
| |
double, make sure to use the objc_msgSend_fp2ret function which ensures that the return value will be {0, 0} if the receiver is nil.
llvm-svn: 143350
|
|
|
|
|
|
|
|
|
| |
itself via an asm label.
available_externally functions are supposed to correspond to an external
function, and that is not the case in the examples in pr9614.
llvm-svn: 143049
|
|
|
|
|
|
| |
zero-initialization before running its constructor.
llvm-svn: 141933
|
|
|
|
| |
llvm-svn: 141300
|
|
|
|
| |
llvm-svn: 140502
|
|
|
|
| |
llvm-svn: 140478
|
|
|
|
| |
llvm-svn: 140068
|
|
|
|
|
|
|
|
|
| |
Use a more portable heuristic for deciding when to emit a single
atomic store; it's possible that I've lost information here, but
I'm not sure how much of the logic before was intentionally arch-specific
and how much was just not quite consistent.
llvm-svn: 139468
|
|
|
|
|
|
|
| |
annotate global, local variables, struct fields, or arbitrary statements (using
the __builtin_annotation), rdar://8037476.
llvm-svn: 139423
|
|
|
|
|
|
|
|
|
| |
instead of codegen waiting to consume such a declaration, which won't
happen if that decls are coming from a PCH.
Fixes rdar://10028656.
llvm-svn: 139359
|
|
|
|
|
|
|
|
| |
builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
rather than doing so after the fact. No actual functionality change (yet).
llvm-svn: 138985
|
|
|
|
|
|
|
|
| |
enumerations from the ASTContext into CodeGen, so that we don't need
to serialize it to AST files. This appears to be the last of the
low-hanging fruit for SpecialTypes.
llvm-svn: 137124
|
|
|
|
|
|
|
|
| |
layout of a constant NSString from the ASTContext over to CodeGen,
since this is solely CodeGen's responsibility. Eliminates one of the
unnecessary "special" types that we serialize.
llvm-svn: 137121
|
|
|
|
|
|
| |
Patch by Craig Topper and Sundeep!
llvm-svn: 136856
|
|
|
|
| |
llvm-svn: 136254
|
|
|
|
|
|
| |
Mulder!
llvm-svn: 135855
|
|
|
|
|
|
|
| |
some common llvm types: stringref and smallvector. This cleans up the codebase
quite a bit.
llvm-svn: 135576
|
|
|
|
| |
llvm-svn: 135370
|