| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Generalize the API so we can distinguish symbols that are needed just for a DSO
symbol table from those that are used from some native .o.
The symbols that are only wanted for the dso symbol table can be dropped if
llvm can prove every other dso has a copy (linkonce_odr) and the address is not
important (unnamed_addr).
llvm-svn: 191922
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
As discussed in http://llvm-reviews.chandlerc.com/D1754,
this optimization isn't really valid for C, and fires too rarely anyway.
Reviewers: rafael, nicholas
Reviewed By: nicholas
CC: rnk, llvm-commits, nicholas
Differential Revision: http://llvm-reviews.chandlerc.com/D1769
llvm-svn: 191834
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's silly to merge functions like these:
define void @foo(i32 %x) {
ret void
}
define void @bar(i32 %x) {
ret void
}
to get
define void @bar(i32) {
tail call void @foo(i32 %0)
ret void
}
llvm-svn: 191786
|
| |
|
|
|
|
|
|
| |
This makes using array_pod_sort significantly safer. The implementation relies
on function pointer casting but that should be safe as we're dealing with void*
here.
llvm-svn: 191175
|
| |
|
|
|
|
|
|
|
|
|
| |
Wrong cast operation.
MergeFunctions emits Bitcast instead of pointer-to-integer operation.
Patch fixes MergeFunctions::writeThunk function. It replaces
unconditional Bitcast creation with "Value* createCast(...)" method, that
checks operand types and selects proper instruction.
See unit-test as example.
llvm-svn: 190859
|
| |
|
|
|
|
|
|
|
| |
Previous discussion:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/063909.html
Differential Revision: http://llvm-reviews.chandlerc.com/D1191
llvm-svn: 190773
|
| |
|
|
|
|
| |
disabled.
llvm-svn: 190668
|
| |
|
|
|
|
|
| |
This doesn't change anything since malloc always returns
address space 0.
llvm-svn: 190498
|
| |
|
|
|
|
|
|
|
| |
LLVM IR doesn't currently allow atomic bool load/store operations, and the
transformation is dubious anyway because it isn't profitable on all platforms.
PR17163.
llvm-svn: 190357
|
| |
|
|
| |
llvm-svn: 190090
|
| |
|
|
| |
llvm-svn: 190035
|
| |
|
|
|
|
| |
I am about to patch this code, and this makes the diff far more readable.
llvm-svn: 189982
|
| |
|
|
| |
llvm-svn: 189971
|
| |
|
|
|
|
| |
No functionality change.
llvm-svn: 189969
|
| |
|
|
| |
llvm-svn: 189967
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r189886.
I found a corner case where this optimization is not valid:
Say we have a "linkonce_odr unnamed_addr" in two translation units:
* In TU 1 this optimization kicks in and makes it hidden.
* In TU 2 it gets const merged with a constant that is *not* unnamed_addr,
resulting in a non unnamed_addr constant with default visibility.
* The static linker rules for combining visibility them produce a hidden
symbol, which is incorrect from the point of view of the non unnamed_addr
constant.
The one place we can do this is when we know that the symbol is not used from
another TU in the same shared object, i.e., during LTO. I will move it there.
llvm-svn: 189954
|
| |
|
|
|
|
|
|
|
|
| |
Original message:
If a constant or a function has linkonce_odr linkage and unnamed_addr, mark
hidden. Being linkonce_odr guarantees that it is available in every dso that
needs it. Being a constant/function with unnamed_addr guarantees that the
copies don't have to be merged.
llvm-svn: 189886
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch changes the default setting for the LateVectorization flag that controls where the loop-vectorizer is ran.
Perf gains:
SingleSource/Benchmarks/Shootout/matrix -37.33%
MultiSource/Benchmarks/PAQ8p/paq8p -22.83%
SingleSource/Benchmarks/Linpack/linpack-pc -16.22%
SingleSource/Benchmarks/Shootout-C++/ary3 -15.16%
MultiSource/Benchmarks/TSVC/NodeSplitting-flt/NodeSplitting-flt -10.34%
MultiSource/Benchmarks/TSVC/NodeSplitting-dbl/NodeSplitting-dbl -7.12%
Regressions:
SingleSource/Benchmarks/Misc/lowercase 15.10%
MultiSource/Benchmarks/TSVC/Equivalencing-flt/Equivalencing-flt 13.18%
SingleSource/Benchmarks/Shootout-C++/matrix 8.27%
SingleSource/Benchmarks/CoyoteBench/lpbench 7.30%
llvm-svn: 189858
|
| |
|
|
| |
llvm-svn: 189697
|
| |
|
|
|
|
| |
createInternalizePass uses an ArrayRef.
llvm-svn: 189632
|
| |
|
|
|
|
|
|
|
|
|
| |
SCC passes. This patch moves the SLP-vectorizer and BB-vectorizer back into SCC passes for two reasons:
1. They are a kind of cannonicalization.
2. The performance measurements show that it is better to keep them in.
There should be no functional change if you are not enabling the LateVectorization mode.
llvm-svn: 189539
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When unrolling is disabled in the pass manager, the loop vectorizer should also
not unroll loops. This will allow the -fno-unroll-loops option in Clang to
behave as expected (even for vectorizable loops). The loop vectorizer's
-force-vector-unroll option will (continue to) override the pass-manager
setting (including -force-vector-unroll=0 to force use of the internal
auto-selection logic).
In order to test this, I added a flag to opt (-disable-loop-unrolling) to force
disable unrolling through opt (the analog of -fno-unroll-loops in Clang). Also,
this fixes a small bug in opt where the loop vectorizer was enabled only after
the pass manager populated the queue of passes (the global_alias.ll test needed
a slight update to the RUN line as a result of this fix).
llvm-svn: 189499
|
| |
|
|
|
|
| |
Noticed by Stephen Checkoway <s@pahtak.org>.
llvm-svn: 189312
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stale to the point of not working and more resilient to debug info changes.
The current version of StripDeadDebugInfo became stale and no longer actually
worked since it was expecting an older version of debug info.
This patch updates it to use DebugInfoFinder and the modern DebugInfo classes as
much as possible to make it more redundent to such changes. Additionally, the
only place where that was avoided (the code where we replace the old sets with
the new), I call verify on the DIContextUnit implying that if the format changes
and my live set changes no longer make sense an assert will be hit. In order to
ensure that that occurs I have included a test case.
The actual stripping of the dead debug info follows the same strategy as was
used before in this class: find the live set and replace the old set in the
given compile unit (which may contain dead global variables/functions) with the
new live one.
llvm-svn: 189078
|
| |
|
|
| |
llvm-svn: 188957
|
| |
|
|
| |
llvm-svn: 188956
|
| |
|
|
| |
llvm-svn: 188285
|
| |
|
|
|
|
| |
I have moved this logic into clang and opt.
llvm-svn: 188281
|
| |
|
|
| |
llvm-svn: 188198
|
| |
|
|
|
|
| |
Patch by: Mei Ye
llvm-svn: 187764
|
| |
|
|
| |
llvm-svn: 187628
|
| |
|
|
| |
llvm-svn: 187595
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
conditions
Merge consecutive if-regions if they contain identical statements.
Both transformations reduce number of branches. The transformation
is guarded by a target-hook, and is currently enabled only for +R600,
but the correctness has been tested on X86 target using a variety of
CPU benchmarks.
Patch by: Mei Ye
llvm-svn: 187278
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The language reference says that:
"If a symbol appears in the @llvm.used list, then the compiler,
assembler, and linker are required to treat the symbol as if there is
a reference to the symbol that it cannot see"
Since even the linker cannot see the reference, we must assume that
the reference can be using the symbol table. For example, a user can add
__attribute__((used)) to a debug helper function like dump and use it from
a debugger.
llvm-svn: 187103
|
| |
|
|
| |
llvm-svn: 187099
|
| |
|
|
|
|
| |
Thanks to Nick Lewycky for noticing it.
llvm-svn: 187098
|
| |
|
|
|
|
|
|
| |
GlobalOpt simplifies llvm.compiler.used by removing any members that are also
in the more strict llvm.used. Handle the special case where llvm.compiler.used
becomes empty.
llvm-svn: 186778
|
| |
|
|
|
|
|
| |
We were incorrectly using compiler_used instead of compiler.used. Unfortunately
the passes using the broken name had tests also using the broken name.
llvm-svn: 186705
|
| |
|
|
| |
llvm-svn: 186622
|
| |
|
|
|
|
|
|
| |
Duncan pointed out a mistake in my fix in r186425 when only one of the allocas
being compared had the target-default alignment. This is essentially his
suggested solution. Thanks!
llvm-svn: 186510
|
| |
|
|
|
|
|
|
|
|
|
|
| |
For safety, the inliner cannot decrease the allignment on an alloca when
merging it with another.
I've included two variants of the test case for this: one with DataLayout
available, and one without. When DataLayout is not available, if only one of
the allocas uses the default alignment (getAlignment() == 0), then they cannot
be safely merged.
llvm-svn: 186425
|
| |
|
|
| |
llvm-svn: 185888
|
| |
|
|
| |
llvm-svn: 185738
|
| |
|
|
|
|
|
| |
functions. Make the function attributes pass add it to known library functions
and when it can deduce it.
llvm-svn: 185735
|
| |
|
|
| |
llvm-svn: 185612
|
| |
|
|
|
|
| |
specifying the vector size.
llvm-svn: 185606
|
| |
|
|
|
|
|
|
|
|
| |
attributes for the posix call gettimeofday.
This implies annotating it as nounwind and its arguments as nocapture. To be
conservative, we do not annotate the arguments with noalias since some platforms
do not have restrict on the declaration for gettimeofday.
llvm-svn: 185502
|
| |
|
|
| |
llvm-svn: 185414
|
| |
|
|
|
|
| |
argument with the 'returned' attribute (rather than generate invalid IR); however, if both can be eliminated, both will be
llvm-svn: 185290
|
| |
|
|
|
|
|
|
|
|
|
| |
No functionality change.
It should suffice to check the type of a debug info metadata, instead of
calling Verify. For cases where we know the type of a DI metadata, use
assert.
Also update testing cases to make them conform to the format of DI classes.
llvm-svn: 185135
|