| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 177005
|
| |
|
|
|
|
|
|
|
|
| |
constructs default arguments. It can now take default arguments from
cl::opt'ions. Add a new -default-gcov-version=... option, and actually test it!
Sink the reverse-order of the version into GCOVProfiling, hiding it from our
users.
llvm-svn: 177002
|
| |
|
|
|
|
|
|
|
| |
emitProfileNotes(), similar to emitProfileArcs(). Also update its comment.
Also add a comment on Version[4] (there will be another comment in clang later),
and compress lines that exceeded 80 columns.
llvm-svn: 176994
|
| |
|
|
|
|
|
|
| |
%v, C1), C2 :
Only combine when the shl is only used by the icmp
llvm-svn: 176950
|
| |
|
|
|
|
| |
that they're more consistent with Value::replaceAllUsesWith.
llvm-svn: 176872
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nadav reported a performance regression due to the work I did to
merge the library call simplifier into instcombine [1]. The issue
is that a new LibCallSimplifier object is being created whenever
InstCombiner::runOnFunction is called. Every time a LibCallSimplifier
object is used to optimize a call it creates a hash table to map from
a function name to an object that optimizes functions of that name.
For short-lived LibCallSimplifier instances this is quite inefficient.
Especially for cases where no calls are actually simplified.
This patch fixes the issue by dropping the hash table and implementing
an explicit lookup function to correlate the function name to the object
that optimizes functions of that name. This avoids the cost of always
building and destroying the hash table in cases where the LibCallSimplifier
object is short-lived and avoids the cost of building the table when no
simplifications are actually preformed.
On a benchmark containing 100,000 calls where none of them are simplified
I noticed a 30% speedup. On a benchmark containing 100,000 calls where
all of them are simplified I noticed an 8% speedup.
[1] http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130304/167639.html
llvm-svn: 176840
|
| |
|
|
|
|
|
|
| |
An invoke may require a table entry. For instance, when the function it calls
is expected to throw.
<rdar://problem/13360379>
llvm-svn: 176827
|
| |
|
|
| |
llvm-svn: 176793
|
| |
|
|
|
|
|
| |
After the recent data-structure improvements, a couple of debugging statements
were broken (printing pointer values).
llvm-svn: 176791
|
| |
|
|
|
|
|
| |
This made us emit runtime checks in a random order. Hopefully bootstrap
miscompares will go away now.
llvm-svn: 176775
|
| |
|
|
|
|
| |
Ignore all DbgIntriniscInfo instructions instead of just DbgValueInst.
llvm-svn: 176769
|
| |
|
|
|
|
|
|
|
| |
We want vectorization to happen at -g. Ignore calls to the dbg.value intrinsic
and don't transfer them to the vectorized code.
radar://13378964
llvm-svn: 176768
|
| |
|
|
| |
llvm-svn: 176765
|
| |
|
|
|
|
| |
r176751. Also, learn a lesson about applying patches by hand/eyeball.
llvm-svn: 176764
|
| |
|
|
|
|
| |
Count the subprograms, not the compile units.
llvm-svn: 176751
|
| |
|
|
|
|
|
|
| |
it. Fortunately, versions of gcov that predate the extra checksum also ignore
any extra data, so this isn't a problem. There will be a matching commit in
compiler-rt.
llvm-svn: 176745
|
| |
|
|
|
|
|
|
| |
domination.
Fixes PR15344.
llvm-svn: 176701
|
| |
|
|
| |
llvm-svn: 176661
|
| |
|
|
| |
llvm-svn: 176660
|
| |
|
|
|
|
|
| |
different size argument list and without attributes in the
arguments.
llvm-svn: 176632
|
| |
|
|
|
|
|
|
|
| |
into the actual gcov file.
Instead of using the bottom 4 bytes as the function identifier, use a counter.
This makes the identifier numbers stable across multiple runs.
llvm-svn: 176616
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes rdar:13349374.
Volatile loads and stores need to be preserved even if the language
standard says they are undefined. "volatile" in this context means "get
out of the way compiler, let my platform handle it".
Additionally, this is the only way I know of with llvm to write to the
first page (when hardware allows) without dropping to assembly.
llvm-svn: 176599
|
| |
|
|
|
|
|
| |
Always print options that differ from their implicit default. At least
for simple option types.
llvm-svn: 176572
|
| |
|
|
|
|
| |
This way, clang -mllvm -print-options shows that the driver is overriding it.
llvm-svn: 176569
|
| |
|
|
|
|
|
|
|
|
| |
When considering folding a bitcast of an alloca into the alloca itself,
make sure we don't shrink the amount of memory being allocated, or
things rapidly go sideways.
rdar://13324424
llvm-svn: 176547
|
| |
|
|
|
|
|
| |
GlobalValue linkage up to ExternalLinkage in the ExtractGV pass. This
prevents linkonce and linkonce_odr symbols from being DCE'd.
llvm-svn: 176459
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Only apply divide bypass optimization when not optimizing for size.
* Fixed bug caused by constant for 0 value of type Int32,
used dividend type to generate the constant instead.
* For atom x86-64 apply the divide bypass to use 16-bit divides instead of
64-bit divides when operand values are small enough.
* Added lit tests for 64-bit divide bypass.
Patch by Tyler Nowicki!
llvm-svn: 176442
|
| |
|
|
|
|
|
|
|
|
| |
The LoopVectorizer often runs multiple times on the same function due to inlining.
When this happens the loop vectorizer often vectorizes the same loops multiple times, increasing code size and adding unneeded branches.
With this patch, the vectorizer during vectorization puts metadata on scalar loops and marks them as 'already vectorized' so that it knows to ignore them when it sees them a second time.
PR14448.
llvm-svn: 176399
|
| |
|
|
| |
llvm-svn: 176397
|
| |
|
|
|
|
| |
Fixes PR15384.
llvm-svn: 176366
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The instcombine recognized pattern looks like:
a = b * c
d = a +/- Cst
or
a = b * c
d = Cst +/- a
When creating the new operands for fadd or fsub instruction following the related fmul, the first operand was created with the second original operand (M0 was created with C1) and the second with the first (M1 with Opnd0).
The fix consists in creating the new operands with the appropriate original operand, i.e., M0 with Opnd0 and M1 with C1.
llvm-svn: 176300
|
| |
|
|
|
|
|
|
|
|
| |
Shadow checks are disabled and memory loads always produce fully initialized
values in functions that don't have a sanitize_memory attribute. Value and
argument shadow is propagated as usual.
This change also updates blacklist behaviour to match the above.
llvm-svn: 176247
|
| |
|
|
| |
llvm-svn: 176240
|
| |
|
|
|
|
|
|
|
|
|
| |
This properly asks TargetLibraryInfo if a call is available and if it is, it
can be translated into the corresponding LLVM builtin. We don't vectorize sqrt()
yet because I'm not sure about the semantics for negative numbers. The other
intrinsic should be exact equivalents to the libm functions.
Differential Revision: http://llvm-reviews.chandlerc.com/D465
llvm-svn: 176188
|
| |
|
|
|
|
|
| |
passing a null pointer to the function name in to GCDAProfiling, and add another
switch onto GCOVProfiling.
llvm-svn: 176173
|
| |
|
|
|
|
| |
not llvm.
llvm-svn: 176172
|
| |
|
|
|
|
| |
functions. For each function name we malloc memory. This patch changes the Libcall map to use BumpPtrAllocator. Now we malloc only once. This speeds up instcombine by a few % on a large c++ program.
llvm-svn: 176170
|
| |
|
|
|
|
| |
clean up this code a tiny bit. No functionality change.
llvm-svn: 176168
|
| |
|
|
|
|
|
|
| |
enhancement done the trivial way; by extending inputs and truncating outputs
which is addequate for targets with little or no support for integer arithmetic
on integer types less than 32 bits.
llvm-svn: 176139
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are two related changes (one in llvm, one in clang).
LLVM:
- rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode)
- rename thread_safety => sanitize_thread
- rename no_uninitialized_checks -> sanitize_memory
CLANG:
- add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis))
- add __attribute__((no_sanitize_thread))
- add __attribute__((no_sanitize_memory))
for S in address thread memory
If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not
set llvm attribute sanitize_S
llvm-svn: 176075
|
| |
|
|
|
|
|
|
|
|
| |
This is a common pattern with dyn_cast and similar constructs, when the
PHI no longer depends on the select it can often be turned into a simpler
construct or even get hoisted out of the loop.
PR15340.
llvm-svn: 175995
|
| |
|
|
|
|
| |
rdar://13273675.
llvm-svn: 175939
|
| |
|
|
|
|
|
|
| |
The 'nobuiltin' attribute is applied to call sites to indicate that LLVM should
not treat the callee function as a built-in function. I.e., it shouldn't try to
replace that function with different code.
llvm-svn: 175835
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Storing the load/store instructions with the values
and inspect them using Alias Analysis to make sure
they don't alias, since the GEP pointer operand doesn't
take the offset into account.
Trying hard to not add any extra cost to loads and stores
that don't overlap on global values, AA is *only* calculated
if all of the previous attempts failed.
Using biggest vector register size as the stride for the
vectorization access, as we're being conservative and
the cost model (which calculates the real vectorization
factor) is only run after the legalization phase.
We might re-think this relationship in the future, but
for now, I'd rather be safe than sorry.
llvm-svn: 175818
|
| |
|
|
| |
llvm-svn: 175804
|
| |
|
|
| |
llvm-svn: 175658
|
| |
|
|
| |
llvm-svn: 175617
|
| |
|
|
| |
llvm-svn: 175568
|
| |
|
|
| |
llvm-svn: 175567
|
| |
|
|
| |
llvm-svn: 175565
|