| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
generally support the C++11 memory model requirements for bitfield
accesses by relying more heavily on LLVM's memory model.
The primary change this introduces is to move from a manually aligned
and strided access pattern across the bits of the bitfield to a much
simpler lump access of all bits in the bitfield followed by math to
extract the bits relevant for the particular field.
This simplifies the code significantly, but relies on LLVM to
intelligently lowering these integers.
I have tested LLVM's lowering both synthetically and in benchmarks. The
lowering appears to be functional, and there are no really significant
performance regressions. Different code patterns accessing bitfields
will vary in how this impacts them. The only real regressions I'm seeing
are a few patterns where the LLVM code generation for loads that feed
directly into a mask operation don't take advantage of the x86 ability
to do a smaller load and a cheap zero-extension. This doesn't regress
any benchmark in the nightly test suite on my box past the noise
threshold, but my box is quite noisy. I'll be watching the LNT numbers,
and will look into further improvements to the LLVM lowering as needed.
llvm-svn: 169489
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uncovered.
This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.
I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.
llvm-svn: 169237
|
|
|
|
|
|
|
| |
Changed the alignment of an LValue to be 64 bits so that we can handle
alignment values up to half of a 64-bit address space.
llvm-svn: 161971
|
|
|
|
|
|
|
|
|
|
|
|
| |
if we want to ignore a result, the Dest will be null. Otherwise,
we must copy into it. This means we need to ensure a slot when
loading from a volatile l-value.
With all that in place, fix a bug with chained assignments into
__block variables of aggregate type where we were losing insight into
the actual source of the value during the second assignment.
llvm-svn: 159630
|
|
|
|
| |
llvm-svn: 159295
|
|
|
|
|
|
| |
testers.
llvm-svn: 153660
|
|
|
|
|
|
|
| |
a complete object, the memcpy needs to use the data size of
the structure instead of its sizeof() value. Fixes PR12204.
llvm-svn: 153613
|
|
|
|
|
|
| |
associated with vector element lvalues. Patch by Kevin Schoedel (with some minor modifications by me).
llvm-svn: 153285
|
|
|
|
|
|
| |
Silences valgrind warnings about uninitalized alignment values.
llvm-svn: 146342
|
|
|
|
|
|
| |
change.)
llvm-svn: 145753
|
|
|
|
|
|
| |
few places over to it.
llvm-svn: 145747
|
|
|
|
|
|
| |
review comment.
llvm-svn: 145741
|
|
|
|
|
|
| |
I'll be introducing uses of the specified alignment soon.
llvm-svn: 145736
|
|
|
|
| |
llvm-svn: 143908
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions. It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.
Most of the effort here is in dealing with the various
clients of the AST. I've gone ahead and simplified the
ObjC rewriter's use of properties; other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily. Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.
I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.
llvm-svn: 143867
|
|
|
|
|
|
| |
better.
llvm-svn: 138628
|
|
|
|
|
|
|
|
|
| |
really shouldn't be optional. Fix the remaining place where a
temporary was being passed as potentially-aliased memory.
Fixes PR10756.
llvm-svn: 138627
|
|
|
|
|
|
|
|
|
|
| |
emit call results into potentially aliased slots. This allows us
to properly mark indirect return slots as noalias, at the cost
of requiring an extra memcpy when assigning an aggregate call
result into a l-value. It also brings us into compliance with
the x86-64 ABI.
llvm-svn: 138599
|
|
|
|
|
|
|
| |
creators to tell us whether something needs GC barriers.
No functionality change.
llvm-svn: 138581
|
|
|
|
| |
llvm-svn: 133144
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
right for anonymous struct/union members led to me discovering some
seemingly broken code in that area of Sema, which I fixed, partly by
changing the representation of member pointer constants so that
IndirectFieldDecls aren't expanded. This led to assorted cleanups with
member pointers in CodeGen, and while I was doing that I saw some random
other things to clean up.
llvm-svn: 124785
|
|
|
|
|
|
| |
the l-value.
llvm-svn: 120884
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
ObjCPropertyRefExpr
into the latter.
llvm-svn: 120643
|
|
|
|
|
|
| |
branches. Fixes PR8623.
llvm-svn: 119408
|
|
|
|
|
|
| |
the patch.
llvm-svn: 117159
|
|
|
|
|
|
| |
statement expressions, //rdar: //8540501
llvm-svn: 117146
|
|
|
|
|
|
|
| |
This enables metadata generation by default, however the TBAA pass
in the optimizer is still disabled for now.
llvm-svn: 116536
|
|
|
|
| |
llvm-svn: 114085
|
|
|
|
| |
llvm-svn: 114061
|
|
|
|
|
|
| |
Prospective fix for broken commit in r114045.
llvm-svn: 114060
|
|
|
|
|
|
| |
AggValueSlot slot.
llvm-svn: 114045
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
don't currently need the bits anyway.
llvm-svn: 112173
|
|
|
|
|
|
| |
old form of MakeAddr().
llvm-svn: 111723
|
|
|
|
|
|
| |
methods.
llvm-svn: 111722
|
|
|
|
| |
llvm-svn: 111719
|
|
|
|
|
|
| |
with isNonGC().
llvm-svn: 111718
|
|
|
|
|
|
|
|
|
| |
the qualifiers.
Also, add CodeGenFunction::MakeAddrLValue() helper function which passes in the
ASTContext.
llvm-svn: 111714
|
|
|
|
|
|
| |
generating lvalue load/stores.
llvm-svn: 111710
|
|
|
|
| |
llvm-svn: 111708
|
|
|
|
|
|
| |
Implements radar 8203301.
llvm-svn: 108917
|
|
|
|
| |
llvm-svn: 102863
|
|
|
|
|
|
| |
bit-field LValues to just store the base address of object containing the bit-field.
llvm-svn: 100745
|
|
|
|
| |
llvm-svn: 100513
|
|
|
|
|
|
|
|
|
| |
- Unfortunately, this requires some horrible code in CGObjCMac which always
allocats a CGBitFieldInfo because we don't currently build a proper layout
for Objective-C classes. It needs to be cleaned up, but I don't want the
bit-field cleanups to be blocked on that.
llvm-svn: 100474
|
|
|
|
| |
llvm-svn: 85901
|
|
|
|
|
|
| |
(objc GC's API).
llvm-svn: 82724
|
|
|
|
|
|
|
|
| |
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.
llvm-svn: 82705
|